fix(validator): give each compose validator a distinct Golden secret share - #2411
Merged
Conversation
…share
The insecure Golden storage-key fixture shipped a single secret-share.wire
that compose mounted into all three validators, so every validator held the
same participant share. Any 2-of-3 recovery then collapses to one participant
and the combiner rejects it — threshold recovery was silently impossible even
though each validator stored encrypted records.
Split the fixture into per-participant secret shares (validator-{1,2,3}/
secret-share.wire) sharing one setup-context/public-key-set, and point each
compose validator at its own share. The top-level secret-share.wire (== the
participant-1 share) is kept so single-validator tooling like the CI benchmark
smoke test is unchanged. An ignored test regenerates the fixture from the
existing deterministic tests::values_for helper.
Satisfy the workspace clippy disallowed-methods lint (fs_err over std::fs) and the nightly rustfmt import layout.
Mirko-von-Leipzig
approved these changes
Jul 30, 2026
huitseeker
approved these changes
Jul 30, 2026
huitseeker
left a comment
Contributor
There was a problem hiding this comment.
Makes sense to me, accepting to unblock.
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.
Summary
The insecure Golden storage-key fixture (
scripts/testdata/insecure-golden-storage-key/) ships a singlesecret-share.wire, andcompose/validator.ymlmounts that same directory into all three validators, pointing each at the samesecret-share.wire. So every validator boots holding the identical participant secret share.With a 2-of-3 threshold key, recovery needs two shares from distinct participants. When all three validators hold the same share, any two collected shares are the same participant, and the
Combinerrejects them — so threshold recovery of a stored record is silently impossible, even though each validator does correctly store its encryptedTransactionInputs.I hit this bringing up the demo network against
admin-private-record-share-rpc(#2407): listing records worked, each validator issued a share, but combining any two always failed because they were the same participant. Giving each validator a distinct share makes 2-of-3 recovery succeed end to end.Changes
validator-1/secret-share.wire,validator-2/secret-share.wire,validator-3/secret-share.wire, sharing onesetup-context.wireandpublic-key-set.wire.compose/validator.yml: each validator now pointsMIDEN_VALIDATOR_STORAGE_KEY_SECRET_SHAREat its ownvalidator-<n>/secret-share.wire.secret-share.wireis kept (identical tovalidator-1/secret-share.wire), so single-validator tooling — including the CI benchmark smoke test, which is left untouched — keeps working.#[ignore]d teststorage_key::tests::write_insecure_golden_fixturethat regenerates all fixture files deterministically from the existingtests::values_forhelper, so the fixture stays reproducible with the node's own code (same secp256k1 params, epoch0909…).The shared
setup-context.wire/public-key-set.wirebytes are unchanged — the split only adds the two additional participants' shares thatvalues_for(2)/values_for(3)already implied.Testing
cargo test -p miden-validator --lib storage_key::tests::write_insecure_golden_fixture -- --ignoredregenerates the fixture; the existingoperator_keys()path already validates all three shares against the shared public set.TransactionInputs. With the previous single-share fixture the same combine failed as below-threshold.Changelog