Contents

1 Espresso Confirmation Layer
1.1 Overview
1.2 Architecture
2 Confirmation Layer State
2.1 Overview
2.2 State Merkle Tree
2.2.1 In Memory
2.2.2 In A Relational Database
2.3 State Database
2.3.1 In-Memory Representation
2.3.2 On-Disk Representation
2.3.3 Peer-to-Peer Catchup
3 State Transition Function
3.1 Overview
4 State Catchup
4.1 Overview
5 Chain Config
5.1 Overview
6 HotShot Consensus
6.1 Overview
6.2 View Protocol
6.2.1 Consensus Tasks
6.2.2 Storage
6.3 Epoch Changes
6.4 Staking
6.4.1 Staking And Withdrawing
6.4.2 Delegation
6.4.3 Rewards
6.4.4 Slashing
6.5 Light Client
6.5.1 Certificates
6.5.2 Prover
6.5.3 Contract
6.6 Protocol Upgrades
7 Networking
7.1 Overview
8 Protocol Upgrade
8.1 Overview
9 Staking
9.1 Overview
10 HotStuff
10.1 Overview
11 Stake Table Smart Contract
11.1 Overview
11.2 Transition from static stake table to proof of stake
12 Stake Table Contract Requirements
12.1 Validators
12.2 Delegators
12.3 Global Confirmation Layer (GCL)
12.4 Staking User Interface (UI)
12.5 Non-requirements
13 Rewards Requirements
14 Rewards
14.1 Overview
14.2 Types
14.3 Reward Distribution
14.4 APIs
14.5 Leader Selection
14.6 Claiming
15 Query Service Requirements
16 Query Service
16.1 Overview
16.2 Modular Architecture
16.2.1 API Layer
16.2.2 Data Sources
16.2.3 Storage Implementations
16.2.4 Plugins And Extensions
16.3 Database Schema
16.3.1 Consensus Artifacts
16.3.2 Aggregated Statistics
16.3.3 Merklized State
16.3.4 Internal State
16.3.5 Migrations
16.4 Data Streaming And Updates
16.4.1 Consensus Artifacts
16.4.2 State
16.4.3 Aggregates
16.5 Fetching Missing Data
16.5.1 Infallible Interface For Fetchable Data
16.5.2 Active And Passive Fetching
16.5.3 Fetching From Consensus Storage
16.5.4 Fetching From Peers
16.5.5 Fetching Streams
16.5.6 Scanning
16.6 Pruning
16.6.1 Consensus Artifacts
16.6.2 Merklized State
17 Rollup Integration
17.1 Overview
18 Rollup Integration Requirements
19 List Of Rollup Stack Integrations
20 Arbitrum Nitro Integration
20.1 Overview
20.2 Components
21 Nitro Integration Requirements
22 Nitro Batcher
22.1 Overview
22.2 Key Management
22.3 Startup
22.4 SequencerInbox
22.5 Task 1: Sequencer Espresso
22.5.1 High Level Flow
22.5.2 Tranasaction Submission Process
22.5.3 CheckEspressoQueryNodesForTransaction
22.6 Task 2: Espresso L1
22.6.1 MaybePostSequencerBatch
22.6.2 Submission To Sequencer Inbox
22.6.3 Resetting
23 Nitro Caffeinated Node Watchdog
23.1 Overview
23.2 Force Inclusion Checker
23.2.1 Starting the Checker
23.2.2 Check if a message can be force included
23.3 State Checker
24 Nitro Caffeinated Node
24.1 Overview
24.2 Initialization
24.3 Starting Caff Node
24.4 Create Block
24.5 NextMessage()
24.6 Publish Transaction
25 Nitro Caff Node Requirements
26 Nitro Espresso Streamer Requirements
27 Nitro Espresso Streamer
27.1 Overview
27.2 Parameters
27.3 Streaming Messages
27.3.1 Peek
27.3.2 Next
27.3.3 NextEspressoBlock
27.4 Checkpoints
27.4.1 Proof Of Checkpoint Consistency
27.5 Low Level Functions
27.5.1 Check if the msgBuf array contains the message
27.5.2 Fetch the transactions in a block from all the clients
28 Espresso TEE Verifier
28.1 Overview
28.1.1 Verify
28.1.2 Signature V Overview
28.1.3 RegisterSigner
28.1.4 RegisteredSigners
28.1.5 RegisteredEnclaveHashes
29 Espresso SGX TEE Verifier
29.1 Overview
29.1.1 Verify
29.1.2 RegisterSigner
29.1.3 SetEnclaveHash
29.1.4 DeleteRegisteredSigners
30 Espresso AWS Nitro TEE Verifier
30.1 Overview
30.1.1 RegisterSigner
30.1.2 SetEnclaveHash
30.1.3 DeleteRegisteredSigners
31 Arbitrum Nitro Sequencer Inbox
31.1 Overview
31.1.1 AddSequencerL2Batch
31.1.2 AddSequencerL2BatchFromBlobs
32 Nitro Espresso DA
32.1 Overview
32.2 Workflow
32.3 Batch Poster
32.3.1 Header Byte
32.3.2 MaybePostSequencerBatch Logic
32.4 DA Reader Design
32.4.1 RecoverPayloadFromBatch Implementation
32.4.2 Validator Reader Implementation
32.4.3 Replay Binary Reader Implementation
32.5 Bypassing Batch Parsing
33 OP Stack Integration
33.1 Overview
33.2 High-Level Workflow
33.2.1 Batch Submission To Espresso
33.2.2 Confirmation Validation
33.2.3 Batch Submission To L1
33.2.4 Flowchart
33.3 Components
33.3.1 OP Batcher
33.3.2 Base Layer Batch Validation
33.3.3 Derivation Pipeline
33.3.4 OP’s Espresso Streamer
33.3.5 OP Caffeinated node
33.4 Additional Considerations
33.4.1 Gas Cost Optimization
33.4.2 L1 Reorg Handling
33.4.3 Direct Header Verification
33.5 Future Work
33.5.1 Trustless Espresso Verification
33.5.2 Trustless Enclave Networking
33.5.3 Permissionless Batching
33.5.4 Finality Check Removal
33.5.5 Inbox Address Upgrade
33.5.6 Escape Hatch
34 OP Integration Functions
34.1 Overview
34.2 Component Breakdown
34.2.1 OP Batcher
34.2.2 Batch Authentication Contract
34.2.3 Batch Inbox Contract
34.2.4 Derivation Pipeline
35 Op Integration Requirements
36 Payload Attributes
36.1 Overview
37 Data Availability
37.1 Overview
37.2 CDN
37.3 DA Committee
37.4 VID
37.4.1 Data Structures
37.4.2 Payload Encoding
38 Settlement Layer
38.1 Overview
39 Rollup
39.1 Overview
40 Confirmation
40.1 Overview
41 Authenticated Data Structure
41.1 Overview
42 Merkle Tree
42.1 Overview
42.2 Universal Merkle Trees
42.3 Append-Only Merkle Trees
43 Append-only Merkle Tree
43.1 Overview
44 Universal Merkle Tree
44.1 Overview
45 Commitment
45.1 Overview
46 Commitment Scheme
46.1 Overview