Repository navigation
Conversation
… job's coinbase as one binary transaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #28, which is based on #24. Review the last commit. This is an alternative to #29: merge one of the two.
Needs #26 on musl.
datum_protocol_powkeeps 140528 bytes on the stack, andassembleBlockAndSubmitkeeps 133280 (gcc 16.2-fstack-usage, x86_64, default CMake build). Both are more than musl's 128 KiB default thread stack.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_SIZEis 64000 (YUGE was 16000). That holds 2048 P2WPKH outputs or about 1480 taproot outputs.datum_stratum_coinbase_fit_to_templatestill 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 64000 bytes needs about 257000 WU, 32% of an 800000 WU RDTS block.MAX_COINBASER_OUTPUTSis 2048 (was 512). It sets the coinbaser parse limit and the size ofavailable_coinbase_outputs.STRATUM_COINBASE2_MAX_LENis 131072 hex characters (was 32768), so coinb2 can be up to 65535 bytes. The share's coinbase section writes each part's length as a uint16.MAX_POW_MESSAGE_SIZE(MAX_COINBASE_TXN_SIZE_BYTES+ 4096) replaces 32768 as the size ofdatum_protocol_pow's message buffers and as the replay limit.DATUM_PROTOCOL_COINBASER_BUFFER_SIZEis 65536 (was 32768) for the coinbaser response, whose length field is a uint32. A response is one byte plus its outputs encoded as in the coinbase, so it holds every dictated output a 64000-byte coinbase has room for.64000 is below the protocol's limit for this layout, 65610 bytes: coinb2 at 65535, the 63-byte coinb1 of a DATUM job with no tags, and the 12-byte extranonce. The largest share carrying a 64000-byte coinbase is 65372 bytes (encrypted, with its pad), so it fits a 64 KiB frame.
The pool server has to accept a share coinbase section (coinb1 + coinb2) of up to 63988 bytes, a share message of up to 65372 bytes, and a coinbaser response of up to 65535 bytes.
BSS goes from 89.5 MB to 212.3 MB.
The commit also reformats
datum_stratum.h: Allman braces, and spaces for alignment.Every commit builds with
-Wall -Werrorand passes--test.