Skip to content

v5.0.1

Latest

Choose a tag to compare

@github-actions github-actions released this 18 Oct 07:27
· 14 commits to main since this release

Full Changelog: v5.0.0...v5.0.1

Upgrade before block 340,000, expected on 19 October (UTC).

Who needs to act

  • Running v5.0.0 (node, miner or pool): upgrade before block 340,000. After that block, a v5.0.0 node can reject a block the rest of the network accepts, and stop following the chain.
  • Running v4.x: upgrade too. Miners and pools need v5.x to enforce the block-340,000 rule. Nodes on v4.1.x or older stop following the chain once blocks use the opcodes that activate at block 400,000.
  • Wallet users: nothing to do for block 340,000. Read the known issue below before restoring a wallet.

To upgrade, replace the binary and restart. Your data directory carries over, and you don't need to resync.

Consensus changes

  • Key-reuse rejection is deferred. v5.0.0 makes a block invalid from block 340,000 if it reuses a one-time key (a WOTS address or an MSS leaf). Each node checks that against its own local record of spent keys. That record isn't part of the state root and can differ between nodes, so honest nodes could disagree about the same block and split the chain. v5.0.1 switches the rule off until the spent-key set is part of consensus state. Nodes still refuse to relay a second spend from a key.
  • Unchanged from v5.0.0: from block 340,000, a Consolidate's predicate is checked against every input, not only the first. Coins behind a covenant that reads per-input value or state must be moved with a Reveal.

Reusing a one-time key is still unsafe. Once a key has signed twice, anyone who has seen both signatures can forge a spend, and the coins go to whoever gets one mined first. For an MSS address, that means every coin at the address. The automatic "bounty hunter" burn can't get its burns mined, and it's switched off from block 340,000.

Fixes

Pool

  • A malformed mining.authorize message no longer crashes the pool.
  • Found blocks are recorded at the right height and confirmed correctly. Before, every block showed as orphaned.
  • An orphaned block's refund gives back exactly what was charged. Before, it over-credited miners' scores.

Node and network

  • Unsolicited blocks are rate-limited per peer, and orphan work checks run off the main event loop. Before, a few small messages could stall a node.
  • Header sync rejects a bad chunk with cheap checks before running the expensive work checks.
  • Nodes that follow the chain by gossip, without mining, now record spent keys and save state, as every other block path does.
  • MSS leaf counters can only advance within the tree's real size.

Explorer, miner dashboard and RPC

  • The explorer escapes script data before displaying it, closing a cross-site scripting hole.
  • The miner dashboard log no longer renders config strings as HTML.
  • /axe refuses state-changing requests from other origins.
  • A node reached on a loopback or LAN address refuses cross-origin requests, so a website you visit can't drive your local node. Public RPC nodes are unaffected. If you pointed the hosted web wallet at your own local node, that no longer works.

CLI wallet

  • wallet consolidate checks MSS leaves against the node before signing, as wallet send does, so a restored wallet doesn't re-sign used leaves.

DEX

  • New HTLC and covenant locks require a 32-byte preimage, matching the Base contract. Existing locks are unchanged.

Known issue: restoring a wallet can reuse keys

Restoring a used wallet from its recovery phrase in the web or desktop wallet can miss coins (old change, mining rewards, MSS coins). It can then send change to one-time keys the original wallet already signed with, and that change can be stolen. A fix is in progress. Until it ships, don't send from a restored copy of a wallet that has already sent. Keep using the original device where you can.

Download

Binaries for Linux, Raspberry Pi, Windows and macOS are attached below. To build from source:

git fetch --tags
git checkout v5.0.1
cargo build --release

Full changelog: v5.0.0...v5.0.1