You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!--
Please read and fill out this form before submitting your PR.
Please make sure you have reviewed our contributors guide before
submitting your
first PR.
NOTE: PR titles should follow semantic commits:
https://www.conventionalcommits.org/en/v1.0.0/
-->
## Overview
<!--
Please provide an explanation of the PR, including the appropriate
context,
background, goal, and rationale. If there is an issue with this
information,
please provide a tl;dr and link the issue.
Ex: Closes #<issue number>
-->
Copy file name to clipboardExpand all lines: docs/guides/evm/migration.md
+62-19Lines changed: 62 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,16 +52,24 @@ All network participants must agree on:
52
52
53
53
### 3. Stop the Node at Target Height
54
54
55
-
Configure your node to stop at the agreed-upon migration height:
55
+
Configure your node to stop at the agreed-upon migration height. Both the Evolve node and ev-reth must be stopped to properly export the genesis state:
56
56
57
57
```bash
58
58
# Stop the Evolve node gracefully
59
-
docker stop evolve-node
59
+
docker stop ev-node
60
60
61
61
# Or if running as a service
62
-
systemctl stop evolve-node
62
+
systemctl stop ev-node
63
+
64
+
# Stop ev-reth
65
+
docker stop ev-reth
66
+
67
+
# Or if running as a service
68
+
systemctl stop ev-reth
63
69
```
64
70
71
+
**Important**: ev-reth must be completely shutdown before running `dump-genesis` as the export process requires exclusive access to the database.
72
+
65
73
### 4. Export Current State Using reth dump-genesis
66
74
67
75
reth dump-genesis exports the current head state in the node’s local database into a genesis file.
@@ -70,49 +78,57 @@ It does not accept a --block flag, so to capture a specific migration height you
70
78
⸻
71
79
72
80
Option 1 — Stop at the target height before dumping
81
+
73
82
- Sync your Evolve/reth node to the agreed migration height.
74
83
- Disable block production or stop the sequencer so no new blocks are added.
75
84
- Run dump-genesis while the DB is exactly at the migration height.
76
85
86
+
```bash
77
87
# Stop node at migration height
88
+
78
89
systemctl stop evolve-node
79
90
80
91
# Export state at current head (must be migration height)
81
-
reth dump-genesis \
92
+
93
+
ev-reth dump-genesis \
82
94
--datadir /path/to/reth/datadir \
83
95
--output genesis-export.json
84
-
96
+
```
85
97
86
98
⸻
87
99
88
100
Option 2 — Rewind DB to migration height
89
101
90
102
If your node has already synced past the migration block:
91
103
104
+
```bash
92
105
reth db revert-to-block <MIGRATION_BLOCK_HEIGHT> --datadir /path/to/reth/datadir
93
106
94
107
# Then dump the state
95
108
reth dump-genesis \
96
109
--datadir /path/to/reth/datadir \
97
110
--output genesis-export.json
98
-
111
+
```
99
112
100
113
⸻
101
114
102
115
Verification after export:
103
116
117
+
```bash
104
118
# Number of accounts in alloc
119
+
105
120
jq '.alloc | length' genesis-export.json
106
121
107
122
# Review chain configuration
108
123
jq '.config' genesis-export.json
124
+
```
109
125
110
126
The exported genesis will contain:
127
+
111
128
- All account balances and nonces
112
129
- Contract bytecode and storage
113
130
- Current chain configuration
114
131
115
-
116
132
### 5. Prepare New Genesis Configuration
117
133
118
134
Once you have genesis-export.json, update it for the new chain parameters.
0 commit comments