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

[Bootstrapping] Spork root block view extends previous spork #6784

Open
Tracked by #6772
jordanschalm opened this issue Dec 5, 2024 · 0 comments
Open
Tracked by #6772

[Bootstrapping] Spork root block view extends previous spork #6784

jordanschalm opened this issue Dec 5, 2024 · 0 comments
Labels
Preserve Stale Bot repellent Protocol Team: Issues assigned to the Protocol Pillar.

Comments

@jordanschalm
Copy link
Member

jordanschalm commented Dec 5, 2024

Context

The bootstrapping tooling generates a root block for a spork. The root block provides a flag --root-height, which is used to manually pass in the height extending the final block of the prior spork, ensuring block heights are not repeated. By contrast, the block view is reset to 0 every spork, so subsequent sporks re-use view numbers.

In Mainnet25, we released the Protocol KV Store, which includes a view-based mechanism for determining its version over time. The KV Store version cannot be downgraded, and we rely on the fact that views are strictly increasing over time for safety. Currently the KV Store Upgrade mechanism (which also supports "Protocol HCU"s) is incompatible with the current practice of resetting the view count every epoch.

⚠️ Caution: Because views have been reset for a long time, there are known and (we should assume) unknown instances in our codebase where components assume root blocks have a zero view. Here is a non-exhaustive list of examples:

Definition of Done

  • Implement a mechanism for injecting an initial view into the root block during sporks
    • simplest is a CLI flag + manual process, as we do for height, but it would be great to automate both
  • Update components/test which assume spork root blocks have 0 view
@jordanschalm jordanschalm added Protocol Team: Issues assigned to the Protocol Pillar. Preserve Stale Bot repellent labels Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Preserve Stale Bot repellent Protocol Team: Issues assigned to the Protocol Pillar.
Projects
None yet
Development

No branches or pull requests

1 participant