FuelLabs / fuel-core

Rust full node implementation of the Fuel v2 protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgradable consensus parameters

xgreenx opened this issue · comments

  • Make ConsensusParameters and GasCost versionable(fuel-vm and fuel-core).
  • Create a new type of the transaction that allow permissioned upgrade of consensus parameters. It gasless, it should support predicates and signatures(it should be customisable).
  • Add new table to store CP. Update application block header to contain version of the CP. Implement simple increasing of the version during procession of a new transaction. Update block producer and executor to use a new CP from the table.

I feel like versions for CP could mean two things: change the values, but have the same fields, or add a new type with different/ new fields.

What are we thinking here?

It means both. The main point is to indicate that there are new consensus parameters. How exactly they look like is defined by serialization and deserialization.

It means both. The main point is to indicate that there are new consensus parameters. How exactly they look like is defined by serialization and deserialization.

Meaning that the mapping of a version to the params is for the serialized parameters and not for the current Rust type?

Yes. The database will contain a table where the key is a version, and the value is serialized consensus parameters.