Protocol
Everything a node checks, byte for byte. The reference implementation is the node you can download: consensus lives in lib/config.mjs, lib/pq.mjs and lib/chain.mjs.
Design
The network trusts one primitive: the Keccak permutation. Account signatures are SLH-DSA (NIST FIPS 205) in its SHAKE256 instance, which is Keccak. Proof of work, addresses, transaction and block hashes and the state trie are Keccak-256. There is no elliptic curve and no lattice anywhere in consensus.
Algebraic schemes (RSA, elliptic curves, lattices) give an attacker structure to work with; hash-based signatures reduce to the security of the hash function. That is the property this chain is built around.
Accounts and keys
| Algorithm id 1 | SLH-DSA-SHAKE-128f: public key 32 bytes, secret key 64 bytes, signature 17,088 bytes |
| Key generation | deterministic from a 48-byte seed (the recovery key is this seed plus a 2-byte Keccak checksum) |
| Address | keccak256("PQAI_ADDR_V1" ‖ alg ‖ publicKey)[12:] |
| Key commitment | keccak256("PQAI_KEY_V1" ‖ alg ‖ publicKey) |
An account answers to the key its address was derived from until its first rotation. A rotation transaction, signed by the current key, records a new key commitment in the storage of the system address 0x…0f00 at slot keccak256(address). From the block that includes it, only a key matching that commitment is accepted. The address, balance and contract state do not change.
Transactions
A transaction is an RLP list of 13 items. Integers are minimal big-endian; empty bytes stand for zero or for "none".
[ chainId, nonce, gasPrice, gasLimit, to, value, data, kind, newKey, from, alg, publicKey, signature ]
digest = keccak256("PQAI_TX_V1" ‖ rlp(first ten items))
signature = SLH-DSA.sign(digest, secretKey)
hash = keccak256(rlp(all thirteen items))
| kind 0 | transfer, call, or contract creation when to is empty |
| kind 1 | key rotation; newKey is the 32-byte commitment of the next key; costs 50,000 gas |
| chainId | 1600 (testnet) |
| Encoding | strict: the bytes must re-encode to themselves, so a transaction has exactly one hash |
| Max size | 128 KB |
Fees
Every transaction pays 150,000 gas for its signature check on top of execution. The base fee is 1 gwei per gas. Signature gas and the base fee are burned; whatever the sender pays above the base fee on execution gas is the miner's tip. The pool checks the intrinsic gas, the nonce (up to 16 ahead), the balance for value plus maximum fee, and that the signing key is the account's current key.
Blocks and proof of work
header = [ number, parentHash, timestamp, miner, stateRoot, txRoot, receiptRoot,
gasUsed, gasLimit, baseFee, difficulty, extra ]
sealHash = keccak256("PQAI_BLOCK_V1" ‖ rlp(header))
blockHash = keccak256(sealHash ‖ nonce as 8 bytes little-endian)
valid when blockHash ≤ 2^256 / difficulty
| Target spacing | 10 s |
| Difficulty | per block: parent × 2(10 − Δt) / 40 in integer fixed point (aserti3-2d), floor 100,000. Fast blocks raise it; every 40 s without a block halves it. |
| Timestamp | strictly after the parent, at most 15 s ahead of the receiving node's clock |
| Gas limit | 30,000,000 per block |
| txRoot | keccak256(rlp([tx hashes])) |
| receiptRoot | keccak256(rlp([[status, gasUsed, [[address, topics, data]]]])) |
| Reward | 2 coins per block, plus the block's tips, credited to its miner when the next block executes |
| Fork choice | the chain with the most total difficulty |
Paying a block's miner one block later keeps a block's execution independent of who mines it: the node builds one candidate per head and every miner only seals their own header.
Execution
The EVM runs at Shanghai rules. Solidity, Foundry and Hardhat output deploy unchanged. The sender of every transaction is an SLH-DSA account; the signature is checked before execution, at pool admission and again when a block is imported.
| 0x01 ecrecover | removed (secp256k1) |
| 0x06, 0x07, 0x08 | removed (BN254 addition, multiplication, pairing) |
| 0x…0f01 | SLH-DSA-SHAKE-128f verify. Input publicKey (32) ‖ message (32) ‖ signature (17,088), output 32 bytes, 1 if valid. 300,000 gas. |
| 0x…0f02 | key commitment an account answers to (zero before its first rotation). Input: ABI-encoded address. 2,600 gas. |
| 0x…0f03 | fee pot: collects a block's tips until they are paid to its miner |
Contracts that rely on ecrecover (EIP-2612 permits, ECDSA multisigs) do not work here by design. Verify account signatures with the precompile, or authorise by msg.sender.
JSON-RPC
POST to /rpc. Ethereum read methods behave as usual: eth_chainId, eth_blockNumber, eth_getBalance, eth_getTransactionCount, eth_getCode, eth_getStorageAt, eth_call, eth_estimateGas, eth_gasPrice, eth_getBlockByNumber, eth_getBlockByHash, eth_getTransactionByHash, eth_getTransactionReceipt, eth_getLogs (10,000 blocks per query).
eth_sendRawTransaction expects an ECDSA-signed Ethereum transaction and is refused. Native methods:
| pq_sendTransaction | [rawHex] → transaction hash |
| pq_getAccount | [address] → balance, nonce, keyCommit, rotated |
| pq_getWork | [minerAddress] → sealHash, target, number, difficulty |
| pq_submitWork | [sealHash, nonce] → result of the import |
| pq_networkInfo | height, hash rate, difficulty, peers, genesis |
cast block latest --rpc-url /rpc
Signing from JavaScript
The wallet's own module, served by every node, signs transactions in a browser or in Node.
import * as K from '/js/core.js';
const key = K.keygen(); // or K.keygen(K.recoveryToSeed(text))
const from = K.deriveAddress(key.alg, key.publicKey);
const { raw, hash } = K.signTx({
nonce: 0n, to: K.fromHex('0x…'), value: K.parseUnits('1.5'), gasLimit: 21000n, gasPrice: 2000000000n,
}, key);
await fetch('/rpc', { method: 'POST', headers: { 'content-type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'pq_sendTransaction', params: [K.toHex(raw)] }) });
Network
Nodes talk over HTTPS. Each node polls its peers' heads, downloads the blocks it lacks and validates them itself; new blocks and transactions are pushed to peers as they are accepted. A node that announces a public URL receives pushes once it has proven it serves the same genesis.
| GET /p2p/head | height, hash, total difficulty, genesis |
| GET /p2p/blocks?from=n&count=k | canonical blocks, up to 500 |
| POST /p2p/block | a new block (header + raw transactions) |
| POST /p2p/tx | a new transaction |
Verification
What is live
| Public testnet | live: one bootnode, open to any node that joins |
| Wallet, faucet, browser mining | live |
| Node software | live: download, verify the checksum, run |
| Independent security review | not done |
| Mainnet | live since December 4: chain 1601, the whole reserve in the vault from block 0, bridge to Robinhood Chain open (bridge) |