Menhir Read the report

One assumption.
SHA-2.

Menhir is Bitcoin with hash-based signatures: mining, addresses and signatures all rest on SHA-2. A measured regtest prototype.

Randomizer 24 FORS 6,120 Hypertree 10,080 Schnorr 64 One cell per byte of a signature.

Bitcoin makes two cryptographic bets. A quantum computer breaks one.

Proof-of-work and addresses rest on SHA-256. Signatures rest on the secp256k1 elliptic curve, which Shor's algorithm solves. Most post-quantum coins swap the curve for lattices: a second, younger bet. Menhir removes the second bet instead of replacing it.

Bitcoin today
SHA-256secp256k1
The curve falls to Shor's algorithm. The hash only loses margin to Grover's.
Lattice coins
HashModule lattices
Small signatures, bought with a new assumption standardised in 2024.
Menhir
SHA-2
If SHA-2 breaks, mining and addresses break in every design. Nothing is added to that.

The whole cost is size.

A hash-based signature is 16,224 bytes. Schnorr's is 64. Nothing else about a payment changes, so nothing else about its cost does.

Weight of a payment

One input, two outputs16,832 WU
Two inputs, two outputs33,278 WU
Two-of-two multisig leaf33,112 WU
Taproot key path, for scale616 WU, computed
View as table
ShapeBytesvBWUPer block
1 input, 2 outputs16,4214,20816,832237 measured
2 inputs, 2 outputs32,7448,32033,278120 arithmetic
2-of-2 leaf, 2 outputs32,7018,27833,112120 arithmetic
Taproot key path (computed)n/a1546166,491 computed

Phase 1 measurements

Measured on a working node, not estimated.

Every transaction below was signed, mined into a block on a private regtest chain and read back. Timings come from one loaded machine and are upper bounds for it.

Signature primitive

253.59µs

to verify one signature on one thread: 3,943 per second.

Sign
278.83 ms
Key generation
27.32 ms
Sign over verify
about 1,100×

The asymmetry suits a ledger: a signature is made once and verified by every node.

Block capacity

237

payments fill a 4,000,000 WU block. The next one was rejected with bad-blk-weight.

Block weight
3,990,116 WU
Block size
3.89 MB
Throughput
0.395 per second
Taproot, computed
about 6,491

Correctness, checked against OpenSSL 4.1

  • 66 of 66NIST ACVP vectors
  • 100 of 100node signatures verified by OpenSSL
  • 100 of 100OpenSSL signatures accepted by the node
  • 140 of 140signature hash vectors against an independent implementation
  • 14 of 14consensus code mutations caught by the tests
  • 2 of 2forged cases rejected

The two implementations share no code: the node's is written on Bitcoin Core's hash functions, OpenSSL's is its own.

Block validation

A full block validates in 11.0 to 18.0 ms. A block built to abuse the signature budget took 5.75 s.

Tapscript charges 50 units per signature check, a price set for Schnorr. One hash-based signature pays for about 340 checks. Not fixed in the prototype: it has to be repriced before any public network.

  • Honest block, 241 inputs, 15 threads: three runs, all flagged unstable
  • Serial reference, derived: 61.1 ms
  • Worst case: 5.75 s on 15 threads, 12 s on one

Chain growth

204.57GB

per year at most, with every block full.

A node that drops signatures buried under enough proof-of-work would keep about one hundredth of the chain.

Method and limits

  • One machine: Apple M5 Max, 18 cores, macOS 27.0.1, release build, commit a94c192393.
  • The machine was shared with other jobs: load average between 14 and 51. No timing is corrected for it.
  • Every block benchmark was flagged unstable by the harness. Timings are ranges.
  • One host, regtest: propagation and initial block download over a real network were not measured.
  • Internal review with mutation testing. No external audit.
  • The source is not public yet, so nobody else can reproduce these figures today.

What the numbers say to the BIP-360 debate.

  1. Capacity is the decision.

    237 payments per block against about 6,491. Deploying this parameter set means choosing: the witness discount, the weight limit, smaller parameter sets, or aggregation.

  2. Validation time is not the limit.

    At 253.59 µs per check a block could carry many times more signatures before validation neared one second. Bandwidth and storage bind first.

  3. Storage is almost all signatures.

    With 99.16 % of block bytes in witnesses, pruning buried witnesses changes the storage cost by two orders of magnitude. Its trust model is an open question.

  4. Budgets sized for elliptic curves need review.

    The validation weight charge is the case found here. Dust thresholds and fee policies sized for 100 vB spends are next.

What changes in Bitcoin Core.

Signature
SLH-DSA-SHA2-192s, FIPS 205, NIST category 3. Public key 48 bytes, secret key 96. Written on Core's own SHA-256, SHA-512 and HMAC, with no new dependency.
Output
P2MR in the style of BIP-360: witness version 2 and a script tree with no key path. No elliptic-curve key is committed anywhere.
Spending
BIP-342 tapscript. A public key is an algorithm byte followed by the key, the signature is 16,224 bytes, and the stack element limit rises from 520 to 16,384.
Outputs
Post-quantum only, by consensus, from the genesis block. An output a quantum computer could spend cannot exist.
Mining
SHA-256d proof-of-work, unchanged.
single-key spend
output   OP_2 <32-byte merkle root>
leaf     31 01 <48-byte key> ac
witness  [signature] [leaf] [control]
bytes    16,224      51     1
control  c1
key id   01 = SLH-DSA-SHA2-192s
53 files and 9,435 added lines against Bitcoin Core v32.1

From a stone to a network.

  1. Done

    Design

    Thesis, consensus decisions and the phase 1 contract.

  2. Measured

    Regtest prototype

    The signature primitive, a chain with post-quantum outputs only, the P2MR spend path, and the numbers on this page.

  3. Next

    Public testnet

    Network parameters, per-block retarget, wallet descriptors, and the capacity decision: weight, discount, interval and the price of a signature check.

  4. Later

    Hardening

    Compact hash parameter sets of roughly 3 to 4 kB per signature, witness pruning, fuzzing and an external audit.

  5. Later

    Mainnet

    Fair launch and reproducible binaries. No date is announced.

Read the work.

No Menhir network exists. There is no token and nothing is for sale. The source code is not public yet. Nothing on this site is an offer of any asset.