Skip to content

Commit

Permalink
Merge pull request #123 from scroll-tech/chore-merge-upstream-b69c2ebee
Browse files Browse the repository at this point in the history
Chore merge upstream b69c2eb
  • Loading branch information
Thegaram authored Jan 7, 2025
2 parents dba9746 + 22d6d5a commit fe3d5ae
Show file tree
Hide file tree
Showing 357 changed files with 4,960 additions and 5,348 deletions.
2 changes: 1 addition & 1 deletion .config/zepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
# 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:
# Auxilary flags:
"--offline",
"--locked",
"--show-path",
Expand Down
20 changes: 10 additions & 10 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
bin/ @onbjerg
crates/blockchain-tree/ @rakita @rkrasiuk @mattsse @Rjected
crates/blockchain-tree-api/ @rakita @rkrasiuk @mattsse @Rjected
crates/chainspec/ @Rjected @joshieDo @mattsse @emhane
crates/chainspec/ @Rjected @joshieDo @mattsse
crates/chain-state/ @fgimenez @mattsse @rkrasiuk
crates/cli/ @onbjerg @mattsse
crates/config/ @onbjerg
Expand All @@ -16,18 +16,18 @@ crates/ethereum-forks/ @mattsse @Rjected
crates/etl/ @joshieDo @shekhirin
crates/evm/ @rakita @mattsse @Rjected
crates/exex/ @onbjerg @shekhirin
crates/fs-util/ @onbjerg @emhane
crates/fs-util/ @onbjerg
crates/metrics/ @onbjerg
crates/net/ @emhane @mattsse @Rjected
crates/net/downloaders/ @onbjerg @rkrasiuk @emhane
crates/node/ @mattsse @Rjected @onbjerg @emhane @klkvr
crates/optimism/ @mattsse @Rjected @fgimenez @emhane
crates/net/ @mattsse @Rjected
crates/net/downloaders/ @onbjerg @rkrasiuk
crates/node/ @mattsse @Rjected @onbjerg @klkvr
crates/optimism/ @mattsse @Rjected @fgimenez
crates/payload/ @mattsse @Rjected
crates/primitives/ @Rjected @emhane @mattsse @klkvr
crates/primitives-traits/ @Rjected @joshieDo @emhane @mattsse @klkvr
crates/primitives/ @Rjected @mattsse @klkvr
crates/primitives-traits/ @Rjected @joshieDo @mattsse @klkvr
crates/prune/ @shekhirin @joshieDo
crates/revm/ @mattsse @rakita
crates/rpc/ @mattsse @Rjected @emhane
crates/rpc/ @mattsse @Rjected
crates/stages/ @onbjerg @rkrasiuk @shekhirin
crates/static-file/ @joshieDo @shekhirin
crates/storage/codecs/ @joshieDo
Expand All @@ -40,7 +40,7 @@ crates/storage/nippy-jar/ @joshieDo @shekhirin
crates/storage/provider/ @rakita @joshieDo @shekhirin
crates/storage/storage-api/ @joshieDo @rkrasiuk
crates/tasks/ @mattsse
crates/tokio-util/ @fgimenez @emhane
crates/tokio-util/ @fgimenez
crates/tracing/ @onbjerg
crates/transaction-pool/ @mattsse
crates/trie/ @rkrasiuk @Rjected @shekhirin
Expand Down
2 changes: 2 additions & 0 deletions .github/assets/check_rv32imac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ crates_to_check=(
reth-primitives-traits
reth-optimism-forks
reth-network-peers
reth-trie-common
reth-chainspec
# reth-evm
# reth-primitives
# reth-optimism-chainspec
Expand Down
3 changes: 0 additions & 3 deletions .github/assets/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ crates=($(cargo metadata --format-version=1 --no-deps | jq -r '.packages[].name'
# 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
# The following require investigation if they can be fixed
reth-basic-payload-builder
reth-beacon-consensus
Expand Down Expand Up @@ -70,7 +68,6 @@ exclude_crates=(
reth-transaction-pool # c-kzg
reth-trie-parallel # tokio
reth-testing-utils
reth-network-peers
reth-scroll-cli # tokio
reth-scroll-node # tokio
reth-scroll # tokio
Expand Down
23 changes: 23 additions & 0 deletions .github/scripts/codspeed-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
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
)

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

# TODO: Slow benchmarks due to too many iterations
## "${cmd[@]}" -p reth-transaction-pool --features test-utils,arbitrary
53 changes: 16 additions & 37 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,41 @@
# Runs benchmarks on serialization/deserialization of storage values and keys.
# Runs benchmarks.

on:
pull_request:
merge_group:
# TODO: Disabled temporarily for https://github.com/CodSpeedHQ/runner/issues/55
# merge_group:
push:
branches: [main]

env:
CARGO_TERM_COLOR: always
BASELINE: base
IAI_CALLGRIND_RUNNER: iai-callgrind-runner
SEED: reth

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

name: bench
jobs:
iai:
codspeed:
runs-on: ubuntu-latest
# Only run benchmarks in merge groups and on main
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Install Valgrind
run: sudo apt update && sudo apt install valgrind
with:
submodules: true
- uses: rui314/setup-mold@v1
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Install iai-callgrind-runner
run: |
echo "::group::Install"
version=$(cargo metadata --format-version=1 |\
jq '.packages[] | select(.name == "iai-callgrind").version' |\
tr -d '"'
)
cargo binstall iai-callgrind-runner --version $version --no-confirm --no-symlinks --force
echo "::endgroup::"
echo "::group::Verification"
which iai-callgrind-runner
echo "::endgroup::"
- name: Checkout base
uses: actions/checkout@v4
- name: Install cargo-codspeed
uses: taiki-e/install-action@v2
with:
ref: ${{ github.base_ref || 'main' }}
# On `main` branch, generates test vectors and serializes them to disk using `serde-json`.
- name: Generate test vectors
run: cargo run --bin reth --features dev -- test-vectors tables
# Runs iai and stores `main` baseline report for comparison later on $BASELINE.
- name: Save baseline
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --save-baseline=$BASELINE
- name: Checkout PR
uses: actions/checkout@v4
tool: cargo-codspeed
- name: Build the benchmark target(s)
run: ./.github/scripts/codspeed-build.sh
- name: Run the benchmarks
uses: CodSpeedHQ/action@v3
with:
clean: false
# Runs iai on incoming merge using previously generated test-vectors and compares the report against `main` report.
- name: Compare PR benchmarks
run: cargo bench -p reth-db --bench iai --profile profiling --features test-utils -- --baseline=$BASELINE
run: cargo codspeed run --workspace
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ jobs:
# #![cfg(not(feature = "scroll))] or #![cfg(not(feature = "optimism"))].
- run: |
cargo udeps --workspace --lib --examples --tests --benches --all-features --locked \
--exclude "reth-optimism-*" --exclude op-reth --exclude "example-*" --exclude reth \
--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 op-reth --exclude "example-*" --exclude reth --exclude reth-payload-primitives \
--exclude reth-e2e-test-utils --exclude reth-ethereum-payload-builder --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-engine
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ target/
testdata/micro/db

# Generated data for stage benchmarks
crates/stages/testdata
crates/stages/stages/testdata

# Prometheus data dir
data/
Expand Down
Loading

0 comments on commit fe3d5ae

Please sign in to comment.