NETSoon

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.

Terminal
acrux node follow http://127.0.0.1:4930
Argument or optionDefaultMeaning
URLrequiredthe gateway's JSON-RPC: Acrux Net's, or a local cluster's
--genesis../chain/genesis/acrux-net.jsonthe net's genesis, for the programs its SVM runs

What it does

  1. Loads the starting state

    It reads the executed state of the latest finalized cblock with getExecutionSnapshot and 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.

  2. 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's agreedSet. On a cblock's last slot, the cblock must carry a fast or slow finalization certificate at its threshold.

  3. Decrypts the agreed blocks

    It reads the slot's encrypted blocks with getSlotBlocks and 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).

  4. Re-executes

    It validates every transaction against its signed header and charges the inclusion fees. It collects fragments until t of 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

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
LineMeaning
from cblock N: A accounts loaded, state H matchesthe starting cblock, the accounts in its state, and the first 12 hex digits of its state hash
slot N re-executedslot N was decrypted, merged and executed here
agreedthe agreed set P, the proposers whose blocks the slot executed
state … matchesthe first 12 hex digits of the state hash computed here, equal to the net's
checkedslots 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:

ReasonWhat failed
the starting state does not hash to cblock N's state hashthe loaded state differs from the net's
attestation by a non-proposeran attestation's index names no proposer of the window
attestation signaturean attestation does not verify under its proposer's identity
the attestations do not agreethe attestations yield no agreed set
agreed set … differs from the attestations' …the slot claims a different P than its attestations give
no finalization certificatea cblock's last slot shows no finalization certificate at its threshold
released key does not match the block's key commitmentan attestation's key opens no committed block
block N does not match its attested commitmenta decrypted block is not the block its proposer committed to
signed header or target mismatcha 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 Ma finalized cblock is not on the chain already run