Test that proofsForTransactions() does not modify the UTXO set tree along a growing chain - #2493
Merged
kushti merged 1 commit intoSep 1, 2026
Conversation
11 tasks
Contributor
Author
|
CI note: the red job is
This PR only adds one property to |
kushti
approved these changes
Sep 1, 2026
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.
Addresses #1614.
What was already covered, and what was missing.
UtxoStateSpecificationalready checks that aproofsForTransactions()call does not change the state digest on a fresh state ("proofsForTransactions() does not change state digest") and that it is deterministic there ("proofsForTransactions() to be deterministic"). No test checked the same invariants while a chain grows - a tree with real history, with proofs generated between block applications, which is how the node actually uses it. I asked about this reading of the scope in an issue comment on 2026-08-11 and heard no objection.The new property,
proofsForTransactions() does not modify the UTXO set tree along a growing chain, builds a chain of valid full blocks the same way the neighbouring concurrency test does, and at every height asserts:rootDigestbefore == after);stateRoot = adDigest,ADProofsRoot = ADProofs.proofDigest(...)) is accepted byapplyModifier, and the state lands exactly on the promised digest.On the numbers in the issue: the literal 500 blocks x 500 transactions would take hours in CI, so the chain here is 20 blocks with the standard generator transactions - the invariants are the same at any scale, and the length is a one-line constant. Happy to raise it, or to add an
ignoredlong-run variant with the literal numbers, if preferred.Verified the test bites: injecting a mutation into
proofsForTransactions(staging an extraInserton the persistent prover and committing it) makes the property fail on the root check; on clean master it is green, and the fullUtxoStateSpecificationsuite passes locally (22/22).Note: the issue shows a years-old assignee with no linked work; if that work is still planned I am happy to defer.