Expand description
This module is the core of the Sovereign SDK. It defines the traits and types that allow the SDK to run the “business logic” of any application generically.
The most important trait in this module is the StateTransitionFunction
, which defines the
main event loop of the rollup.
Structs§
- Batch
Receipt - A receipt for a batch of transactions. These receipts are stored in the rollup’s database
and may be queried via RPC. Batch receipts are generic over a type
BatchReceiptContents
which the rollup can use to store arbitrary typed data, like the gas used by the batch. They are also generic over a typeTxReceiptContents
, since they contain a vectors ofTransactionReceipt
s. A receipt giving the outcome of a batch of transactions - Event
- A key-value pair representing a change to the rollup state
- Event
Key - The key of an event. This is a wrapper around a
Vec<u8>
. - Event
Value - The value of an event. This is a wrapper around a
Vec<u8>
. - Prover
Config - The configuration of a full node of the rollup which creates zk proofs.
- Slot
Result - Result of applying a slot to current state Where:
- Standard
Config - The configuration of a standard full node of the rollup which does not create zk proofs
- Transaction
Receipt - A receipt for a single transaction. These receipts are stored in the rollup’s database
and may be queried via RPC. Receipts are generic over a type
R
which the rollup can use to store additional data, such as the status code of the transaction or the amout of gas used.s A receipt showing the result of a transaction - ZkConfig
- The configuration used to initialize the “Verifier” of the state transition function which runs inside of the zkVM.
Traits§
- State
Transition Config - A special marker trait which allows us to define different rollup configurations. There are
only 3 possible instantiations of this trait:
ProverConfig
,ZkConfig
, andStandardConfig
. - State
Transition Function - State transition function defines business logic that responsible for changing state. Terminology: