Skip to content

Commit b8559fc

Browse files
refactor: improve upgrade script for cross-platform compatibility and sequential upgrades (#238)
* refactor: upgrade script * chore: nit * chore: nits * chore: nits * chore: nit * refactor: pos upgrade scenario (#240) * chore: filter l2-el and l2-cl containers * chore: rename method and add check on containers * chore: nit * chore: nit * chore: nit * chore: rename methods * chore: reduce requests made to the CL node * chore: add liveness check to get_any_cl_api_url * chore: nit * chore: define local vars * chore: clean up * chore: clean up * chore: clean up upgrade_cl_node * chore: clean up upgrade_el_node * chore: clean up * chore: add docker_network_name var * chore: add sections * chore: nit * docs: update comments * chore: clean up * chore: clean up * chore: wait_for_devnet_to_reach_block * chore: nit * chore: clean up * fix: typo * fix: shellcheck issues * fix: same * chore: nit * chore: use amd64 images by default * chore: same * fix: sleep interval * fix: typo * chore: nit * chore: nit * chore: nit * chore: update logs * chore: nit * chore: nit * chore: nit * fix: typo * chore: nit * docs: remove nodes from comments * chore: nit * docs: document script and wait for network to progress * fix: use docker instead of kurtosis to wait for rpcs to reach block * chore: remove loop * fix: typo * chore: update output.log * chore: nit * fix: nits * chore: fix readme * fix: typo * docs: nit * update README * fix: get_orphaned_containers * chore: nit * doc: add sleep 1 comment --------- Co-authored-by: kamuikatsurgi <shahkrishang11@gmail.com> --------- Co-authored-by: Léo Vincent <28714795+leovct@users.noreply.github.com>
1 parent a3a192d commit b8559fc

File tree

5 files changed

+885
-690
lines changed

5 files changed

+885
-690
lines changed

scenarios/pos/upgrade/.env.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ENCLAVE_NAME=pos
2-
KURTOSIS_POS_VERSION=v1.2.11
2+
KURTOSIS_POS_VERSION=v1.2.12
3+
RIO_FORK_BLOCK=256
34

4-
NEW_BOR_IMAGE=0xpolygon/bor:2.6.0-beta
5-
NEW_ERIGON_IMAGE=0xpolygon/erigon:v3.4.0-beta
5+
NEW_BOR_IMAGE=0xpolygon/bor:2.6.0-amd64
6+
NEW_ERIGON_IMAGE=0xpolygon/erigon:v3.4.0
67
NEW_HEIMDALL_V2_IMAGE=0xpolygon/heimdall-v2:0.6.0

scenarios/pos/upgrade/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
11
# PoS Upgrade Scenario
2+
23
Test a rolling upgrade of [kurtosis-pos](https://github.com/0xPolygon/kurtosis-pos) devnet nodes. Non-block-producing nodes are upgraded first, then block producers last to maintain network stability.
34

45
## Usage
56

67
1. Copy `.env.example` to `.env` and configure:
78
- `ENCLAVE_NAME`: Name of the Kurtosis enclave
8-
- `KURTOSIS_POS_VERSION`: Initial kurtosis-pos package version
9+
- `KURTOSIS_POS_VERSION`: Initial kurtosis-pos package version (branch, tag, or commit)
10+
- `RIO_FORK_BLOCK` (optional): Block number for Rio hard fork activation (default: `256`)
911
- `NEW_BOR_IMAGE`: Target Bor client image
10-
- `NEW_HEIMDALL_IMAGE`: Target Heimdall client image
12+
- `NEW_HEIMDALL_V2_IMAGE`: Target Heimdall v2 client image
1113
- `NEW_ERIGON_IMAGE`: Target Erigon client image
1214

15+
```bash
16+
cp .env.example .env
17+
```
18+
1319
2. (Optional) Customize `params.yml` for devnet configuration.
1420

1521
3. Run the scenario:
22+
1623
```bash
17-
sudo ./run.sh
24+
bash run.sh
1825
```
26+
27+
## Cleanup
28+
29+
Remove the enclave, orphaned containers, and temporary data before re-running:
30+
31+
```bash
32+
kurtosis enclave rm --force pos
33+
docker ps --all --format '{{.Names}}' | grep -E '^l2-(e|c)l-.*-.*-' | xargs docker rm --force
34+
rm -rf ./tmp
35+
```

0 commit comments

Comments
 (0)