This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
Allow producers to register WTMsig block signing authorities in system contract #349
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rities to eosio.bios and eosio.system contracts. The setprods action of eosio.bios contract has been modified to support block signing authorities in a way that is not backwards compatible. The regproducer action of eosio.system contract is backwards compatible for valid submitted producer keys. A new regproducer2 action has been added to eosio.system contract to support registering a block signing authority to a producer. Both the eosio.bios and eosio.system contract now depend on the set_proposed_producers_ex intrinsic and therefore can only be deployed on an EOSIO chain that has activated the WTMSIG_BLOCK_SIGNATURES protocol feature.
tbfleming
approved these changes
Oct 1, 2019
b1bart
suggested changes
Oct 2, 2019
…elax validation rules on keys. Also use the new CDT `is_valid` member function of `block_signing_authority_v0` to validate the user-submitted block signing authorities (requires bumping dependency on CDT). Changes to tests to reflect the fact that `set_proposed_producers_ex` now accepts authorities even with invalid keys (requires bumping dependency on EOSIO).
this PR also closes #296 |
b1bart
approved these changes
Oct 3, 2019
3 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
Change
setprods
action of the eosio.bios contract to take a vector ofeosio::producer_authority
instead and use the newset_proposed_producers_ex
intrinsic to propose producer schedules using weighted threshold multisig block signing authorities.Add the
regproducer2
action to the eosio.system contract to allow block producers candidates to register a weighted threshold multisig block signing authority instead of just a single block signing key. The oldregproducer
action is still usable.Deployment Changes
The eosio.system contract and eosio.bios contract can now only be deployed on an EOSIO chain that has activated the
WTMSIG_BLOCK_SIGNATURES
protocol feature.API Changes
The eosio.bios contract's
setprods
action now takes a vector ofeosio::producer_authority
as theschedule
rather than a vector ofeosio::producer_key
.The eosio.system contract adds a new action
regproducer2
which does the same thing as the existingregproducer
action except that it allows the block producer candidate to register a weighted threshold multisig block signing authority rather than just a single block signing key.This PR also adds a binary extension field
producer_authority
to theproducers
table of the eosio.system contract and it subtly changes the meaning of theproducer_key
field. Theproducer_key
will still be set as it was before if the block producer candidate uses theregproducer
action to register a block signing key or even if theregproducer2
action is used to set a block signing authority consisting of a single key (that single key is repeated inproducer_key
). However, if a block signing authority with multiple keys is registered, thenproducer_key
will be set to the null key (the same key it would have if the block producer candidate was disabled throughunregprod
orrmvproducer
).The changes in this PR introduce both variants (through
block_signing_authority
) and binary extensions (two new features of ABI 1.1) to the eosio.system contract ABI. They also introduce variants (through theauthority
field ofproducer_authority
) to the eosio.bios contract ABI. Clients must be able to parse v1.1 ABIs to interact with this new version of the system contract.Documentation Additions