Blocks
A block is a header hash, a header and a body. The body holds four sets:
The full block is published to the data availability layer. Only the header hash and header go to L1. That is sufficient because the header holds the Merkle Patricia Trie root of each set, and each root can be checked on L1 by streaming over the set.
Order of application
A block applies its events in a fixed order:- Withdrawals
- Transaction orders
- Transaction requests
- Deposits
The block header
The header hash is the Blake2b-224 hash of the header, 28 bytes.
The UTXO set
The UTXO set maps output references to outputs. An output has an address, a value, an optional inline datum and an optional script. An output reference is the ID of the event that created the output (a transaction or a deposit) and its index. Every L2 address carries the network ID of the Sundial instance, which separates the L2 ledger from the settlement L1 and from other Sundial instances.Transactions
There are two ways a transaction reaches a block:- A transaction request is submitted to an operator’s API. This is the normal path.
- A transaction order is posted on L1. Operators must include it. See Deposits, withdrawals and transaction orders.
transactions set.
How the transaction type differs from Cardano’s
The L2 transaction type is based on Cardano’s Conway-era transaction, restricted to what a contract-secured L2 can validate.
Violating any of these is fraud under the ledger rules.
Hashed fields
In the form that L1 scripts work with, every variable-length field of a transaction is replaced by its hash. This lets a fraud proof step through a transaction at bounded cost. The data availability layer holds the preimages, and a mismatch between a hash and its preimage is itself provable.Confirmed state
A block is confirmed once all its predecessors are confirmed and its maturity period has passed without a verified fraud proof. Confirmation is irreversible, which lets the L1 representation be condensed:ConfirmedStatekeeps only the last confirmed header’s hash, its UTXO root, its time bounds and its protocol version. Each merge overwrites it. Earlier headers are pinned by the chain of header hashes.Settlementtakes the block’s deposit, withdrawal and transaction roots into a separate settlement UTXO. Users reference it to absorb deposits and pay out withdrawals. See Consensus.