Skip to content

Commit 9d7bd3c

Browse files
committed
add more documentation
1 parent 2e0410a commit 9d7bd3c

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

sequencer-migration/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Scroll Sequencer Migration
2-
32
This module contains documentation and scripts for Scroll's sequencer migration from `l2geth` to rollup node (RN) aka `l2reth`.
43

54
### Risks
@@ -25,11 +24,21 @@ The high-level flow of the transition will look like this:
2524
9. Turn on `l2geth` sequencingx
2625

2726
### Testing locally
27+
To test locally run the test `docker_test_migrate_sequencer` and execute the `migrate-sequencer.sh` script.
2828
```bash
2929
# this test runs for ~60 seconds and starts with l2geth sequencing and expects all nodes to reach the same block at block number 120.
3030
RUST_LOG=info,docker-compose=off cargo test --package tests --test migrate_sequencer -- docker_test_migrate_sequencer --exact --show-output
3131

3232
source local.env
33-
./migrate-sequencer.sh
33+
./migrate-sequencer.sh <blocks_to_produce>
34+
35+
# if necessary, reset l2geth block height and start sequencing on l2geth.
36+
./revert-l2geth-to-block.sh <block_number>
3437
```
3538

39+
**Simulating failure case**:
40+
- To simulate the case where `l2reth` produces invalid blocks we can adjust to `--builder.gaslimit=40000000` in `launch_rollup_node_sequencer.bash`. This will produce a block with a too big jump of the gas limit and `l2geth` will reject it. In a simulation we can then "revert" `l2geth` to its latest block and start sequencing on `l2geth` again.
41+
- Continuing on the above case we can fabricate a L2 reorg by simply resetting to any previous block. For all `l2geth` nodes the reorg will be shallow (ie before the invalid `l2reth` blocks) and for `l2reth` it will be deeper (ie all `l2reth` produced blocks + reset to previous block).
42+
43+
TODO: how to run with Docker
44+

tests/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ pub async fn miner_stop(provider: &NamedProvider) -> Result<()> {
4848
/// * `Ok(())` if all nodes reach the target block within the timeout
4949
/// * `Err` if timeout is reached or any provider call fails
5050
pub async fn wait_for_block(nodes: &[&NamedProvider], target_block: u64) -> Result<()> {
51-
let timeout_duration = Duration::from_secs(30);
51+
let timeout_duration = Duration::from_secs(60);
5252
let timeout_secs = timeout_duration.as_secs();
5353

5454
tracing::info!(

0 commit comments

Comments
 (0)