Docs Run a node
Follow a net
Re-execute a running Acrux net with acrux node follow. It decrypts every finalized slot's blocks, merges and runs them on its own SVM, and checks each state hash.
acrux node follow follows a net the way a validator does. Starting from the latest finalized cblock, it takes each finalized slot's encrypted blocks and checks the attestations. It decrypts the blocks with the keys their attestations release, merges and re-executes them on its own SVM, and compares every state hash with the net's. It trusts nothing it can recompute.
acrux node follow http://127.0.0.1:4930| Argument or option | Default | Meaning |
|---|---|---|
URL | required | the gateway's JSON-RPC: Acrux Net's, or a local cluster's |
--genesis | ../chain/genesis/acrux-net.json | the net's genesis, for the programs its SVM runs |
What it does
Loads the starting state
It reads the executed state of the latest finalized cblock with
getExecutionSnapshotand loads it into its own SVM. Its hash of that state must equal both the snapshot's state hash and the net's state hash for the cblock's last slot.Checks each slot's attestations
Every attestation is checked against the identity of the window's proposer with that index.
Agreed(s)is run on the checked attestations, the strict-majority rule of Validator, and must give the slot'sagreedSet. On a cblock's last slot, the cblock must carry a fast or slow finalization certificate at its threshold.Decrypts the agreed blocks
It reads the slot's encrypted blocks with
getSlotBlocksand decrypts each agreed block with the key its proposer's attestation released. The key must match the block's committed key hash. The block's commitment, rebuilt from its slices' roots, its key hash and its parent, must equal the hash its attestations name (Wire formats).Re-executes
It validates every transaction against its signed header and charges the inclusion fees. It collects fragments until
tof them rebuild a threshold transaction, then merges the slot and executes it with Algorithm 4 and the fees (Ordering and selection). The state hash it computes must equal the net's for that slot.
A finalized cblock finalizes its ancestors, so it executes the chain of cblocks back to the last one it ran, in order, and each must extend the one before.
Output
from cblock 347: 61 accounts loaded, state 12e2b70f6d63 matches
slot 1392 re-executed agreed [1,2,3] state d0e3673214c7 matches checked 1
slot 1393 re-executed agreed [1,2,3] state 3396a5380950 matches checked 2
slot 1394 re-executed agreed [1,2,3] state 18664cef672c matches checked 3
slot 1395 re-executed agreed [1,2,3] state c599fb0c37ed matches checked 4
slot 1396 re-executed agreed [1,2,3] state 706da1bbc666 matches checked 5| Line | Meaning |
|---|---|
from cblock N: A accounts loaded, state H matches | the starting cblock, the accounts in its state, and the first 12 hex digits of its state hash |
slot N re-executed | slot N was decrypted, merged and executed here |
agreed | the agreed set P, the proposers whose blocks the slot executed |
state … matches | the first 12 hex digits of the state hash computed here, equal to the net's |
checked | slots re-executed since the command started |
It polls every 200 ms and continues as new cblocks finalize. Stop it with Ctrl+C. The gateway holds each slot's encrypted blocks for the last 64 slots.
When a check fails
The command stops with the slot and the reason:
| Reason | What failed |
|---|---|
the starting state does not hash to cblock N's state hash | the loaded state differs from the net's |
attestation by a non-proposer | an attestation's index names no proposer of the window |
attestation signature | an attestation does not verify under its proposer's identity |
the attestations do not agree | the attestations yield no agreed set |
agreed set … differs from the attestations' … | the slot claims a different P than its attestations give |
no finalization certificate | a cblock's last slot shows no finalization certificate at its threshold |
released key does not match the block's key commitment | an attestation's key opens no committed block |
block N does not match its attested commitment | a decrypted block is not the block its proposer committed to |
signed header or target mismatch | a transaction does not derive its signed header, or targets a later slot |
slot N: re-executed state … differs from the net's … | executing the agreed blocks gave a different state |
cblock N does not extend cblock M | a finalized cblock is not on the chain already run |