Block states
A block in Taiko Alethia transitions through different states as it progresses through the protocol. The key states are:
- Proposed: The block has been submitted to the TaikoL1 contract.
- Proved: At least one validity proof has been submitted.
- Verified: The block and all its ancestors up to genesis have valid proofs.
Taiko Alethia allows parallel proof generation, meaning multiple blocks can be proved concurrently. However, a block is considered verified only when its parent block is also verified. Blocks are verified in batches, not sequentially.
For more details, refer to the Multi-Proofs page.
Safe and Finalized Block States
Safe Block
The Safe block state on Taiko Alethia is equivalent to a Safe block on Ethereum.
Each L2 block originates from an L1 block that can be queried using the taiko-geth API
. If the corresponding L1 block is considered Safe, the associated L2 block can also be considered Safe.
Querying L1 Origin for an L2 Block
The following taiko-geth API method retrieves the L1 origin of a given Taiko Alethia L2 block:
func (s *TaikoAPIBackend) L1OriginByID(blockID *math.HexOrDecimal256) (*rawdb.L1Origin, error) {l1Origin, err := rawdb.ReadL1Origin(s.eth.ChainDb(), (*big.Int)(blockID))if err != nil {return nil, err}if l1Origin == nil {return nil, ethereum.NotFound}return l1Origin, nil}
Finalized (Verified) Block
The Verified block state in Taiko Alethia is analogous to the Finalized block state in Ethereum. A block is Verified when:
- Every state transition from genesis to the current block has valid proofs.
- Its parent block is also verified.
- The block is included in a batch verification process.
A Verified block cannot be reverted, ensuring strong finality guarantees.
Example API Query and Response
The following JSON-RPC request retrieves the L1 origin for a given L2 block:
{"method": "taiko_l1OriginByID","id": 1,"jsonrpc": "2.0","params": ["0x19a3c"]}
Response
"result": {"blockID": "0x19a3c","l2BlockHash": "0x0905c85f9a288ebe94eb85743a65c8cf6266097b8b826cdca4f4018e6267c26a","l1BlockHeight": "0x16ef0f","l1BlockHash": "0x419f0c5b2cc90078c7040c3b90d174895ce83d76ebfdd75ad2dd5521036d0938"}
Interpreting the Response
For block 0x19a3c
:
- It is Safe if the L1 block (
0x419f..
) reaches a Safe state. - It is Finalized (Verified) if all state transitions from genesis to block
0x19a3c
have valid proofs.