Skip to content

Commit f73a124

Browse files
tac0turtlealpe
andauthored
docs: rewrite and restructure docs (#3026)
* rewrite and restructure docs * refernce and change of sequencing concept * Refactor documentation for data availability layers and node operations - Updated Celestia guide to clarify prerequisites, installation, and configuration for connecting Evolve chains to Celestia. - Enhanced Local DA documentation with installation instructions, configuration options, and use cases for development and testing. - Expanded troubleshooting guide with detailed diagnostic commands, common issues, and solutions for node operations. - Created comprehensive upgrades guide covering minor and major upgrades, version compatibility, and rollback procedures. - Added aggregator node documentation detailing configuration, block production settings, and monitoring options. - Introduced attester node overview with configuration and use cases for low-latency applications. - Removed outdated light node documentation. - Improved formatting and clarity in ev-reth chainspec reference for better readability. * format * claenup and comments * Update block-lifecycle.md * adjustments * docs: fix broken links, stale flag prefixes, and formatting issues (#3112) * docs: fix broken links, stale --rollkit.* flag prefixes, and escaped backticks - Fix forced-inclusion.md: based.md → based-sequencing.md (2 links) - Fix block-lifecycle.md: da.md → data-availability.md (2 links) - Fix reference/specs/overview.md: p2p.md → learn/specs/p2p.md - Fix running-nodes/full-node.md: relative paths to guides/ - Fix what-is-evolve.md: remove escaped backticks around ev-node - Replace all --rollkit.* flags with --evnode.* in ev-node-config.md - Fix visualizer.md: --rollkit.rpc → --evnode.rpc * docs: fix markdownlint errors (MD040 missing code block languages, MD012 extra blank lines) - Add 'text' language specifier to 25 fenced code blocks containing ASCII diagrams, log output, and formulas - Remove extra blank line in migration-from-cometbft.md - Fix non-descriptive link text in deployment.md * fix and push --------- Co-authored-by: Alexander Peters <alpe@users.noreply.github.com>
1 parent c449847 commit f73a124

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+9611
-0
lines changed

docs/concepts/block-lifecycle.md

Lines changed: 705 additions & 0 deletions
Large diffs are not rendered by default.

docs/concepts/data-availability.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Data Availability
2+
3+
Data availability (DA) ensures that all transaction data required to verify the chain's state is accessible to anyone.
4+
5+
## Why DA Matters
6+
7+
Without data availability guarantees:
8+
9+
- Nodes can't verify state transitions
10+
- Users can't prove their balances
11+
- The chain's security model breaks down
12+
13+
Evolve uses external DA layers to provide these guarantees, rather than storing all data on L1.
14+
15+
## How Evolve Handles Data Availability
16+
17+
Evolve currently supports two DA modes:
18+
19+
### Local DA
20+
21+
- **Use case**: Development and testing
22+
- **Guarantee**: None (operator can withhold data)
23+
- **Latency**: Instant
24+
25+
### Celestia
26+
27+
- **Use case**: Production deployments
28+
- **Guarantee**: Data availability sampling (DAS)
29+
- **Latency**: ~12 seconds to finality
30+
31+
## DA Flow
32+
33+
```text
34+
Block Produced
35+
36+
37+
┌─────────────────┐
38+
│ Submitter │ Queues block for DA
39+
└────────┬────────┘
40+
41+
42+
┌─────────────────┐
43+
│ DA Layer │ Stores and orders data
44+
└────────┬────────┘
45+
46+
47+
┌─────────────────┐
48+
│ Full Nodes │ Retrieve and verify
49+
└─────────────────┘
50+
```
51+
52+
## Namespaces
53+
54+
Evolve uses DA namespaces to organize data:
55+
56+
| Namespace | Purpose |
57+
|-----------|---------|
58+
| Header | Block headers |
59+
| Data | Transaction data |
60+
61+
## Best Practices
62+
63+
- **Development**: Use Local DA for fast iteration
64+
- **Testnet**: Use Celestia testnet (Mocha or Arabica)
65+
- **Production**: Use Celestia mainnet or equivalent
66+
67+
## Learn More
68+
69+
- [Local DA Guide](/guides/da-layers/local-da)
70+
- [Celestia Guide](/guides/da-layers/celestia)
71+
- [DA Interface Reference](/reference/interfaces/da)

docs/concepts/fee-systems.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# Fee Systems
2+
3+
Evolve chains have two layers of fees: execution fees (paid to process transactions) and DA fees (paid to post data).
4+
5+
## Execution Fees
6+
7+
### EVM (ev-reth)
8+
9+
Uses EIP-1559 fee model:
10+
11+
```text
12+
Transaction Fee = (Base Fee + Priority Fee) × Gas Used
13+
```
14+
15+
| Component | Destination | Purpose |
16+
|-----------|-------------|---------|
17+
| Base Fee | Burned (or redirected) | Congestion pricing |
18+
| Priority Fee | Sequencer | Incentive for inclusion |
19+
20+
#### Base Fee Redirect
21+
22+
By default, base fees are burned. ev-reth can redirect them to a treasury:
23+
24+
```json
25+
{
26+
"config": {
27+
"evolve": {
28+
"baseFeeSink": "0xTREASURY",
29+
"baseFeeRedirectActivationHeight": 0
30+
}
31+
}
32+
}
33+
```
34+
35+
See [Base Fee Redirect](/ev-reth/features/base-fee-redirect) for details.
36+
37+
### Cosmos SDK (ev-abci)
38+
39+
Uses standard Cosmos SDK fee model:
40+
41+
```text
42+
Transaction Fee = Gas Price × Gas Used
43+
```
44+
45+
Configure minimum gas prices:
46+
47+
```toml
48+
# app.toml
49+
minimum-gas-prices = "0.025stake"
50+
```
51+
52+
Fees go to the fee collector module and can be distributed via standard Cosmos mechanisms.
53+
54+
## DA Fees
55+
56+
Both execution environments incur DA fees when blocks are posted to the DA layer.
57+
58+
### Cost Factors
59+
60+
| Factor | Impact |
61+
|--------|--------|
62+
| Block size | Linear cost increase |
63+
| DA gas price | Market-driven, varies |
64+
| Batching | Amortizes overhead |
65+
| Compression | Reduces data size |
66+
67+
### Who Pays?
68+
69+
The sequencer pays DA fees from their own funds. They recover costs through:
70+
71+
- Priority fees from users
72+
- Base fee redirect (if configured)
73+
- External subsidy
74+
75+
### Optimization Strategies
76+
77+
#### Lazy Aggregation
78+
79+
Only produce blocks when there are transactions:
80+
81+
```yaml
82+
node:
83+
lazy-aggregator: true
84+
lazy-block-time: 1s # Max wait time
85+
```
86+
87+
Reduces empty blocks and DA costs.
88+
89+
#### Batching
90+
91+
ev-node batches multiple blocks into single DA submissions:
92+
93+
```yaml
94+
da:
95+
batch-size-threshold: 100000 # bytes
96+
batch-max-delay: 5s
97+
```
98+
99+
#### Compression
100+
101+
Enable blob compression:
102+
103+
```yaml
104+
da:
105+
compression: true
106+
```
107+
108+
## Fee Flow Diagram
109+
110+
```text
111+
User Transaction
112+
113+
│ Pays: Gas Price × Gas
114+
115+
┌─────────────────┐
116+
│ Sequencer │
117+
│ │
118+
│ Receives:
119+
│ - Priority fees │
120+
│ - Base fees* │
121+
└────────┬────────┘
122+
123+
│ Pays: DA fees
124+
125+
┌─────────────────┐
126+
│ DA Layer │
127+
│ (Celestia) │
128+
└─────────────────┘
129+
130+
* If base fee redirect is enabled
131+
```
132+
133+
## Estimating Costs
134+
135+
### Execution Costs
136+
137+
EVM:
138+
139+
```bash
140+
cast estimate --rpc-url http://localhost:8545 <CONTRACT> "transfer(address,uint256)" <TO> <AMOUNT>
141+
```
142+
143+
Cosmos:
144+
145+
```bash
146+
appd tx bank send <FROM> <TO> 1000stake --gas auto --gas-adjustment 1.3
147+
```
148+
149+
### DA Costs
150+
151+
Depends on:
152+
153+
- DA layer pricing (e.g., Celestia gas price)
154+
- Data size per block
155+
- Submission frequency
156+
157+
Use the [Celestia Gas Calculator](/guides/tools/celestia-gas-calculator) for estimates.

docs/concepts/finality.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Finality
2+
3+
Finality determines when a transaction is irreversible. Evolve has a multi-stage finality model.
4+
5+
## Finality Stages
6+
7+
```text
8+
Transaction Submitted
9+
10+
11+
┌───────────────────┐
12+
│ Soft Confirmed │ ← Block produced, gossiped via P2P
13+
└─────────┬─────────┘
14+
15+
16+
┌───────────────────┐
17+
│ DA Finalized │ ← DA layer confirms inclusion
18+
└───────────────────┘
19+
```
20+
21+
### Soft Confirmation
22+
23+
When a block is produced and gossiped via P2P:
24+
25+
- **Latency**: Milliseconds (block time)
26+
- **Guarantee**: Sequencer has committed to this ordering
27+
- **Risk**: Sequencer could equivocate (produce conflicting blocks)
28+
29+
### DA Finalized
30+
31+
When the DA layer confirms the block is included:
32+
33+
- **Latency**: ~6 seconds (Celestia)
34+
- **Guarantee**: Block data is permanently available and ordered
35+
- **Risk**: None (assuming DA layer security)
36+
37+
## Choosing Finality Thresholds
38+
39+
| Use Case | Recommended Finality |
40+
|----------|---------------------|
41+
| Display balance | Soft confirmation |
42+
| Accept payment | Soft confirmation |
43+
| Process withdrawal | DA finalized |
44+
| Bridge transfer | DA finalized |
45+
46+
## Configuration
47+
48+
Block time affects soft confirmation latency:
49+
50+
```yaml
51+
node:
52+
block-time: 100ms
53+
```
54+
55+
DA finality depends on the DA layer. Celestia provides ~6 second finality.

docs/concepts/p2p-networking.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# P2P
2+
3+
Every node (both full and light) runs a P2P client using [go-libp2p][go-libp2p] P2P networking stack for gossiping transactions in the chain's P2P network. The same P2P client is also used by the header and block sync services for gossiping headers and blocks.
4+
5+
Following parameters are required for creating a new instance of a P2P client:
6+
7+
* P2PConfig (described below)
8+
* [go-libp2p][go-libp2p] private key used to create a libp2p connection and join the p2p network.
9+
* chainID: identifier used as namespace within the p2p network for peer discovery. The namespace acts as a sub network in the p2p network, where peer connections are limited to the same namespace.
10+
* datastore: an instance of [go-datastore][go-datastore] used for creating a connection gator and stores blocked and allowed peers.
11+
* logger
12+
13+
```go
14+
// P2PConfig stores configuration related to peer-to-peer networking.
15+
type P2PConfig struct {
16+
ListenAddress string // Address to listen for incoming connections
17+
Seeds string // Comma separated list of seed nodes to connect to
18+
BlockedPeers string // Comma separated list of nodes to ignore
19+
AllowedPeers string // Comma separated list of nodes to whitelist
20+
}
21+
```
22+
23+
A P2P client also instantiates a [connection gator][conngater] to block and allow peers specified in the `P2PConfig`.
24+
25+
It also sets up a gossiper using the gossip topic `<chainID>+<txTopicSuffix>` (`txTopicSuffix` is defined in [p2p/client.go][client.go]), a Distributed Hash Table (DHT) using the `Seeds` defined in the `P2PConfig` and peer discovery using go-libp2p's `discovery.RoutingDiscovery`.
26+
27+
A P2P client provides an interface `SetTxValidator(p2p.GossipValidator)` for specifying a gossip validator which can define how to handle the incoming `GossipMessage` in the P2P network. The `GossipMessage` represents message gossiped via P2P network (e.g. transaction, Block etc).
28+
29+
```go
30+
// GossipValidator is a callback function type.
31+
type GossipValidator func(*GossipMessage) bool
32+
```
33+
34+
The full nodes define a transaction validator (shown below) as gossip validator for processing the gossiped transactions to add to the mempool, whereas light nodes simply pass a dummy validator as light nodes do not process gossiped transactions.
35+
36+
```go
37+
// newTxValidator creates a pubsub validator that uses the node's mempool to check the
38+
// transaction. If the transaction is valid, then it is added to the mempool
39+
func (n *FullNode) newTxValidator() p2p.GossipValidator {
40+
```
41+
42+
```go
43+
// Dummy validator that always returns a callback function with boolean `false`
44+
func (ln *LightNode) falseValidator() p2p.GossipValidator {
45+
```
46+
47+
## References
48+
49+
[1] [client.go][client.go]
50+
51+
[2] [go-datastore][go-datastore]
52+
53+
[3] [go-libp2p][go-libp2p]
54+
55+
[4] [conngater][conngater]
56+
57+
[client.go]: https://github.com/evstack/ev-node/blob/main/pkg/p2p/client.go
58+
[go-datastore]: https://github.com/ipfs/go-datastore
59+
[go-libp2p]: https://github.com/libp2p/go-libp2p
60+
[conngater]: https://github.com/libp2p/go-libp2p/tree/master/p2p/net/conngater

0 commit comments

Comments
 (0)