-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat(sequencer): Add new validator update action #1679
base: main
Are you sure you want to change the base?
Conversation
power, | ||
name, | ||
} = value; | ||
if name.len() > MAX_VALIDATOR_NAME_LENGTH { |
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.
Should we explicitly check against chars()
, or is 32 bytes fine?
}, | ||
Protobuf, | ||
}; | ||
|
||
pub mod group; | ||
|
||
const MAX_VALIDATOR_NAME_LENGTH: usize = 32; |
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.
Just a note that I thought this might be a bit short, but did some research and I don't think there is any validator in top 100 for celestia with a longer name, so probably fine.
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.
Thinking a bit outside the box on breaking changes here:
Technically speaking the ValidatorUpdateV2
action is not a wire breaking change. I think I said we should introduce this as a whole new action, and I still believe we should take ownership over it but fields 1 and 2 are the same. Should we instead just replace the type (will make buf mad I believe because I think I enforced higher level than this for the module than just wire.
But if we do that and don't add a whole new action, we could have this update be built into the oracle upgrade as well and just not do any database state on the name until the fork is triggered? This requires the upgrade logic to be added.
Noting that I'm holding off on further work on this until upgrade logic and DB changes are landed. |
Summary
Changed action
ValidatorUpdate
to include a name and moved it to our proprietary action types.Background
Previously, validator names were not stored app-side, and names could only be set in CometBFT genesis.
Changes
ValidatorUpdate
and moved it fromastria_vendored
toastria
.ValidatorNames
struct, which containsaddress <> name
key-value pairs.ValidatorNames
.ValidatorSet
to useinsert
instead ofpush_update
so that it doesn't imply any ordering.Testing
VALIDATOR_NAMES
storage keyvalidator_name_request
.ValidatorUpdate
.Related Issues
closes #1590