-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stake-contract: add support for multisig #2312
Conversation
399814e
to
2cf892c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - using BLS multisig might lead to a more pervasive change when we swap the signature scheme for transactions (for example to ECDSA), but we will think of that when we'll cross that bridge
2cf892c
to
7c6f3a8
Compare
ba4fef9
to
69764d4
Compare
- Change `Stake` to have both funds key and account key - Change `Stake` to use `BlsMultiSignature` - Change `Withdraw` to use `BlsMultiSignature`
Additionally: - change the `reward` and `slash` calls to panic if no stake is found - change `stakes` call to return `StakeKeys` instead of `BlsPublicKey` as key - add `get_stake_keys` call
6f82d63
to
b4bc48f
Compare
@ureeves @autholykos I had to add stake-contract: allow to change funds_key when restaking to not lock-in the stake to a specific key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The only keys required to run a node are the so called "provisioner keys"
Basically they are a BLS keypair stored on a node machine.
If the node got compromised, the key pair can be used to move stake funds to a different address
With this PR, instead, the "provisioner keys" would only be used to sign consensus messages.
Indeed, any other operation like "unstake/withdraw" requires to be multisigned with an additional key (aka "funds key") that is enrolled during the "stake" operation
In order to not introduce any breaking change into our wallet, the current execution-core library still has
Stake::new
that takes just a single key, and consider the "funds key" to be the same.Future implementation of execution-core can handle the funds key properly