Skip to content

v2.1.0

Choose a tag to compare

@jrick jrick released this 26 Nov 14:58
release-v2.1.0

This release implements the new stake version for voting on the maxtreasuryspend agenda as defined by DCP0013. As usual, it also includes a wide variety of other performance, reliability and usability improvements.

All users must upgrade due to the vote on new consensus rules.

Bug fixes

  • A long-standing bug which would cause transactions in blocks that get reorged out and back again into the best chain was identified and fixed (#2527).

  • Unmined tickets purchased at the end of a ticket price window are no longer incorrectly removed from the wallet due to pruning tickets with the wrong stake difficulty price (#2528).

  • In RPC sync mode, repeated blockconnected notifications from dcrd for the same block during multiple reorgs are no longer processed. This fixes the wallet's internal sidechain management and prevents identical blocks from being removed and reattached unnecessarily (#2526).

  • Several lock ordering bugs which would deadlock the process were corrected (#2508, #2560).

  • A check that mixing is enabled was moved earlier into the ticket purchasing codepath, preventing the mixed purchase from being attempted (#2484).

  • A check that mixing is enabled was added early to the mixoutput JSON-RPC method, preventing the mixing attempt when disabled (#2473).

  • The mixing client received the following fixes:

    • Errors during address generation are properly handled by aborting out of the mix session (decred/dcrd#3484).
    • A nil dereference panic caused by the logger trying to include relevant session information was fixed by always returning the current run state on unactionable errors (decred/dcrd#3505).
    • Local mixing peers that have canceled their request are no longer served by the client, avoiding a slew of "context canceled" error messages being logged (decred/dcrd#3507).
    • A busy loop causing 100% CPU usage when all local peer requests in a session had been canceled was avoided with improved error management (decred/dcrd#3511).
  • Interaction with VSPs has been improved:

    • Unmined tickets which are pruned by the wallet no longer remain handled by the VSP client (#2525).
    • Failed database updates changing the status of VSP tickets are retried later (#2524).
    • Actively managed tickets are only removed from the VSP client after a successful removal from the database (#2524).
    • Batched ticket processing no longer fails to process all tickets when one ticket in the batch already has a confirmed fee payment (#2519).
    • Fee payments which must split an existing output no longer overestimate the required payment amount by failing to consider change amounts that would otherwise be dust (#2494).
    • Hardcoded VSP fee rates have been removed, and the config option is used instead (#2439).
  • The consolidate JSON-RPC method now respects the max transaction size limit (#2513).

  • The consolidate JSON-RPC method now refuses to continue if the output it would create is also a dust output (#2490).

  • Under RPC sync mode, the existsaddresses calls performed at startup sync are now batched to prevent exceeded the maximum request size (#2504).

  • A data race starting gRPC services was corrected (#2532).

  • A data race counting the number of addresses processed at sync startup was corrected (#2517).

  • A variety of instances of incorrect error handling were corrected by returning the proper error to the caller (#2474, #2577).

Other improvements

  • The mixing client received the following improvements:

    • Slot reservation and DC-net secret messages, and the addresses to mix, are now generated at peer creation rather than generating these lazily after the mixing epoch occurs and the session starts. This improves the publish time for initial KE messages, leading to improved peer agreement (decred/dcrd#3533).
    • Mix session are now allowed to continue longer and concurrently with later sessions started at later epochs (decred/dcrd#3553).
    • Mixing peers who repeatedly disrupt mixes, either by timeout or discovered during blame assignment, are now excluded from client session forming for a period (decred/dcrd#3554).
  • The getstakeinfo JSON-RPC method now provides an estimate of the live ticket pool size when operating in SPV mode (#2523).

  • Requesting transaction notifications for the wallet's seed-derived addresses has been sped up by fixing the code concurrency (#2516).

  • Background rescans started by the JSON-RPC server are now cleanly stopped on server shutdown (#2434).

  • Config option descriptions have removed references to the no-longer-used CoinShuffle++ server (#2548).

  • A new wallet method has been added to set the birthday block or date on existing wallets (#2385).

API changes

The module has been bumped to major version 5. Some users will need to make changes for the following API changes:

  • The wallet.OutputSelectionPolicy type has been removed and (*Wallet).SelectInputs method no longer takes it as an argument. The (*Wallet).UnspentOutputs method and the types it returned were not observed to be used by anything, and were removed (#2535).

  • The UseVotingAccount field of the ticket purchase request was removed. The VotingAccount field will always be used and callers always set this value to the intended voting account (#2483).

  • All manual ticket revoking functionality has been removed. Tickets are automatically revoked by consensus rules now.

  • All legacy stakepool code has been removed (#2403).

In addition the following changes have been made to the RPC servers:

  • The spend limit parameters have been removed from both the purchasetickets JSON-RPC and WalletService.PurchaseTicket gRPC requests (#2542).

Changelog

All commits to the v2.1.0 release since the v2.0.6 release may be viewed on GitHub
here.

All commits to the v2.1.0 release since the v2.0.0 release may be viewed on GitHub
here.
Most of these commits were previously backported to 2.0.x patch releases.

Code Contributors (alphabetical order):