-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.toml
More file actions
159 lines (138 loc) · 5.93 KB
/
Copy pathconfig.example.toml
File metadata and controls
159 lines (138 loc) · 5.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Summit-Checkpointer Example Configuration
# Copy this file to config.toml and adjust for your setup.
#
# The RPC server bind address and port are CLI options rather than TOML values:
# --bind-address 0.0.0.0 # Existing default; use 127.0.0.1 for local-only RPC
# --port 42069
# ============================================================================
# Reth Configuration
# ============================================================================
[reth]
# Reth JSON-RPC endpoint
# This is used to monitor the current block number
rpc_url = "http://localhost:8545"
# Path to reth's MDBX database
# NOTE: This should point to the 'db' directory itself
# Example: If your reth data is at /var/lib/reth, and it contains:
# - /var/lib/reth/db/
# - /var/lib/reth/static_files/
# Then set this to: /var/lib/reth/db
db_path = "/var/lib/reth/db"
# ============================================================================
# Checkpointing Configuration
# ============================================================================
[checkpoint]
# Fixed checkpoint interval used only when [summit].enabled = false.
# When Summit integration is enabled, the checkpointer discovers completed
# checkpoint epochs and their exact historical height bounds through Summit RPC,
# so on-chain epoch-length changes are handled automatically.
epoch_blocks = 1000
# Number of blocks to wait after the epoch boundary before creating a checkpoint.
# This gives Reth time to flush data. With Summit enabled, the exact boundary is
# obtained from getEpochBounds rather than calculated from epoch_blocks.
# Recommended: 2-5 blocks depending on your setup.
checkpoint_delay_blocks = 3
# Directory where checkpoints will be saved.
# Each checkpoint creates epoch_N/epoch_N.tar.gz with metadata.json alongside it.
# When Summit integration is enabled, the producer verifies the Summit checkpoint digest and
# position, binds the Reth unwind block to the checkpoint state's execution head hash, and then
# writes epoch_N/manifest.json.
# The manifest is served through GET /snapshots/{epoch}/manifest and commits to the exact archive
# bytes with SHA-256 and size.
# Make sure this location has enough disk space (each checkpoint can be large).
output_dir = "/var/lib/reth/checkpoints"
# Maximum number of snapshots to retain. Optional; when set, must be at least 1.
# max_snapshots = 50
# Use compact mode when copying the MDBX database
# This reduces the checkpoint size by compacting the database during copy
# Recommended: true (unless you need to preserve exact database layout)
compact = true
# Path to mdbx_copy binary
# Can be absolute path or just "mdbx_copy" if it's in your PATH
# To find it: which mdbx_copy
mdbx_copy_path = "mdbx_copy"
# Path to reth binary
# Can be absolute path or just "reth" if it's in your PATH
# To find it: which reth
reth_path = "reth"
# ============================================================================
# Summit Configuration
# ============================================================================
[summit]
# Enable Summit consensus client integration
# Set to false if you're not using Summit or want to test without it
enabled = true
# Summit JSON-RPC endpoint
# This is used to fetch checkpoint data for each epoch
rpc_url = "http://localhost:5052"
# Maximum duration for an individual Summit RPC request.
# This is separate from monitor.retry_interval_secs, which controls retry backoff.
rpc_timeout_secs = 100
# ============================================================================
# Monitoring Configuration
# ============================================================================
[monitor]
# How often to poll reth for the current block number (in seconds)
# Default: 30 seconds
# For faster networks or testing, you can reduce this
poll_interval_secs = 30
# How long to wait after an RPC failure before retrying (in seconds)
# This prevents spamming the RPC endpoint if reth is down
retry_interval_secs = 60
# ============================================================================
# State Tracking
# ============================================================================
[state]
# Path to state file that tracks the last checkpointed epoch
# This file is used to resume from the correct point after a restart
# The file is automatically created and managed by the service
state_file = "./checkpointer_state.cbor"
# ============================================================================
# Logging Configuration
# ============================================================================
[logging]
# Log level options: trace, debug, info, warn, error
# - trace: Very verbose, includes all debug info
# - debug: Detailed information useful for debugging
# - info: General informational messages (recommended for production)
# - warn: Warning messages only
# - error: Error messages only
level = "info"
# Log format options: json, pretty
# - json: Machine-readable JSON format (good for log aggregation)
# - pretty: Human-readable format with colors (good for terminals)
format = "pretty"
# ============================================================================
# Example Configurations for Different Use Cases
# ============================================================================
# PRODUCTION SETUP (mainnet)
# [checkpoint]
# epoch_blocks = 10000 # Checkpoint every ~33 hours
# checkpoint_delay_blocks = 5 # Wait 5 blocks for safety
# output_dir = "/mnt/backups/reth-checkpoints"
# compact = true
#
# [monitor]
# poll_interval_secs = 30
#
# [logging]
# level = "info"
# format = "json"
# TESTING SETUP (small epochs for quick testing)
# [checkpoint]
# epoch_blocks = 10 # Checkpoint every 10 blocks
# checkpoint_delay_blocks = 2
# output_dir = "./test-checkpoints"
#
# [monitor]
# poll_interval_secs = 2 # Check every 2 seconds
#
# [logging]
# level = "debug"
# format = "pretty"
# DEVELOPMENT SETUP (without Summit)
# [summit]
# enabled = false # Disable Summit integration
#
# [logging]
# level = "debug"