Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/v0.2.0-beta.5…
Browse files Browse the repository at this point in the history
…-opbnb
  • Loading branch information
Keefe Liu committed May 14, 2024
2 parents 0bd5444 + aadf535 commit 6086bb6
Show file tree
Hide file tree
Showing 563 changed files with 20,810 additions and 13,345 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,target,./crates/storage/libmdbx-rs/mdbx-sys/libmdbx,Cargo.toml,Cargo.lock
ignore-words-list = crate,ser,ratatui
13 changes: 10 additions & 3 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ body:
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please provide as much detail as possible.
If you believe you have found a vulnerability, please provide details [here](mailto:[email protected]) instead.
- type: textarea
id: what-happened
attributes:
label: Describe the bug
description: |
A clear and concise description of what the bug is.
If the bug is in a crate you are using (i.e. you are not running the standard `reth` binary) please mention that as well.
validations:
required: true
Expand All @@ -25,7 +25,7 @@ body:
description: Please provide any steps you think might be relevant to reproduce the bug.
placeholder: |
Steps to reproduce:
1. Start '...'
2. Then '...'
3. Check '...'
Expand Down Expand Up @@ -76,6 +76,13 @@ body:
description: This can be obtained with `reth db version`
validations:
required: true
- type: textarea
id: network
attributes:
label: Which chain / network are you on?
description: This is the argument you pass to `reth --chain`. If you are using `--dev`, type in 'dev' here. If you are not running with `--chain` or `--dev` then it is mainnet.
validations:
required: true
- type: dropdown
id: node-type
attributes:
Expand Down
20 changes: 15 additions & 5 deletions .github/scripts/label_pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@ function shouldIncludeLabel (label) {
return !isStatus && !isTrackingIssue && !isPreventStale && !isDifficulty;
}

// Get the issue number from an issue link in the forms `<keyword> <issue url>` or `<keyword> #<issue number>`.
function getIssueLink (repoUrl, body) {
const urlPattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) ${repoUrl}/issues/(?<issue_number>\\d+)`, 'i')
const issuePattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) \#(?<issue_number>\\d+)`, 'i')

const urlRe = body.match(urlPattern);
const issueRe = body.match(issuePattern);
if (urlRe?.groups?.issue_number) {
return urlRe.groups.issue_number
} else {
return issueRe?.groups?.issue_number
}
}

module.exports = async ({ github, context }) => {
try {
const prNumber = context.payload.pull_request.number;
const prBody = context.payload.pull_request.body;
const repo = context.repo;

const repoUrl = context.payload.repository.html_url;
const pattern = new RegExp(`(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) ${repoUrl}/issues/(?<issue_number>\\d+)`, 'i')

const re = prBody.match(pattern);
const issueNumber = re?.groups?.issue_number;

const issueNumber = getIssueLink(repoUrl, prBody);
if (!issueNumber) {
console.log('No issue reference found in PR description.');
return;
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ on:
env:
REPO_NAME: ${{ github.repository_owner }}/reth
IMAGE_NAME: ${{ github.repository_owner }}/reth
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
CARGO_TERM_COLOR: always
DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/reth
OP_DOCKER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/op-reth
DOCKER_USERNAME: ${{ github.actor }}

jobs:
Expand All @@ -36,9 +38,15 @@ jobs:
run: |
docker run --privileged --rm tonistiigi/binfmt --install arm64,amd64
docker buildx create --use --name cross-builder
- name: Build and push image, tag as "latest"
- name: Build and push reth image, tag as "latest"
if: ${{ contains(github.event.ref, 'beta') }}
run: make PROFILE=maxperf docker-build-push-latest
- name: Build and push image
- name: Build and push reth image
if: ${{ ! contains(github.event.ref, 'beta') }}
run: make PROFILE=maxperf docker-build-push
- name: Build and push op-reth image, tag as "latest"
if: ${{ contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push-latest
- name: Build and push op-reth image
if: ${{ ! contains(github.event.ref, 'beta') }}
run: make IMAGE_NAME=$OP_IMAGE_NAME DOCKER_IMAGE_NAME=$OP_DOCKER_IMAGE_NAME PROFILE=maxperf op-docker-build-push
15 changes: 9 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run:
cargo clippy --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }} ${{ matrix.extra-features }} asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
- run: cargo clippy --bin "${{ matrix.binary }}" --workspace --features "${{ matrix.network }} ${{ matrix.extra-features }} asm-keccak jemalloc jemalloc-prof min-error-logs min-warn-logs min-info-logs min-debug-logs min-trace-logs"
env:
RUSTFLAGS: -D warnings

Expand Down Expand Up @@ -99,9 +98,7 @@ jobs:
env:
# Keep in sync with ./book.yml:jobs.build
# This should only add `-D warnings`
RUSTDOCFLAGS:
--cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page
-Zunstable-options -D warnings
RUSTDOCFLAGS: --cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options -D warnings

fmt:
name: fmt
Expand All @@ -114,6 +111,12 @@ jobs:
components: rustfmt
- run: cargo fmt --all --check

codespell:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: codespell-project/actions-codespell@v2

grafana:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -128,7 +131,7 @@ jobs:
name: lint success
runs-on: ubuntu-latest
if: always()
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, grafana]
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, codespell, grafana]
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.HOMEBREW }}
no_fork: true
tap: paradigmxyz/brew
formula: reth
36 changes: 21 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

