Skip to content

Raise COINBASE_TYPE_YUGE to 32000 bytes and the coinbaser output limit to 1024 - #29

Open
iohzrd wants to merge 4 commits into
CONVOYMining:masterfrom
iohzrd:yuge-32000
Open

iohzrd wants to merge 4 commits into
CONVOYMining:masterfrom
iohzrd:yuge-32000

Conversation

@iohzrd

@iohzrd iohzrd commented Oct 6, 2026 •

Copy link
Copy Markdown

Based on #28, which is based on #24. Review the last commit. This is an alternative to #30: merge one of the two.

On BLAKE2b work every miner is served COINBASE_TYPE_YUGE, and the coinbase never reaches the miner, so no firmware limit applies to its size. This raises it. Fingerprinting and classes 1, 2, 3 and 5 are unchanged.

  • MAX_DICTATED_COINBASE_SIZE is 32000 (YUGE was 16000). That holds 1024 P2WPKH outputs or about 740 taproot outputs.
  • datum_stratum_coinbase_fit_to_template still cuts the coinbase to the template's room. At the node's default -blockreservedweight (8000 WU) that is about 1800 bytes on a full block. Filling 32000 bytes needs about 129000 WU, 16% of an 800000 WU RDTS block.
  • MAX_COINBASER_OUTPUTS is 1024 (was 512). It sets the coinbaser parse limit and the size of available_coinbase_outputs.
  • STRATUM_COINBASE2_MAX_LEN is 65536 hex characters (was 32768).
  • MAX_POW_MESSAGE_SIZE (MAX_COINBASE_TXN_SIZE_BYTES + 4096) replaces 32768 as the size of datum_protocol_pow's message buffers and as the replay limit.
  • DATUM_PROTOCOL_COINBASER_BUFFER_SIZE is 65536 (was 32768) for the coinbaser response, whose length field is a uint32.
  • Test: 1024 P2WPKH outputs fit one coinbase, with a three-byte output count.

The pool server has to accept a share coinbase section (coinb1 + coinb2) of up to 31988 bytes, a share message of up to 33372 bytes (encrypted, with its pad), and a coinbaser response of up to 65535 bytes.

BSS goes from 89.4 MB to 130.4 MB.

The commit also reformats datum_stratum.h: Allman braces, and spaces for alignment.

Every commit builds with -Wall -Werror and passes --test.

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.

1 participant