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

[TESTING] Script for benchmarking builders locally #137

Open
wants to merge 78 commits into
base: main
Choose a base branch
from

Conversation

kamilchodola
Copy link

@kamilchodola kamilchodola commented Nov 10, 2023

📝 Summary

Script created gives a opportunity to test performance of builder implementation and compare it to latest builder version.
This gives an opportunity to ensure that builder works correctly and did not introduce any performance degradation.

Usage of a script is well described in Readme.md

High level usage:

  1. Run a script to build image
  2. Run a script to create a local infrastructure
  3. Wait for X blocks to be executed
  4. Analyze results in Grafana Dashboard

Here is a image of comparison of latest docker image vs latest docker image (Baseline to see if results are the same)
image

Next one is comparison of latest vs deneb branch built with command go run emulate_network.go build -t deneb - deneb seems to be a source for latest image so result should also be the same.
image

And the last one shows a difference between latest image and main branch (main seems to be outdated and tool clearly exposes a memory usage difference which on main is more than 2x higher, slower bid production on main branch and a bit different disk usage)
image

📚 References

Ethereum-package from Kurtosis which is used as a engine to run a devnet:
https://github.com/kurtosis-tech/ethereum-package


OlegJakushkin and others added 30 commits October 19, 2023 12:51
* Runner script

Allows image building, kurtosis ethereum-package starting and stopping using the generated image

* feat: update geth builder overview dashboard

Created a Go script that follows the following API and is expected to exist in ./scripts inside builder repo:

Main features:
 - Runs on Windows and Linux using Go run
 - Does progressive command log printing
 - Allows to set ImageTag and provide ImageArgs when building starting the network
Example commands:

 - build ../ repo into docker image go run emulate_network.go build
 - run network and see deployment progress go run emulate_network.go run -n=enclaveName -k="C:/Users/olegj/kurtosis.exe”
 - stop network go run emulate_network.go stop -n=enclaveName -k="C:/Users/olegj/kurtosis.exe”


Co-authored-by: Carlos Bermudez Porto <cbermudez.dev@gmail.com>
new docker debug file
…nfig (#2)

* Increase the number of generated transactions. Update custom flood config
* Update builder metrics flags

* fix: update metrics flags

* feat: update dashboard tooltips

* feat: use ethereum package main branch

* feat: use version 0.6.1 with builder fix
…a better peering of transactions.

Minor improvements:
* Use flashbots/builder for participant
* Hardcode tag instead of using `latest`
* Use capella 0
Fix builders not submitting blocks.  Use geth as it appear to deliver…
no port forwarding
OlegJakushkin and others added 2 commits November 17, 2023 13:23
* Using default Dockerfile for build

Also updated readme
@kamilchodola kamilchodola marked this pull request as ready for review November 17, 2023 14:37
@piwonskp
Copy link

Some updated results as we've increased fuzzing rate since the description was added.
Latest vs latest:
image
Latest vs PR:
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: file name should be README.md

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

```
## Architecture
Test network consists of 3 builders and a regular client. Dev and baseline are builders being compared. Dev builder is a candidate to be merged to main while baseline is the current version of builder. The 2 remaining clients are validator which is a builder connected to the relay as validator and a regular el client which submits blocks in epochs 0-3.
![image](https://github.com/NethermindEth/fb-builder/assets/11379770/54d4a8cf-f64c-4f69-9e32-b35bf43dba0c)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this image links to the nethermind fb-builder, could add the image as part of the PR?



## Running in Docker in Docker
See this note for refrence here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a missing link?

```
go run emulate_network.go help
```
## Architecture
Copy link
Contributor

@avalonche avalonche Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it'll be useful to expand a bit more on the architecture. For example, how the broadcast architecture works (a bit of an explainer of what each of the fuzzers do) and also why a third validation builder is needed (due to performance reasons).

```
go run emulate_network.go help
```
## Architecture
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, I think it'll be super useful if there's a "dashboard" section here explaining all the metrics that are being collected and what it is measuring

@piwonskp
Copy link

@avalonche fixed

kamilchodola added a commit to kamilchodola/documentation that referenced this pull request Jun 18, 2024
Name: Carlos Bermudez
Project: Nethermind Client DevOps
Team: Nethermind
Joined: 05/04/2022(without Internship 05/07/2022)
Discord handle: cbermudez97
Summary of their work/eligibility: Carlos started working in Nethermind before the Merge. He is contributing as DevOps to the Infrastructure requirements for the Nethermind Client, especially in creating workflows for improving testing in the Post-Merge scenario. Carlos also helps a lot in QA activities and builds new tools which are improving the way on how well Nethermind Client can be tested and monitored.


Public:
https://github.com/NethermindEth/nethermind/commits/master/?author=cbermudez97 (not much here sadly)
https://github.com/NethermindEth/sedge/pulls?q=is%3Apr+author%3Acbermudez97
https://github.com/NethermindEth/metrics-infrastructure/commits/master/?author=cbermudez97
flashbots/builder#137
https://github.com/kurtosis-tech/ethereum-package/pulls?q=is%3Apr+author%3Acbermudez97

Other than above ones Carlos contributes a lot to currently private repositories which are about to be changed to public ones from which other EL/CL clients can benefit a lot like:
1. Easy scripting way to configure all EL and CL clients in Virtualized environment and sync on all testnets and mainnet.
2. Creating a big library of playbooks in Ansible to easily maintain already created nodes.
3. Tool which allows to add new nonValidator nodes to existing devnets (very useful to test SnapSync etc on Devnets without touching existing validators).
4. Infrastructure monitoring dashboard - tool where all spawned VMs with nodes installed can be browsed, edited (without need to jump directly to VM) or removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants