Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/rebasehive #6

Merged
merged 190 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
42634bd
Update besu branch back to main (#836)
parithosh Aug 24, 2023
8ed34df
cmd/hiveview: limit log bytes in suite view
fjl Aug 25, 2023
1925203
simulators/ethereum/engine: Fix ForkID Tests (#837)
marioevz Aug 31, 2023
3e57db1
simulators/ethereum/engine: Add incorrect engine versions tests (#834)
marioevz Sep 1, 2023
9bca303
configs/cancun: Besu update (#841)
marioevz Sep 5, 2023
1aac136
clients/reth: add cancun fork in mapper (#842)
Rjected Sep 7, 2023
992463d
clients/erigon: Fix `Dockerfile.git` (#861)
marioevz Sep 8, 2023
a323ae7
simulators/ethereum/engine: Refactor Legacy Engine API Tests (#840)
marioevz Sep 12, 2023
bd48a2b
simulators/ethereum/engine: Beacon root pre-deploy address update (#839)
spencer-tb Sep 12, 2023
80cdc29
clients/reth: Dockerfile support to build Reth from git or locally (#…
spencer-tb Sep 14, 2023
3cc2356
clients/besu: sh - Remove legacy option from startup flags (#863)
Gabriel-Trintinalia Sep 15, 2023
9a771f9
simulators/ethereum/pyspec: update execution-spec-tests (#865)
Rjected Sep 16, 2023
f7ea88b
cmd/hiveview: persist column filters in URL (#864)
fjl Sep 16, 2023
27104dd
cmd/hiveview: avoid creating history for column filter changes (#866)
fjl Sep 16, 2023
2e6ce85
simulators/ethereum/engine: run tests in parallel (#869)
lightclient Sep 19, 2023
e4e7ec5
hiveproxy: upgrade dependencies
fjl Sep 19, 2023
e1836fc
go.mod: upgrade dependencies
fjl Sep 19, 2023
3c7329c
go.mod: upgrade hiveproxy dependency
fjl Sep 19, 2023
d5e8ff7
.circleci: use Go 1.21
fjl Sep 19, 2023
b92a9b6
.circleci: enable internal static linking
fjl Sep 19, 2023
aac0e91
.circleci: disable libc dependencies in CI build
fjl Sep 19, 2023
b925762
simulators/devp2p: upgrade dependencies
fjl Sep 19, 2023
d381717
simulators/smoke: upgrade dependencies
fjl Sep 19, 2023
c5fd7a3
simulators/smoke/genesis: add some new forks
fjl Sep 19, 2023
3a05cf7
simulators/ethereum/sync: upgrade dependencies
fjl Sep 19, 2023
dee0127
simulators/ethereum/rpc: upgrade dependencies
fjl Sep 19, 2023
60b2f38
simulators/ethereum/rpc-compat: upgrade dependencies
fjl Sep 19, 2023
36f709d
simulators/ethereum/pyspec: upgrade dependencies
fjl Sep 19, 2023
c1e3f75
simulators/ethereum/graphql: upgrade dependencies
fjl Sep 19, 2023
b2c38c1
simulators/ethereum/consensus: upgrade dependencies
fjl Sep 19, 2023
4101148
simulators/ethereum/engine: upgrade dependencies
fjl Sep 19, 2023
a88ef6a
simulators/ethereum: update Go version in go.work file
fjl Sep 19, 2023
5f398bf
simulators/ethereum/engine: go mod tidy
fjl Sep 19, 2023
0618310
simulators/ethereum/engine: Add London non-zero-number test (#867)
marioevz Sep 19, 2023
61ecf1f
configs/cancun: Update Geth (#871)
marioevz Sep 20, 2023
d8b08b3
simulators/ethereum/engine: Update beacon root address: 0xbEAC..7d7a …
marioevz Sep 21, 2023
dd1d133
simulators/ethereum/pyspec: Use hive specific fixture format (#844)
spencer-tb Sep 21, 2023
f0c8672
Add reth (#875)
parithosh Sep 22, 2023
7c6ed71
clients/prysm-vc: Fix docker args
marioevz Sep 20, 2023
f33ead5
clients/lodestar-vc: Remove builder option
marioevz Sep 22, 2023
f8aa437
clients/teku-bn: Add trusted setup file
marioevz Sep 20, 2023
88a8ec6
configs/cancun: add all consensus clients
marioevz Sep 20, 2023
b569225
bump besu (#882)
parithosh Sep 25, 2023
949ee7c
simulators/ethereum: Update beacon root address 0x000F..Beac02 (#884)
danceratopz Sep 26, 2023
e828d75
simulators/ethereum/engine: rm 0x prefix on 4788 code (#885)
lightclient Sep 26, 2023
38f59e2
clients/erigon: Increase allowed blobcount in remote txs (#890)
somnathb1 Sep 27, 2023
4940de8
simulators/ethereum/engine: use replaced version of geth with updated…
lightclient Sep 27, 2023
aea0139
simulators/ethereum/engine: Engine API Test Fixes (#891)
marioevz Sep 27, 2023
8ef7ee1
clients/besu: use ubuntu base image and install java (#889)
macfarla Sep 27, 2023
219e6f6
simulators/ethereum/engine: Fix several tests (#886)
marioevz Sep 28, 2023
b783884
clients/ethereumjs: Remove `transports` parameter (#892)
marioevz Sep 29, 2023
6d720a7
simulators/ethereum/engine: Fix incomplete transactions test (#893)
marioevz Sep 29, 2023
b099c72
clients/nimbus-el: use admin_nodeInfo instead of net_nodeInfo (#896)
kdeme Oct 3, 2023
34e4de8
simulators/ethereum/engine: Optional `INVALID` on sync
marioevz Oct 2, 2023
f2844e5
simulators/ethereum/engine: Fix invalid nonce test on zero nonce
marioevz Oct 2, 2023
21450fd
simulators/ethereum/engine: Fix invalid Tx tests to use more realisti…
marioevz Oct 2, 2023
bb7886a
simulators/ethereum/engine: Remove blob tx on Shanghai genesis, befor…
marioevz Oct 2, 2023
df91079
simulators/ethereum/engine: Tx Invalid Signature Modifies S
marioevz Oct 3, 2023
92999bd
simulators/ethereum/engine: Update post-merge forks to activate later…
spencer-tb Oct 11, 2023
98b04c0
simulators/ethereum/engine: Fix naming, safe/finalized on reorg tests…
marioevz Oct 13, 2023
7984999
simulators/ethereum/engine: use generic error check for missing block…
lightclient Oct 17, 2023
3aad27f
clients/go-ethereum: disable min free disk check (#910)
jsvisa Oct 19, 2023
925ab45
internal/libhive: return clients in the order defined in the client-f…
marioevz Oct 19, 2023
e88d288
cmd/hivechain: support for newer forks, more chain outputs (#909)
fjl Oct 19, 2023
bc70996
simulators/ethereum/engine,pyspec: Update Trusted Setup (#915)
marioevz Oct 19, 2023
d5c7d98
cmd/hivechain: export chain starting after genesis (#912)
lightclient Oct 20, 2023
3d11814
cmd/hivechain: write ttd passed to genesis if merged (#913)
lightclient Oct 20, 2023
210e74f
cmd/hivechain: add forkenv output (#921)
fjl Oct 20, 2023
c832aa3
cmd/hivechain: add HIVE_NETWORK_ID in forkenv output
fjl Oct 20, 2023
25812b4
cmd/hivechain: use smaller network ID
fjl Oct 20, 2023
00c9c93
cmd/hivechain: even smaller chainid
fjl Oct 20, 2023
b087944
cmd/hivechain: add headnewpayload output
fjl Oct 20, 2023
e643272
cmd/hivechain: track preimages during generation (#924)
lightclient Oct 22, 2023
57c7eee
cmd/hivechain: remove trie/triedb/hashdb package dependency
fjl Oct 22, 2023
4e461d8
Nethermind to use master branch (#925)
flcl42 Oct 23, 2023
1176f3d
simulators/ethereum/engine,pyspec: Use `golang:1.20-alpine` (#926)
marioevz Oct 23, 2023
1163b74
simulators/ethereum/engine: Trim log output of requests (#928)
marioevz Oct 24, 2023
1d1b497
Enable blob tx pool for Nethermind
flcl42 Oct 24, 2023
0499ba5
simulators/ethereum/engine: Fix engine-cancun fcu version tests (#902)
spencer-tb Oct 24, 2023
38601ce
clients: only output full genesis file at high log levels (#927)
spencer-tb Oct 24, 2023
09ed207
clients: remove openethereum as its deprecated (#932)
spencer-tb Oct 25, 2023
ada6415
simulators/ethereum/engine: update test names for distinction (#914)
spencer-tb Oct 25, 2023
25a160b
simulators: fix typos in comments (#933)
vuittont60 Oct 26, 2023
de7d1a8
simulators/ethereum/engine: Add test to re-org to mempool and back in…
marioevz Oct 26, 2023
bd7e1c1
simulators/ethereum/engine: Minor fix to re-org tests (#934)
marioevz Oct 27, 2023
f53cda9
clients/besu: remove HIVE_SKIP_POW
fjl Oct 30, 2023
b9b3321
clients/erigon: remove HIVE_SKIP_POW
fjl Oct 30, 2023
f30aea0
clients/erigon: set terminalTotalDifficultyPassed
fjl Oct 30, 2023
d8ea3b9
clients/ethereumjs: remove mention of HIVE_SKIP_POW
fjl Oct 30, 2023
ed370bc
clients/go-ethereum: remove -gcmode=archive in import
fjl Oct 30, 2023
875fb18
clients/nethermind: remove mentions of HIVE_SKIP_POW
fjl Oct 30, 2023
09f91b4
clients/nimbus-el: remove mentions of HIVE_SKIP_POW
fjl Oct 30, 2023
a6e7926
clients/reth: remove mention of HIVE_SKIP_POW
fjl Oct 30, 2023
6974b1d
hivesim: only log test and suite skips at high log levels (#923)
spencer-tb Oct 31, 2023
b4acfd5
graphql: add test case for eip-4844 fields (#894)
s1na Oct 31, 2023
716dcd6
cmd/hivechain: add ability to create valid clique chain (#938)
fjl Oct 31, 2023
f5523a5
simulators/ethereum/sync: use engine API to trigger sync (#922)
fjl Oct 31, 2023
045d5b5
go.mod: upgrade github.com/docker/docker
fjl Oct 31, 2023
17ce994
simulators/devp2p: upgrade hivesim
fjl Oct 31, 2023
ef2b824
simulators/smoke: upgrade hivesim
fjl Oct 31, 2023
76e674d
simulators/ethereum/sync: upgrade hivesim
fjl Oct 31, 2023
e68e2c6
simulators/ethereum/rpc: upgrade hivesim
fjl Oct 31, 2023
aeb635b
simulators/ethereum/rpc-compat: upgrade hivesim
fjl Oct 31, 2023
a3092d1
simulators/ethereum/pyspec: upgrade hivesim
fjl Oct 31, 2023
2e30490
simulators/ethereum/graphql: upgrade hivesim
fjl Oct 31, 2023
89bc116
simulators/ethereum/engine: upgrade hivesim
fjl Oct 31, 2023
781a17e
simulators/ethereum/consensus: upgrade hivesim
fjl Oct 31, 2023
7ea18c0
simulators/ethereum: remove go.work
fjl Oct 31, 2023
b6c57c9
simulators/ethereum/pyspec: module replacement to reference engine sim
fjl Oct 31, 2023
f366177
simulators/ethereum/engine: Fix bugs for ForkID and Missing Ancenstor…
spencer-tb Nov 1, 2023
4b49304
clients/go-ethereum: use --state.scheme=path
fjl Nov 2, 2023
18d984d
clients: remove unused HIVE_TESTNET variable
fjl Nov 2, 2023
f5d45c6
docs: remove HIVE_SKIP_POW
fjl Nov 7, 2023
a343b70
cmd/hivechain: disable difficulty-bomb-only forks
fjl Nov 7, 2023
a4c2b5e
cmd/hivechain: remove HIVE_SKIP_POW in forkenv output
fjl Nov 7, 2023
fd76567
clients/ethereumjs: verbose RPC logging (#939)
jochem-brouwer Nov 7, 2023
574ca2e
clients: add 'glacier' forks in mapper (#941)
fjl Nov 8, 2023
3fe3360
hive: add --sim.randomseed flag (#943)
marioevz Nov 11, 2023
74a3253
simulators/ethereum/engine: Add randomness seed input (#944)
marioevz Nov 15, 2023
e5a1df0
clients/besu: Remove trusted setup (#946)
marioevz Nov 16, 2023
71e0529
cmd/hivechain: add 4788 contract to genesis and set beacon root post-…
lightclient Nov 9, 2023
6d2f8dd
clients/ethereumjs: add faster local test dockerfile (#940)
jochem-brouwer Nov 22, 2023
49745c0
clients/lodestar-vc: add `--builder` flag (#949)
marioevz Nov 24, 2023
c021812
clients/teku-bn: Add rate limit parameters (#899)
marioevz Nov 27, 2023
e530abe
simulators/ethereum/engine,pyspec: Upgrade geth branch (#951)
marioevz Nov 27, 2023
751876e
configs/cancun: Use go-ethereum master (#952)
marioevz Nov 27, 2023
d45fed7
clients/teku-bn: Remove trusted setup file, add `--ignore-weak-subjec…
marioevz Nov 28, 2023
2cdea39
hivesim: dd documentation generation (#948)
marioevz Dec 5, 2023
91d2ae9
clients/erigon, simulators/ethereum/rpc: patch RPC tests for erigon (…
somnathb1 Dec 6, 2023
51514d6
cmd/hivechain: fix typos in contracts
fjl Dec 14, 2023
bf96af9
cmd/hivechain: add snap test contract in genesis
fjl Dec 14, 2023
f8c976b
clients/nethermind: upgrade to .NET 8 (#955)
flcl42 Dec 20, 2023
7d0350f
simulators/devp2p: add support for new eth tests (#942)
fjl Dec 20, 2023
1fd74a7
clients/nethermind: update TxPool config (#956)
marcindsobczak Dec 28, 2023
b6da011
clients/erigon: small fix to mapper jq (#962)
somnathb1 Jan 4, 2024
3f89e28
simulators/ethereum/consensus: Fix `excessBlobGas` genesis (#964)
marioevz Jan 4, 2024
3f8d5e4
clients/erigon: Fix git dockerfile (#965)
marioevz Jan 5, 2024
b03e61d
clients/besu: Fix git dockerfile (#966)
marioevz Jan 5, 2024
72630da
all: fix some typos in README.md files (#968)
fakefraud Jan 11, 2024
610a6a3
cmd/hivechain: improve modifier schedule
fjl Jan 16, 2024
35cbb76
cmd/hivechain: add more transaction types
fjl Jan 16, 2024
6fabe4a
cmd/hivechain: add simple test for generate
fjl Jan 16, 2024
34cfa38
cmd/hivechain: deploy revert contract
fjl Jan 16, 2024
3e70ea2
cmd/hivechain: improve spacing in callrevert
fjl Jan 16, 2024
9afd083
cmd/hivechain: improve deploy tx gaslimit
fjl Jan 16, 2024
9d05a6d
cmd/hivechain: avoid OOG in randomcode
fjl Jan 16, 2024
42d1434
cmd/hivechain: correct selectors in callrevert
fjl Jan 16, 2024
1ff5fb9
cmd/hivechain: add blob transaction
fjl Jan 17, 2024
81422e6
clients/reth: use ghcr.io/paradigmxyz/reth as base image (#971)
holiman Jan 18, 2024
93245d7
cmd/hivechain: use calldata hash as log topic in emit contract
fjl Jan 18, 2024
4beb4e9
clients/nethermind: Fix Dockerfile.git (#972)
marioevz Jan 25, 2024
9d79bda
simulators/ethereum/rpc-compat: load chain env from tests
fjl Jan 29, 2024
da1cc14
simulators/ethereum/rpc-compat: add explainer in diff message
fjl Jan 29, 2024
53ab521
clients/nimbus-el: change command line options to use combo HTTP serv…
jangko Jan 29, 2024
86ccb97
.circleci: Add CI for rust simulators (#980)
KolbyML Jan 31, 2024
38d2631
clients: add portal network client definitions (#977)
KolbyML Jan 31, 2024
470148e
.ciricleci: fix circleci script after breaking from #980 (#982)
KolbyML Jan 31, 2024
c5a4388
hivesim: add built-in support for connecting to the engine API
fjl Jan 31, 2024
6a3b174
go.mod: go.mod tidy
fjl Jan 31, 2024
a9adf04
simulators/ethereum/rpc-compat: send forkchoiceUpdated to client (#983)
fjl Feb 1, 2024
e223100
simulators/ethereum/sync: use EngineAPI method of hivesim
fjl Feb 1, 2024
6211cfa
simulators/ethereum/rpc-compat: handle test comments and avoid error …
fjl Feb 1, 2024
ee26965
clients/besu: remove --engine-jwt-enabled
fjl Feb 1, 2024
b5d043f
clients/reth: fix merge netsplit block in mapper (#986)
Rjected Feb 4, 2024
45fb071
simulators/ethereum/pyspec: Use latest EEST fixture release. (#985)
spencer-tb Feb 5, 2024
b68424d
simulators/portal/history/rpc-compat: add portal network history rpc-…
KolbyML Feb 5, 2024
9a84ecf
clients: add 'portal' role
fjl Feb 5, 2024
4b174ad
simulators/portal/history/portal-interop: add portal network history …
KolbyML Feb 5, 2024
3d5fa64
simulators/portal/history/portal-mesh: add portal network history por…
KolbyML Feb 5, 2024
60f2fb9
simulators/portal/history/trin-bridge: add portal network history tri…
KolbyML Feb 5, 2024
648d44a
simulators/portal/beacon/rpc-compat: add portal network beacon rpc-co…
KolbyML Feb 5, 2024
03a9060
clients/prysm-vc: Use REST api (#906)
marioevz Feb 5, 2024
72d3ee7
simulators/eth2/engine: Fix error checking (#897)
marioevz Feb 5, 2024
1d7c780
clients/lodestar-bn: Add optional flag to disable peer scoring (#911)
marioevz Feb 5, 2024
facba89
clients/erigon: Configure snapshots flag (#992)
spencer-tb Feb 6, 2024
ef43681
clients/go-ethereum: Remove miner gasprice flag (#993)
spencer-tb Feb 7, 2024
39f6752
simulators/ethereum/engine: Fixes for execution-apis#498 (#974)
marioevz Feb 7, 2024
bad4bae
simulators/portal: refactor simulators to run multiple suites (#994)
KolbyML Feb 9, 2024
7261ccb
simulators/ethereum/engine: Expect error code for invalid payload att…
spencer-tb Feb 12, 2024
af97b26
clients/lighthouse-bn: Add trusted peers env var (#908)
marioevz Feb 13, 2024
8c46de7
clients/besu: fix merge block in mapper (#999)
pinges Feb 14, 2024
ebca98b
simulators/ethereum/consensus: add Paris as additional merge fork (#997)
spencer-tb Feb 14, 2024
7871c8c
simulators/portal/history: trin_bridge suite remove redundant extra c…
KolbyML Feb 14, 2024
36674ca
clients/erigon: Increase blobpool limit in Erigon (#1000)
somnathb1 Feb 14, 2024
dfd2def
simulators/ethereum/pyspec: Refactor, add sync payload verification (…
marioevz Feb 15, 2024
b7b9cfa
simulators/ethereum/consensus: add more 'paris' forks
fjl Feb 16, 2024
c6e85e0
simulators/portal/history: fix bug where only headers were tested (#1…
KolbyML Feb 26, 2024
7de2743
clients/reth: make sure pruner doesn't start on tests (#1002)
joshieDo Feb 27, 2024
6781ff5
simulators/eth2: Fix Docker golang version (#1003)
marioevz Feb 28, 2024
6772ed6
clients/portal: update Dockerfiles to use baseimage/tag arg format (#…
KolbyML Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 8 additions & 73 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,14 @@
version: 2.1
orbs:
go: circleci/[email protected]

jobs:
# This job builds the hive executable and stores it in the workspace.
build:
docker:
- image: cimg/go:1.19
steps:
# Build it.
- checkout
- go/load-cache
- go/mod-download
- go/save-cache
- run: {command: 'go build -ldflags="-extldflags=-static" .'}
# Store the executable.
- persist_to_workspace:
root: .
paths: ["hive"]

# This job runs the smoke test simulations. This requires a virtual
# machine instead of the container-based build environment because
# hive needs to be able to talk to the docker containers it creates.
smoke-tests:
machine:
image: ubuntu-2004:202201-02
steps:
- checkout
- attach_workspace: {at: "/tmp/build"}
- run:
command: "/tmp/build/hive --sim=smoke/genesis --client=go-ethereum"
- run:
command: "/tmp/build/hive --sim=smoke/network --client=go-ethereum"
setup: true

# This job also runs the smoke test simulations, but against a remote dockerd.
smoke-tests-remote-docker:
docker:
- image: cimg/base:2022.04
steps:
- checkout
- attach_workspace: {at: "/tmp/build"}
- setup_remote_docker: {version: 20.10.14}
- run:
command: "/tmp/build/hive --sim=smoke/genesis --client=go-ethereum --loglevel 5"
- run:
command: "/tmp/build/hive --sim=smoke/network --client=go-ethereum --loglevel 5"

# This job runs the go unit tests.
go-test:
docker:
- image: cimg/go:1.19
steps:
# Get the source.
- checkout
- go/load-cache
- go/mod-download
- go/save-cache
# Run the tests.
- run:
name: "hive module tests"
command: "go test -cover ./..."
- run:
name: "hiveproxy module tests"
command: "go test -cover ./..."
working_directory: "./hiveproxy"
- run:
name: "Compile Go simulators"
command: ".circleci/compile-simulators.sh"
orbs:
path-filtering: circleci/[email protected]

workflows:
main:
setup-workflow:
jobs:
- go-test
- build
- smoke-tests:
requires: ["build"]
- smoke-tests-remote-docker:
requires: ["build"]
- path-filtering/filter:
mapping: |
simulators/portal/.* rust-ci true
base-revision: origin/master
106 changes: 106 additions & 0 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 2.1
orbs:
go: circleci/[email protected]

parameters:
rust-ci:
type: boolean
default: false

jobs:
# This job builds the hive executable and stores it in the workspace.
build:
docker:
- image: cimg/go:1.21
steps:
# Build it.
- checkout
- go/load-cache
- go/mod-download
- go/save-cache
- run: {command: 'go build -ldflags="-s -extldflags=-static" -tags "osusergo netgo static_build" .'}
# Store the executable.
- persist_to_workspace:
root: .
paths: ["hive"]

# This job runs the smoke test simulations. This requires a virtual
# machine instead of the container-based build environment because
# hive needs to be able to talk to the docker containers it creates.
smoke-tests:
machine:
image: ubuntu-2004:202201-02
steps:
- checkout
- attach_workspace: {at: "/tmp/build"}
- run:
command: "/tmp/build/hive --sim=smoke/genesis --client=go-ethereum"
- run:
command: "/tmp/build/hive --sim=smoke/network --client=go-ethereum"

# This job also runs the smoke test simulations, but against a remote dockerd.
smoke-tests-remote-docker:
docker:
- image: cimg/base:2022.04
steps:
- checkout
- attach_workspace: {at: "/tmp/build"}
- setup_remote_docker: {version: 20.10.14}
- run:
command: "/tmp/build/hive --sim=smoke/genesis --client=go-ethereum --loglevel 5"
- run:
command: "/tmp/build/hive --sim=smoke/network --client=go-ethereum --loglevel 5"

# This job runs the go unit tests.
go-test:
docker:
- image: cimg/go:1.21
steps:
# Get the source.
- checkout
- go/load-cache
- go/mod-download
- go/save-cache
# Run the tests.
- run:
name: "hive module tests"
command: "go test -cover ./..."
- run:
name: "hiveproxy module tests"
command: "go test -cover ./..."
working_directory: "./hiveproxy"
- run:
name: "Compile Go simulators"
command: ".circleci/compile-simulators.sh"
# this makes sure the rust code is good
rust-simulators:
docker:
- image: cimg/rust:1.75.0
steps:
- checkout
- run:
name: Install rustfmt
command: rustup component add rustfmt
- run:
name: Install Clippy
command: rustup component add clippy
- run:
name: Install Clang
command: sudo apt update && sudo apt-get install clang -y
- run:
name: "Lint, build, test Rust simulators"
command: ".circleci/rust-simulators.sh"

workflows:
main:
jobs:
- go-test
- build
- smoke-tests:
requires: ["build"]
- smoke-tests-remote-docker:
requires: ["build"]
rust-jobs:
when: << pipeline.parameters.rust-ci >>
jobs:
- rust-simulators
16 changes: 16 additions & 0 deletions .circleci/rust-simulators.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

# This causes the bash script to exit immediately if any commands errors out
set -e

failed=""
sims=$(find simulators -name Cargo.toml)
for d in $sims; do
d="$(dirname "$d")"
echo "Lint, build, test $d"
( cd "$d" || exit 1;
cargo fmt --all -- --check;
cargo clippy --all --all-targets --all-features --no-deps -- --deny warnings;
cargo test --workspace -- --nocapture;
)
done
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ workspace
.idea/
# build output
/hive

# build output for rust simulators files
simulators/**/Cargo.lock
simulators/**/target
1 change: 0 additions & 1 deletion clients/besu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ COPY genesis.json /genesis.json
COPY mapper.jq /mapper.jq
COPY besu.sh /opt/besu/bin/besu-hive.sh
COPY enode.sh /hive-bin/enode.sh
COPY trusted_setup.txt /trusted_setup.txt

# Set execute permissions for scripts
RUN chmod +x /opt/besu/bin/besu-hive.sh /hive-bin/enode.sh
Expand Down
15 changes: 9 additions & 6 deletions clients/besu/Dockerfile.git
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
### Build Besu From Git:

## Builder stage: Compiles besu from a git repository
FROM openjdk:17-jdk-slim as builder
FROM ubuntu:22.04 as builder

ARG tag=main
ARG github=hyperledger/besu

RUN echo "Cloning: $github - $tag" && \
apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
RUN echo "installing java on ubuntu base image" \
&& apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909* \
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
&& echo "Cloning: $github - $tag" \
&& git clone --depth 1 --branch $tag https://github.com/$github \
&& cd besu && ./gradlew installDist

## Final stage: Sets up the environment for running besu
FROM openjdk:17-jdk-slim
FROM ubuntu:22.04

# Copy compiled binary from builder
COPY --from=builder /besu/build/install/besu /opt/besu

RUN apt-get update && apt-get install -y curl jq libsodium23 libnss3-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Create version.txt
RUN /opt/besu/bin/besu --version > /version.txt
Expand All @@ -28,7 +32,6 @@ COPY genesis.json /genesis.json
COPY mapper.jq /mapper.jq
COPY besu.sh /opt/besu/bin/besu-hive.sh
COPY enode.sh /hive-bin/enode.sh
COPY trusted_setup.txt /trusted_setup.txt

# Set execute permissions for scripts
RUN chmod +x /opt/besu/bin/besu-hive.sh /hive-bin/enode.sh
Expand Down
9 changes: 6 additions & 3 deletions clients/besu/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
### Build Besu Locally:

## Builder stage: Compiles besu from a local directory
FROM openjdk:17-jdk-slim as builder
FROM ubuntu:22.04 as builder

# Default local client path: clients/besu/<besu>
ARG local_path=besu
COPY $local_path besu

RUN apt-get update && apt-get install -y git libsodium-dev libnss3-dev \
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909 \
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
&& cd besu && ./gradlew installDist

## Final stage: Sets up the environment for running besu
FROM openjdk:17-jdk-slim
FROM ubuntu:22.04

# Copy compiled binary from builder
COPY --from=builder /besu/build/install/besu /opt/besu

RUN apt-get update && apt-get install -y curl jq libsodium23 libnss3-dev \
&& apt-get install --no-install-recommends -q --assume-yes ca-certificates-java=20190909 \
&& apt-get install --no-install-recommends -q --assume-yes openjdk-17-jre-headless=17* libjemalloc-dev=5.* \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Create version.txt
Expand All @@ -27,7 +31,6 @@ COPY genesis.json /genesis.json
COPY mapper.jq /mapper.jq
COPY besu.sh /opt/besu/bin/besu-hive.sh
COPY enode.sh /hive-bin/enode.sh
COPY trusted_setup.txt /trusted_setup.txt

# Set execute permissions for scripts
RUN chmod +x /opt/besu/bin/besu-hive.sh /hive-bin/enode.sh
Expand Down
33 changes: 17 additions & 16 deletions clients/besu/besu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@
#
# - HIVE_MINER enables mining. value is coinbase.
# - HIVE_MINER_EXTRA extra-data field to set for newly minted blocks
# - HIVE_SKIP_POW If set, skip PoW verification
# - HIVE_LOGLEVEL Client log level
# - HIVE_GRAPHQL_ENABLED If set, GraphQL is enabled on port 8545 and RPC is disabled
#
# These flags are not supported by the Besu hive client
#
# - HIVE_TESTNET whether testnet nonces (2^20) are needed
# - HIVE_FORK_DAO_VOTE whether the node support (or opposes) the DAO fork

set -e
Expand All @@ -63,9 +61,19 @@ esac
FLAGS="--logging=$LOG --data-storage-format=BONSAI"

# Configure the chain.
jq -f /mapper.jq /genesis.json > /besugenesis.json
echo -n "Genesis: "; cat /besugenesis.json
FLAGS="$FLAGS --genesis-file=/besugenesis.json "
mv /genesis.json /genesis-input.json
jq -f /mapper.jq /genesis-input.json > /genesis.json
FLAGS="$FLAGS --genesis-file=/genesis.json "

# Dump genesis.
if [ "$HIVE_LOGLEVEL" -lt 4 ]; then
echo "Supplied genesis state (trimmed, use --sim.loglevel 4 or 5 for full output):"
jq 'del(.alloc[] | select(.balance == "0x123450000000000000000"))' /genesis.json
else
echo "Supplied genesis state:"
cat /genesis.json
fi


# Enable experimental 'berlin' hard-fork features if configured.
#if [ -n "$HIVE_FORK_BERLIN" ]; then
Expand All @@ -75,10 +83,8 @@ FLAGS="$FLAGS --genesis-file=/besugenesis.json "
# The client should start after loading the blocks, this option configures it.
IMPORTFLAGS="--run"

# Disable PoW check if requested.
if [ -n "$HIVE_SKIP_POW" ]; then
IMPORTFLAGS="$IMPORTFLAGS --skip-pow-validation-enabled"
fi
# Skip PoW checks on import.
IMPORTFLAGS="$IMPORTFLAGS --skip-pow-validation-enabled"

# Load chain.rlp if present.
if [ -f /chain.rlp ]; then
Expand Down Expand Up @@ -113,7 +119,7 @@ fi
if [ "$HIVE_MINER_EXTRA" != "" ]; then
FLAGS="$FLAGS --miner-extra-data=$HIVE_MINER_EXTRA"
fi
FLAGS="$FLAGS --min-gas-price=1 --tx-pool-price-bump=0 --tx-pool-limit-by-account-percentage=1"
FLAGS="$FLAGS --min-gas-price=1 --tx-pool-price-bump=0"

# Configure peer-to-peer networking.
if [ "$HIVE_BOOTNODE" != "" ]; then
Expand Down Expand Up @@ -150,12 +156,7 @@ RPCFLAGS="$RPCFLAGS --rpc-ws-enabled --rpc-ws-api=DEBUG,ETH,NET,WEB3,ADMIN --rpc
# Enable merge support if needed
if [ "$HIVE_TERMINAL_TOTAL_DIFFICULTY" != "" ]; then
echo "0x7365637265747365637265747365637265747365637265747365637265747365" > /jwtsecret
RPCFLAGS="$RPCFLAGS --engine-host-allowlist=* --engine-jwt-enabled --engine-jwt-secret /jwtsecret"
fi

# Enable KZG trusted setup if cancun timestamp is set, needed for custom genesis on Besu wtih Cancun
if [ "$HIVE_CANCUN_TIMESTAMP" != "" ]; then
FLAGS="$FLAGS --kzg-trusted-setup=/trusted_setup.txt"
RPCFLAGS="$RPCFLAGS --engine-host-allowlist=* --engine-jwt-secret /jwtsecret"
fi

# Start Besu.
Expand Down
4 changes: 3 additions & 1 deletion clients/besu/mapper.jq
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def to_int:
"muirGlacierBlock": env.HIVE_FORK_MUIR_GLACIER|to_int,
"berlinBlock": env.HIVE_FORK_BERLIN|to_int,
"londonBlock": env.HIVE_FORK_LONDON|to_int,
"parisBlock": env.HIVE_MERGE_BLOCK_ID|to_int,
"arrowGlacierBlock": env.HIVE_FORK_ARROW_GLACIER|to_int,
"grayGlacierBlock": env.HIVE_FORK_GRAY_GLACIER|to_int,
"mergeNetsplitBlock": env.HIVE_MERGE_BLOCK_ID|to_int,
"terminalTotalDifficulty": env.HIVE_TERMINAL_TOTAL_DIFFICULTY|to_int,
"shanghaiTime": env.HIVE_SHANGHAI_TIMESTAMP|to_int,
"cancunTime": env.HIVE_CANCUN_TIMESTAMP|to_int,
Expand Down
Loading