Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ workflows:
- path-filtering/filter:
mapping: |
hivesim-rs/.* hivesim-rs-ci true
simulators/portal/.* rust-ci true
base-revision: origin/master
5 changes: 0 additions & 5 deletions docs/commandline.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ For example, the following command runs the `devp2p` simulator, limiting the run

./hive --sim devp2p --sim.limit eth/Large

This command runs the `consensus` simulator and runs only tests from the `stBugs`
directory (note the first `/`, matching any suite name):

./hive --sim ethereum/consensus --sim.limit /stBugs/

`--sim.timelimit <timeout>`: Simulation timeout. Hive aborts the simulator if it exceeds
this time. There is no default timeout.

Expand Down
25 changes: 17 additions & 8 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,28 @@ continuously on the production hive instance:
simulator then launches a 'sink' instance of every known client against the source and
checks whether the sink can synchronize the chain from the source client.

- `ethereum/consensus`: This simulator runs the Ethereum 1 consensus tests against all
clients. While client implementers are generally expected to run these tests themselves,
they might not always run the latest tests, and may skip some of them if they take too
long. Running these tests in a hive simulation ensures that none are skipped.

- `ethereum/rpc`: The RPC simulator configures a client for clique PoA mining and runs
various tests against the web3 JSON-RPC interface. These tests ensure that the client is
able to receive transactions via RPC, incorporate them into its chain, and report
transaction results via the standard APIs.

- `ethereum/graphql`: This simulator initializes a client with a known test chain and
enables the GraphQL API endpoint. It then performs certain queries and compares their
output to known good outputs.
- `ethereum/eels/consume-rlp`: This simulator runs modern execution layer consensus tests
generated by the EELS framework. It feeds RLP-encoded blocks to clients and verifies
that they arrive at the expected post-state. This is the replacement for the legacy
`ethereum/consensus` simulator that ran `BlockchainTests`.

- `ethereum/eels/consume-engine`: Similar to `consume-rlp`, but delivers test payloads to
clients via the [Engine API] instead of RLP import. This verifies that clients handle
`engine_newPayloadV*` and `engine_forkchoiceUpdatedV*` calls correctly against the full
set of execution spec test fixtures.

Both `consume-rlp` and `consume-engine` support the `fixtures` and `branch` build
arguments to pin a specific release:

./hive --sim ethereum/eels/consume-engine \
--sim.buildarg fixtures=stable@v4.3.0 \
--sim.buildarg branch=v4.3.0 \
--client go-ethereum

- `ethereum/engine`: The engine API simulator verifies specification compliance of the
[Engine API] implementation of execution clients. The test suite 'pretends' to be a
Expand Down
23 changes: 0 additions & 23 deletions simulators/devp2p/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,6 @@ func main() {
runDiscv5Test(t, c, getBeaconENR)
},
},
hivesim.ClientTestSpec{
Role: "portal",
Parameters: hivesim.Params{
"HIVE_CHECK_LIVE_PORT": "8545",
},
AlwaysRun: true,
Run: func(t *hivesim.T, c *hivesim.Client) {
runDiscv5Test(t, c, getPortalENR)
},
},
},
}

Expand Down Expand Up @@ -324,16 +314,3 @@ func getBeaconENR(c *hivesim.Client) (string, error) {
}
return responseJSON.Data.ENR, nil
}

func getPortalENR(c *hivesim.Client) (string, error) {
var nodeInfoResult struct {
ENR string `json:"enr"`
}
if err := c.RPC().Call(&nodeInfoResult, "discv5_nodeInfo"); err != nil {
return "", err
}
if nodeInfoResult.ENR == "" {
return "", fmt.Errorf("missing 'enr' in discv5_nodeInfo response")
}
return nodeInfoResult.ENR, nil
}
33 changes: 6 additions & 27 deletions simulators/eth2/engine/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ var (
)

var engineTests = []testSpec{
//{Name: "transition-testnet", Run: TransitionTestnet},
{Name: "test-rpc-error", Run: TestRPCError},
{Name: "block-latest-safe-finalized", Run: BlockLatestSafeFinalized},
{Name: "invalid-canonical-payload", Run: InvalidPayloadGen(2, Invalid)},
Expand All @@ -33,18 +32,6 @@ var engineTests = []testSpec{
{Name: "timeouts", Run: Timeouts},
}

var transitionTests = []testSpec{
// Transition (TERMINAL_TOTAL_DIFFICULTY) tests
{Name: "invalid-transition-payload", Run: InvalidPayloadGen(1, Invalid)},
{Name: "unknown-pow-parent-transition-payload", Run: UnknownPoWParent},
{Name: "ttd-before-bellatrix", Run: TTDBeforeBellatrix},
{Name: "equal-timestamp-terminal-transition-block", Run: EqualTimestampTerminalTransitionBlock},
{Name: "invalid-terminal-block-payload-lower-ttd", Run: IncorrectTerminalBlockGen(-2)},
{Name: "invalid-terminal-block-payload-higher-ttd", Run: IncorrectTerminalBlockGen(1)},
{Name: "build-atop-invalid-terminal-block", Run: IncorrectTTDConfigEL},
{Name: "no-viable-head-due-to-optimistic-sync", Run: NoViableHeadDueToOptimisticSync},
}

func main() {
// Create simulator that runs all tests
sim := hivesim.New()
Expand All @@ -64,23 +51,15 @@ func main() {
panic("choose 1 validator client type")
}
// Create the test suites
var (
engineSuite = hivesim.Suite{
Name: "eth2-engine",
Description: `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient testnet.`,
}
transitionSuite = hivesim.Suite{
Name: "eth2-engine-transition",
Description: `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient transition testnet.`,
}
)
// Add all tests to the suites
engineSuite := hivesim.Suite{
Name: "eth2-engine",
Description: `Collection of test vectors that use a ExecutionClient+BeaconNode+ValidatorClient testnet.`,
}
// Add all tests to the suite
addAllTests(&engineSuite, c, engineTests)
addAllTests(&transitionSuite, c, transitionTests)

// Mark suites for execution
// Mark suite for execution
hivesim.MustRunSuite(sim, engineSuite)
hivesim.MustRunSuite(sim, transitionSuite)
}

func addAllTests(suite *hivesim.Suite, c *clients.ClientDefinitionsByRole, tests []testSpec) {
Expand Down
Loading