Skip to content

Commit 85133a8

Browse files
add cheat sheet and roadmap updates
1 parent cba5705 commit 85133a8

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
CDK-erigon supports two simple methods for network recovery:
2+
3+
- Partial L1 recovery; from a partially synced datadir.
4+
- Full L1 recovery; from a completely empty datadir.
5+
6+
## Partial recovery
7+
8+
### Sync limit step
9+
10+
First, find out the following:
11+
12+
- What batch to set as the first batch to start recovering from.
13+
- What is the last block of the batch prior to this. It can be found by querying the RPC or checking the L1 data from the sequencer contract.
14+
15+
Once we know the last block number, we can begin a fresh sync to get to that block height. To do this use the same configuration that you would normally use for the network but add an additional flag in `--zkevm.sync-limit=[block you need + 1]`.
16+
17+
!!! info "Example"
18+
In order to sync to block 100, enter `101` for the flag value.
19+
20+
Let the node run and it eventually sits in a loop at this block height. Once the node reaches the required height, you can stop the node as normal.
21+
22+
### L1 recovery step
23+
24+
First determine the earliest L1 block height suitable for recovery.
25+
26+
You can do this by looking for the L1 block number for the earliest transaction against the sequencer contract (found in the cdk-erigon config).
27+
28+
Once you have the info you need, start the node up with a new flag: `zkevm.l1-sync-start-block=[l1block height]`.
29+
30+
!!! important
31+
Remove the `zkevm.sync-limit` flag from the previous step at this point if you are running a partial recovery.
32+
33+
It is important to pick the earliest block on the network so that the L1 info tree update events are gathered correctly. If not, you run the risk of the indexes
34+
not lining up.
35+
36+
## Full recovery
37+
38+
Follow the L1 recovery step as above, and use a completely fresh datadir.

docs/cdk/erigon/releases.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ At the time of writing, `cdk-erigon` supports the following chains and fork ids:
1212

1313
## Roadmap
1414

15-
- `v0.9.x`: Support for the Polygon Cardona testnet.
16-
- `v1.x.x`: Support for Polygon mainnet.
15+
- `v1.x.x`: Support for the Polygon Cardona testnet.
16+
- `v1.x.x`: Support for Polygon zkEVM mainnet.
1717
- `v3.x.x`: Erigon 3 based (snapshot support).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ nav:
7272
- Deploy a node: cdk/erigon/deploy-cdk-erigon.md
7373
- How to:
7474
- Configure chains dynamically: cdk/erigon/chain-config.md
75+
- Recover the network: cdk/erigon/network-recovery.md
7576
- Architecture:
7677
- CDK rollup: cdk/architecture/cdk-zkevm.md
7778
- CDK validium: cdk/architecture/cdk-validium.md

0 commit comments

Comments
 (0)