[release-v2.1] main: Use backported standalone updates. - #3767
Merged
davecgh merged 5 commits intoAug 18, 2026
Conversation
Previously the session expiry would always be set to max uint32 due to the prs slice never being appended, thus iterating over it having no effect.
This updates the 2.1 release branch to use the latest version of the mixing module which includes a fix for a potential periodic deanonymization attack and improved session expiry. In particular, the following updated module version is used: - github.com/decred/dcrd/mixing@v0.7.4
Transactions with input values that are negative or greater than the max supply ultimately will always eventually end up invalid by checks performed much later in the validation process. Moreover, the aforementioned conditions are entirely context free. Given that, it is much more efficient and robust to simply reject any transactions that violate them as early as possible in the validation process. The context-free transaction sanity checks are the ideal location since they are among the earliest validation checks that are performed. However, unconfirmed transactions are allowed to leave the input value set to the special sentinel value of -1 (wire.NullValueIn) that signals the actual value will be filled in later. The sanity checks take place before that information is available to populate, so that case needs to be exempted and left for the later checks to reject as they already do now. With that in mind, this modifies CheckTransactionSanity to reject transactions that violate those conditions accordingly. It also adds ErrFraudAmountIn to uniquely identify when checks fail validation for that reason. Finally, it modifies the rule error conversion in the internal blockchain code to recognize and convert the new error.
This adds a few additional tests for transaction sanity checking to ensure negative values, except the special sentinel value, and values greater than the max supply are rejected as expected.
This updates the 2.1 release branch to use the latest version of the blockchain/standalone module which includes an update to reject obviously impossible values very early in the validation process. In particular, the following updated module version is used: - github.com/decred/dcrd/blockchain/standalone@v2.3.0
jrick
approved these changes
Aug 18, 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.
This updates the 2.1 release branch to use the latest version of the
blockchain/standalonemodule which includes an update to reject obviously impossible values very early in the validation process.In particular, the following updated module version is used:
The following PRs are included: