-
Notifications
You must be signed in to change notification settings - Fork 27
add native stake to d-param #1072
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
base: master
Are you sure you want to change the base?
Conversation
9447854 to
775efeb
Compare
AmbientTea
left a comment
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.
We need to make the d-param and selection pallet versioned for this to be backwards compatible. Let me know if you need support with this.
| impl From<DParamDatum> for sidechain_domain::DParameter { | ||
| fn from(datum: DParamDatum) -> Self { | ||
| match datum { | ||
| DParamDatum::V0 { num_permissioned_candidates, num_registered_candidates } => { | ||
| Self { num_permissioned_candidates, num_registered_candidates } | ||
| DParamDatum::V0 { num_permissioned_candidates, num_registered_candidates } => Self { | ||
| num_permissioned_candidates, | ||
| num_registered_candidates, | ||
| num_native_stake_candidates: 0, | ||
| }, | ||
| DParamDatum::V1 { | ||
| num_permissioned_candidates, | ||
| num_registered_candidates, | ||
| num_native_stake_candidates, | ||
| } => Self { | ||
| num_permissioned_candidates, | ||
| num_registered_candidates, | ||
| num_native_stake_candidates, |
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.
Have you tested upgrading a chain to this version? I'm pretty sure this will break existing chains that use the current 2-value d-param. We need to introduce DParameterV2, bump the selection pallet's version, and modify the Ariadne IDP to be version-aware so it knows what schema of inputs it should provide to the pallet.
4cc909e to
f1e27f1
Compare
f1e27f1 to
b8eccce
Compare
b8eccce to
c4b069f
Compare
Description
Adds third value to D-Param feature. Now it supports native stake (mNIGHT) validators to take part in the consensus.
link
Checklist
changelog.mdfor affected crate