Skip to main content

Block template

zecnerod serves block templates through getblocktemplate on its Zebra-compatible JSON-RPC interface.

Coinbase rules​

Every coinbase must satisfy consensus rules or the block is rejected.

  • Founder output. Until the first halving at block 1,680,000, the coinbase must pay 0.1875 ZMR (3% of the 6.25 ZMR subsidy) to the published founder multisig address. See Founder stream.
  • Miner output. The rest of the subsidy plus transaction fees go to the pool’s address.
  • Maturity. Coinbase outputs can’t be spent for 100 blocks.
  • Transaction version. Version 5 transactions.

The template returned by the node already includes the founder output. If you build the coinbase yourself, you must add it.

TODO

Publish the founder multisig address (and its script) here, and confirm the exact template fields the node returns for the founder output.

Header and nonce layout​

TODO

Document the block header layout used for hashing (field order, sizes, byte order), where the miner nonce sits, how the hashing blob is built from the header, and how the result is compared with the target. Pool software depends on this being exact. Fill from the zecnerod source.

Share target​

Set a per-miner share target well below the network target and check every share against it. Submit any share whose hash also meets the network target with submitblock.

The network target comes from aserti3-2d difficulty adjustment, which reacts to each block. With 75 second blocks, refresh templates promptly when a new block arrives.

TODO

Confirm the exact target and difficulty fields in the getblocktemplate response and the expected submitblock input format.

Transparent or shielded payouts​

The project pool shields its coinbase before paying out, so it can pay transparent or Sapling addresses. Other pools can do the same or pay transparent addresses directly.