Skip to content

Instantly share code, notes, and snippets.

@SChernykh
SChernykh / HEADER_CODEC.md
Last active June 12, 2026 18:11
Monero header-only sync format

Header-only synchronization wire format ("header codec")

This document specifies a compressed wire format for batches of consecutive Monero block headers, designed for header-only synchronization where bandwidth is the primary concern. It compresses 1000 typical mainnet headers from ~76,500 bytes (raw) to a measured average of 37,684 bytes (37.68 bytes per header) — within 0.1% of the order-0 entropy of the data — while letting the receiver reconstruct every header byte-exactly and recompute every block id.

For comparison, the block id lists exchanged by today's NOTIFY_RESPONSE_CHAIN_ENTRY

@SChernykh
SChernykh / RandomX_v2_results.md
Last active February 9, 2026 04:59
RandomX v2 testing
  • RandomX v1 hash: 4194304 VM instructions + 262144 AES = 4456448 total ops
  • RandomX v2 hash: 6291456 VM instructions + 524288 AES = 6815744 total ops (+52.9%)

RandomX v2 includes the following changes:

  • Program size increased from 256 to 384
  • CFROUND is tweaked to change the rounding 16 times less often
  • Group F and group E register mix is done using 16 AES operations (the extra 262144 AES ops come from this change)
  • Dataset prefetch is 2 iterations ahead instead of 1

RandomX v2 hash is 1.5 times "heavier" than RandomX v1 hash, so hashrate comparison is only for the reference. The real metric is work per Joule (the last two columns).