-
Notifications
You must be signed in to change notification settings - Fork 256
feat(testing): Integrate beacon-kit with CometBFTs e2e framework #2856
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
Draft
jmalicevic
wants to merge
65
commits into
berachain:main
Choose a base branch
from
informalsystems:greg/e2e-framework
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
Co-authored-by: Jasmina Malicevic <[email protected]> Signed-off-by: Greg Szabo <[email protected]>
dockerfile for e2e framework
Introduce runner and override makeConfig
override makeGenesis in runner
Added geth node to docker network
Added load to geth using polycli
[do not merge] Simple tests added with README
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR integrates the e2e framework of CometBFT into beacon-kit.
Users can launch networks ,defined in manifests (examples are in
testing/networks:single.toml,simple.toml,ci.toml).These nodes are launched together with a geth node and a node generating load using
polycli.One way to launch them is using
make build-cmt-e2efollowed by :make test-cmt-e2e-single-no-build;make test-e2e-simple-no-buildortest-e2e-ci-no-buildto run the different predefined manifests.Monitoring the network is also enabled using
make start-monitoringandmake stop-monitoring.Using these commands the nodes are started, load is generated and the defined tests are ran. One can also manually start and observe the network behavior by running the following commands after a successful build:
build/bin/runner -f testing/networks/MANIFEST.toml setup- sets the corresponding folder structure and monitoring files properly.build/bin/runner -f testing/networks/MANIFEST.toml start- where MANIFEST should be replaced by the name of the manifest you want to test.build/bin/runner -f testing/networks/MANIFEST.toml load- starts the node that haspolyclienabled and starts generating load until interrupted. Currentlypolycliparameters can be edited intesting/networks/MANIFEST/compose.ymlor directly in the code intesting/runner/setup.go.build/bin/runner -f testing/networks/MANIFEST.toml stop- stops the network.build/bin/runner -f testing/networks/MANIFEST.toml cleanup- cleans up the files generated in the previous steps.make start-monitoringsets up the folder structure to monitor the nodes and exposes CometBFT metrics in a grafana dashboard.make stop-monitoringkills the container exposing metrics.A GitHub workflow file launches the e2e testing framework on pushes to
main.There are simple tests that connect to beacon-kit via
Node-APIand test for simple things. Inspired by existing tests in e2e_api`All of the above is launched in docker containers locally.
Note that all files under
testing/cmt_e2e/runnerare mainly copies ofcometbft/e2e/runnerwith minor changes to support launching a Geth node and supporting polycli.The following items are missing from this work:
tomlfile rather than hard coded inrunner/setup.gopolyclicli options so they can be added directly withload. For now they can be edited inrunner/setup.goor after the setup incompose.ymlcometbft/generatorto generate random testate manifestsrunner/setup.go. There is a more elegant way of doing it but it would require importingcometbft/test/e2e/packagein addition torunner.