-
Notifications
You must be signed in to change notification settings - Fork 85
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
contracts: only require BLS key to remove staker #2420
base: main
Are you sure you want to change the base?
Conversation
043cc65
to
01e77fe
Compare
Changes solidity code (incl. solidity tests) but no updates to bindings and rust code yet.
01e77fe
to
ec726f7
Compare
Ensure that the implementations of these functions to load initial stake table and stake table update are actually exercised in tests.
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 but left a question
@@ -221,6 +207,36 @@ impl From<PeerConfigKeys<BLSPubKey>> for NodeInfoJf { | |||
} | |||
} | |||
|
|||
pub fn bls_jf_to_sol(bls_vk: BLSPubKey) -> permissioned_stake_table::G2Point { |
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.
what does this mean? bls_jf_to_sol
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.
Converting the jellyfish type of BLSPubKey to the solidity type.
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.
Since neither of these types are owned by this crate we can't implement the From
due to the orphan rule. I think it gets somewhat confusing if we create too many type wrappers so just opted for a function here.
When removing a staker from the permissioned stake table the staker is identified by the BLS pub key. It's therefore not necessary to pass any other information to the contract to remove a staker. This PR removes the redundant information that was previously required to remove stakers.