Use Python 3.10+ with SQLite and OpenSSL 3.5+ with ML-DSA enabled. On Windows, Git's bundled OpenSSL is detected automatically. Set BITKEELMARK_OPENSSL to override its path.
Start locally
Run from the project root. Substitute the three addresses printed by setup for MINER, WORKER and RECIPIENT.
python -m chain.setup
python -m chain.network --db .local/devnet/chain.sqlite --site site --port 18764
Open the explorer. In a second terminal, mine one block and start the relay.
python -m chain --db .local/devnet/chain.sqlite mine MINER
python -m chain.relay serve MINER
In another terminal, submit work and sign a payment of one BKMK.
python -m chain.relay work WORKER --count 3
python -m chain --db .local/devnet/chain.sqlite transfer .local/devnet/miner RECIPIENT 100000000 .local/send.json
python -m chain.relay send .local/send.json
After the next block, check the account and replay consensus.
python -m chain --db .local/devnet/chain.sqlite balance RECIPIENT
python -m chain --db .local/devnet/chain.sqlite verify
python -m chain.snapshot
The snapshot replaces the offline explorer fixture with the latest public records. Refresh the live explorer to query the node directly.
Hosting and rewards
The read-only node listens on loopback. Follow the replication guide for a second node. For a trusted private LAN, bind the relay to its private address with --host. Workers and senders select it with --pool http://PRIVATE-IP:8766. Transport is plain HTTP. Only signed payments, public addresses and work records belong on this interface.
The relay mines every 30 seconds when it has pending work. A queued submission expires on a tip change or restart. Check inclusion before resubmitting. Each accepted share proves the same difficulty and earns one point. The block pays 5% of its subsidy by points, rounded in atomic units. With zero shares, the miner receives that portion for its block proof. Miners choose which shares to include. Passive availability earns no points.
The private chain charges zero transfer fees. Its fixed low difficulty, bounded blocks and static peers are development settings. The implementation uses an account ledger and its own wire format. Bitcoin Core runs separately.
Reserve
Setup generates five test custodians on one machine. For independent custody, each signer runs python -m chain keygen PRIVATE_DIRECTORY on their own machine and shares only their address. Initialize a fresh database from a JSON array of the five addresses with python -m chain --db NEW_DATABASE init MANIFEST. Verify the genesis hash independently. The manifest fixes the network identity.
The ledger rejects reserve spending through height 210,000. From height 210,001 it requires at least three distinct custodian signatures. Use reserve-propose, pass the proposal through reserve-approve on each signing device, then include the approved file with mine --transaction. Each signer must check the destination, amount and nonce. Keep the private directories out of the site and archives.
Applications
Install the pinned Ethereum execution environment described in the protocol notes. Run the counter with that interpreter.
python lab/app_chain.py --program lab/counter.json
The JSON contains deployed EVM runtime bytecode and ordered hex calldata. Each call runs with 30,000 gas and carries storage into the next call. The supplied counter adds 7 and 11. Replay begins from empty state, uses one fixed caller and contract, and returns receipts and a state root.
Use the printed root as --commitment ROOT on a signed BKMK transfer. For Bitcoin regtest, run the same program with --anchor and mine a block with python lab/node.py mine 1. Verify with --verify-height HEIGHT. Keep the input program available so another participant can independently recompute the root. Neither chain executes EVM code during validation.