From 98be31249e1798da81e20b8810c1e3f79e75605e Mon Sep 17 00:00:00 2001 From: Gregory Edison Date: Mon, 5 Aug 2024 18:12:30 +0200 Subject: [PATCH 1/3] add unwind to-block --- .github/workflows/eth-sync.yml | 5 ++++- .github/workflows/op-sync.yml | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eth-sync.yml b/.github/workflows/eth-sync.yml index 54c0d96079b9..f473e29a57c6 100644 --- a/.github/workflows/eth-sync.yml +++ b/.github/workflows/eth-sync.yml @@ -6,7 +6,7 @@ on: pull_request: merge_group: push: - branches: [main] + branches: [ main ] env: CARGO_TERM_COLOR: always @@ -48,3 +48,6 @@ jobs: - name: Run stage unwind for 100 blocks run: | reth stage unwind num-blocks 100 + - name: Run stage unwind to block hash + run: | + reth stage unwind to-block 0x52e0509d33a988ef807058e2980099ee3070187f7333aae12b64d4d675f34c5a diff --git a/.github/workflows/op-sync.yml b/.github/workflows/op-sync.yml index 73303b032d05..9f538b32807f 100644 --- a/.github/workflows/op-sync.yml +++ b/.github/workflows/op-sync.yml @@ -6,7 +6,7 @@ on: pull_request: merge_group: push: - branches: [main] + branches: [ main ] env: CARGO_TERM_COLOR: always @@ -50,3 +50,7 @@ jobs: - name: Run stage unwind for 100 blocks run: | op-reth stage --chain base unwind num-blocks 100 + - name: Run stage unwind to block hash + run: | + reth stage unwind to-block 0x118a6e922a8c6cab221fc5adfe5056d2b72d58c6580e9c5629de55299e2cf8de + From 24fa611110132332d5fbd75c9c70ae64f3a928a1 Mon Sep 17 00:00:00 2001 From: Gregory Edison Date: Wed, 7 Aug 2024 15:16:13 +0200 Subject: [PATCH 2/3] add workflow for stage run commands --- .github/workflows/stage.yml | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/stage.yml diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml new file mode 100644 index 000000000000..a30d656e13ad --- /dev/null +++ b/.github/workflows/stage.yml @@ -0,0 +1,72 @@ +# Runs all single stage commands. + +name: stage-test + +on: + pull_request: + merge_group: + push: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + FROM_BLOCK: 0 + TO_BLOCK: 50000 + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + stage: + name: stage commands + # Only run stage commands test in merge groups + if: github.event_name == 'merge_group' + runs-on: + group: Reth + env: + RUST_LOG: info,sync=error + RUST_BACKTRACE: 1 + timeout-minutes: 60 + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: Build reth + run: | + cargo install --features asm-keccak,jemalloc --path bin/reth + - name: Run headers stage + run: | + reth stage run headers --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run bodies stage + run: | + reth stage run bodies --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run senders stage + run: | + reth stage run senders --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run execution stage + run: | + reth stage run execution --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run account-hashing stage + run: | + reth stage run account-hashing --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run storage hashing stage + run: | + reth stage run storage-hashing --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run hashing stage + run: | + reth stage run hashing --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run merkle stage + run: | + reth stage run merkle --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run transaction lookup stage + run: | + reth stage run tx-lookup --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run account history stage + run: | + reth stage run account-history --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints + - name: Run storage history stage + run: | + reth stage run storage-history --from ${{ env.FROM_BLOCK }} --to ${{ env.TO_BLOCK }} --commit --checkpoints From ccb2631c96b426933680305719e84b3c324f849a Mon Sep 17 00:00:00 2001 From: Gregory Edison Date: Fri, 9 Aug 2024 10:56:45 +0200 Subject: [PATCH 3/3] answer comments --- .github/workflows/stage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index a30d656e13ad..60ffa8f73d72 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -1,4 +1,4 @@ -# Runs all single stage commands. +# Runs all `stage run` commands. name: stage-test @@ -19,7 +19,7 @@ concurrency: jobs: stage: - name: stage commands + name: stage-run-test # Only run stage commands test in merge groups if: github.event_name == 'merge_group' runs-on: