-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Versioning of public types #1544
Comments
Should we use |
This story should also include the ability to configure the block height at which these versions take effect |
We need to make sure we are covering all types that get included in the DB. There are also subtypes, like How can we feel confident that we have caught all relevant types? |
Closes #1544 Addresses breaking changes from FuelLabs/fuel-vm#654 --------- Co-authored-by: Turner <james.mitchell.turner@gmail.com>
Part of: FuelLabs/fuel-core#1544 --------- Co-authored-by: Hannes Karppila <hannes.karppila@gmail.com>
Closes FuelLabs/fuel-core#1544 Addresses breaking changes from FuelLabs/fuel-vm#654 --------- Co-authored-by: Turner <james.mitchell.turner@gmail.com>
We need to make all public complex types like
Block
s,Transaction
s,Input
s,Output
s, andConsensus
to support versioning. It is not related to the primitive types.Using Rust enums for versioning types in the context of blockchains
Enums can be used to version types in the context of blockchains. This is particularly useful for representing changes to the blockchain protocol over time without breaking compatibility with existing nodes.
Example:
Existing code that interacts with the blockchain can use the
ConsensusAlgorithmVersion
enum to determine the specific version of the consensus algorithm that is used for the current block. This allows you to introduce new versions of the consensus algorithm without breaking existing code that handles consensus messages.Benefits of using enums for versioning types
Most of them already are enums. But some of them(like
Block
) - not. In the scope of this task, we need to revise all existing types and decide which ones should be enums and which should not. It may also requirefuel-specs
modifications.Notes:
Add
#[non_exhaustive]
flag.The text was updated successfully, but these errors were encountered: