Repository navigation
chore(node): prove an upgrade keeps its key store - #654
Open
LKSNDRTMLKV wants to merge 1 commit into
Open
LKSNDRTMLKV wants to merge 1 commit into
LKSNDRTMLKV wants to merge 1 commit into
Conversation
Member
Author
[Low impact] This test-only PR appears safe to merge. SummaryThis PR strengthens upgrade tests to check that saved drafts publish and that an upgraded node keeps using the previous release's signing key. No shipped behavior changes.
LKSNDRTMLKV explicitly intends the throwaway localhost fixture key and passphrase to be public. Older fixtures intentionally keep using fresh stores. No actionable issues found. Reviews (1) · Last reviewed commit: "chore(node): prove an upgrade keeps its ..." · Reviewed by Greptile |
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.
Part of #600, the last of its three pull requests. It proves checks 2 and 3 of the 2026-11-19 comment. #600 can close once #648, #650 and this one have merged.
No changelog: test and fixture tooling only. No shipped behaviour changes.
What was unproven
upgrade_fromsent the publish and dropped the answer, so only a5xxfailed it.persist_envelope, always writes the tag, so a v0.16.0 store should open. Nothing tested it:keystore.encand then threw it away.What changes
200, thenstatusactive, then ajwsSignature, for every draft in every fixture. All the drafts in v0.14.0, v0.15.0 and v0.16.0 publish: a stored determination carries noinputHash, and publish computes it again over the content it signs.scripts/capture-upgrade-fixture.shkeeps the key store. It writes it into the fixture askeystore.enc, with its passphrase beside it inkeystore.passphrase..gitignoregains one negation, forcrates/dpp-node/tests/fixtures/upgrade/*/keystore.enconly, with that reason beside it. Every other*.encis still refused.dump.sqlandpublic.jsonare rewritten as a capture does. v0.14.0 and v0.15.0 are not re-captured and keep a fresh store.upgrade_fromuses a fixture's key store when it has one.tempfile::tempdir()before the node opens it, so no test can rewrite the committed file.did:webhost, read from the stored signatures'kid, as an operator upgrading in place would have it.dpp_crypto::jws::resolve_verification_keyandverify_jws, the pair the resolver uses;upgrade_fixture_coverage: the store is optional, but a fixture withkeystore.encmust carry a non-emptykeystore.passphrase, and the reverse.Checked
just checkgreen on this branch (1931 tests passed, 3 skipped, audit included).operator_pathsandupgrade_fixture_coveragepass 12 of 12, with all three fixtures upgrading.cargo fmt --check,bash -nandshellcheckon the script. The script's oneshellchecknote, SC2015, is on a line this pull request does not touch.suspended: it fails withleft: "active".keystore.passphraseremoved: the coverage test fails with "keystore.enc has no keystore.passphrase beside it".For whoever re-captures
On a machine whose
/tmpis a RAM-backed tmpfs, building a release under the defaultmktemp -dcan exhaust memory. ATMPDIRon a filesystem that does not keep Unix permissions also fails: the v0.16.0 node cannot create its local seal directory there. ATMPDIRon an ordinary Linux filesystem works, as does passing a built<bin-dir>.