Skip to content

Explicit versioning of PVF execution environment #917

@pepyakin

Description

@pepyakin

Currently, there is no explicit versioning of the PVF execution environment.

The execution environment (EE) includes (non-exhaustive probably):

  • the set of available host functions for the PVF during execution, as well as their behavior.
  • the shape of the ValidationParams and ValidationOutputs.
  • the validity constraints on those, including time constraints
  • the set of available features for wasm. (i.e. extensions like multi-value, multiple memories, simd, etc).

As soon as we release a new version of node with a different EE we will have a window of time, where there is previous and last version of EE is available at the same time. In case there is a candidate that is valid on newer version of EE and invalid on the previous version, it can lead to disputes.

One potential way to avoid that is to introduce explicit versioning of EE. A version of an EE is an integer. This integer is stored on-chain and can be retrieved via runtime API. To simplify matters, we can put this version into the HostConfiguration which would tie changing this version to session boundaries: all candidates produced within the session will have to be validated with EE of the same version.

Whenever the node version with newer EE has been deployed widely, we can bump the EE version on chain. Validators that do not support the new EE version should abstain in backing, approvals and pre-checking. In that case, they will not receive rewards which should incentivise them to update ASAP.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions