A Commit closes a Crossing: the Coprocessor posts the new Ledger root under its enclave signature, and the Pool program stores it only after checking that signature, the chain of roots, everything the Crossing recorded on chain and the conservation of every asset it touched. The same instruction pays the Crossing’s fees to the fee recipient.
What a Commit posts#
A Commit is one transaction: an idempotent creation of the fee recipient’s token account for each asset it carries, then an Ed25519 signature-verification instruction that carries the Commit message and the enclave’s signature over it, directly followed by commit, which has no payload of its own. Three earlier stages of the Crossing leave on chain what the Commit is checked against: open_crossing records the verified mids, route_residual records each Residual fill, and log_diff posts the ciphertext diff.
is the signing key’s epoch, the Crossing index, and the two roots are the prior and the new one. The domain tag and program id keep a signature made for a route, an open or another deployment from passing as a Commit. The body holds:
| Field | Meaning |
|---|---|
| the data availability accumulator over the Crossing’s diff | |
| , | the root and count of the Exits this Commit lists |
| , | the hashes of the mids and of the Residual fills recorded for Crossing |
| the digest of the deposit chain hashes at the new cuts | |
| per touched asset | the mint; the Ledger total ; the Exits added ; the fees ; the deposits credited from each shard; the commitment delta ; the aggregate opening |
Nothing in names a trader, a balance or an order: every field is a root, a hash, a count or a per-asset aggregate. The byte layout is in Signed messages.
A heartbeat Commit, which the Coprocessor sends when nothing has settled for 750 slots (The batch), carries no asset: its message lists zero asset entries, the transaction creates no token account, and the program runs every check below except the per-asset ones.
What the program checks#
The program stores the new root only if every check below passes; any failure reverts the whole transaction.
| Check | Holds when |
|---|---|
| Enclave signature | the instruction just before commit verifies one signature over under a key the Registry admits, within that key’s validity interval |
| No Escape | the Escape is not active |
| Order and prior root | is the stored index plus one, and equals the stored root |
| Opener | the signing key opened Crossing ; only that key commits it until the Crossing’s lease passes (Coprocessor) |
| Mids | equals the hash open_crossing stored over the Pyth prices it verified |
| Fills | equals the fills route_residual recorded, and the Commit carries every mint a fill or a consolidate_vault of Crossing moved |
| Data availability | equals the log_diff accumulator, which is then sealed (Ledger) |
| Conservation | for each touched asset, the vault identity and the commitment equation hold |
| Deposits | each shard’s cut lies between the stored cut and the queue’s head, and matches the chain hashes the program wrote at the cuts |
Enclave signature by instruction introspection#
A Solana program cannot call the Ed25519 precompile. It learns that a signature was checked by reading the transaction’s instructions through the Instructions sysvar. A precompile instruction may verify a signature over bytes taken from any instruction, so the Pool accepts one shape only: the instruction directly before commit belongs to the Ed25519 program, verifies exactly one signature, and points every offset into itself at fixed positions (signature, key, then the message to the end). The program reads from there, finds the key in the Registry and checks the current slot against its validity interval.
The Registry admits a key only after register_enclave has verified the enclave’s attestation, which binds the key to a published measurement (Attestation and reproducible builds). Because includes and the prior root, a signature authorizes one root and never a later one.
Conservation per asset#
For each asset it touches, the Commit applies its deltas and checks two equations. The first is in base units: the vault identity, under which the shards hold exactly the attested Ledger total , the committed Exits not yet released and the deposits not yet credited.
The second ties the Ledger’s commitments to that total. The program keeps , the sum of every asset- leaf commitment, and the Commit supplies the change and the sum of the asset’s openings. With weights hashed from , the asset’s index and , every carried asset is checked in one multiscalar multiplication over ristretto255:
A Commit with any asset out of balance passes with probability at most for an adversary making hash queries, below for . Any watcher runs the remaining check from the diff: each is the sum of the rewritten leaves’ commitment changes, with a range proof for every leaf and a validity proof for the batch. Together these give committed conservation: every in-range opening of an asset’s leaves sums to , and the Council’s decryption of each leaf equals its balance, so the claims an Escape can pay against a root total exactly .
The fee payment#
The same commit instruction pays the Crossing’s fees , in each pair’s quote asset (SOL or USDC), from vault shard 0 to the token accounts of the fee recipient that the Pool’s configuration names. The amounts are the ones the signed message states, and they leave the vault in the transaction that attests them, so no fee stays in the Pool between Commits. What each fill pays is in Fees; Fees and $PRV follows the fees from the fee recipient on.
What a Commit changes#
On success the program stores:
- in the Ledger root account: , , , , the Commit’s slot, and in a ring of the last 64 exits roots;
- in each touched asset’s state: the new and , added to the committed Exits awaiting release, and the new cut of each shard;
- in the Crossing’s state account: the sealed accumulator.
From then on the deposits up to the cuts are credited, each listed Exit can be paid by a permissionless release_exit that proves its inclusion under , and each trader’s new leaves verify against . The Commit’s slot starts the liveness window: if no Commit follows within slots (about 30 minutes), anyone can open the Escape. A live Coprocessor commits each Crossing that settles something and sends a heartbeat 750 slots after the last Commit otherwise, so the gap stays near 750 slots at most, a twelfth of that window.
Atomicity#
Every Commit writes the Ledger root account, so Sealevel runs Commits one at a time, while deposits, which do not write it, run alongside. A Commit that fails a check reverts in full: the root stays at , and the Coprocessor resubmits with the fills already on chain, so no swap repeats and the Ledger credits exactly the fills the program recorded. A second copy of a Commit that has landed fails the order check, which the relayer reads as confirmation.