fuel-core
fuel-core copied to clipboard
Decide on how to perform a forkless upgrade
Maybe via Transaction::Upgrade
. How can we later add governance on top of that? What to do with a huge size of the byte code? How does the network know what is the current bytecode hash?
Maybe this should be a v2 of the upgradeability epic? It seems like we should be able to enable this in the future with a regular hard-fork.
We've decided to split the updating of the consensus parameters and WASM bytecode into separate processes.
The BlockHeader
will contain the consensus_parameters_version: u32
and state_transition_bytecode_version: u32
fields as part of the application hash.
The upgrade transaction will post a serialized version of the consensus parameters. By default, we will use postcard
to serialize it. The version will be automatically increased for the next block. The state transition will advance the version by one based on the current block header during the processing of the upgrade transaction.
The state transition function will verify that the block header uses the latest version by checking that a higher version doesn't exist.
Relayed following taks:
- https://github.com/FuelLabs/fuel-core/issues/1753
- https://github.com/FuelLabs/fuel-core/issues/1754