Genesis, targets and overflow

8 October 2026 · decision #16 (option A). The exact rule is in CHAIN-DESIGN §2; this page explains it with examples and plans the genesis miner.

The max target is a limit, not the block target

ASERT gives every block its own target. Slow blocks make the target bigger (easier); fast blocks make it smaller (harder). The max target (pow limit) is the easiest the chain may ever be. ASERT can never go above it.

Constant

Value

Meaning

MAX_TARGET

0x1d7fffff = 0x7fffff × 256^26 ≈ 2^231

25 leading zero bits; about 2^25 ≈ 33.5 million hashes per block expected

Genesis bits

= MAX_TARGET

mainnet and testnet the same; re-measure on the launch machine

Why 25 bits: the spec estimated 2^24.6 and the review suggested about 25. The owner picked the median, rounded to the nearest valid compact value.

Overflow, by example

These are real outputs of the exact rule, starting from MAX_TARGET:

What happened

New target ÷ MAX

Result

Blocks on time (block 100)

1.0

stays 0x1d7fffff

Blocks 10 s each (too fast)

0.26

harder: 0x1d20d03f

Blocks twice as slow

4.3

too easy, clamped to MAX

1 day with no blocks

3,495

clamped to MAX

31 years with no blocks

a 139,120-bit number

overflow: a 256-bit C++ integer can’t hold it

Why overflow is dangerous: a fixed-width integer that overflows wraps around, like a car odometer going from 999999 to 000000. A huge, easy target becomes a tiny, near-impossible one, and the chain freezes. That is the opposite of what we want.

The rule: decide “is the result bigger than MAX?” before shifting in fixed-width math. If it is, the answer is MAX. If the result is 0, the answer is 1.

Genesis miner: e46/golden/genesis_miner.py

  1. Inputs: network (mainnet or testnet), one or two UTF-8 pszTimestamp parts (each 1–80 bytes), time, and bits (default MAX_TARGET).

  2. Coinbase: one null-prevout input, followed by one or two zero-value Data outputs holding the timestamp parts, then a zero-value Data output containing the 32-byte witness commitment. The commitment is always last. Take the coinbase txid, then the bound merkle_root (WO-03b). event_root is 32 zero bytes.

  3. Header: the 120-byte header; prev_block is all zero bytes and nonce starts at 0.

  4. Search: try nonces until RL_v3(header) ≤ target. The search calls the C++ librl; the Python reference independently rebuilds and checks the result.

  5. --examples: prints the overflow table above.

  6. Output: a block to paste into the C++ chain parameters:

// e46 genesis — generated by genesis_miner.py (do not edit by hand)
consensus.powLimit         = CompactToTarget(0x1d7fffff);
genesis.nTime              = 0;          // filled in on launch day
genesis.nBits              = 0x1d7fffff;
genesis.nNonce             = 0;          // filled in by the search
consensus.hashGenesisBlock = "…";       // SHAKE256 block ID
genesis.hashMerkleRoot     = "…";
// testnet: same layout, its own pszTimestamp and mined nonce

The miner and its golden-vector verification are implemented in WO-10. Mainnet launch parameters remain unset until the project owner selects the launch timestamp and mines the chosen parameters.

Genesis hasher: reproduce the first block

Status: implemented (WO-10).

The genesis hasher rebuilds E46’s very first block from public inputs. Anyone can run it and check that they get the same block ID as the one built into the software. That’s how you confirm that nobody mined the chain in secret before launch and that there’s no hidden premine.

What you need: this repository, Python 3, and the built C++ libraries (cmake --preset release, then cmake --build --preset release).

Check the published genesis (mainnet or testnet):

The Python utility builds the requested genesis coinbase and calls the compiled genesis_cli miner. The WO-10 testnet vector is frozen in e46/golden/wo10-golden.json and independently checked by the test suite.

It reads the published pszTimestamp, time, bits and nonce, rebuilds the coinbase, both Merkle roots and the 120-byte header, re-checks the proof of work, and prints the block ID. It must equal consensus.hashGenesisBlock.

Mine a fresh genesis (for research forks and replication):

python3 e46/golden/genesis_miner.py --network testnet \
  --timestamp-part 'E46 08/Oct/2026 NASA’s SpaceX Crew‑12 Splashes Down,' \
  --timestamp-part ' Sets Briefing to Discuss Mission' \
  --time 1791498189

It searches nonces until RL_v3(header) ≤ target and prints the resulting chain parameters, including the coinbase bytes. A different timestamp gives a different chain; give your copy its own address prefixes so its coins can’t be confused with E46’s.