env:
REPO_NAME: ${{ github.repository_owner }}/reth
OP_IMAGE_NAME: ${{ github.repository_owner }}/op-reth
IMAGE_NAME: ${{ github.repository_owner }}/reth
CARGO_TERM_COLOR: always

Expand All @@ -26,11 +27,11 @@ jobs:

build:
name: build release
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.configs.os }}
needs: extract-version
strategy:
matrix:
include:
configs:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
profile: maxperf
Expand All @@ -46,29 +47,34 @@ jobs:
- target: x86_64-pc-windows-gnu
os: ubuntu-20.04
profile: maxperf
build:
- command: build
binary: reth
- command: op-build
binary: op-reth
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
target: ${{ matrix.configs.target }}
- uses: taiki-e/install-action@cross
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true

- name: Apple M1 setup
if: matrix.target == 'aarch64-apple-darwin'
if: matrix.configs.target == 'aarch64-apple-darwin'
run: |
echo "SDKROOT=$(xcrun -sdk macosx --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-os-version)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Build Reth
run: make PROFILE=${{ matrix.profile }} build-${{ matrix.target }}
run: make PROFILE=${{ matrix.configs.profile }} ${{ matrix.build.command }}-${{ matrix.configs.target }}
- name: Move binary
run: |
mkdir artifacts
[[ "${{ matrix.target }}" == *windows* ]] && ext=".exe"
mv "target/${{ matrix.target }}/${{ matrix.profile }}/reth${ext}" ./artifacts
[[ "${{ matrix.configs.target }}" == *windows* ]] && ext=".exe"
mv "target/${{ matrix.configs.target }}/${{ matrix.configs.profile }}/${{ matrix.build.binary }}${ext}" ./artifacts
- name: Configure GPG and create artifacts
env:
Expand All @@ -78,22 +84,22 @@ jobs:
export GPG_TTY=$(tty)
echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
cd artifacts
tar -czf reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz reth*
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
tar -czf ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz ${{ matrix.build.binary }}*
echo "$GPG_PASSPHRASE" | gpg --passphrase-fd 0 --pinentry-mode loopback --batch -ab ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz
mv *tar.gz* ..
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz
name: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz
path: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz

- name: Upload signature
uses: actions/upload-artifact@v4
with:
name: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
path: reth-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.target }}.tar.gz.asc
name: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz.asc
path: ${{ matrix.build.binary }}-${{ needs.extract-version.outputs.VERSION }}-${{ matrix.configs.target }}.tar.gz.asc

draft-release:
name: draft release
Expand Down Expand Up @@ -184,7 +190,7 @@ jobs:
ENDBODY
)
assets=()
for asset in ./reth-*.tar.gz*; do
for asset in ./*reth-*.tar.gz*; do
assets+=("$asset/$asset")
done
tag_name="${{ env.VERSION }}"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: ethereum/tests
ref: 1c23e3c27ac53b794de0844d2d5e19cd2495b9d8
path: testing/ef-tests/ethereum-tests
submodules: recursive
fetch-depth: 1
Expand Down
15 changes: 9 additions & 6 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
* @gakonst
bin/ @onbjerg
crates/blockchain-tree @rakita @rkrasiuk
crates/consensus/auto-seal @mattsse
crates/consensus/beacon @rkrasiuk @mattsse @Rjected
crates/cli/ @onbjerg @mattsse
crates/consensus @rkrasiuk @mattsse @Rjected
crates/exex @onbjerg @shekhirin
crates/metrics @onbjerg
crates/net/ @emhane @mattsse @Rjected
crates/net/downloaders/ @onbjerg @rkrasiuk
crates/node/ @mattsse @Rjected @onbjerg
crates/node-core/ @mattsse @Rjected @onbjerg
crates/node-ethereum/ @mattsse @Rjected
crates/payload/ @mattsse @Rjected
crates/prune @shekhirin @joshieDo
crates/revm/src/ @rakita
crates/revm/ @mattsse
crates/revm/ @mattsse @rakita
crates/rpc/ @mattsse @Rjected
crates/rpc/rpc-types @mattsse @Rjected @Evalir
crates/rpc/rpc-types-compat @mattsse @Rjected @Evalir
crates/stages/ @onbjerg @rkrasiuk @shekhirin
crates/stages-api/ @onbjerg @rkrasiuk @shekhirin
crates/static-file @joshieDo @shekhirin
crates/storage/ @rakita @joshieDo @shekhirin
crates/tasks @mattsse
crates/tracing @onbjerg
crates/transaction-pool/ @mattsse
crates/trie @rkrasiuk
crates/trie-parallel @rkrasiuk
crates/optimism @mattsse
.github/ @onbjerg @gakonst @DaniPopes
Loading

0 comments on commit 6086bb6

Please sign in to comment.