Hive is a system for running integration tests against Ethereum clients.
Ethereum Foundation maintains two public Hive instances to check for consensus, p2p and blockchain compatibility:
- eth1 consensus, graphql and p2p tests are on https://hivetests.ethdevops.io
- Engine API integration and rpc tests are on https://hivetests2.ethdevops.io
To read more about hive, please check [the documentation][doc].
Open
http://localhost:8080
on explorer, and then we can see all the test results.
./build/bin/hiveview --serve --logdir ./workspace/logs
- Get the taiko-mono repo and turn to const_contracts branch
git clone [email protected]:taikoxyz/taiko-mono.git
git checkout const_contracts
- Update contract txs list(all the txs in simulators/params/l1contract_txs.txt file)
git clone [email protected]:taikoxyz/hive.git
cd simulators/taiko
TAIKO_MONO_DIR=taiko-mono_path ./scripts/deploy_l1_contract.sh
git clone [email protected]:taikoxyz/hive.git
make hive
make hiveview
- how it tests
- Start one cluster at first;
- Start the second and the third clusters and then wait for the l2 finalized header;
- Verify the latest l2 finalized header in the three cluster;
make test_full_sync
- how it tests
- Start one cluster at first;
- Wait for pacaya hardfork block high;
- Stop proposer;
- Call preconf api and create preconf blocks;
- Verify preconf status;
- Create propose block and verify propose status;
make test_preconf_preconf
- how it tests
- Start one cluster at first
- Wait for pacaya hardfork block high
- Stop proposer
- reorg propose blocks
- create preconf blocks
- set reorg point
- create propose block
- reorg l1 chain
- wait for propose block recovered and verify the status same to origin.
- reorg preconf blocks
- create preconf blocks
- create a reorg propose block then will reorg all the preconf blocks
- verify reorg status
make test_preconf_reorg
- how it tests
- Normally start one cluster and wait for a random reorg l2 block
- Reorg l2chain to the latest finalized high
- Waiting for the l2chain be reorged to the latest finalized high+1
make test_reorg_reorg
- how it tests
- Start one cluster
- Let proposer use blobs to propose blocks
- Waiting taiko-geth tough the target number
make test_blob_beacon
- how it tests
- Start one cluster
- Let proposer use blobs to propose blocks
- Waiting taiko-geth tough the target number
make test_blob_server
./clients
: contains multi-docker images these are used for testing../simulators/taiko
binding
: taiko contract SDK.scripts
: some shell scripts used to get txs and update envs and update SDK files.docker
: docker: docker-compose folder used to deploy taiko contracts and get txs.common/clients
: They are docker images that relate to clients.common/config
: Most of them are related to the configuration of the beacon geth node.common/spoofing
: Used to genesis l1 execution node.common/testnet
suites
: tests instances, new test case plz add in this folder.base
:- taiko-base/l2-full-sync
- taiko-base/l2-snap-sync
blob
:- taiko-blob/blob-l1-beacon
- taiko-blob/blob-server
reorg
:- taiko-reorg/taiko-reorg
-
Create a new folder named
client
insimulators/taiko/suites
-
Add
execution.go
type ClientTestSpec struct {
suite_base.BaseTestSpec
}
func (r ClientTestSpec) Verify(ctx context.Context, t *hivesim.T, testnet *tn.Testnet) {
panic("Plz add test content in this function.")
}
- Add
tests.go
var testSuite = hivesim.Suite{
Name: "taiko-blob",
DisplayName: "driver blob client test",
Location: "suites/blob",
}
var Tests = make([]suites.TestSpec, 0)
func init() {
Tests = append(Tests,
BlobTestSpec{
TestL1Beacon: true,
BaseTestSpec: suite_base.BaseTestSpec{
Name: "blob-l1-beacon",
},
},
BlobTestSpec{
TestBlobServer: true,
BaseTestSpec: suite_base.BaseTestSpec{
Name: "blob-server",
},
})
}
func Suite(clients clients.ClientGroups) hivesim.Suite {
// Load params.yml
beaconConfig, err := params.UnmarshalConfig(taparams.ConfigContent, nil)
if err != nil {
panic(err)
}
var genesis core.Genesis
// Load genesis.json
if err = json.Unmarshal(taparams.GenesisContent, &genesis); err != nil {
panic(err)
}
suites.SuiteHydrate(&testSuite, clients, Tests, &execution_config.GenesisState{
BeaconConfig: beaconConfig,
Genesis: &genesis,
})
return testSuite
}