Adding SECP keys for the validators #3807
Unanswered
SkidanovAlex
asked this question in
Ideas
Replies: 3 comments 1 reply
-
The missing piece is the need to update staking pool contract to use new staking action and all validators switching to the new version |
Beta Was this translation helpful? Give feedback.
1 reply
-
I think that it is too early to have BLS keys. We should wait until they become supported by Ethereum first. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Consolidated discussions in https://gov.near.org/t/add-secp-validator-key-to-enable-pessimistic-bridge/401 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For the "pessimistic" bridge we need validators to sign certain messages with SECP256K1 keys. Validators do not have such keys today, and here I propose one way to transition to a state in which validators do have the keys, and the keys are committed to on chain.
Step1: Adding the keys
Add a new field to the EpochInfo:
validator_extra_keys: HashMap<AccountId, ValidatorExtraKeys>
, whereValidatorExtraKeys
isstruct { secp_key: Option<SECP256K1PublicKey>, bls_key: Option<BLS12381PublicKey> }
Add a new action
StakeAction2 { stake: Balance, public_key: ED25519PublicKey, secp_key: SECP256K1PublicKey, bls_key: BLS12381PublicKey }
After this action, there’s all the information necessary to populate
validator_extra_keys
If the old
StakeAction
is used, the secp and bls keys are set toNone
.To support the existing staking pools, that are built with the
StakeAction
, add a new actionSetValidatorExtraKeys { account_id: AccountId, validator_key: ED25519PublicKey, secp_key: SECP256K1PublicKey, bls_key: BLS12381PublicKey, signature: ED25519Signature }
When this action is executed, it locates an existing validators and validator proposals matching the
account_id
andvalidator_key
, validates that thesignature
is a valid signature on all the fields excluding signature concatenated using the validator public key, and stores the secp key and the bls key in the epoch manager.Update the tooling in
nearcore
to generate secp and bls keys when generatingvalidator_info.json
.Add support for
StakeAction2
into explorer and other tools. Note that this can be done before the upgrade, since before the upgrade the new enum variant will never be present.Once the changes are made, the upgrade can initially just proceed by rolling out the new binary. We then work with the validators to issue
SetValidatorKeys
command. Post-upgrade we update the documentation to reflect the necessity of this step.Step2: Adding the logic for the bridge
Once all the validators have provided the extra keys, we can roll out the change needed for the bridge. The change itself is outside of the scope of this discussion.
Beta Was this translation helpful? Give feedback.
All reactions