github decred/dcrd release-v2.1.7
dcrd v2.1.7

5 hours ago

This is a patch release of dcrd that includes the following notable changes:

  • Several fixes for network and mixing-related denial-of-service (DoS) attacks
  • Improved mixing performance
  • Resolves a memory leak that accumulates slowly over time
  • Corrects the test network initial synchronization issue introduced in v2.1.6
  • Adds extensive safeguards against unexpected transaction spends

Upgrade Highly Recommended

Miners, stakeholders, and anyone running a full node are strongly encouraged to upgrade to this release. It includes multiple fixes for potential denial-of-service (DoS) attacks that could disrupt node operation.

Miners, in particular, are at risk of having their template generation stalled.

Spend Safeguards

In response to the previous inflation bug, this release adds extensive safeguards designed to detect unexpected transaction spends that should not be possible. When these safeguards detect certain unexpected conditions, the affected node will shut down rather than continue operating in a potentially
unsafe state.

These safeguards would have prevented the previous inflation bug by causing all affected nodes to halt when they encountered the invalid spend. They are also designed to catch a broader range of potential problems that could otherwise go unnoticed.

Changelog

This patch release consists of 87 commits from 6 contributors which total to 161 files changed, 7389 additional lines of code, and 4543 deleted lines of code.

All commits since the last release may be viewed on GitHub here.

Protocol and network:

Transaction relay (memory pool):

Mixing message relay (mix pool):

  • [release-v2.1] mixpool: Refactor activeInEpoch to scale linearly (decred/dcrd#3831)
  • [release-v2.1] mixpool: Reject distinct KEs with same identity and session (decred/dcrd#3831)
  • [release-v2.1] mixpool: Reject KEs with epochs too far in past (decred/dcrd#3831)
  • [release-v2.1] mixpool: Limit max messages per single mixing identity (decred/dcrd#3831)
  • [release-v2.1] mixpool: Require KE epoch to be a minute multiple (decred/dcrd#3831)
  • [release-v2.1] mixing: Allow more than mixing.MaxPeers in KE messages (decred/dcrd#3831)

dcrd command-line flags and configuration:

  • [release-v2.1] config: Correct --profile port range in help (decred/dcrd#3832)

Developer-related package and module changes:

  • [release-v2.1] wire: fix function name in comment to match actual function (decred/dcrd#3829)
  • [release-v2.1] multi: Fix godoc comment var/func names (decred/dcrd#3829)
  • [release-v2.1] wire: Clarify some payload size names (decred/dcrd#3829)
  • [release-v2.1] wire: Add SerializeSize to Message interface (decred/dcrd#3829)
  • [release-v2.1] wire: Always use accurate SerializeSize (decred/dcrd#3829)
  • [release-v2.1] blockchain/stake: Local consts for req script vers (decred/dcrd#3830)
  • [release-v2.1] blockchain/stake: Cleanup treasury add code (decred/dcrd#3830)
  • [release-v2.1] blockchain/stake: Cleanup treasury spend code (decred/dcrd#3830)
  • [release-v2.1] blockchain/stake: Cleanup treasurybase code (decred/dcrd#3830)
  • [release-v2.1] tickettreap: Fix off-by-one in getByIndex (decred/dcrd#3830)
  • [release-v2.1] stake: Correct off by one in revoke create helper (decred/dcrd#3830)
  • [release-v2.1] mixclient: remove shadowed roots declaration (decred/dcrd#3831)
  • [release-v2.1] mixclient: Remove unnecessary len check (decred/dcrd#3831)
  • [release-v2.1] mixclient: Add missing genDicemixKeys err handling (decred/dcrd#3831)
  • [release-v2.1] mixclient: Check SR mix dimensions before recovering pads (decred/dcrd#3831)
  • [release-v2.1] mixclient: Use shorter 10s stage timeout on testnet (decred/dcrd#3831)
  • [release-v2.1] blockchain: Always check size and merkle root (decred/dcrd#3832)
  • [release-v2.1] blockchain: Fix variable shadowing bugs (decred/dcrd#3832)
  • [release-v2.1] blockchain: Correct a couple of mutexes (decred/dcrd#3832)
  • [release-v2.1] blockchain: Separate agenda and deployment prep (decred/dcrd#3832)
  • [release-v2.1] blockchain: Consolidate determining active agenda (decred/dcrd#3832)
  • [release-v2.1] blockchain: Consolidate stake diff agenda (decred/dcrd#3832)
  • [release-v2.1] blockchain: Consolidate max block size agenda (decred/dcrd#3832)
  • [release-v2.1] blockchain: Use choice id in threshold state tuple (decred/dcrd#3832)
  • [release-v2.1] blockchain: Separate agenda and deployment logic (decred/dcrd#3832)
  • [release-v2.1] blockchain: Add default required agendas (decred/dcrd#3832)
  • [release-v2.1] blockchain: Process block headers before data (decred/dcrd#3832)
  • [release-v2.1] blockchain: Deduplicate merkle root checks (decred/dcrd#3832)
  • [release-v2.1] mempool: Consolidate chain error wrapping (decred/dcrd#3832)
  • [release-v2.1] blockchain: Remove incorrect cache assertion (decred/dcrd#3832)
  • [release-v2.1] blockchain: Combine single and range txout add (decred/dcrd#3832)
  • [release-v2.1] blockchain: Improve stake spend violation handling (decred/dcrd#3832)
  • [release-v2.1] blockchain: Consolidate zero conf tx detection (decred/dcrd#3832)
  • [release-v2.1] blockchain: Use panics for utxoview/cache asserts (decred/dcrd#3832)
  • [release-v2.1] blockchain: Add additional utxo assertions (decred/dcrd#3832)

Developer-related module management:

Testing and Quality Assurance:

Misc:

Code Contributors (alphabetical order):

  • Dave Collins
  • Jamie Holdstock
  • Josh Rickmar
  • Iain
  • LuaLighter
  • yzxcj797

Don't miss a new dcrd release

NewReleases is sending notifications on new releases.