flow-go
flow-go copied to clipboard
[Dynamic Protocol State | M2] KV Store upgrade event
Context
To avoid relying on sporks to perform updates of KV store it was designed to use HCU-style upgrades. To support such upgrade we need to define VersionUpgrade field in the KV store and use it to coordinate changes between versions. Node software is operated using specific rules which are called version requirements
https://github.com/onflow/flow-go/issues/5315 addresses how the version upgrade event is handled within the Protocol State Machine. The event originates as a service event from the smart contract; this issue addresses adding the service event.
Definition of Done
- Create a new Cadence service event
ProtocolStateVersionUpgrade(newVersion: UInt)
, which accepts a positive integer value representing the new version after the service event is processed- I'd suggest putting this event (and other Protocol KV setters) in FlowServiceAccount
- Create the
flow-go
model for the event - Implement conversion (https://github.com/onflow/flow-go/blob/master/model/convert/service_event.go#L20)