Repository navigation
feat(evidence-plugin): mark the ledger's format and refuse a newer one; say there is no downgrade (#308) - #309
Merged
Merged
Conversation
…e; say there is no downgrade (#308) The build before the checkpointed-local-log 0.6 stack cannot read a ledger the 0.6 build wrote and takes a node with a required capsules plugin down. A ledger/format marker now makes a build that meets a newer format stop with a message naming the cause, and the changelog says to back the data directory up before upgrading. Signed-off-by: Ethan Zhang <github@yzhang.io>
ethanyzhang
requested review from
StevenMih,
i386,
michaelneale and
ndizazzo
as code owners
November 18, 2026 20:32
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…story moves it, write the marker atomically, say export-flat is no way back (#308) Signed-off-by: Ethan Zhang <github@yzhang.io>
…its test (#308) Signed-off-by: Ethan Zhang <github@yzhang.io>
… stops the node (#308) Signed-off-by: Ethan Zhang <github@yzhang.io>
… the no-downgrade paragraph apart (#308) Signed-off-by: Ethan Zhang <github@yzhang.io>
Collaborator
Author
|
Review record (caps-308), PR #309, final head 39544b2.
review: rounds 2, accepted 4, declined 0, pre-existing 0; classes: check ordering, non-atomic write, doc disagrees with code; record: this comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #308.
Problem. A node that ran the #300/#302 build cannot start on the previous plugin: the older build reads the new checkpoint
subas a failed COSE check, andcapsulesis a required plugin, so the node stops.Change.
ledger/formatmarker (ledger_format.rs): written at ledger open (CapsuleState::open, before any store is opened); a build that meets a higher number refuses withthis ledger was written by a newer plugin (...); downgrade is not supported: ...and leaves the ledger as it was. Format 1 is the 0.6 stack. No peer reads it; nothing signed or served changes.ledger/andkeys/before upgrading; a new Added entry describes the marker and says it cannot protect a rollback to builds that predate it.chain_store/tests.rstree()skips the marker like the lock files (the "flat files are untouched" test is about history files).Tests.
ledger_formatunit tests (stamp, refuse newer, unreadable and older marker) andopen_refuses_a_ledger_written_in_a_newer_format(CapsuleState::open).cargo testincrates/evidence-plugin: exit 0, 1517 passed;cargo clippy --all-targetsandcargo fmt --checkexit 0.Not changed: no read-only mode (new machinery,
capsulesstays required). Public text (changelog wording) and the door confirmation are with Sherlock2; merge waits for both.