Skip to content

Commit ed2c5c8

Browse files
docs: update docs (#166)
1 parent 02b1b24 commit ed2c5c8

11 files changed

Lines changed: 130 additions & 60 deletions

.codex

Whitespace-only changes.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ cargo build --release
4747

4848
### 1. Generate Validator Keys
4949
```bash
50-
cargo run -- --key-path path/to/store/key keys generate
50+
cargo run -- keys generate --key-store-path /path/to/keys
5151
```
5252

5353
### 2. View Your Public Key
5454
```bash
55-
cargo run -- --key-path path/to/store/key keys show
55+
cargo run -- keys show --key-store-path /path/to/keys
5656
```
5757

5858
### 3. Configure Genesis
@@ -61,10 +61,10 @@ Create a genesis file that references your EVM genesis configuration. See [examp
6161
### 4. Start Your Validator
6262
Ensure your EVM client is running, then:
6363
```bash
64-
cargo run -- \
65-
--key-path /path/to/priv-key \
64+
cargo run -- run \
65+
--key-store-path /path/to/keys \
6666
--store-path /storage/directory \
67-
--engine-jwt-path /path/to/evm/jwt.hex \
67+
--engine-ipc-path /tmp/reth_engine_api.ipc \
6868
--genesis-path /path/to/genesis.toml
6969
```
7070

docs/architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,12 @@ Summit is a modular consensus client implementing the Simplex protocol for EVM-b
135135
│ (key-value) │
136136
│ • Consensus │
137137
│ state by │
138-
height
138+
epoch
139139
│ • Checkpoints │
140140
│ by epoch │
141141
│ • Finalized │
142142
│ headers │
143-
│ by height
143+
│ by epoch
144144
│ │
145145
│ finalizer/src/ │
146146
│ db.rs │
@@ -276,4 +276,4 @@ Summit uses Commonware's storage primitives for persistent state
276276
- **Network Attacks**: Authenticated P2P prevents impersonation
277277
- **Consensus Attacks**: Simplex protocol handles Byzantine validators
278278
- **Execution Attacks**: Engine API isolation prevents direct EVM access
279-
- **Storage Attacks**: Cryptographic verification prevents tampering
279+
- **Storage Attacks**: Cryptographic verification prevents tampering

docs/checkpointing.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ When a node starts, it attempts to load the most recent checkpoint:
9898

9999
### Database Schema
100100

101-
Checkpoints and headers are stored in separate column families:
101+
Checkpoints and headers are stored in a single QMDB store using prefixed keys and explicit tracker entries for the latest stored epoch:
102102

103-
| Column Family | Key | Value |
104-
|---------------|-----|-------|
105-
| `checkpoints` | epoch (u64) | Checkpoint bytes |
106-
| `finalized_headers` | epoch (u64) | FinalizedHeader bytes |
107-
| `most_recent_checkpoint` | - | epoch (u64) |
108-
| `most_recent_finalized_header` | - | epoch (u64) |
103+
| Key Space | Key | Value |
104+
|-----------|-----|-------|
105+
| `checkpoint` | epoch (u64) | `(Checkpoint, last_block)` |
106+
| `finalized_header` | epoch (u64) | `FinalizedHeader` bytes |
107+
| `latest_checkpoint_epoch` | fixed state key | epoch (u64) |
108+
| `latest_finalized_header_epoch` | fixed state key | epoch (u64) |
109+
| `consensus_state` | epoch (u64) | `ConsensusState` bytes |
109110

110111
## Checkpoint Verification
111112

@@ -185,7 +186,7 @@ checkpoint_dir/
185186

186187
### Checkpoint Verification on Startup
187188

188-
When the `finalized_headers/` directory is present, the node automatically verifies the checkpoint on startup by calling `verify_checkpoint_chain` with the genesis state, the loaded headers, and the checkpoint. This allows the node to trustlessly validate a checkpoint received from an untrusted source.
189+
When the `finalized_headers/` directory is present, the node loads the checkpoint artifacts from disk first, then verifies the checkpoint during startup after loading genesis by calling `verify_checkpoint_chain` with the genesis state, the loaded headers, and the checkpoint. This allows the node to trustlessly validate a checkpoint received from an untrusted source.
189190

190191
If the `finalized_headers/` directory is absent, verification is skipped and the node trusts the checkpoint as-is.
191192

docs/commonware-dependencies.md

Lines changed: 61 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Summit leverages the [Commonware library](https://commonware.xyz) extensively fo
99
**Used for**: Simplex consensus protocol implementation
1010

1111
**Key Components:**
12-
- `simplex::SimplexConsensus` - Core consensus engine
13-
- `simplex::types::Activity` - Consensus activities/messages
14-
- `simplex::signing_scheme::Scheme` - Signature verification
12+
- `simplex` - Simplex consensus engine
13+
- `simplex::scheme::Scheme` - Signature verification scheme
14+
- `types::{Epoch, Epocher, FixedEpocher, Round, View, ViewDelta, Height}` - Consensus primitives
1515
- `Block` trait - Block interface definition
16+
- `Reporter` trait - Hook for consensus activity notifications
1617

1718
**Critical Usage:**
1819
- **Consensus Protocol**: All consensus logic delegated to Commonware's Simplex implementation
@@ -41,10 +42,11 @@ Summit leverages the [Commonware library](https://commonware.xyz) extensively fo
4142
**Used for**: Peer-to-peer communication between validators
4243

4344
**Key Components:**
44-
- `authenticated` - Authenticated P2P connections
45-
- `Manager` - Peer connection management
45+
- `authenticated` - Authenticated P2P connections (production)
46+
- `simulated` - In-process network (deterministic tests)
47+
- `Manager`, `Provider`, `TrackedPeers`, `PeerSetUpdate` - Peer set management
4648
- `Sender`/`Receiver` - Message transmission
47-
- `utils::requester` - Request-response patterns
49+
- `Blocker`, `Ingress` - Connection filtering and admission
4850

4951
**Critical Usage:**
5052
- **Validator Discovery**: Automatic peer discovery and connection
@@ -57,25 +59,29 @@ Summit leverages the [Commonware library](https://commonware.xyz) extensively fo
5759
**Used for**: Persistent storage of consensus state and blocks
5860

5961
**Key Components:**
60-
- **Storage traits**: Generic storage interface
61-
- **Database implementations**: Pluggable storage backends
62-
- **Atomic operations**: Transactional state updates
62+
- `qmdb::store::db::Db` - QMDB authenticated key-value store (consensus state, headers)
63+
- `archive` / `archive::immutable` - Block archive keyed by height
64+
- `journal::contiguous::variable` - Append-only write-ahead log
65+
- `translator::EightCap` - Key translator for the QMDB store
66+
- `metadata::Metadata` - Metadata store for pointer/tip data
6367

6468
**Critical Usage:**
65-
- **State Persistence**: Consensus state and validator set storage
66-
- **Block Storage**: Immutable block data with efficient retrieval
67-
- **Atomic Updates**: Ensuring consistency during state transitions
68-
- **Historical Data**: Compressed archival of old blocks
69+
- **State Persistence**: Consensus state, validator set, and finalized headers in QMDB
70+
- **Block Storage**: Finalized blocks archived by height via `archive::immutable`
71+
- **Atomic Updates**: Journal-backed writes with WAL semantics
72+
- **Checkpoints**: Durable checkpoint records for fast sync
6973

7074
### 5. Runtime (`commonware-runtime`)
7175

7276
**Used for**: Async runtime abstractions and utilities
7377

7478
**Key Components:**
75-
- `Clock` - Time management
76-
- `Spawner` - Task spawning abstractions
77-
- `Metrics` - Performance monitoring
78-
- `buffer::PoolRef` - Memory pool management
79+
- `tokio::Runner` - Production async runtime (wraps Tokio)
80+
- `deterministic::Runner` - Seeded, deterministic runtime for tests
81+
- `Clock`, `Spawner`, `Handle` - Time, task spawning, and join handles
82+
- `Metrics` - Prometheus-compatible metrics registry
83+
- `Network`, `Storage` - Abstract network and disk interfaces
84+
- `buffer::paged::CacheRef`, `BufferPooler` - Paged buffer caching for storage
7985

8086
**Critical Usage:**
8187
- **Task Management**: Async task spawning and coordination
@@ -88,10 +94,10 @@ Summit leverages the [Commonware library](https://commonware.xyz) extensively fo
8894
**Used for**: Common data structures and utilities
8995

9096
**Key Components:**
91-
- `NZU64`, `NZUsize` - Non-zero integer types
92-
- `Span` - Efficient byte spans
93-
- `sequence` - Sequence number management
94-
- Hex utilities - Hexadecimal encoding/decoding
97+
- `NZU64`, `NZUsize` - Non-zero integer types (and their constructor macros)
98+
- `from_hex_formatted`, `hex` - Hexadecimal encoding/decoding
99+
- `Hostname` - Validated hostname type for bootstrap configuration
100+
- `acknowledgement::{Acknowledgement, Exact}` - Activity acknowledgement tracking
95101

96102
### 7. Codec (`commonware-codec`)
97103

@@ -121,6 +127,33 @@ Summit leverages the [Commonware library](https://commonware.xyz) extensively fo
121127
- `Consumer`/`Producer` - Data request/response
122128
- `p2p::Producer` - P2P data resolution
123129

130+
### 10. Macros (`commonware-macros`)
131+
132+
**Used for**: Async control-flow macros and instrumented test harness
133+
134+
**Key Components:**
135+
- `select!` / `select_loop!` - Async branching and loops (used in `application/`, `syncer/`)
136+
- `test_traced!` - Instrumented test harness with deterministic tracing
137+
138+
### 11. Math (`commonware-math`)
139+
140+
**Used for**: Cryptographic randomness
141+
142+
**Key Components:**
143+
- `algebra::Random` - Random key generation for BLS12-381 and Ed25519 schemes
144+
145+
**Critical Usage:**
146+
- **Key Generation**: Deterministic randomness for consensus and node key creation in `node/src/keys.rs`
147+
- **Testing**: Seeded randomness for reproducible test fixtures
148+
149+
### 12. Parallel (`commonware-parallel`)
150+
151+
**Used for**: Sequential and parallel processing strategies
152+
153+
**Key Components:**
154+
- `Strategy` - Abstraction over execution strategies
155+
- `Sequential` - Single-threaded execution strategy (used by the syncer and engine)
156+
124157
## Security Analysis
125158

126159
### Cryptographic Security
@@ -207,17 +240,21 @@ use commonware_macros::test_traced;
207240

208241
### Upgrade Path
209242

210-
Summit can upgrade Commonware components independently by updating the git revision in `Cargo.toml`:
243+
Summit pins Commonware to a versioned release in the workspace `Cargo.toml`. All 12 `commonware-*` workspace dependencies are bumped in lockstep:
211244

212245
```toml
213-
commonware-consensus = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f395c9e" }
246+
commonware-consensus = "2026.4.0"
247+
commonware-cryptography = "2026.4.0"
248+
# ...
214249
```
215250

251+
To upgrade, bump the version across every `commonware-*` entry in the root `Cargo.toml` and run `cargo update -p commonware-consensus` (etc.).
252+
216253
## Audit Recommendations
217254

218255
When auditing Summit's Commonware usage:
219256

220-
1. **Verify Git Revision**: Ensure using audited Commonware revision
257+
1. **Verify Version**: Ensure the pinned Commonware release corresponds to an audited version
221258
2. **Integration Points**: Review how Summit integrates Commonware APIs
222259
3. **Configuration**: Verify Commonware components configured securely
223260
4. **Error Handling**: Ensure proper error handling around Commonware calls

docs/engine-api-integration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ pub trait EngineClient: Clone + Send + Sync + 'static {
2828
fork_choice_state: ForkchoiceState,
2929
timestamp: u64,
3030
withdrawals: Vec<Withdrawal>,
31+
suggested_fee_recipient: Address,
32+
parent_beacon_block_root: Option<FixedBytes<32>>,
3133
) -> impl Future<Output = Option<PayloadId>> + Send;
3234

3335
fn get_payload(
@@ -43,7 +45,7 @@ pub trait EngineClient: Clone + Send + Sync + 'static {
4345
fn commit_hash(
4446
&mut self,
4547
fork_choice_state: ForkchoiceState,
46-
) -> impl Future<Output = ()> + Send;
48+
) -> impl Future<Output = ForkchoiceUpdated> + Send;
4749
}
4850
```
4951

@@ -182,4 +184,4 @@ let provider = ProviderBuilder::default().connect_ipc(ipc).await?;
182184

183185
**Logging**: Summit uses the `tracing` crate for logging
184186

185-
**Health Checks**: Summit exposes an HTTP API bound to port 3030 by default. This API includes the method `GET /health` which will reply with `"OK"` if you are lucky. While this API is fairly minimal at the time of this writing, we would not be surprised this bloats up in the future
187+
**Health Checks**: Summit exposes a JSON-RPC API bound to port 3030 by default. The health check is the `health` RPC method, which currently returns `"Ok"`.

docs/running-local-network.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ Easiest way to run a network locally is to use the testnet bin. This will start
44

55
## Steps to do this:
66

7-
1. First make sure you have seismic-reth installed and in your PATH
7+
1. First make sure you have a `reth` binary installed and in your `PATH`. For Seismic development, that typically means building `seismic-reth` and placing the resulting binary in your path as `reth`.
88
```bash
99
git clone https://github.com/SeismicSystems/seismic-reth.git && cd seismic-reth && cargo build --release
1010
```
11-
- move the seismic bin somewhere in your path under the name reth
11+
- Move the built binary somewhere in your path under the name `reth`
1212
```bash
1313
mv target/release/seismic-reth ~/.cargo/bin/reth
1414
```
1515

16-
2. Then run cd into this repo and run `cargo run --bin testnet` at root of this repo. This will start 4 nodes in that terminal
16+
2. Then `cd` into this repo and run `cargo run --bin testnet` at the repo root. This will start 4 Summit nodes and 4 Reth nodes in that terminal.
1717

18-
3. You can reach the reth rpc at localhost:8545 (ports for the other 3 nodes ar 8546, 8547, 8548)
18+
3. You can reach the Reth RPC endpoints on the ports printed by the testnet binary. By default they are `localhost:8545`, `localhost:8546`, `localhost:8547`, and `localhost:8548`.
1919

20-
4. To start the network fresh run this from the root of this repo
20+
4. To reset the local testnet data and start fresh, run this from the repo root:
2121
```bash
2222
cd testnet && ./reset.sh && cd ..
2323
```
@@ -26,8 +26,8 @@ Easiest way to run a network locally is to use the testnet bin. This will start
2626

2727
## Running distributed
2828

29-
To run a fresh network on multiple systems you should install summit on each server and then run `cargo run -- keys generate && cargo run -- keys show` to get the keys for each node.
29+
To run a fresh network on multiple systems you should install Summit on each server and then run `cargo run -- keys generate` and `cargo run -- keys show` to get the keys for each node.
3030

31-
You will then recreate the example_genesis.toml file to have the keys and ips of all your nodes.
31+
You will then recreate the example_genesis.toml file to have the keys and IPs of all your nodes.
3232

33-
After the genesis file is in place you would just start seismic-reth with the `--mock-enclave` flag and then start summit on each and the network should start
33+
After the genesis file is in place you would start your `reth`/`seismic-reth` instance and then start Summit on each host with the matching genesis configuration.

docs/security-model.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ We use SHA-256 in several places:
5151

5252
All peer-to-peer communication is cryptographically authenticated with the following properties:
5353
- **Mutual Authentication**: Both peers verify each other's identity
54-
- **Perfect Forward Secrecy**: Session keys derived independently
55-
- **Replay Protection**: Nonces prevent message replay attacks
54+
- **Message Authentication**: Signed/authenticated communication between peers
5655
- **Identity Verification**: Peer public keys verified against validator set
5756

5857
## BFT Properties
@@ -70,10 +69,14 @@ Summit communicates with execution clients exclusively through the Engine API:
7069
```rust
7170
// NOTE: no direct access to execution state
7271
pub trait EngineClient: Clone + Send + Sync + 'static {
73-
fn start_building_block(...) -> impl Future<Output = Option<PayloadId>>;
72+
fn start_building_block(
73+
...,
74+
suggested_fee_recipient: Address,
75+
parent_beacon_block_root: Option<FixedBytes<32>>,
76+
) -> impl Future<Output = Option<PayloadId>>;
7477
fn get_payload(...) -> impl Future<Output = ExecutionPayloadEnvelopeV4>;
7578
fn check_payload(...) -> impl Future<Output = PayloadStatus>;
76-
fn commit_hash(...) -> impl Future<Output = ()>;
79+
fn commit_hash(...) -> impl Future<Output = ForkchoiceUpdated>;
7780
}
7881
```
7982

@@ -97,7 +100,6 @@ pub trait EngineClient: Clone + Send + Sync + 'static {
97100

98101
**Threat**: Man-in-the-middle attacks
99102
**Mitigation**:
100-
- Perfect forward secrecy in P2P connections
101103
- End-to-end message authentication
102104
- Public key verification against validator set
103105

docs/staking-and-participating.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ The changes were made to accommodate every consensus node having 2 keys to parti
1111
## Becoming a Validator
1212

1313
1. Deploy the Summit image on a TDX VM. This will start seismic-reth and Summit as well as the enclave.
14-
2. The deposit function requires a signature with the node's keys. Since they are only available from within the secure enclave, an RPC endpoint is exposed to receive the signed calldata that includes the signature from the node at default port 3030:
14+
2. The deposit function requires a signature with the node's keys. Since they are only available from within the secure enclave, the node exposes a JSON-RPC method on port 3030 by default to produce the signed deposit calldata:
15+
```json
16+
{
17+
"jsonrpc": "2.0",
18+
"method": "getDepositSignature",
19+
"params": [32000000000, "0x0000000000000000000000000000000000000000"],
20+
"id": 1
21+
}
1522
```
16-
/get_deposit_signature?amount=32000000000&address=0x0000000000000000000000000000000000000000
17-
```
18-
The `amount` should be the staking amount and `address` should be your Ethereum address you want to be able to withdraw to.
23+
The `amount` should be the staking amount and `address` should be the Ethereum address you want to be able to withdraw to.
1924
3. Send a signed transaction to the deposit contract with the calldata from the previous step, along with a value equal to the amount being staked (contract address: `0x00000000219ab540356cBB839Cbe05303d7705Fa`, same as Ethereum).
2025
4. Download the latest checkpoint and load it into the node.
2126
5. Keep your node running and it will start participating in the next epoch.

0 commit comments

Comments
 (0)