Skip to content

Commit

Permalink
Merge pull request #25 from scroll-tech/chore-merge-upstream-7119bb1fe
Browse files Browse the repository at this point in the history
chore: merge upstream 7119bb1
  • Loading branch information
Thegaram authored Oct 21, 2024
2 parents 4b1567a + 7270aaf commit 1d005f1
Show file tree
Hide file tree
Showing 352 changed files with 7,359 additions and 4,663 deletions.
40 changes: 40 additions & 0 deletions .config/zepter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version:
format: 1
# Minimum zepter version that is expected to work. This is just for printing a nice error
# message when someone tries to use an older version.
binary: 0.13.2

# The examples in the following comments assume crate `A` to have a dependency on crate `B`.
workflows:
check:
- [
"lint",
# Check that `A` activates the features of `B`.
"propagate-feature",
# These are the features to check:
"--features=std,optimism,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.
"--left-side-outside-workspace=ignore",
# Auxillary flags:
"--offline",
"--locked",
"--show-path",
"--quiet",
]
default:
# Running `zepter` with no subcommand will check & fix.
- [$check.0, "--fix"]

# Will be displayed when any workflow fails:
help:
text: |
Reth uses the Zepter CLI to detect abnormalities in Cargo features, e.g. missing propagation.
It looks like one more more checks failed; please check the console output.
You can try to automatically address them by installing zepter (`cargo install zepter --locked`) and simply running `zepter` in the workspace root.
links:
- "https://github.com/paradigmxyz/reth/pull/11888"
- "https://github.com/ggwpez/zepter"
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ crates/tasks/ @mattsse
crates/tokio-util/ @fgimenez @emhane
crates/tracing/ @onbjerg
crates/transaction-pool/ @mattsse
crates/trie/ @rkrasiuk @Rjected
crates/trie/ @rkrasiuk @Rjected @shekhirin
etc/ @Rjected @onbjerg @shekhirin
.github/ @onbjerg @gakonst @DaniPopes
9 changes: 3 additions & 6 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ set +e # Disable immediate exit on error

# Array of crates to compile
crates=($(cargo metadata --format-version=1 --no-deps | jq -r '.packages[].name' | grep '^reth' | sort))

# Array of crates to exclude
# Used with the `contains` function.
# shellcheck disable=SC2034
exclude_crates=(
# The following are not working yet, but known to be fixable
reth-exex-types # https://github.com/paradigmxyz/reth/issues/9946
Expand All @@ -30,12 +33,9 @@ exclude_crates=(
reth-engine-util
reth-eth-wire
reth-ethereum-cli
reth-ethereum-engine
reth-ethereum-engine-primitives
reth-ethereum-payload-builder
reth-etl
reth-evm-ethereum
reth-execution-errors
reth-exex
reth-exex-test-utils
reth-ipc
Expand All @@ -49,7 +49,6 @@ exclude_crates=(
reth-node-events
reth-node-metrics
reth-optimism-cli
reth-optimism-evm
reth-optimism-node
reth-optimism-payload-builder
reth-optimism-rpc
Expand All @@ -63,9 +62,7 @@ exclude_crates=(
reth-rpc-eth-api
reth-rpc-eth-types
reth-rpc-layer
reth-rpc-types
reth-stages
reth-storage-errors
reth-engine-local
# The following are not supposed to be working
reth # all of the crates below
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/eth-sync.yml

This file was deleted.

21 changes: 19 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.81" # MSRV
toolchain: "1.82" # MSRV
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.81" # MSRV
toolchain: "1.82" # MSRV
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand Down Expand Up @@ -219,6 +219,22 @@ jobs:
env:
RUSTFLAGS: -D warnings

# Check crates correctly propagate features
feature-propagation:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: fetch deps
run: |
# Eagerly pull dependencies
time cargo metadata --format-version=1 --locked > /dev/null
- name: run zepter
run: |
cargo install zepter -f --locked
zepter --version
time zepter run check
lint-success:
name: lint success
runs-on: ubuntu-latest
Expand All @@ -236,6 +252,7 @@ jobs:
- grafana
- no-test-deps
- features
- feature-propagation
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/op-sync.yml

This file was deleted.

62 changes: 62 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Runs sync tests.

name: sync test

on:
merge_group:

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
sync:
name: sync (${{ matrix.chain.bin }})
runs-on: ubuntu-latest
env:
RUST_LOG: info,sync=error
RUST_BACKTRACE: 1
timeout-minutes: 60
strategy:
matrix:
chain:
- build: install
bin: reth
chain: mainnet
tip: "0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4"
block: 100000
unwind-target: "0x52e0509d33a988ef807058e2980099ee3070187f7333aae12b64d4d675f34c5a"
- build: install-op
bin: op-reth
chain: base
tip: "0xbb9b85352c7ebca6ba8efc63bd66cecd038c92ec8ebd02e153a3e0b197e672b7"
block: 10000
unwind-target: "0x118a6e922a8c6cab221fc5adfe5056d2b72d58c6580e9c5629de55299e2cf8de"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Build ${{ matrix.chain.bin }}
run: make ${{ matrix.chain.build }}
- name: Run sync
run: |
${{ matrix.chain.bin }} node \
--chain ${{ matrix.chain.chain }} \
--debug.tip ${{ matrix.chain.tip }} \
--debug.max-block ${{ matrix.chain.block }} \
--debug.terminate
- name: Verify the target block hash
run: |
${{ matrix.chain.bin }} db --chain ${{ matrix.chain.chain }} get static-file headers ${{ matrix.chain.block }} \
| grep ${{ matrix.chain.tip }}
- name: Run stage unwind for 100 blocks
run: |
${{ matrix.chain.bin }} stage --chain ${{ matrix.chain.chain }} unwind num-blocks 100
- name: Run stage unwind to block hash
run: |
${{ matrix.chain.bin }} stage --chain ${{ matrix.chain.chain }} unwind to-block ${{ matrix.chain.unwind-target }}
Loading

0 comments on commit 1d005f1

Please sign in to comment.