Skip to content

Commit

Permalink
Conflicts resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
root authored and root committed Nov 8, 2023
2 parents 0e749c9 + 1cf8f10 commit eab6a35
Show file tree
Hide file tree
Showing 281 changed files with 40,722 additions and 2,323 deletions.
14 changes: 14 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
[alias]
docs = "doc --workspace --all-features --no-deps"

[target.x86_64-pc-windows-msvc]
rustflags = [
# Increases the stack size to 10MB, which is
# in line with Linux (whereas default for Windows is 1MB)
"-Clink-arg=/STACK:10000000",
]

[target.i686-pc-windows-msvc]
rustflags = [
# Increases the stack size to 10MB, which is
# in line with Linux (whereas default for Windows is 1MB)
"-Clink-arg=/STACK:10000000",
]
7 changes: 7 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[profile.default]
retries = { backoff = "exponential", count = 2, delay = "2s", jitter = true }
slow-timeout = { period = "30s", terminate-after = 4 }

[[profile.default.overrides]]
filter = "test(general_state_tests)"
slow-timeout = { period = "1m", terminate-after = 4 }
11 changes: 0 additions & 11 deletions .github/SANITY_DEPS_ISSUE_TEMPLATE.md

This file was deleted.

11 changes: 8 additions & 3 deletions .github/scripts/compare_iai.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash

# This script should be run on the main branch, after running the iai benchmarks on the target branch.
# If the main branch has a better iai performance, exits in error.
# It ignores L2 differences, since they seem hard to stabilize across runs.

# If the main branch has a better iai performance, exits in error. It ignores L2 differences, since they seem hard to stabilize across runs.
cargo bench --package reth-db --bench iai --manifest-path pr/Cargo.toml | tee /dev/tty | awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
set -eo pipefail

cargo bench -p reth-db --bench iai -F test-utils \
| tee /dev/tty \
| awk '/((L1)|(Ins)|(RAM)|(Est))+.*\(\+[1-9]+[0-9]*\..*%\)/{f=1} END{exit f}'
23 changes: 23 additions & 0 deletions .github/scripts/install_geth.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

# Installs Geth (https://geth.ethereum.org) in $HOME/bin for x86_64 Linux.

set -eo pipefail

GETH_BUILD=${GETH_BUILD:-"1.13.4-3f907d6a"}

name="geth-linux-amd64-$GETH_BUILD"

mkdir -p "$HOME/bin"
wget "https://gethstore.blob.core.windows.net/builds/$name.tar.gz"
tar -xvf "$name.tar.gz"
rm "$name.tar.gz"
mv "$name/geth" "$HOME/bin/geth"
rm -rf "$name"
chmod +x "$HOME/bin/geth"

# Add $HOME/bin to $PATH
[[ "$PATH" != *$HOME/bin* ]] && export PATH=$HOME/bin:$PATH
[ -n "$CI" ] && echo "$HOME/bin" >> "$GITHUB_PATH"

geth version
31 changes: 8 additions & 23 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Runs benchmarks.

on:
pull_request:
merge_group:
Expand All @@ -20,49 +22,32 @@ jobs:
if: github.event_name != 'pull_request'
steps:
- name: Checkout main sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: main
path: main

- name: Checkout PR sources
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
clean: false
path: pr

- name: Install Valgrind
run: |
sudo apt update && sudo apt install valgrind
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable

run: sudo apt update && sudo apt install valgrind
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
main -> target
pr -> target
cache-on-failure: true

- name: Generate test vectors
run: |
cargo run --bin reth --manifest-path main/Cargo.toml -- test-vectors tables
cp -r testdata main
mv testdata pr
- name: Set main baseline
run: cargo bench --package reth-db --bench iai --features test-utils --manifest-path main/Cargo.toml

- name: Compare PR benchmark
shell: 'script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
run: |
./pr/.github/scripts/compare_iai.sh
bench-success:
if: always()
name: bench success
runs-on: ubuntu-latest
steps:
# Note: This check is a dummy because we don't have any bench checks enabled.
- run: echo OK.
run: .github/scripts/compare_iai.sh
working-directory: pr
12 changes: 9 additions & 3 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Documentation and mdbook related jobs.

name: book

