Skip to content

Commit de0a018

Browse files
docs: clarify DA-only sync mode configuration (#2540)
Addresses #issue 1671 by documenting that DA-only sync is already supported by not configuring P2P peers. ## Changes - Added dedicated DA-Only Sync Mode section in config.md - Enhanced P2P Peers documentation to explain DA-only behavior - Updated README to highlight sync mode options - Provided clear configuration examples and use cases closes #1671 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Marko <[email protected]>
1 parent 99dc6b7 commit de0a018

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Ev-node is the basis of the Evolve Stack. For more in-depth information about Ev
1010

1111
## Using Evolve
1212

13+
Evolve supports multiple sync modes:
14+
- **Hybrid sync**: Sync from both DA layer and P2P network (default when peers are configured)
15+
- **DA-only sync**: Sync exclusively from DA layer by leaving P2P peers empty (see [Configuration Guide](docs/learn/config.md#da-only-sync-mode))
16+
- **P2P-priority sync**: Prioritize P2P with DA as fallback
17+
1318
### Example Implementation: TestApp CLI
1419

1520
The easiest way to understand how to use Evolve is by exploring our example implementation, TestApp.

docs/learn/config.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This document provides a comprehensive reference for all configuration options a
44

55
## Table of Contents
66

7+
- [DA-Only Sync Mode](#da-only-sync-mode)
78
- [Introduction to Configurations](#introduction-to-configurations)
89
- [Base Configuration](#base-configuration)
910
- [Root Directory](#root-directory)
@@ -49,6 +50,41 @@ This document provides a comprehensive reference for all configuration options a
4950
- [Signer Path](#signer-path)
5051
- [Signer Passphrase](#signer-passphrase)
5152

53+
## DA-Only Sync Mode
54+
55+
Evolve supports running nodes that sync exclusively from the Data Availability (DA) layer without participating in P2P networking. This mode is useful for:
56+
57+
- **Pure DA followers**: Nodes that only need the canonical chain data from DA
58+
- **Resource optimization**: Reducing network overhead by avoiding P2P gossip
59+
- **Simplified deployment**: No need to configure or maintain P2P peer connections
60+
- **Isolated environments**: Nodes that should not participate in P2P communication
61+
62+
**To enable DA-only sync mode:**
63+
64+
1. **Leave P2P peers empty** (default behavior):
65+
```yaml
66+
p2p:
67+
peers: "" # Empty or omit this field entirely
68+
```
69+
70+
2. **Configure DA connection** (required):
71+
```yaml
72+
da:
73+
address: "your-da-service:port"
74+
namespace: "your-namespace"
75+
# ... other DA configuration
76+
```
77+
78+
3. **Optional**: You can still configure P2P listen address for potential future connections, but without peers, no P2P networking will occur.
79+
80+
When running in DA-only mode, the node will:
81+
- ✅ Sync blocks and headers from the DA layer
82+
- ✅ Validate transactions and maintain state
83+
- ✅ Serve RPC requests
84+
- ❌ Not participate in P2P gossip or peer discovery
85+
- ❌ Not share blocks with other nodes via P2P
86+
- ❌ Not receive transactions via P2P (only from direct RPC submission)
87+
5288
## Configs
5389

5490
Evolve configurations can be managed through a YAML file (typically `evolve.yaml` located in `~/.evolve/config/` or `<your_home_dir>/config/`) and command-line flags. The system prioritizes configurations in the following order (highest priority first):
@@ -461,17 +497,21 @@ p2p:
461497
**Description:**
462498
A comma-separated list of peer addresses (e.g., multiaddresses) that the node will attempt to connect to for bootstrapping its P2P connections. These are often referred to as seed nodes.
463499

500+
**For DA-only sync mode:** Leave this field empty (default) to disable P2P networking entirely. When no peers are configured, the node will sync exclusively from the Data Availability layer without participating in P2P gossip, peer discovery, or block sharing. This is useful for nodes that only need to follow the canonical chain data from DA.
501+
464502
**YAML:**
465503

466504
```yaml
467505
p2p:
468506
peers: "/ip4/some_peer_ip/tcp/7676/p2p/PEER_ID1,/ip4/another_peer_ip/tcp/7676/p2p/PEER_ID2"
507+
# For DA-only sync, leave peers empty:
508+
# peers: ""
469509
```
470510

471511
**Command-line Flag:**
472512
`--rollkit.p2p.peers <string>`
473513
*Example:* `--rollkit.p2p.peers /dns4/seed.example.com/tcp/26656/p2p/12D3KooW...`
474-
*Default:* `""` (empty)
514+
*Default:* `""` (empty - enables DA-only sync mode)
475515
*Constant:* `FlagP2PPeers`
476516

477517
### P2P Blocked Peers

0 commit comments

Comments
 (0)