-
Notifications
You must be signed in to change notification settings - Fork 69
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
dynamic versioning #1878
dynamic versioning #1878
Conversation
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.
Looks good overall. There is a little bit of duplication w/ #1872, so I'd like to look through one more time after that gets merged. Should be a smaller change set at that time.
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.
Looks good. Just a couple of minor comments regarding the aliases.
types/src/v0/mod.rs
Outdated
|
||
#[derive(Debug, Copy, Clone)] | ||
pub struct SequencerVersions; | ||
pub type BaseV01UpgradeV02 = SequencerVersions<StaticVersion<0, 1>, StaticVersion<0, 2>>; |
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 we are defining aliases for these, it might be a little easier to keep in sync if we use the alias everywhere.
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.
this is used for test network mostly
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.
I think I should rename it to MockSequencerVersions
This PR:
SequencerApiVersion
is currently hardcoded as V0.1 for all APIs.main
function torun
in binaries that require a protocol version, run() accepts a generic parameter V that implements the Versions trait. This allows matching and initializing versions from the genesis.toml file using the appropriate type. This can be replaced with a macroFiles to review:
all files mostly but primary focus on genesis.toml config, SequencerVersions type and main functions in all binaries.
test:
Run the demo native locally to ensure everything functions as expected.