Skip to content

Commit

Permalink
BlockInterval support for hash ranges (#728)
Browse files Browse the repository at this point in the history
* Refactor BlockInterval::new() to facilitate hash range inputs

* Update scripts

* Remove blockid from interval

* Script and into() cleanup

* comments and cleanup

* check end vs start in range

* fix script call in workflow

* fix checkpoint arg

* add trait and mocks

* replace all cached provider

* cleanup tests

* lint / cleanup

* pr fixes

* fix mock macro only tests and log proof count

* rm block check and fix sh/readme changes

* fix taplo

* devdep

* move provider

* generalize BlockIntervalProvider impl

* partial fix

* compiling

* fix provider generics

* reinstate unit tests

* add comment

* add block to errors

* rm expect

* add where clause
  • Loading branch information
sergerad authored Oct 28, 2024
1 parent b1b73e3 commit 1e1e762
Show file tree
Hide file tree
Showing 16 changed files with 486 additions and 302 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jerigon-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ jobs:
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
ulimit -n 8192
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 0x1 0xf $ETH_RPC_URL native true 3000 100 test_only
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 15 $ETH_RPC_URL native 0 3000 100 test_only
echo "Proving blocks in test_only mode finished"
- name: Run prove blocks with native tracer in real mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 0x4 0x7 $ETH_RPC_URL native true 3000 100
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 4 7 $ETH_RPC_URL native 3 3000 100
echo "Proving blocks in real mode finished"
- name: Shut down network
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/jerigon-zero.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
branches:
- "**"


env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
Expand All @@ -26,16 +25,16 @@ jobs:
uses: actions/checkout@v4

- name: Checkout test-jerigon-network sources
uses: actions/checkout@v4
uses: actions/checkout@v4
with:
repository: 0xPolygonZero/jerigon-test-network
ref: 'feat/kurtosis-network'
ref: "feat/kurtosis-network"
path: jerigon-test-network

- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -57,39 +56,35 @@ jobs:
#It is much easier to use cast tool in scripts so install foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
uses: foundry-rs/foundry-toolchain@v1

- name: Run cancun test network
run: |
docker pull ghcr.io/0xpolygonzero/erigon:feat-zero
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
kurtosis run --enclave cancun-testnet github.com/ethpandaops/[email protected] --args-file jerigon-test-network/network_params.yml
- name: Generate blocks with transactions
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
cast rpc eth_blockNumber --rpc-url $ETH_RPC_URL
cd jerigon-test-network && set -a && source .env && set +a
bash ./tests/generate_transactions.sh
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
cast rpc eth_blockNumber --rpc-url $ETH_RPC_URL
cd jerigon-test-network && set -a && source .env && set +a
bash ./tests/generate_transactions.sh
- name: Run prove blocks with zero tracer in test_only mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
ulimit -n 8192
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 0x1 0xf $ETH_RPC_URL jerigon true 3000 100 test_only
OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 15 $ETH_RPC_URL jerigon 0 3000 100 test_only
echo "Proving blocks in test_only mode finished"
- name: Run prove blocks with zero tracer in real mode
run: |
ETH_RPC_URL="$(kurtosis port print cancun-testnet el-2-erigon-lighthouse ws-rpc)"
rm -rf proofs/* circuits/* ./proofs.json test.out verify.out leader.out
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 0x2 0x5 $ETH_RPC_URL jerigon true 3000 100
OUTPUT_TO_TERMINAL=true RUN_VERIFICATION=true ./scripts/prove_rpc.sh 2 5 $ETH_RPC_URL jerigon 1 3000 100
echo "Proving blocks in real mode finished"
- name: Shut down network
run: |
kurtosis enclave rm -f cancun-testnet
kurtosis engine stop
71 changes: 71 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1e1e762

Please sign in to comment.