Rebuild the dish from nothing
The contract keeps one ordered ledger: every colony that joined, every purchase and sale, every planting, specimen slide and tide, every clock skip and refund, with the PETRI, NEAR and credit each moved. That is all anyone needs: Life is deterministic, so replaying the ledger from an empty dish must land on exactly the board, the history chain, the PETRI balances, the NEAR vault and the credit pool the contract holds. This page does it now, in your browser, with the same Rust code the contract runs, reading everything from one final block.
The replay stops at the generation the contract last stored. The live dish elsewhere on this site runs a few generations ahead of that in your browser, by the same rules, until someone advances the contract.
0of — generations, the last one the contract stored
What was checked
- History chain
- On chain
- —
- Replay or rule
- waiting for the replay
- Board hash: every cell and its owner
- On chain
- —
- Replay or rule
- waiting for the replay
- Living cells
- On chain
- —
- Replay or rule
- waiting for the replay
- Every planting was legal, sieges marked
- On chain
- —
- Replay or rule
- waiting for the replay
- Every planting paid the formula's price
- On chain
- —
- Replay or rule
- waiting for the replay
- Every planting paid its cell fee
- On chain
- —
- Replay or rule
- waiting for the replay
- Every licensed planting was a slide of at least licence_min_cells (12) cells, its pattern, and paid the holder of the day (or the agar, for a planter that never attached NEAR)
- On chain
- —
- Replay or rule
- waiting for the replay
- Every purchase followed the agar's curve
- On chain
- —
- Replay or rule
- waiting for the replay
- Every sale back followed the curve and the allowance, and none was the house's
- On chain
- —
- Replay or rule
- waiting for the replay
- Specimens: every slide is its colony's own cells as the dish stood
- On chain
- —
- Replay or rule
- waiting for the replay
- Every slide's holder and the royalties it was paid
- On chain
- —
- Replay or rule
- waiting for the replay
- Every tide: ran when due, chain and stored bytes; its share of the vault, split, bounty (none to the house) and storage worked out from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- Every claim took exactly what its colony was owed
- On chain
- —
- Replay or rule
- waiting for the replay
- Every refund is for exactly the payout it names, once
- On chain
- —
- Replay or rule
- waiting for the replay
- No colony holding kept PETRI (earned before its first NEAR, or bought with credit) sold PETRI for NEAR or paid for a pact
- On chain
- —
- Replay or rule
- waiting for the replay
- Every colony's kept PETRI, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- Every pact kept to the rules, and no planting broke a pact binding its colony
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI the dish holds for pact offers not yet accepted
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI left in the agar
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI sold from the agar for NEAR
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI burned by planting, by specimen slides and by unregistering
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI paid to slide holders in royalties
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI returned to the agar by planting
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI bought back by the agar
- On chain
- —
- Replay or rule
- waiting for the replay
- PETRI set aside for keepers
- On chain
- —
- Replay or rule
- waiting for the replay
- Every colony's lifetime PETRI earnings
- On chain
- —
- Replay or rule
- waiting for the replay
- NEAR in the tide vault
- On chain
- —
- Replay or rule
- waiting for the replay
- NEAR paid in by players
- On chain
- —
- Replay or rule
- waiting for the replay
- NEAR paid out at tides
- On chain
- —
- Replay or rule
- waiting for the replay
- Every colony's NEAR won at tides
- On chain
- —
- Replay or rule
- waiting for the replay
- Credit sponsored, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- Credit spent in the dish, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- Credit taken back by its sponsors, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- NEAR won and not yet claimed, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- Pending NEAR, from the ledger
- On chain
- —
- Replay or rule
- waiting for the replay
- The contract's NEAR covers everything it owes, as the ledger counts it
- On chain
- —
- Replay or rule
- waiting for the replay
- Nobody can change the contract: no full-access key
- On chain
- —
- Replay or rule
- waiting for the replay
Checkpoints, as they were met
- Tides appear here as the replay reaches them: each one checks the history chain and the NEAR it paid.
How the history chain is built
Every sixteenth generation the contract hashes the board (each living cell and its owner) and folds that hash into a running chain. At every tide that runs, on a 240th generation, the ledger records the chain. Change one cell anywhere in the past and every later link changes.
Your browser reads the rules, the state, the colonies, the whole ledger, each colony's earnings and tide winnings, and the contract account (its keys and its NEAR balance) from petri-v6.testnet on NEAR testnet, all at one final block. Nothing else. The switch at the top of the page picks the dish: free play on testnet or real NEAR on mainnet.
It starts petri-core on an empty dish with all 1,000,000 PETRI in the agar, an empty vault and an empty credit pool, then applies each entry at its generation: it checks every planting is legal and paid the formula's price and its fee, every purchase and sale followed the curve and the sale allowance, every tide ran exactly when due and paid the right shares of the vault and the credit pool, as NEAR or as credit to the right colonies, and every specimen slide holds exactly its colony's living cells as the board stood and burned the rule's price. Between entries it steps Life and feeds the living exactly as the contract does.
At every tide and at the end it compares hashes, PETRI, NEAR and credit with the contract, and checks that the contract's NEAR covers everything it owes. A match means the dish you see, and every coin and NEAR in it, is what the rules produced.
Run it without this page
The same replay runs from a terminal with Node 20 or later, straight against NEAR RPC. It prints each check and exits non-zero on any mismatch.
git clone https://github.com/RohanGlitched/petri cd petri node scripts/verify.mjs # the mainnet dish, or any other dish node scripts/verify.mjs --network mainnet node scripts/verify.mjs --contract petri-v6.testnet --network testnet
What this does not prove
- It proves the board and balances follow from the log. It cannot prove the log itself is complete; that is NEAR’s job, since every planting is a transaction anyone can look up.
- It reads through public RPC providers. A lying provider could feed you a consistent fake; check against a node you trust if the stakes are high.
- Token transfers between accounts are not replayed here. They do not touch the dish, and their totals are covered by the contract’s conservation tests.