forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from bitfinity-network/merge_upstream_v1.1.4
Merge upstream v1.1.4
- Loading branch information
Showing
1,492 changed files
with
118,407 additions
and
55,481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
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 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" |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: GitHub Discussions | ||
url: https://github.com/foundry-rs/reth/discussions | ||
url: https://github.com/paradigmxyz/reth/discussions | ||
about: Please ask and answer questions here to keep the issue tracker clean. | ||
- name: Security | ||
url: mailto:[email protected] | ||
about: Please report security vulnerabilities here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/usr/bin/env bash | ||
set +e # Disable immediate exit on error | ||
|
||
# Array of crates to check | ||
crates_to_check=( | ||
reth-codecs-derive | ||
reth-ethereum-forks | ||
reth-ethereum-primitives | ||
reth-primitives-traits | ||
reth-optimism-forks | ||
reth-network-peers | ||
# reth-evm | ||
# reth-primitives | ||
# reth-optimism-chainspec | ||
) | ||
|
||
# Array to hold the results | ||
results=() | ||
# Flag to track if any command fails | ||
any_failed=0 | ||
|
||
for crate in "${crates_to_check[@]}"; do | ||
cmd="cargo +stable build -p $crate --target riscv32imac-unknown-none-elf --no-default-features" | ||
|
||
if [ -n "$CI" ]; then | ||
echo "::group::$cmd" | ||
else | ||
printf "\n%s:\n %s\n" "$crate" "$cmd" | ||
fi | ||
|
||
set +e # Disable immediate exit on error | ||
# Run the command and capture the return code | ||
$cmd | ||
ret_code=$? | ||
set -e # Re-enable immediate exit on error | ||
|
||
# Store the result in the dictionary | ||
if [ $ret_code -eq 0 ]; then | ||
results+=("1:✅:$crate") | ||
else | ||
results+=("2:❌:$crate") | ||
any_failed=1 | ||
fi | ||
|
||
if [ -n "$CI" ]; then | ||
echo "::endgroup::" | ||
fi | ||
done | ||
|
||
# Sort the results by status and then by crate name | ||
IFS=$'\n' sorted_results=($(sort <<<"${results[*]}")) | ||
unset IFS | ||
|
||
# Print summary | ||
echo -e "\nSummary of build results:" | ||
for result in "${sorted_results[@]}"; do | ||
status="${result#*:}" | ||
status="${status%%:*}" | ||
crate="${result##*:}" | ||
echo "$status $crate" | ||
done | ||
|
||
# Exit with a non-zero status if any command fails | ||
exit $any_failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
#!/usr/bin/env bash | ||
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 | ||
# The following require investigation if they can be fixed | ||
reth-basic-payload-builder | ||
reth-beacon-consensus | ||
reth-bench | ||
reth-blockchain-tree | ||
reth-cli | ||
reth-cli-commands | ||
reth-cli-runner | ||
reth-consensus-debug-client | ||
reth-db-common | ||
reth-discv4 | ||
reth-discv5 | ||
reth-dns-discovery | ||
reth-downloaders | ||
reth-e2e-test-utils | ||
reth-engine-service | ||
reth-engine-tree | ||
reth-engine-util | ||
reth-eth-wire | ||
reth-ethereum-cli | ||
reth-ethereum-payload-builder | ||
reth-etl | ||
reth-exex | ||
reth-exex-test-utils | ||
reth-ipc | ||
reth-net-nat | ||
reth-network | ||
reth-node-api | ||
reth-node-builder | ||
reth-node-core | ||
reth-node-ethereum | ||
reth-node-events | ||
reth-node-metrics | ||
reth-optimism-cli | ||
reth-optimism-node | ||
reth-optimism-payload-builder | ||
reth-optimism-rpc | ||
reth-optimism-primitives | ||
reth-rpc | ||
reth-rpc-api | ||
reth-rpc-api-testing-util | ||
reth-rpc-builder | ||
reth-rpc-engine-api | ||
reth-rpc-eth-api | ||
reth-rpc-eth-types | ||
reth-rpc-layer | ||
reth-stages | ||
reth-engine-local | ||
# The following are not supposed to be working | ||
reth # all of the crates below | ||
reth-invalid-block-hooks # reth-provider | ||
reth-libmdbx # mdbx | ||
reth-mdbx-sys # mdbx | ||
reth-provider # tokio | ||
reth-prune # tokio | ||
reth-stages-api # reth-provider, reth-prune | ||
reth-static-file # tokio | ||
reth-transaction-pool # c-kzg | ||
reth-trie-parallel # tokio | ||
reth-testing-utils | ||
reth-network-peers | ||
) | ||
|
||
# Array to hold the results | ||
results=() | ||
# Flag to track if any command fails | ||
any_failed=0 | ||
|
||
# Function to check if a value exists in an array | ||
contains() { | ||
local array="$1[@]" | ||
local seeking=$2 | ||
local in=1 | ||
for element in "${!array}"; do | ||
if [[ "$element" == "$seeking" ]]; then | ||
in=0 | ||
break | ||
fi | ||
done | ||
return $in | ||
} | ||
|
||
for crate in "${crates[@]}"; do | ||
if contains exclude_crates "$crate"; then | ||
results+=("3:⏭️:$crate") | ||
continue | ||
fi | ||
|
||
cmd="cargo +stable build -p $crate --target wasm32-wasip1 --no-default-features" | ||
|
||
if [ -n "$CI" ]; then | ||
echo "::group::$cmd" | ||
else | ||
printf "\n%s:\n %s\n" "$crate" "$cmd" | ||
fi | ||
|
||
set +e # Disable immediate exit on error | ||
# Run the command and capture the return code | ||
$cmd | ||
ret_code=$? | ||
set -e # Re-enable immediate exit on error | ||
|
||
# Store the result in the dictionary | ||
if [ $ret_code -eq 0 ]; then | ||
results+=("1:✅:$crate") | ||
else | ||
results+=("2:❌:$crate") | ||
any_failed=1 | ||
fi | ||
|
||
if [ -n "$CI" ]; then | ||
echo "::endgroup::" | ||
fi | ||
done | ||
|
||
# Sort the results by status and then by crate name | ||
IFS=$'\n' sorted_results=($(sort <<<"${results[*]}")) | ||
unset IFS | ||
|
||
# Print summary | ||
echo -e "\nSummary of build results:" | ||
for result in "${sorted_results[@]}"; do | ||
status="${result#*:}" | ||
status="${status%%:*}" | ||
crate="${result##*:}" | ||
echo "$status $crate" | ||
done | ||
|
||
# Exit with a non-zero status if any command fails | ||
exit $any_failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ubuntu | ||
|
||
COPY dist/reth /usr/local/bin | ||
|
||
COPY LICENSE-* ./ | ||
|
||
EXPOSE 30303 30303/udp 9001 8545 8546 | ||
ENV RUST_LOG=debug | ||
ENTRYPOINT ["/usr/local/bin/reth"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
set -eo pipefail | ||
|
||
# Create the hive_assets directory | ||
mkdir hive_assets/ | ||
|
||
cd hivetests | ||
go build . | ||
|
||
./hive -client reth # first builds and caches the client | ||
|
||
# Run each hive command in the background for each simulator and wait | ||
echo "Building images" | ||
./hive -client reth --sim "pyspec" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "ethereum/engine" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "devp2p" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "ethereum/rpc-compat" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "smoke/genesis" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "smoke/network" -sim.timelimit 1s || true & | ||
./hive -client reth --sim "ethereum/sync" -sim.timelimit 1s || true & | ||
wait | ||
|
||
# Run docker save in parallel and wait | ||
echo "Saving images" | ||
docker save hive/hiveproxy:latest -o ../hive_assets/hiveproxy.tar & | ||
docker save hive/simulators/devp2p:latest -o ../hive_assets/devp2p.tar & | ||
docker save hive/simulators/ethereum/engine:latest -o ../hive_assets/engine.tar & | ||
docker save hive/simulators/ethereum/rpc-compat:latest -o ../hive_assets/rpc_compat.tar & | ||
docker save hive/simulators/ethereum/pyspec:latest -o ../hive_assets/pyspec.tar & | ||
docker save hive/simulators/smoke/genesis:latest -o ../hive_assets/smoke_genesis.tar & | ||
docker save hive/simulators/smoke/network:latest -o ../hive_assets/smoke_network.tar & | ||
docker save hive/simulators/ethereum/sync:latest -o ../hive_assets/ethereum_sync.tar & | ||
wait | ||
|
||
# Make sure we don't rebuild images on the CI jobs | ||
git apply ../.github/assets/hive/no_sim_build.diff | ||
go build . | ||
mv ./hive ../hive_assets/ |
Oops, something went wrong.