Skip to content

Commit

Permalink
Merge pull request #167 from scroll-tech/chore-merge-upstream-4ada1535e
Browse files Browse the repository at this point in the history
  • Loading branch information
frisitano authored Mar 5, 2025
2 parents 6e90007 + 35faf7d commit 3b4b00e
Show file tree
Hide file tree
Showing 440 changed files with 6,518 additions and 6,042 deletions.
30 changes: 15 additions & 15 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ version:
workflows:
check:
- [
"lint",
# Check that `A` activates the features of `B`.
"propagate-feature",
# These are the features to check:
"--features=std,optimism,op,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench",
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
"--left-side-feature-missing=ignore",
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.
"lint",
# Check that `A` activates the features of `B`.
"propagate-feature",
# These are the features to check:
"--features=std,op,scroll-alloy-traits,dev,asm-keccak,jemalloc,jemalloc-prof,tracy-allocator,serde-bincode-compat,serde,test-utils,arbitrary,bench,alloy-compat",
# Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually.
"--left-side-feature-missing=ignore",
# Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on.

"--left-side-outside-workspace=ignore",
# Auxilary flags:
"--offline",
"--locked",
"--show-path",
"--quiet",
]
"--left-side-outside-workspace=ignore",
# Auxilary flags:
"--offline",
"--locked",
"--show-path",
"--quiet",
]
default:
# Running `zepter` with no subcommand will check & fix.
- [$check.0, "--fix"]
Expand Down
1 change: 1 addition & 0 deletions .github/assets/check_rv32imac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ crates_to_check=(
reth-execution-errors
reth-execution-types
reth-db-models
reth-evm

## ethereum
reth-ethereum-forks
Expand Down
5 changes: 4 additions & 1 deletion .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ exclude_crates=(
reth-ethereum-cli
reth-ethereum-payload-builder
reth-etl
reth-evm
reth-exex
reth-exex-test-utils
reth-ipc
Expand All @@ -45,6 +44,8 @@ exclude_crates=(
reth-optimism-payload-builder
reth-optimism-rpc
reth-optimism-chain-registry
reth-optimism-consensus
reth-optimism-evm
reth-rpc
reth-rpc-api
reth-rpc-api-testing-util
Expand Down Expand Up @@ -75,10 +76,12 @@ exclude_crates=(
reth-scroll # tokio
reth-scroll-state-commitment # tokio
reth-scroll-chainspec # tokio
reth-scroll-consensus # c-kzg
reth-scroll-evm # tokio
reth-scroll-rpc #tokio
reth-scroll-engine-primitives # proptest
reth-scroll-payload # c-kzg
reth-scroll-primitives # c-kzg
)

# Array to hold the results
Expand Down
21 changes: 6 additions & 15 deletions .github/scripts/codspeed-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@ set -eo pipefail
# TODO: Benchmarks run WAY too slow due to excessive amount of iterations.

cmd=(cargo codspeed build --profile profiling)
excludes=(
# Unnecessary
--exclude reth-libmdbx
# Build is too slow
--exclude reth-network
# Built separately
--exclude reth-transaction-pool
# TODO: some benchmarks panic: https://github.com/paradigmxyz/reth/actions/runs/12307046814/job/34349955788
--exclude reth-db
--exclude reth-trie-parallel
--exclude reth-engine-tree
crates=(
-p reth-primitives
-p reth-trie
-p reth-trie-common
-p reth-trie-sparse
)

"${cmd[@]}" --features test-utils --workspace "${excludes[@]}"

# TODO: Slow benchmarks due to too many iterations
## "${cmd[@]}" -p reth-transaction-pool --features test-utils,arbitrary
"${cmd[@]}" --features test-utils "${crates[@]}"
4 changes: 2 additions & 2 deletions .github/workflows/compact.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
matrix:
bin:
- cargo run --bin reth --features "dev"
- cargo run --bin op-reth --features "optimism dev" --manifest-path crates/optimism/bin/Cargo.toml
- cargo run --bin scroll-reth --features "scroll skip-state-root-validation dev" --manifest-path crates/scroll/bin/scroll-reth/Cargo.toml
- cargo run --bin op-reth --features "dev" --manifest-path crates/optimism/bin/Cargo.toml
- cargo run --bin scroll-reth --features "skip-state-root-validation dev" --manifest-path crates/scroll/bin/scroll-reth/Cargo.toml
steps:
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
name: Run tests
run: |
cargo nextest run \
--locked -p reth-optimism-node --features "optimism"
--locked -p reth-optimism-node
integration-success:
name: integration success
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kurtosis-op.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
image_tag: ghcr.io/paradigmxyz/op-reth:kurtosis-ci
binary_name: op-reth
cargo_features: optimism,asm-keccak
cargo_features: asm-keccak
cargo_package: crates/optimism/bin/Cargo.toml

test:
Expand Down
29 changes: 7 additions & 22 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ jobs:
matrix:
include:
- type: ethereum
args: --bin reth --workspace --lib --examples --tests --benches --locked
args: --workspace --lib --examples --tests --benches --locked
features: "ethereum asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: optimism
args: --bin op-reth --workspace --lib --examples --tests --benches --locked
features: "optimism asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: scroll
args: --bin scroll-reth --workspace --lib --examples --tests --benches --locked
features: "scroll skip-state-root-validation asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
features: "skip-state-root-validation asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- type: book
args: --manifest-path book/sources/Cargo.toml --workspace --bins
features: ""
Expand Down Expand Up @@ -111,21 +108,18 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo hack check --workspace --exclude op-reth --exclude scroll-reth --exclude scroll-reth-mpt
- run: cargo check -p op-reth --features "optimism"
- run: cargo check -p scroll-reth --features "scroll"
- run: cargo hack check --workspace
- run: cargo check -p scroll-reth

msrv:
name: MSRV / ${{ matrix.network }}
name: MSRV
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
include:
- binary: reth
network: ethereum
- binary: op-reth
network: optimism
steps:
- uses: actions/checkout@v4
- uses: rui314/setup-mold@v1
Expand All @@ -135,7 +129,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo build --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }}"
- run: cargo build --bin "${{ matrix.binary }}" --workspace
env:
RUSTFLAGS: -D warnings

Expand Down Expand Up @@ -183,16 +177,7 @@ jobs:
with:
cache-on-failure: true
- uses: taiki-e/install-action@cargo-udeps
# due to the scroll and optimism feature flag, we need to exclude some crates that were annotated with
# #![cfg(not(feature = "scroll))] or #![cfg(not(feature = "optimism"))].
- run: |
cargo udeps --workspace --lib --examples --tests --benches --all-features --locked \
--exclude reth-optimism-cli --exclude reth-optimism-consensus --exclude reth-optimism-payload-builder \
--exclude reth-optimism-node --exclude reth-optimism-evm --exclude reth-optimism-node --exclude reth-optimism-rpc \
--exclude reth-optimism-txpool --exclude reth-op --exclude op-reth --exclude "example-*" --exclude reth \
--exclude reth-exex-test-utils --exclude reth-node-ethereum --exclude reth-scroll-cli --exclude reth-scroll-evm \
--exclude reth-scroll-node --exclude scroll-reth --exclude reth-scroll-rpc --exclude reth-scroll-trie \
--exclude reth-scroll-engine-primitives --exclude scroll-alloy-provider --exclude reth-scroll-payload
- run: cargo udeps --workspace --lib --examples --tests --benches --all-features --locked
book:
name: book
runs-on: ubuntu-latest
Expand Down
25 changes: 11 additions & 14 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,27 @@ jobs:
matrix:
include:
- type: ethereum
args: --features "asm-keccak ethereum" --locked --workspace --exclude ef-tests
args: --features "asm-keccak ethereum" --locked
partition: 1
total_partitions: 2
- type: ethereum
args: --features "asm-keccak ethereum" --locked --workspace --exclude ef-tests
args: --features "asm-keccak ethereum" --locked
partition: 2
total_partitions: 2
- type: optimism
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum" --workspace --exclude ef-tests
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
partition: 1
total_partitions: 2
- type: optimism
args: --features "asm-keccak optimism" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum" --workspace --exclude ef-tests
args: --features "asm-keccak" --locked --exclude reth --exclude reth-bench --exclude "example-*" --exclude "reth-ethereum-*" --exclude "*-ethereum"
partition: 2
total_partitions: 2
- type: scroll
args: -p "reth-scroll-*" -p "scroll-alloy-*" --locked --features "scroll"
args: -p "reth-scroll-*" -p "scroll-alloy-*" --locked
partition: 1
total_partitions: 1
- type: book
args: --manifest-path book/sources/Cargo.toml --workspace --exclude ef-tests
args: --manifest-path book/sources/Cargo.toml
partition: 1
total_partitions: 1
timeout-minutes: 30
Expand All @@ -68,9 +68,9 @@ jobs:
- name: Run tests
run: |
cargo nextest run \
${{ matrix.args }} \
--no-tests=warn \
--partition hash:${{ matrix.partition }}/${{ matrix.total_partitions }} \
${{ matrix.args }} --workspace \
--exclude ef-tests --no-tests=warn \
--partition hash:${{ matrix.partition }}/2 \
-E "!kind(test)"
state:
Expand Down Expand Up @@ -101,14 +101,11 @@ jobs:
- run: cargo nextest run --release -p ef-tests --features "asm-keccak ef-tests"

doc:
name: doc tests (${{ matrix.network }})
name: doc tests
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
timeout-minutes: 30
strategy:
matrix:
network: ["ethereum", "optimism"]
steps:
- uses: actions/checkout@v4
- uses: rui314/setup-mold@v1
Expand All @@ -117,7 +114,7 @@ jobs:
with:
cache-on-failure: true
- name: Run doctests
run: cargo test --doc --workspace --features "${{ matrix.network }}"
run: cargo test --doc --workspace --all-features

unit-success:
name: unit success
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: mingw-w64
run: sudo apt-get install -y mingw-w64
- name: Check OP-Reth
run: cargo check -p op-reth --features optimism --target x86_64-pc-windows-gnu
run: cargo check -p op-reth --target x86_64-pc-windows-gnu
Loading

0 comments on commit 3b4b00e

Please sign in to comment.