You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/src/user/mining.md
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,22 +61,21 @@ If `miner_address` is a Unified Address with more than one receiver, Zebra sends
61
61
62
62
[#extra-coinbase-data]: #extra-coinbase-data
63
63
64
-
Zebra does not tag its blocks by default. If you don't set `extra_coinbase_data`, the blocks you mine carry no identifying data. Setting this option fixes that:
64
+
Zebra prepends a `🦓` marker to the coinbase input of every block it builds. Setting `extra_coinbase_data` adds your own tag (such as a pool name) after it, separated by `": "`:
A few important details about how this value is used:
72
+
How it's used:
73
73
74
-
- The string is inserted into the transparent input script of the coinbase transaction, immediately after the encoded block height.
75
-
- The string is always encoded as raw UTF-8 bytes. It is **not** hex-decoded, even if it looks like a valid hex string — `extra_coinbase_data = "deadbeef"` puts the eight ASCII characters `deadbeef` in the coinbase script, not the four bytes `0xde 0xad 0xbe 0xef`. This option only carries UTF-8 text, so arbitrary non-UTF-8 byte sequences can't be embedded. In practice most mining tags are short, human-readable pool names or identifiers, so this is usually what you want anyway.
76
-
- The encoded value, including Zebra's script push overhead, is limited to 94 bytes. Because that limit includes 1-2 bytes of push-opcode overhead, keep your tag at 92 bytes or less to be safe. If the limit is exceeded, Zebra refuses to build a block template until the value is shortened.
77
-
- This field is optional. Leaving it unset is valid — Zebra just won't tag the block.
74
+
- Inserted into the coinbase input script, after the block height, `🦓` marker, and `": "` separator.
75
+
- Limited to 86 bytes. If exceeded, Zebra refuses to start.
76
+
- Optional. If unset, the block still carries the `🦓` marker, just no extra data.
78
77
79
-
You can confirm the tag is being applied by calling `getblocktemplate` and checking the `coinbasetxn.data` field (see [Testing the setup](#testing-the-setup)): the hex string after the height bytes should decode back to your configured text.
78
+
You can confirm the marker is applied by calling `getblocktemplate` and checking the `coinbasetxn.data` field (see [Testing the setup](#testing-the-setup)): after the height bytes you'll see the `🦓` marker (`f0 9f a6 93`), then — if `extra_coinbase_data` is set — the `": "` separator (`3a 20`) and your text.
0 commit comments