Skip to content

[release-v2.1] main: Use backported standalone updates. - #3767

Merged
davecgh merged 5 commits into
decred:release-v2.1from
davecgh:rel121_standalone_backports
Aug 18, 2026
Merged

[release-v2.1] main: Use backported standalone updates.#3767
davecgh merged 5 commits into
decred:release-v2.1from
davecgh:rel121_standalone_backports

Conversation

@davecgh

@davecgh davecgh commented Aug 18, 2026

Copy link
Copy Markdown
Member

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

The following PRs are included:

jholdstock and others added 5 commits May 17, 2026 00:51
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
@davecgh davecgh added this to the 2.1.6 milestone Aug 18, 2026
@davecgh davecgh changed the title Rel121 standalone backports [release-v2.1] main: Use backported standalone updates. Aug 18, 2026
@davecgh
davecgh merged commit 78e7f02 into decred:release-v2.1 Aug 18, 2026
66 of 68 checks passed
@davecgh
davecgh deleted the rel121_standalone_backports branch August 18, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants