npm run testnet starts a mesh of node processes on one machine, gives each one its own
producer key, has them find each other over real TCP, and lets them take turns sealing
blocks under Tyr's slot schedule. It then checks that more than one node produced, that every
block was sealed by the leader of its slot, that all of them independently reach the same head
and the same state root — and, since 2026-09-08, that nine features actually work across
processes rather than only inside one.
npm run testnet # development mode, 13 nodes, one full rotation
npm run testnet -- --mode production # MIDGARD: 21 nodes on the committed genesis
node scripts/testnet.mjs --nodes 5 # smaller, for a quick check
node scripts/testnet.mjs --blocks 39 # longer run: three rotationsTo look at Midgard without starting anything, or to hand its genesis to a machine that has the binary and nothing else:
strblk genesis --network midgard # the chain, the pin, the key warning
strblk genesis --network midgard --export midgard.json # the file `strblk node --genesis` takes
strblk node --network midgard --peers <host:port> # join itEverything is torn down on exit, including on Ctrl-C: every process is killed and every temporary data directory is removed.
This is a check, not a network. If you want one that stays up, read POLARIS.md#
MEASURED, 2026-09-07: this page predates Polaris, and the distinction it did not have to draw
is now the first thing to say.
npm run testnet is a test. Its product is a verdict, its data directories are temp
directories, and it destroys everything it made — which is exactly right for something a pipeline
runs and exactly useless for a network you want to administer, point an explorer at, or still
have tomorrow.
Polaris is the network that stays up. Same genesis, same keys, same node agent, same rotation
order — all of it factored into scripts/e2e/midgard-net.mjs and imported by both — but it keeps
its directories under .sourceless/polaris/, publishes a manifest of every endpoint, survives a
stop and a start with the chain intact, and runs no checks and reports no verdict.
npm run testnet | Polaris (npm run testnet:up) | |
|---|---|---|
| what it is | a check | a network |
| default processes | 13 (21 in production mode) | 3 |
| data directories | temp, deleted on exit | .sourceless/polaris/, kept |
| survives a restart | n/a — there is nothing to restart | yes: MEASURED, same height, head and state root |
| endpoints | printed and gone | in .sourceless/polaris/polaris.json |
| product | a verdict, and forty checks behind it | a chain you can hold an instrument up to |
| runs checks | forty | none |
| You want to | Read |
|---|---|
| Prove a build across processes and real TCP | this page |
| Get a network, an explorer and a dashboard running from a clone | RUNNING.md |
| Administer a standing local network | POLARIS.md |
| Look at a running chain | XPLORER.md |
| Act on a running node | GUNGNIR.md |
Two facts on this page apply to both, because they are facts about the chain rather than about
either harness: an idle chain does not advance, and most record kinds do not gossip, so a
burn, a sale or a wrap waits for the submitting node's own slot. Polaris prints both on every
up and every status; see POLARIS.md §4,
and Records have to be re-offered every slot below for how this harness meets the second one.
Every claim below is labelled. MEASURED means it was observed by running the thing named,
on the machine this repository was built on, on 2026-09-08. REASONED means it is an argument.
Where something has not been measured it says unmeasured.
The two modes are two different chains, and that is the point#
| development | production | |
|---|---|---|
| chain | the development genesis (chain id 31337) | Midgard, chain id 131313 |
| genesis | compiled in, 1313 declared seats | compiled in, 21 declared seats, hash-pinned |
| producer set | validators: [...] — DECLARED, one seat per process | genesis — the committed 21 |
| default processes | 13 | 21, one per seat |
| rotation order | the array the harness hands over | normalized STR.domain, byte order |
| producer keys | sourceless-testnet/producer/N | sourceless-midgard-public-seed/node/N |
| attestation | nobody is seated, so nothing is signed | MEASURED: 39/39 blocks, best 21/21 seats |
| governance | producers are on no roll — proposals refused | producers ARE the roll — proposals pass |
The two are not "the same run with a flag". A declared set is an operator's override that the genesis hash does not cover; a genesis set is chain state. They rotate over different orders, they seat different people, and exactly one of them can attest or govern. Both modes run the whole check list and the checks that cannot hold in one of them say so by name rather than being skipped — see Where a feature cannot run, below.
Midgard: a committed genesis, and keys that are published on purpose#
--mode production runs Midgard, the testnet realm in src/core/snotra.ts. As of
2026-09-08 it is a chain this build carries rather than a name it reserves:
1. Building the roster
chain SourceLess Midgard (testnet, public keys) (chain id 131313)
genesis hash e88a8753925935b0c003961f7988fe3df6f466cf648584a7bf39c486c4772d37
register pin e88a8753925935b0c003961f7988fe3df6f466cf648584a7bf39c486c4772d37 (matches)
keys PUBLISHED — every Midgard key derives from a seed in src/core/midgard.ts
allocations 7 across 3 tokens
bridge attestors 3 declared
roster size 21 declared seat(s), one slot each, 3000 ms per slotWhat this replaced. The harness used to BUILD a genesis at the top of every run. Four consequences, and each one is a reason the change was made:
- A node could not join it. The harness was the only thing that knew the genesis, so
strblk node --network midgardhad nothing to point at. - Every run was a different chain.
producedAtMscame from the clock, so the genesis hash — the identity of the network, and what every signature is bound to — moved on every invocation. Two runs an hour apart could not have exchanged a block. - It was not the chain it stood in for. One allocation against the dev genesis's seven; no
eSTR premine; no CCOS premine; and
bridgeAttestors: [], so$TRcould never be minted on the one network that exists to rehearse a dollar arriving over a bridge. - It had no key custody story, honest or otherwise, because the keys did not outlive the process that made them.
Token parity is now exact. MEASURED: every allocation devGenesisSpec() makes, Midgard
makes, at the same figures — 42B/15B/5B/0 STR, the whole 50,000,000 eSTR cap into the Energy
STR Pool, the 42,000,000 + 21,000,000 CCOS split that lands on the 63,000,000 cap exactly, and
three declared bridge attestors on STR.BRIDGE1–STR.BRIDGE3. A test asserts the shapes and
the totals, not only the sums: 42B/15B/5B/0 is a different chain from one 62B allocation even
though both add up.
The one deliberate difference from the development genesis is that Midgard's treasury holds
STR.treasury from block zero. devGenesisSpec() allocates no domain at all, which is fine for
a chain rebuilt in every test and useless for a network a stranger dials into: an unproved
wallet may receive and do nothing else.
The keys are public. Say it out loud.#
Every Midgard address — the treasury, all 21 validator seats, all three attestors — derives from
a string in src/core/midgard.ts. Anyone holding this repository can seal a Midgard block,
spend the Midgard treasury and mint Midgard $TR. A testnet whose keys are derivable from a
public seed is a testnet, not a security claim, and nothing on it is evidence about custody.
That is not hidden from the checks that exist to catch it. reproducibleKeyAddresses counts all
31 Midgard addresses, so strblk genesis reports them. What lets
a production-mode node start on them is a narrow exception in src/core/snotra.ts: a realm may
declare keyProvenance: { kind: 'published' }, and the exception matches only against that
realm's pinned genesis hash. The alternative — quietly leaving the seeds out of the set so the
guard never noticed — would have made every one of those surfaces describe a testnet treasury
key that is in this repository as if it were custody-held. A control bypassed by an omission
cannot be audited; one bypassed by a named, hash-pinned exception can.
The run proves the boundary rather than asserting it:
11. Production refusals
dev genesis in production refused
seed-derived validator refused
near-Midgard genesis refusedThe third probe is the new one and it is the one that matters. It starts a node on a genesis one minor unit away from Midgard — same chain id, same 21 seats, same attestors, same keys — and the node must refuse, because the hash moved and the exception no longer matches. If that probe ever comes up green, the exception has stopped being pinned to one chain and production mode has stopped refusing derivable keys on anything claiming chain id 131313.
A real Midgard deployment requires real keys made outside this repository. The seed set is
deliberately shaped as the slot set a private-key genesis uses — node/1…node/21,
service/<name>, attestor/1…attestor/3 — so replacing the keys is a substitution rather
than a redesign. What comes out is a different genesis with a different hash, and the pin moves
with it. That is what makes "the keys are public" a fact about
this chain rather than about the name Midgard.
Why 21 seats and not 1313#
REASONED, and the reasoning is in src/core/midgard.ts beside the constant. In short:
- 1313 declared seats with 13 processes is not Midgard at mainnet scale; it is a chain that is 99% down. Tyr's liveness rule is N/k slots per block, so 1313 seats and 13 producers is 101 slots — one block every 5 minutes 3 seconds, and a single rotation would take 21 hours.
- It would appear to reproduce the quorum finding while measuring something else. The
finding (
docs/design/QUORUM_FINALITY.md§1.2) is that 876 of 1313 attestations cannot be collected: 219 frames per link per slot are needed, 192 refill, 51.5% refused, best count- A 1313-seat Midgard with 13 nodes up would report
13/876for the entirely different
reason that 1300 seats are not running. Same red light, different fault. The instrument that measures the real thing is
scripts/attest-measure.mjs, which seats the whole roll in one chain and pushes real signed frames through the real limiter; a process-per-seat testnet is not that instrument and cannot become one. - A 1313-seat Midgard with 13 nodes up would report
- 21 is
SPECIAL_DOMAIN_COUNT— the whole of the mainnet declaration's variety. Seats 22–1313 are 1292 identicalpower: 50quasars; seats 1–21 are the named domains at powers 70 to 100, and Midgard takes them fromgenesisNodeSpecrather than restating them. So the seating, the power weighting (total 1760, not a flat 2100) and the Gladsheim quorum arithmetic run over the same table Asgard's will. - Its quorum threshold is a real supermajority:
floor(21 × 2 / 3) + 1= 15 of 21, where the old 13-seat harness roll needed 9 and Asgard needs 876. 15 is reachable and 876 is not, so a Midgard run that fails to reach quorum has found something. MEASURED: 21 processes run. 21 of 21 seats sealing in turn, one block every 3.05 s against a 3.0 s slot, whole run 2 m 46 s including the feature phase.
What 21 does not do, stated so nobody has to infer it: it does not test the 1313 roll, it does not test the 876 threshold, and a green Midgard run is not evidence that mainnet quorum is reachable. That question is settled — negatively — elsewhere, and nothing here changes it.
midgardGenesisSpec(seats) will build the shape at any size, for an experiment that needs one.
Exactly one value is committed and pinned; any other is a different chain, assertMidgardRollSize
says so, and production mode refuses it because no pin vouches for its published keys.
What a green run proves#
MEASURED, npm run testnet — 13 nodes, development mode, 33 checks, 1 m 49 s:
[ok] every node found the network from one seed 13/13 peered
[ok] every node enforces a closed producer set validatorSetSource: declared
[ok] each node seals as a different member of the roster 13 distinct producer addresses
[ok] every node stayed up 13/13 alive
[ok] the chain advanced past genesis height 31
[ok] blocks were produced by more than one node 13 distinct producers
[ok] every running node sealed at least once 13/13
[ok] every block was sealed by the leader of its slot 31/31 in turn
[ok] no two blocks claimed the same slot slots strictly increasing
[ok] every node holds the same producer sequence 13/13 agree on who sealed every height
[ok] every node reached the same height 1 distinct: 31
[ok] every node holds the same head af7a1bde2bcde58a…
[ok] every node computed the same state root 0cbb47fef4db…
[ok] every node validates its own chain from genesis 13/13
[ok] no node can prove an equivocation 0 alarms across 13 nodes
[ok] value moved between processes 26 transactions sealedMEASURED, npm run testnet -- --mode production — 21 nodes on Midgard, 40 checks, 2 m 46 s.
Everything above, plus the three genesis-identity checks, the three refusal probes, the
attestation check (39/39 blocks attested, best 21/21 seats) and the feature exercise.
Every node has its own data directory, its own Fafnir-sealed identity, its own TCP port and its
own producer key. Each is started knowing about node 1 and nobody else, so the peer counts it
reaches (5 to 20 in observed runs) are Praeco discovery actually working rather than a mesh
wired up in advance. Blocks cross process boundaries over real sockets through the full Bifrost
handshake, and each node's validateChain() verdict is computed from its own copy of the chain.
The observed rate#
| measurement | development (13) | production / Midgard (21) |
|---|---|---|
| declared seats | 13 (the roster is the processes) | 21 (the genesis) |
| blocks in the timed window | 13 in 39.4 s | 21 in 64.1 s |
| observed rate | one every 3.03 s | one every 3.05 s |
| distinct producers, whole run | 13 of 13 | 21 of 21 |
| equivocation alarms | 0 across 13 nodes | 0 across 21 nodes |
| blocks carrying attestations | 0 — nobody is seated | 39/39, best 21/21 seats |
| whole run | 1 m 49 s | 2 m 46 s |
The slot is 3.0 s — CHAIN_CONFIG.blockTargetSeconds, read by the harness rather than written
into it. With a roster of N and k members online the expected interval is N/k slots; with
every seat filled that is one block per slot, and that is what was observed in both modes.
That number is the reason a small deployment must declare a small validator set. Thirteen processes on the 21-seat Midgard roll produce a block every 1.62 slots; three nodes on the full 1313 genesis roster would produce one roughly every 22 minutes. The lever is the size of the roster, and it is a genesis decision made in the open — there is deliberately no backup leader, because a rule that lets somebody else seal in your slot is a rule that lets two nodes seal in one slot. The harness prints the expectation rather than leaving it to be discovered:
processes 13 of 21 seats filled
expected rate 1.62 slots per block: 21 seats, 13 running, so 8 slot(s) per
rotation have no producerThe rotation check, and the bug it was not catching#
The harness computes the expected leader itself — roster[slot mod N], where
slot = floor((producedAtMs - epochStartMs) / slotMs) — rather than asking a node whose turn it
was. Asking would only check that a node agrees with itself. The four lines are duplicated on
purpose, so that if tyr.ts ever changes what it rotates over, the harness disagrees and says
so.
It was duplicating the wrong rule in production mode, and the check had been red. MEASURED
on the unmodified harness at HEAD, node scripts/testnet.mjs --mode production --blocks 4:
[FAIL] every block was sealed by the leader of its slot
height 1 slot 5: node2 sealed, node6 had the turnThe two modes rotate over different orders and only one was implemented here:
- a declared set uses
tyrScheduleFor, which rotates over the array it is handed, in order; - a genesis set uses
TyrRotationoverGladsheimSeating.roster(), which sorts by normalized domain in byte order — deliberately, because the Althing roll carries no genesisindexand a member governance admits later has none to invent.valhalla.tssays so in as many words; nothing here had read it.
The old harness's own genesis made it obvious once looked for: its nodes were STR.midgard1…
STR.midgard13, whose byte order is 1, 10, 11, 12, 13, 2, 3, … — so slot 5 belongs to node2,
which is exactly what sealed. The harness expected node6 and called the chain wrong.
productionRoster() now implements the seating's rule, and it is still a second implementation
rather than a call into the product.
Production mode#
npm run testnet -- --mode production runs the committed Midgard genesis and the closed,
genesis-committed validator set instead of a declared one. It has to: production mode refuses the
development genesis outright, and refuses any address whose private key is derivable from a seed
compiled into the build.
Three things are checked before a single process starts, because each one fails later as something that reads like a different bug:
[ok] the committed Midgard genesis hashes to the register pin
[ok] the genesis survives the wire without changing chain identity
[ok] every declared seat has a process behind it 21/21 seats filledThe genesis reaches each child as JSON and is read back by the product's own
deserializeGenesisSpec, so the round trip has to be hash-preserving. If it were not, every node
would refuse to start with a message about custody keys — the least informative way to learn
about a serializer bug.
The feature exercise#
Until 2026-09-08 every check in this harness was about consensus or about networking. Nothing
exercised contracts, wNFT identity, governance, domain registration, the domain burn, the
domain sale, the Feeless Pool, Echo/WSTR wrapping or post-mining across processes, so for all
nine of them "the feature works" rested entirely on in-process tests: one BlockchainCore, one
heap, one clock. Those tests are good and they cannot see the class of defect a network can — a
record that does not survive serializeBlock, a rule a follower applies differently from the
producer, a ledger that is in the state root on one path and not another.
The property each check asserts is not "the feature ran". A feature that ran on the node it was submitted to has proved nothing a unit test had not. What is asserted is that N independently validating processes reach the same answer from the block alone: the submitting node computed it, the other N−1 replayed it from bytes off a socket, and all N agree.
MEASURED, production mode, 21 nodes:
7. Exercising the features across processes
[ok] a domain reservation reaches every node 4 names allocated and agreed by 21/21 nodes
[ok] the treasury pays four wallets in one block 4 payees at 100000000000000000 minor each
[ok] proving a domain mints a wNFT and locks 1000 STR on every node
[ok] every node computed the same identity root 1 distinct: 2ae01f03ce15af9b…
[ok] a wNFT attribute written on one node is read on all of them
[ok] a wrap mints WSTR against STR held in the Echo vault, one for one, on every node
[ok] an unwrap burns the WSTR and the vault releases the STR on every node
[ok] burning a domain releases the lock back to the burner on every node
[ok] every node agrees on the cooldown and bars the burner from the name
[ok] a domain sale moves the wNFT, the lock and the price on every node
[ok] a governance proposal raised on one node is chain state on all of them raised by STR.OBI
[ok] every node computed the same governance root 1 distinct: ee1e04ee0c7d7aa6…
[ok] a contract deployed through one node exists on all of them
[ok] a contract call reaches the same storage on every node storage {"count":"7"}
[ok] every node computed the same contract root
[ok] a contract call post-mines STR, and every node mints the same amount 312 minor units
[ok] the Feeless Pool holds the post-mined STR and agrees across nodesThe four wallets are derived from fixed seeds, so two runs use the same addresses:
alpha proves a domain, writes a wNFT attribute, wraps and unwraps, and deploys and calls the
contract; beta proves a domain and burns it; gamma proves a domain and sells it to delta,
who reserves a name of its own and never proves it. The reservation used to be what made delta
fundable — LedgerManager.validate refused a transfer to an address with no allocated domain —
and since the domainless-recipient change any address is fundable, so it is now there because
transferRefusal requires the buyer hold a name and no proved one.
Several checks are arithmetic rather than root comparisons, because a root comparison cannot say whether the right money moved:
- The wrap asserts a pair: the holder is down by the amount and the Echo vault is up by it.
A check on the WSTR balance alone would pass on a vault issuing claims against collateral it
never received, which is the failure shape of most bridges. (
applyWrapRecordburns the holder's STR and mints it atECHO_VAULT_ADDRESS; it does not lock it on the holder.) - The burn asserts
getAvailablemoves by the lock andgetLockedgoes to zero.getBalancecounts locked value, so it does not move at all — a check written over it would pass on a burn that refunded nothing. - The sale asserts the seller's balance is up by the price and the seller's lock is zero and the buyer's lock is the domain lock. A sale that moved the price and left the lock behind would hand the buyer an identity with no sybil cost under it.
- The Feeless Pool is checked separately from the state root, because it is not inside
LedgerManager.stateRoot()— two nodes agreeing on the root says nothing about whether they agree on the pool, and this is the only place that is asked across processes.
Where a feature cannot run, the check says so rather than being omitted#
The attestation check set the pattern: assert the result in production and the mechanism in
development, because the two modes hand the nodes different producer sets. Governance is the
same shape. In production the producers ARE the genesis nodes, so a producer's key is on the
Althing roll and may raise a proposal. In development the producers are harness keys in no
genesis at all: verifyProducerAuthorisedAt lets them SEAL, because a declared set is what
authorises sealing, and the governance roll is derived from the genesis and does not know them.
So the development check asserts the refusal by its reason —
[ok] a declared producer is on no governance roll, so it cannot propose
refused by name: the roll is derived from the genesis and a declared producer is in no
genesis. Run --mode production to exercise governance against a chain whose producers
ARE its roll— which is a stronger claim than "no proposal appeared", because it fails if the record is accepted AND if it is refused for any other reason.
Records have to be re-offered every slot, and finding that out is the finding#
RheaKind is 'tx' | 'allocation' | 'registration'. Exactly those three propagate: submit one
anywhere and whichever node has the next slot seals it. The other six record kinds —
governance, wNFT, wNFT transfer, domain burn, wrap, contract — have no SLNN protocol and no Rhea
kind, so chain.submit* queues them on ONE node and they are sealed only when THAT node's turn
comes.
MEASURED: a submit-once version of this phase timed out on five of nine features at a
36-second bound, while the records were still, correctly, sitting in a queue waiting for a turn
that had not come round — one full rotation is 63 seconds on the 21-seat roll. The harness now
re-offers each record once per slot to whoever holds that slot, which converges in one or two
slots. It is safe because every one of these records is nonce- or sequence-bound: the same bytes
offered to five nodes are one record, at most one can ever apply, and the rest are refused at the
door or dropped at seal time.
That is a product seam, not a harness detail. On a real network a client that submits a domain sale, a governance ballot or a contract call to a node that is not the current leader waits for that node's own turn — 63 s on a 21-member roster and, on a 1313-member one, up to 66 minutes — with no retry anywhere in the product. It is listed with the other seams below.
What it does not prove#
This matters more than the checklist, so it is stated at the same volume.
One machine is one clock. Thirteen processes sharing a system clock cannot disagree about which slot it is, and disagreeing about the slot is the interesting half of the slot rotation. Everything this run says about leader election is said under the assumption the whole network agrees on the time. Clock skew, NTP steps and a validator whose clock is two minutes fast are untested.
One machine is one failure domain. One disk, one kernel, one network stack. No hostile peers, no packet loss, no partitions, no independent operators, no adversary. Nothing here says anything about behaviour under attack.
Nobody went offline. Every run above had every seat filled for the whole run, which is the
easiest case: full slot occupancy and no empty slots to recover from. The liveness claim —
that an absent leader costs one slot and nothing else — is argued in tyr.ts and is
unmeasured here. --nodes short of the roll leaves seats empty and the harness prints the
N/k expectation, but no run in this document deliberately kills a producer mid-flight.
The features were exercised, not stressed. One wNFT attribute, one wrap, one burn, one sale, one proposal, one deploy and one call. Concurrency between two of them, a record refused and retried under contention, and a feature record arriving during a reorg are all unmeasured. The nine checks say the mechanisms work across processes on a quiet network; they say nothing about what happens when two of them collide.
No node misbehaved. The equivocation check is 0 alarms, and it stayed zero because every
node followed the rules. That the alarm fires when a producer does seal twice is proved by the
unit and integration suites, not by this run.
The rotation was not stressed. 31 blocks over a 13-seat roster and 39 over a 21-seat one is two rotations at most. Long-run fairness, mempool starvation of a particular member, and behaviour across an epoch boundary are all unmeasured.
Midgard is not deployed. This build knows what Midgard IS — a committed genesis and a pinned
hash — and knows nothing about where it is running. rpcUrls and explorerUrls in the register
are empty and stay empty until something answers at an address. Whether any Midgard node exists
outside a harness run is unmeasured.
A green run means the stack works as a network rather than as a library, and that leader election works as written when everyone is honest, present and agreed about the time. It is not evidence that the network is safe.
Seams this run exposes#
Product gaps the harness had to work around. Each one is a real limitation, not a harness detail:
- A node has no operator interface. See below: the harness cannot use
strblk node. - Identity records do not gossip.
HestiaNode.flowOncebroadcasts Rhea entries of kindtxand nothing else, so an allocation or a registration never leaves the node it was submitted to. Under leader election that has a cost that did not exist before: a client that submits a domain claim to a node which is not the current leader waits for that node's own turn, which on a 13-member roster is up to 39 s and on the 1313-member genesis roster is up to 66 minutes. The harness measures this directly — step 5 waits for node 1's turn before it can transfer, because the payees it allocated only reach the chain in node 1's slot. Corrected 2026-09-15
Withdrawn:
Seven of the ten record kinds do not gossip AT ALL.Corrected 2026-09-15: Kvasir closed this. Fifteen of the seventeen carriers were flooded then, eighteen of twenty when recounted 2026-10-07; the two that are not, contract and collateral records, are refusals rather than gaps, because neither can be authenticated by a relaying node.RheaKindis'tx' | 'allocation' | 'registration'.RheaKindis now DERIVED fromRHEA_CARRIERSrather than hand-written, which is what stopped it drifting from the carriers again. What follows described the state before that and is kept as the record of it: Governance records, wNFT records, wNFT transfers, domain burns, wrap records, contract records and collateral records have no SLNN protocol and no Rhea kind, sochain.submit*queues them on the ONE node that took the call and they are sealed only when that node's turn comes — 63 s on the 21-seat Midgard roll, up to 66 minutes on the 1313-seat genesis roster — with no retry anywhere in the product.MEASURED: a submit-once feature phase timed out on five of nine features at a 36-second bound while every record was still correctly queued. The harness works around it by re-offering each record once per slot to whoever holds that slot; a wallet has nothing equivalent. This is the largest seam in this list and it is the reason a domain sale or a governance ballot is not usable today by a client that cannot guess which node is the leader.- A node cannot be asked whose slot it is.
BlockchainCore.leadersis private and there is no accessor, so neither an operator nor a metrics exporter can ask a running node for the current slot, the current leader, or the roster it is enforcing. The harness recomputes the schedule from its own configuration — and, until 2026-09-08, recomputed it from the WRONG rule in production mode without anything catching the disagreement. See "The rotation check" above. - The Feeless Pool is not in the state root.
LedgerManager.stateRoot()folds seven token ledgers, contracts, governance, identity, collateral and burned domains. It does not foldFeelessPool, so two nodes holding different pool books agree on the state root and both report a valid chain. The feature phase asks about it separately, across processes, which is the only place that question is put; a divergence would be invisible to every other check in this repository. - There is no
BlockchainCore.equivocations(). The alarms live on the publicforksresolver (chain.forks.alarms(),alarmCount()), which is reachable, so the check is real — but the name an operator would look for does not exist.
Closed since this document was last written: the Midgard chain id is a harness constant —
it is now MIDGARD_CHAIN_ID in src/core/midgard.ts, read by the register and by the harness,
with a test pinning the two equal; and the production testnet builds a genesis of its own —
it now runs the committed one.
Why it does not use strblk node#
The first version of this harness drove the shipped binary directly. Thirteen nodes started,
found each other, and sat at height 0 forever, writing nothing but identity.json.
A node seals only when its mempool is non-empty, and nothing can put a transaction into a running node from outside its own process — there is no network-facing submission interface. So a testnet built from the shipped binary cannot be given any work.
scripts/testnet.mjs therefore runs on scripts/e2e/node-agent.mjs, which embeds the same
HestiaNode and adds a local control channel. That is a workaround for a gap in the product,
not a design choice, and it is recorded as a launch blocker rather than hidden here.
Polaris runs on the same agent, for the same reason. MEASURED, 2026-09-07: everything both
need — the genesis, the producer keys, the rotation order, how an agent is spawned and spoken to —
now lives in scripts/e2e/midgard-net.mjs and is imported by scripts/testnet.mjs and
scripts/polaris.mjs alike. So the gap above is not two workarounds; it is one, and closing it
closes it for both. The agent now also takes the directory lease before it starts and publishes
its operator endpoint into the lock file, which is what lets strblk status and
strblk explorer --dir find a running node to ask instead of opening a second store beside a
live writer.
How it is put together#
- The roster is built before anything is spawned, and in production it is READ from the genesis rather than assembled: the seating sorts the declared nodes by normalized domain, and that order is what the rotation is. Every node is started with its own key and the whole committed set. No two-phase start and no discovery of who the validators are: the roster is chain identity, so it cannot be assembled from whoever happened to connect.
- Every node needs work of its own. A node whose mempool is empty at its turn seals nothing and the slot is lost. So the harness queues one domain allocation on every node every 1.5 s — the smallest record the chain accepts from a stranger, and exactly how a newcomer joins. Value moves separately, from the one funded account, so the state root moves rather than only the identity registry.
- Nodes seal every 500 ms, not every 3 s. A leader that tried once per slot would lose its turn whenever the attempt fell before its work arrived. Six attempts per slot cost nothing: an attempt outside this node's turn is a failed header check, not a block.
- Ports are chosen by the OS. Nothing is hardcoded, so runs do not collide.
- Keys are sealed at rest. Each node gets its own
SOURCELESS_KEY_PASSPHRASE, so the run exercises the real keystore path rather than the unencrypted fallback. - Nodes start sequentially. Thirteen simultaneous scrypt derivations at N=2¹⁷ would peak
around 1.7 GB; started one at a time the peak is roughly 173 MB. A real deployment starting
thirteen nodes together does hit the higher figure — worth knowing before writing a systemd
target. Twenty-one started sequentially is
MEASUREDto run on one machine at the same block rate as thirteen; twenty-one started together is unmeasured. - Feature records are re-offered once per slot, never faster. A record already applied is refused at the door, which is expected and is not counted as a failure; the loop checks the chain BEFORE it submits, so a landed record stops being offered.
- stdin is a pipe the harness holds open. That is each child's lifeline: if the harness
dies for any reason, including a signal it cannot handle, the write end closes, the child
reads EOF and stops itself. Passing
'ignore'here hands the child/dev/null, which is at EOF immediately — the agent then shuts down before it finishes starting and reports nothing at all on the way out. That cost an hour the first time. - Every wait is on a condition, never a sleep, and every wait reports what it last observed when it times out — including whose slot it was at the moment it gave up.
Reading a failed run#
The harness prints each node's height, head, state root, peer count, blocks produced and
validateChain() verdict before it tears anything down, then names which checks did not hold.
The failures worth recognising:
every block was sealed by the leader of its slotfailed. The harness names the height, the slot, who sealed and whose turn it was. Either the rotation intyr.tschanged, or a node is enforcing a different roster — checkvalidatorSetSourceon every node first.blocks were produced by more than one nodefailed with 1 producer. The rotation is not being enforced at all, or twelve nodes have no work at their turn. Check the closed-set line in step 4:development-openthere means the run tested nothing about leadership.every running node sealed at least oncefailed. Not necessarily a defect: a member with nothing to seal at its turn loses the slot silently, which is the slot rotation working as designed. Compareslot occupancy— if blocks are far fewer than slots, work is not reaching every node. Note the denominator is the RUNNING processes, not the declared seats: an unfilled seat is reported once, byevery declared seat has a process behind it, rather than as N failures here.the committed Midgard genesis hashes to the register pinfailed.src/core/midgard.tsandsrc/core/snotra.tshave drifted. Nothing else in the run will mean anything; the pin is what every node's start-up guard is checked against, so fix this first.production refuses a genesis one byte away from Midgardfailed. The published-key exception has stopped being pinned to one hash, and production mode has stopped refusing repository-derivable keys on anything claiming chain id 131313. Treat as the finding of the run.- A feature check timed out at
0/N nodes. Read the detail line before anything else: it names the first node that could not ANSWER and the last submission that was refused.0/Nwith no error and no refusal means the record was accepted and never sealed, which points at the leader-targeting;0/Nwith an error on every node means the read itself is broken and the feature may be perfectly fine. no node can prove an equivocationfailed. One producer signed two blocks at one height. This is the failure the whole schedule exists to prevent; the alarm carries both headers and the chain they were signed for.- Different heads at the same height is a fork. Under a rotation it should be impossible between honest nodes; if you see it, look at whether two nodes disagree about the roster order before looking anywhere else.
- Different state roots at the same head is worse. The blocks agree and the nodes computed different state from them — a determinism bug, which is the class of defect this codebase treats as most serious.
What is still missing for a real deployment#
None of the following exists yet, and a local testnet passing does not substitute for any of it: private keys for Midgard, whose keys are published on purpose, a multi-host Midgard run, and a clock-skew test. See BUILD_STATUS.md for the full list and its ranking.
Six items that used to be on that list have since been built, and each carries a caveat worth
reading rather than a tick: a Linux artifact and a container image that builds (both in CI, and
CI is unreachable from this machine, so neither has been observed to run); a canary process
(Vidar, npm run canary) and a rollback playbook (Hlin, docs/RUNBOOK_ROLLBACK.md);
metrics export (Cepheid, GET /metrics, measured at 120 series from a running node); and
a service unit plus a backup and restore procedure (Pharos, deploy/, and
docs/RUNBOOK_BACKUP.md).
Two of those are conditional in a way a tick would hide. The metrics endpoint closes nothing on
its own — every alerting path still runs inside the node process, so the process is dead
produces no signal unless something outside is scraping, and deploy/ is configuration that has
not been executed here. And the backup procedure's finding is a refusal: MEASURED, copying
a data directory a node is writing to can lose records silently, so the procedure is stop-then-
copy, or an atomic filesystem snapshot, and not cp -r.
Alert sinks are still open. Hermod writes to stderr, which reaches journald and a container log collector with no configuration and no network — and getting it from there to a person is an operator's, not this repository's. Nothing here pages anybody.