on:
push:
branches: [main]
Expand All @@ -13,7 +16,7 @@ jobs:
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install mdbook
run: |
Expand All @@ -36,7 +39,7 @@ jobs:
timeout-minutes: 60

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install mdbook-linkcheck
run: |
Expand All @@ -53,10 +56,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
<<<<<<< HEAD
with:
toolchain: nightly-2023-10-29
=======
>>>>>>> 1cf8f1033e3c6363fa18ddb3de672983aa43355a
- name: Install mdbook
run: |
mkdir mdbook
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Runs `cargo-deny` when modifying `Cargo.lock`.

name: deny

on:
Expand All @@ -10,7 +12,6 @@ on:
merge_group:

env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always

concurrency: deny-${{ github.head_ref || github.run_id }}
Expand All @@ -20,7 +21,7 @@ jobs:
name: deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check all
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Automatically run `cargo update` periodically
# Runs `cargo update` periodically.

name: Update Dependencies

Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly

- name: cargo update
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Publishes the Docker image.

name: docker

on:
Expand All @@ -21,24 +23,18 @@ jobs:
packages: write
contents: read
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Get latest version of stable Rust
run: rustup update stable
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- uses: taiki-e/install-action@cross
- name: Log in to Docker
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io --username ${DOCKER_USERNAME} --password-stdin
- name: Set up Docker builder
run: |
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
docker buildx create --use --name cross-builder
- name: Build and push image
run: |
cargo install cross
env PROFILE=maxperf make docker-build-latest
run: make PROFILE=maxperf docker-build-latest
48 changes: 37 additions & 11 deletions .github/workflows/hive.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Runs `ethereum/hive` tests.

name: hive

on:
schedule:
# every day
- cron: '0 0 * * *'
- cron: "0 0 * * *"

env:
CARGO_TERM_COLOR: always
Expand All @@ -10,16 +14,13 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

name: hive
jobs:
prepare:
runs-on:
group: Reth
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: mkdir artifacts

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and export reth image
Expand All @@ -33,15 +34,15 @@ jobs:
cache-to: type=gha,mode=max

- name: Checkout hive tests
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ethereum/hive
ref: master
path: hivetests

- uses: actions/setup-go@v3
with:
go-version: '^1.13.1'
go-version: "^1.13.1"
- run: go version
- name: Build hive tool
run: |
Expand All @@ -55,7 +56,6 @@ jobs:
name: artifacts
path: ./artifacts


test:
continue-on-error: ${{ matrix.experimental }}
strategy:
Expand All @@ -71,7 +71,17 @@ jobs:
# we have excluded these tests because we do not support block
# announcements
# exclude: [TestLargeAnnounce, TestBroadcast, TestBlockHashAnnounce]
include: [TestStatus, TestGetBlockHeaders, TestSimultaneousRequests, TestSameRequestID, TestZeroRequestID, TestGetBlockBodies, TestMaliciousHandshake, TestMaliciousStatus, TestTransaction, TestMaliciousTx]
include:
- TestStatus
- TestGetBlockHeaders
- TestSimultaneousRequests
- TestSameRequestID
- TestZeroRequestID
- TestGetBlockBodies
- TestMaliciousHandshake
- TestMaliciousStatus
- TestTransaction
- TestMaliciousTx
experimental: true
- sim: ethereum/engine
limit: engine-exchange-capabilities
Expand All @@ -93,7 +103,23 @@ jobs:
experimental: true
# eth_ rpc methods
- sim: ethereum/rpc-compat
include: [eth_blockNumber, eth_call, eth_chainId, eth_createAccessList, eth_estimateGas, eth_feeHistory, eth_getBalance, eth_getBlockBy, eth_getBlockTransactionCountBy, eth_getCode, eth_getStorage, eth_getTransactionBy, eth_getTransactionCount, eth_getTransactionReceipt, eth_sendRawTransaction, eth_syncing]
include:
- eth_blockNumber
- eth_call
- eth_chainId
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_getBalance
- eth_getBlockBy
- eth_getBlockTransactionCountBy
- eth_getCode
- eth_getStorage
- eth_getTransactionBy
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_syncing
experimental: true
# not running eth_getProof tests because we do not support
# eth_getProof yet
Expand Down Expand Up @@ -175,7 +201,7 @@ jobs:
chmod +x /usr/local/bin/hive
- name: Checkout hive tests
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ethereum/hive
ref: master
Expand Down
Loading

0 comments on commit eab6a35

Please sign in to comment.