Skip to content
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

[Access] Integrate VersionControl module into the Access node's script execution system #5789

Open
Tracked by #5040
peterargue opened this issue Apr 26, 2024 · 0 comments
Assignees
Labels

Comments

@peterargue
Copy link
Contributor

peterargue commented Apr 26, 2024

Problem Definition

From time to time, the version or cadence or FVM is upgraded on the network. When this happens, the update is typically not backwards compatible, so a Height Coordinated Upgrade (HCU) is needed to coordinate all execution nodes to switch to the new version at the exact same height.

Access nodes also need to ensure they only execute scripts for blocks that are compatible with their current version of cadence. The VersionControl module can provide visibility into which blocks are compatible with the node's current version.

Proposed Solution

Integrate with the VersionControl (#5788) module in the Access node's local script execution system. Before executing a script, the node should check if the block the script was requested for is compatible with the node's current version using the CompatibleAtBlock(height uint64) bool method. If not, it should return an error.

If the check is put in this method https://github.com/onflow/flow-go/blob/master/engine/access/rpc/backend/script_executor.go#L83-L89

then the API's failover mechanism will kick in, allowing for graceful failover to an EN (or rejecting the request if configured with local only)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants