braidpool icon indicating copy to clipboard operation
braidpool copied to clipboard

Commit to Metadata and splitting extranonce

Open mcelrath opened this issue 3 months ago • 3 comments

Currently in the code we only have one extranonce. The stratum protocol has two extranonces, extranonce1 which is set by the pool and extranonce2 which is 32-bits and set by the miner when he runs out of nonce space in the block header and version rolling.

I propose we split our extranonce as follows: extranonce1 = "Braidpool|" + <miner_id> + "|" + <miner_metadata> where <miner_id> is a string the miner can add like "Bob's awesome mine" and <miner_metadata> is arbitrary metadata that the miner can add and we may use later to identify braidpool nodes, mine sites, downstream customers, or individual mining devices.

Tasks:

  1. Add extranonce1 to the uncommitted_metadata struct, and update its serialization/deserialization accordingly.
  2. Rename extranonce in uncommitted_metadata to extranonce1
  3. Construct extranonce1 as "Braidpool|" + where the miner can put "Bob's awesome mine" in the config file.
  4. Provide a programmatic way for the miner to construct miner_metadata. This might be an external function or script we call, provided by the miner. What's the best way to do this?
  5. Update database serialization/deserialization with all the above.

mcelrath avatar Nov 05 '25 13:11 mcelrath

@mcelrath Can I work on this issue ???

Rustix69 avatar Nov 06 '25 05:11 Rustix69

You should coordinate with @Sansh2356 on this if you want to work on it. You can find him on our discord.

mcelrath avatar Nov 06 '25 14:11 mcelrath

Solved partially in #265 .

Sansh2356 avatar Nov 11 '25 18:11 Sansh2356