diff --git a/.gitignore b/.gitignore index 5a42a4885..40cda8823 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,5 @@ profile.cov **/yarn-error.log /ofac_blacklist.json -/blacklist.json \ No newline at end of file +/blacklist.json +scripts/kurtosis/network_params_tmp.json diff --git a/scripts/Dockerfile.debug b/scripts/Dockerfile.debug new file mode 100644 index 000000000..42b8ba628 --- /dev/null +++ b/scripts/Dockerfile.debug @@ -0,0 +1,34 @@ +# Support setting various labels on the final image +ARG COMMIT="" +ARG VERSION="" +ARG BUILDNUM="" + +# Build Geth in a stock Go builder container +FROM golang:1.20-alpine as builder + +RUN apk add --no-cache gcc musl-dev linux-headers git + +# Get dependencies - will also be cached if we won't change go.mod/go.sum +COPY go.mod /go-ethereum/ +COPY go.sum /go-ethereum/ +RUN cd /go-ethereum && go mod download + +ADD . /go-ethereum + +RUN cd /go-ethereum && go build -o ./build/bin/geth -gcflags=all='-N -l' -v ./cmd/geth + +RUN go install github.com/go-delve/delve/cmd/dlv@latest +# Pull Geth into a second stage deploy alpine container +FROM alpine:latest + +RUN apk add --no-cache ca-certificates +COPY --from=builder /go-ethereum/build/bin/geth /usr/local/bin/ +COPY --from=builder /go/bin/dlv / +EXPOSE 8545 8546 30303 30303/udp 40000 +ENTRYPOINT ["/dlv", "--listen=:40000", "--headless=true", "--continue", "--accept-multiclient", "--api-version=2", "exec", "/usr/local/bin/geth"] +# Add some metadata labels to help programatic image consumption +ARG COMMIT="" +ARG VERSION="" +ARG BUILDNUM="" + +LABEL commit="$COMMIT" version="$VERSION" buildnum="$BUILDNUM" diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 000000000..fc1eae660 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,125 @@ +# Emulate Network script + +This README accompanies the `emulate_network.go` Go script, which uses Docker, Kurtosis, and the Kurtosis Ethereum-Package enclave to test builder performance. + +## Introduction + +This script streamlines and automates the process of (re-)building the current builder Docker image and interfacing with the Kurtosis platform. It offers a set of commands to assist developers in routine tasks, such as (re-)building Docker images and managing Kurtosis enclaves. + + +## Running in dev environment + +### Prerequisites + +Before using the script, ensure you have the following installed: + +1. **Go**: Ensure you have Go installed. Download and install it from [here](https://golang.org/dl/). + +2. **Docker**: The build process needs Docker. Make sure Docker is installed and running. Check out the [Docker website](https://www.docker.com/get-started) for installation instructions. + +3. **Kurtosis**: The script interfaces with the Kurtosis platform. Ensure `kurtosis` is installed and available in your PATH. Refer to [Kurtosis's official documentation](https://docs.kurtosis.com/install) for installation details. + +4. **ethereum-package**: This script utilizes a modified ethereum-package network configuration, which will be downloaded from [repo](github.com/kurtosis-tech/ethereum-package/) main brunch automatically. + +### How to Run + +To execute the script with Go, navigate to the directory containing the script and run: + +``` +go run emulate_network.go [OPTIONS] +``` + +Replace `` with one of the available commands and provide the necessary options. + +### Commands and Options +To run script `cd` into this (`./scripts`) folder. + +1. **build**: + - Purpose: Builds a Docker image of the builder. + - Options: + - `-t`: (Optional) Image tag for the Docker build. Defaults to `flashbots/builder:dev`. + - `-d` (Optional) Image Build directory. Defaults to `".."` + - `-f` (Optional) Build dockerfile path. Defaults to `"../Dockerfile"`. Use `"./Dockerfile.debug"` for debug capabilities. + + - Example: + ``` + go run emulate_network.go build -t=test-builder -f="../Dockerfile" -d=".." + ``` + + + +2. **run**: + - Purpose: Prepares configurations and starts a Kurtosis enclave. + - Options: + - `-t`: (Optional) Image tag. Defaults to `flashbots/builder:dev`. + - `-n`: (Optional) Enclave name. Defaults to `explorer`. + - `-a`: (Optional) Additional builder arguments. + - `-s`: (Optional) Max steps (integer). Defaults to `1000`. Set for `-1` for "unlimited". + - `-k`: (Optional) Path to `kurtosis` executable. Defaults to `kurtosis`. + - `--slotTime`: (Optional) Seconds per slot applied on local devnet. Defaults to 5. + - Example: + ``` + go run emulate_network.go run -t=imageTag -a=imageArgs -n=enclaveName -k=/path/to/kurtosis + ``` + +3. **stop**: + - Purpose: Stops an active Kurtosis enclave. + - Options: + - `-k`: (Optional) Path to `kurtosis` executable. Defaults to `kurtosis`. + - `-n`: (Required) Enclave name. + - Example: + ``` + go run emulate_network.go stop -k=/path/to/kurtosis -n=enclaveName + ``` + +4. **help**: + - Purpose: Display a summary of available commands and their options. + - Example: + ``` + go run emulate_network.go help + ``` +## Dashboard +Grafana dashboard contains three sections: quality comparison, usage of system resources and a section to inspect network behaviour. Each section contain graphs designed to show different properties of the network. + +Quality comparison allows to compare builder implementations by analysing bids produced by each of them. It contains four graphs: +* Bids profit - Profit of bids generated by each builder in time. The most important metric to compare effectiveness of builders. +* Bids creation time - Measures the time spent on creating a single bid. The metric allows to compare performance of builders. +* Bids Txnum - Number of bids submitted per second +* Bids Gas used - Summarized gas of all produced bids per second + +The dashboard also provides graphs showing usage of system resources: CPU, memory, disk and network. It allows to monitor resources and quickly identify regressions in resource utilization of a particular implementation. + +Network inspection gives an overview of the network. It provides information such as the transaction pool, block processing time, transaction propagation and database access. The section may be useful in certain circumstances to get the detailed information and for debugging. + +## Architecture +![Test network architecture](architecture.png) + +The architecture consists of fuzzer layer, broadcaster, network, MEV services and data collection layer. + +Fuzzer layer: +* [mev-flood](https://github.com/flashbots/mev-flood) - Spams the network with uniswap swaps +* [tx-fuzz](https://github.com/MariusVanDerWijden/tx-fuzz/tree/master) - generates random transactions and deploys by utilizing [FuzzyVM](https://github.com/MariusVanDerWijden/FuzzyVM) +* [Custom flood](https://github.com/kurtosis-tech/ethereum-package/blob/c558cb2eab25cc8c3718b1fda6759a0819e6f942/src/mev_custom_flood/sender.py)] - Simple fuzzer sending tokens between two accounts + +Fuzzer layer sends transactions to the broadcaster which replicate those and broadcast them to all nodes in parallel. + +Test network consists of 4 nodes: +* Dev builder - candidate to be merged. +* Baseline builder - current version of builder. +* Validator builder - connected to the relay as validator. Being relay validator affects performance of the builder therefore the third builder is used to keep the competition between dev and baseline fair. +* Proposer - regular execution layer client. The node contains validators that propose and vote for new blocks. It also builds blocks in epochs 0-3. + +Among those nodes there are three builders that send their bids to the relay. Then the best bid is chosen and passed to the proposer node which proposes it as the new block. + +Data collection layer consists of prometheus and grafana. Prometheus gathers the data from all nodes, while grafana displays the data for chosen nodes in form of graphs. + +## Known issues +### Kurtosis errors on network start +In case of system resource related errors or on windows docker restore after sleep Kurtosis may have trouble starting a new enclave. +1. Make sure you have no valuable containers up and running in enclaves or docker +2. To clean up Kurtosis call `kurtosis clean -a` +3. To clean up docker run `docker rm -vf $(docker ps -aq)` + + +## Running in Docker in Docker (WIP) +See [README](./dind#readme). diff --git a/scripts/architecture.png b/scripts/architecture.png new file mode 100644 index 000000000..ac01160cd Binary files /dev/null and b/scripts/architecture.png differ diff --git a/scripts/dind/Dockerfile.kurtosis_dind b/scripts/dind/Dockerfile.kurtosis_dind new file mode 100644 index 000000000..78250bef0 --- /dev/null +++ b/scripts/dind/Dockerfile.kurtosis_dind @@ -0,0 +1,28 @@ +FROM docker:dind + +# Create the /etc/machine-id file +RUN apk add --no-cache dbus && \ + dbus-uuidgen > /etc/machine-id + +# Install required packages +RUN apk add --no-cache git curl tar + +# Download and install Go +RUN curl https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz -o go.tar.gz && \ + tar -C /usr/local -xzf go.tar.gz && \ + rm go.tar.gz + +# Set up Go environment variables +ENV GOPATH /go +ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH +RUN mkdir -p "${GOPATH}/src" "${GOPATH}/bin" && chmod -R 777 "${GOPATH}" + +# Download and install Kurtosis CLI +RUN curl -L "https://github.com/kurtosis-tech/kurtosis-cli-release-artifacts/releases/download/0.85.3/kurtosis-cli_0.85.3_linux_amd64.tar.gz" -o kurtosis-cli.tar.gz && \ + tar -xzvf kurtosis-cli.tar.gz -C /usr/local/bin && \ + rm kurtosis-cli.tar.gz + +ADD . /go-ethereum +WORKDIR /go-ethereum/scripts/ + +ENV DOCKER_HOST=unix:///var/run/docker.sock diff --git a/scripts/dind/README.md b/scripts/dind/README.md new file mode 100644 index 000000000..9ddb07aed --- /dev/null +++ b/scripts/dind/README.md @@ -0,0 +1,55 @@ +# Emulate Network Using Docker-in-Docker (DinD) + +This documentation details the use of Docker-in-Docker (DinD) to emulate network environments for testing builder performance. This method provides an isolated environment, removing the need for Go or Kurtosis installations on the host system. + +## Introduction + +Utilizing a DinD setup allows developers to create a contained environment where Docker images can be built and Kurtosis enclaves can be managed. This is particularly useful for simulating network conditions in a clean state without affecting the host's setup. + +## Running in a DinD Environment + +### Prerequisites + +- **Docker**: Ensure Docker is installed and running on your system. The DinD process will be running as a Docker container. + +### Setup and Execution + +1. **Create the DinD Environment**: + - Run a DinD container for an isolated build environment named `builder-dind-container` assuming you are currently in this folder: + ```shell + docker build -f ./Dockerfile.kurtosis_dind -t builder-dind-image ../../ + docker run -dit --privileged --name builder-dind-container builder-dind-image + ``` + ***note:*** privileged mode that is not needed when using local hosting in your docker described [here](../) + +2. **Build the Builder Image**: + - Execute the build command within the DinD environment: + ```shell + docker exec builder-dind-container go run emulate_network.go build -t=custom-builder-tag + ``` + +3. **Start the Enclave**: + - Start an enclave with the specified builder image: + ```shell + docker exec builder-dind-container go run emulate_network.go run -n=builder-enclave -t=custom-builder-tag + ``` + +4. **Stop the Enclave**: + - To stop a running enclave, use the following command: + ```shell + docker exec builder-dind-container go run emulate_network.go stop -n=builder-enclave + ``` + +5. **Cleanup**: + - To stop and remove the DinD container, execute: + ```shell + docker stop builder-dind-container + docker rm builder-dind-container + ``` + +**Note**: Replace `builder-dind-container` with a descriptive name relevant to your project, and `builder-dind-image` with the image name you've prepared for the DinD environment. The `custom-builder-tag` should be replaced with the actual tag name you wish to assign to your builder image. + +## Known Issues and Solutions +Ports control is missing in ethereum-package. + +By following these instructions, developers can leverage a Docker-in-Docker approach to emulate networks and test builder performance in a controlled and isolated manner. \ No newline at end of file diff --git a/scripts/emulate_network.go b/scripts/emulate_network.go new file mode 100644 index 000000000..069e59987 --- /dev/null +++ b/scripts/emulate_network.go @@ -0,0 +1,458 @@ +package main + +import ( + "bytes" + "encoding/json" + "flag" + "fmt" + "io" + "log" + "net/http" + "os" + "os/exec" + "regexp" + "runtime" + "strconv" + "strings" + "time" +) + +type PortInfo struct { + LocalURL string + ServiceName string + ForwardedServiceAddress string +} + +type ServiceInfo struct { + UUID string + Name string + Ports []PortInfo + Status string +} + +// parseUserServices parses the given text and returns a slice of ServiceInfo. +func parseUserServices(text string) ([]ServiceInfo, error) { + var services []ServiceInfo + + // Split the text into lines for easier processing + lines := strings.Split(text, "\n") + + var currentService *ServiceInfo + + // Iterate over each line + for _, line := range lines { + // Regular expression to match the service information + serviceRe := regexp.MustCompile(`(?m)^([0-9a-f]{12})\s+(\S+)\s+(.*?)\s+(RUNNING|STOPPED)$`) + portRe := regexp.MustCompile(`^\s*(\S+):\s+(\d+)/(\S+)\s+->\s+(.+)$`) + defaultPortRe := regexp.MustCompile(`^\s*(\d+)/(\S+)\s+->\s+(.+)$`) + + if serviceRe.MatchString(line) { + // Process the previous service and start a new one + if currentService != nil { + services = append(services, *currentService) + } + matches := serviceRe.FindStringSubmatch(line) + currentService = &ServiceInfo{ + UUID: matches[1], + Name: matches[2], + Status: matches[4], + } + if matches[3] != "" { + if defaultPortRe.MatchString(matches[3]) { + defaultPortMatches := defaultPortRe.FindStringSubmatch(matches[3]) + currentService.Ports = append(currentService.Ports, PortInfo{ + ServiceName: currentService.Name, + LocalURL: defaultPortMatches[2], + ForwardedServiceAddress: defaultPortMatches[3], + }) + } else if portRe.MatchString(matches[3]) { + portMatches := portRe.FindStringSubmatch(matches[3]) + currentService.Ports = append(currentService.Ports, PortInfo{ + ServiceName: portMatches[1], + LocalURL: portMatches[3], + ForwardedServiceAddress: portMatches[4], + }) + } + } + } else if currentService != nil { + if portRe.MatchString(line) { + // If it's a named port for the current service + portMatches := portRe.FindStringSubmatch(line) + currentService.Ports = append(currentService.Ports, PortInfo{ + ServiceName: portMatches[1], + LocalURL: portMatches[3], + ForwardedServiceAddress: portMatches[4], + }) + } else if defaultPortRe.MatchString(line) { + // If it's an unnamed port for the current service + defaultPortMatches := defaultPortRe.FindStringSubmatch(line) + currentService.Ports = append(currentService.Ports, PortInfo{ + ServiceName: currentService.Name, + LocalURL: defaultPortMatches[2], + ForwardedServiceAddress: defaultPortMatches[3], + }) + } + } + } + + // Append the last service if it exists + if currentService != nil { + services = append(services, *currentService) + } + + return services, nil +} + +// getBlockNumber sends a JSON-RPC request to the specified URL and returns the current block number +func getBlockNumber(url string) (int64, error) { + jsonStr := []byte(`{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}`) + + // Create the HTTP request + req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr)) + if err != nil { + return 0, fmt.Errorf("error creating request: %w", err) + } + req.Header.Set("Content-Type", "application/json") + + // Send the request + client := &http.Client{} + resp, err := client.Do(req) + if err != nil { + return 0, fmt.Errorf("error sending request: %w", err) + } + defer resp.Body.Close() + + // Read the response + body, err := io.ReadAll(resp.Body) + if err != nil { + return 0, fmt.Errorf("error reading response body: %w", err) + } + + // Unmarshal the JSON response + var response struct { + Jsonrpc string `json:"jsonrpc"` + ID int `json:"id"` + Result string `json:"result"` + } + if err := json.Unmarshal(body, &response); err != nil { + return 0, fmt.Errorf("error unmarshaling response: %w", err) + } + + // Convert hexadecimal result to integer + blockNumber, err := strconv.ParseInt(response.Result, 0, 64) + if err != nil { + return 0, fmt.Errorf("error converting hex to int: %w", err) + } + + return blockNumber, nil +} + +func build(imageTag string, buildDir string, buildDockerfilePath string) { + cmd := "docker build" + + " -t " + imageTag + + " -f " + buildDockerfilePath + + " " + buildDir + runCommand(cmd) +} + +func update_config(imageTag string, imageArgs string, kurtosisNetworkScriptFolder string, slotTime int64, filename ...string) { + // Determine the filename. If not provided, default to "network_params.json". + var file string + if len(filename) > 0 { + file = filename[0] + } else { + file = "network_params.json" + } + + // Read the file + fileContent, err := os.ReadFile(file) + if err != nil { + fmt.Println("Error reading the file:", err) + return + } + + var data map[string]interface{} + err = json.Unmarshal(fileContent, &data) + if err != nil { + fmt.Println("Error unmarshalling the JSON:", err) + return + } + + if slotTime != 0 { + if networkParams, ok := data["network_params"].(map[string]interface{}); ok { + networkParams["seconds_per_slot"] = slotTime + fmt.Printf("Seconds per slot updated to %d\n", slotTime) + } else { + fmt.Println("network_params object not found or is not a JSON object") + } + } + + // Navigate to the participants array + if participants, ok := data["participants"].([]interface{}); ok { + for _, participant := range participants { + p, ok := participant.(map[string]interface{}) + if !ok { + fmt.Println("Error casting participant to map") + continue + } + + // Check if the participant is the one with "el_client_type": "geth" + if p["el_client_type"] == "REPLACE_WITH_BUILDER" { + p["el_client_type"] = "geth" + // Modify the participant entry as needed + p["el_client_image"] = imageTag + + if extraParamsInterface, ok := p["el_extra_params"].([]interface{}); ok { + var extraParams []string + for _, paramInterface := range extraParamsInterface { + if param, ok := paramInterface.(string); ok { + extraParams = append(extraParams, param) + } else { + fmt.Println("Error: el_extra_params contains a non-string value") + } + } + extraParams = append(extraParams, imageArgs) + p["el_extra_params"] = extraParams + } else { + fmt.Println("Error: el_extra_params is not an array of strings") + } + + fmt.Println("Detected and updated BUILDER config: ", p) + break // Exit the loop once the participant is found and updated + } + } + } else { + fmt.Println("Participants field not found or not an array") + return + } + + // Marshal the map back to JSON + modifiedContent, err := json.MarshalIndent(data, "", " ") + if err != nil { + fmt.Println("Error marshalling the map back to JSON:", err) + return + } + + // Print out the resulting string + fmt.Println(string(modifiedContent)) + + // Save the modified content back to the file + err = os.WriteFile(kurtosisNetworkScriptFolder+"/network_params_tmp.json", modifiedContent, os.ModePerm) + if err != nil { + fmt.Println("Error writing the modified content to the file:", err) + } +} + +func run(imageTag, imageArgs, enclaveName string, maxSteps int, kurtosisPath, kurtosisNetworkScriptFolder string, kurtosisNetConfigPath string, slotTime int64) { + /* params := map[string]interface{}{ + "image_tag": imageTag, + "image_args": imageArgs, + "enclave_name": enclaveName, + "max_steps": maxSteps, + "kurtosis_path": kurtosisPath, + "kurtosis_network_config": kurtosisNetworkScriptFolder, + }*/ + update_config(imageTag, imageArgs, kurtosisNetworkScriptFolder, slotTime, kurtosisNetConfigPath) + + cmd := fmt.Sprintf("%s run --enclave %s %s", kurtosisPath, enclaveName, kurtosisNetworkScriptFolder) + out, _, errRun := runCommand(cmd) + if errRun != nil { + fmt.Println("Error executting command:", errRun) + return + } + + services, errParse := parseUserServices(out) + if errParse != nil { + log.Fatalf("Error parsing services: %v", errParse) + } + + printSummary(services) + if maxSteps <= 0 { + return + } + + web3url := "" + for _, service := range services { + //fmt.Println(service.Name) + if strings.HasPrefix(service.Name, "el-") { + for _, port := range service.Ports { + //fmt.Println(port.ServiceName) + if strings.HasPrefix(port.ServiceName, "rpc") { + //fmt.Println(port.ForwardedServiceAddress) + web3url = port.ForwardedServiceAddress + break // Break after printing the first matching LocalURL + } + } + break // Break after checking the ports of the first matching service + } + } + web3url = strings.TrimSpace(web3url) + web3url = "http://" + web3url + + targetBlock := int64(maxSteps) + + block, err := getBlockNumber(web3url) + + if err != nil { + fmt.Println("Error getting block number:", err) + return + } + + progressBarLength := 50 // Length of the progress bar + + for block < targetBlock { + time.Sleep(1 * time.Second) // Delay to avoid rapid requests + block, err = getBlockNumber(web3url) + if err != nil { + fmt.Println("\nError getting block number:", err) + return + } + + // Calculate progress + progress := int(float64(block) / float64(targetBlock) * float64(progressBarLength)) + if progress > progressBarLength { + progress = progressBarLength // Cap progress at 100% + } + + percentage := int(float64(block) / float64(targetBlock) * 100) + if percentage > 100 { + percentage = 100 // Cap percentage at 100% + } + + // Update progress bar with current block and percentage + fmt.Printf("\rCurrent Block: %d, Progress: [%-50s] %d%%", block, strings.Repeat("=", progress)+strings.Repeat(" ", progressBarLength-progress), percentage) + } + + fmt.Println("\nStopping all network related services") + + for _, service := range services { + if service.Name != "grafana" && service.Name != "adminer" && service.Name != "postgres" && service.Name != "redis" && service.Name != "dora" && service.Name != "prometheus" { + //fmt.Println(service.Name) + cmd := fmt.Sprintf("%s service stop %s %s", kurtosisPath, enclaveName, service.Name) + _, _, errRun := runCommand(cmd) + if errRun != nil { + fmt.Println("Error stopping service:", errRun) + continue + } + //fmt.Println("Output:", out) + } + } + fmt.Println("Stopped transaction spamming and block building services.") + printSummary(services) +} + +func printSummary(services []ServiceInfo) { + fmt.Printf("\033[1m") + fmt.Println("Please visit monitoring services for results:") + for _, service := range services { + if service.Name == "grafana" || service.Name == "dora" { + for _, port := range service.Ports { + web3url := port.ForwardedServiceAddress // Assuming ForwardedServiceAddress is the correct field + web3url = strings.TrimSpace(web3url) + // TODO: make the dashboard accessible at root + if service.Name == "grafana" { + web3url += "/d/geth-builder-overview/geth-builder-overview" + } + fmt.Printf("%s: %s ", service.Name, web3url) + } + } + } + fmt.Printf("\033[0m\n") +} + +func stop(kurtosisPath, enclaveName string) { + if enclaveName == "" { + fmt.Println("Error: enclave name must be specified.") + cmd := fmt.Sprintf("%s enclave ls", kurtosisPath) + runCommand(cmd) + return + } + cmd := fmt.Sprintf("%s enclave rm -f %s", kurtosisPath, enclaveName) + runCommand(cmd) +} + +func runCommand(cmd string) (string, string, error) { + var stdoutBuf, stderrBuf bytes.Buffer + var command *exec.Cmd + + if runtime.GOOS == "windows" { + command = exec.Command("cmd", "/C", cmd) + } else { + command = exec.Command("sh", "-c", cmd) + } + + // Create multi-writers to write to both the buffer and the os.Stdout or os.Stderr + stdoutMultiWriter := io.MultiWriter(&stdoutBuf, os.Stdout) + stderrMultiWriter := io.MultiWriter(&stderrBuf, os.Stderr) + + command.Stdout = stdoutMultiWriter + command.Stderr = stderrMultiWriter + + err := command.Start() + if err != nil { + return "", "", fmt.Errorf("command start failed: %v", err) + } + + err = command.Wait() + if err != nil { + return stdoutBuf.String(), stderrBuf.String(), fmt.Errorf("command execution failed: %v", err) + } + + return stdoutBuf.String(), stderrBuf.String(), nil +} + +func help() { + fmt.Println(`Emulate Network script +Available commands: +- build + - -t : Image tag (optional, default: "flashbots/builder:dev") + - -d : Image Build directory (optional, default: "..") + - -f : Build dockerfile path (optional, default: ../Dockerfile"), use "./Dockerfile.debug" for debug capabilities) +- run + - -t : Image tag (optional, default: "flashbots/builder:dev") + - -n : Enclave name (optional, default: "explorer") + - -a : Additional builder arguments (optional) + - -s : Max steps. Use -1 to run permanently (optional, default: 1000) + - -k : Kurtosis path (optional, default: "kurtosis") + - -c : Kurtosis network config (optional, default: "./kurtosis") + - --slotTime : Seconds per slot applied on local devnet (optional, default: 5) +- stop + - -k : Kurtosis path (optional, default: "kurtosis") + - -n : Enclave name (required)`) +} + +func main() { + flagSet := flag.NewFlagSet("", flag.ExitOnError) + imageTag := flagSet.String("t", "flashbots/builder:dev", "Image tag for build or run.") + enclaveName := flagSet.String("n", "explorer", "Enclave name for run or stop.") + kurtosisPath := flagSet.String("k", "kurtosis", "Kurtosis path for run or stop.") + + if len(os.Args) < 2 { + fmt.Println("Please provide a command. Available commands are: build, run, stop.") + return + } + + switch os.Args[1] { + case "build": + buildDir := flagSet.String("d", "..", "Build directory.") + buildDockerfilePath := flagSet.String("f", "../Dockerfile", "Build dockerfile path. Use \"./Dockerfile.debug\" for debug capabilities") + flagSet.Parse(os.Args[2:]) + build(*imageTag, *buildDir, *buildDockerfilePath) + case "run": + imageArgs := flagSet.String("a", "", "Image arguments for run.") + maxSteps := flagSet.Int("s", 1000, "Max steps for run.") + kurtosisNetworkConfigScriptFolder := flagSet.String("f", "./kurtosis", "Kurtosis network config for run.") + kurtosisNetConfigPath := flagSet.String("c", "./kurtosis/network_params.json", "Kurtosis network params "+ + "configuration path. Note that run command modifies it with provided imageTag and imageArgs.") + slotTime := flagSet.Int64("slotTime", 5, "Seconds per slot to update in the JSON config.") + flagSet.Parse(os.Args[2:]) + run(*imageTag, *imageArgs, *enclaveName, *maxSteps, *kurtosisPath, *kurtosisNetworkConfigScriptFolder, *kurtosisNetConfigPath, *slotTime) + case "stop": + flagSet.Parse(os.Args[2:]) + stop(*kurtosisPath, *enclaveName) + case "help": + help() + default: + fmt.Println("Invalid command. Available commands are: build, run, stop.") + } +} diff --git a/scripts/kurtosis/data/grafana/dashboard.json b/scripts/kurtosis/data/grafana/dashboard.json new file mode 100644 index 000000000..b4cf2aaa6 --- /dev/null +++ b/scripts/kurtosis/data/grafana/dashboard.json @@ -0,0 +1,3515 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "enable": true, + "expr": "beacon_head_slot{role=\"Proposer\"} <= 128", + "hide": false, + "iconColor": "#F2495C", + "name": "Epoch 4", + "step": "1s", + "textFormat": "Builder blocks are not being used during the first 4 epochs", + "titleFormat": "Epoch 4" + } + ] + }, + "description": "Geth metrics overview dashboard.", + "editable": true, + "fiscalYearStartMonth": 0, + "gnetId": 14053, + "graphTooltip": 1, + "id": 2, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 122, + "panels": [], + "title": "Builder", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "from": 128, + "result": { + "color": "green", + "index": 0, + "text": "Yes" + }, + "to": null + }, + "type": "range" + }, + { + "options": { + "from": null, + "result": { + "color": "red", + "index": 1, + "text": "No" + }, + "to": 127 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 129, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 1 + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "beacon_head_slot{role=\"Proposer\"}", + "interval": "1s", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Epoch 4 Reached", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 131, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "miner_block_build_count{role=~\"$instance\"}", + "interval": "1s", + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Bids Built Count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Slots" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 6 + }, + "id": 126, + "interval": "1s", + "options": { + "legend": { + "calcs": [ + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "timezone": [ + "" + ], + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "miner_block_profit_gauge{client_name=~\"$client_name\", role=~\"$instance\"} / 1000000000000000000", + "hide": false, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "beacon_head_slot{role=~\"Proposer\"}", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "Slot", + "range": true, + "refId": "B" + } + ], + "title": "Bids Profit (Eth)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Slots" + }, + { + "id": "unit", + "value": "none" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 6 + }, + "id": 125, + "interval": "1", + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "miner_block_build{client_name=~\"$client_name\", role=~\"$instance\", quantile=\"$quantile\"}", + "format": "time_series", + "hide": false, + "legendFormat": "build {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "miner_block_merge{client_name=~\"$client_name\", role=~\"$instance\", quantile=\"$quantile\"}", + "format": "time_series", + "hide": false, + "legendFormat": "merge {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "beacon_head_slot{role=~\"Proposer\"}", + "hide": false, + "legendFormat": "Slot", + "range": true, + "refId": "B" + } + ], + "title": "Bids Creation Time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Slots" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 13 + }, + "id": 127, + "interval": "1s", + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "miner_block_txnum{client_name=~\"$client_name\", role=~\"$instance\"}", + "hide": false, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "beacon_head_slot{role=~\"Proposer\"}", + "format": "time_series", + "hide": false, + "legendFormat": "Slot", + "range": true, + "refId": "B" + } + ], + "title": "Bids Txnum", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisLabel", + "value": "Slots" + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 13 + }, + "id": 128, + "interval": "1", + "options": { + "legend": { + "calcs": [ + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "miner_block_gasused{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "hide": false, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "beacon_head_slot{role=~\"Proposer\"}", + "hide": false, + "legendFormat": "Slot", + "range": true, + "refId": "B" + } + ], + "title": "Bids Gas used", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 82, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "refId": "A" + } + ], + "title": "System", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 21 + }, + "id": 106, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_cpu_sysload{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "system {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_cpu_syswait{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "iowait {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_cpu_procload{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "geth {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "CPU", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 21 + }, + "id": 86, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(system_memory_allocs{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "alloc {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_memory_used{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "used {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "system_memory_held{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "held {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "Memory", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 21 + }, + "id": 85, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(system_disk_readbytes{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "read {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(system_disk_writebytes{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "write {{role}}", + "range": true, + "refId": "B" + } + ], + "title": "Disk", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 27 + }, + "id": 75, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "refId": "A" + } + ], + "title": "Network", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 96, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(p2p_ingress{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ingress {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(p2p_egress{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "egress {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "Traffic", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 28 + }, + "id": 77, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "p2p_peers{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "peers {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(p2p_dials{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "dials {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(p2p_serves{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "serves {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "Peers", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 4, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "refId": "A" + } + ], + "title": "Blockchain", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(252, 252, 252)", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 35 + }, + "id": 108, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(chain_head_header{client_name=~\"$client_name\", role=~\"$instance\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Latest header", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 35 + }, + "id": 110, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_head_header{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "header {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_head_receipt{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "receipt {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_head_block{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "block {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "Chain head", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 38 + }, + "id": 111, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(chain_head_receipt{client_name=~\"$client_name\", role=~\"$instance\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Latest receipt", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "locale" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 41 + }, + "id": 109, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "max(chain_head_block{client_name=~\"$client_name\", role=~\"$instance\"})", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Latest block", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 44 + }, + "id": 113, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_pending{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Executable transactions", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 18, + "x": 6, + "y": 44 + }, + "id": 116, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_pending{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "executable {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_queued{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gapped {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_local{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "local {{role}}", + "range": true, + "refId": "C" + } + ], + "title": "Transaction pool", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 47 + }, + "id": 114, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_queued{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Gapped transactions", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgb(255, 255, 255)", + "value": null + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 50 + }, + "id": 115, + "links": [], + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "auto" + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "txpool_local{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Local transactions", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ns" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 53 + }, + "id": 112, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_execution{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "execution (q=$quantile) {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_validation{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "validation (q=$quantile) {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_write{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "commit (q=$quantile) {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_account_reads{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "account read (q=$quantile) {{role}}", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_account_updates{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "account update (q=$quantile) {{role}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_account_hashes{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "account hashe (q=$quantile) {{role}}", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_account_commits{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "account commit (q=$quantile) {{role}}", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_storage_reads{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "storage read (q=$quantile) {{role}}", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_storage_updates{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "storage update (q=$quantile) {{role}}", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_storage_hashes{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "storage hashe (q=$quantile) {{role}}", + "range": true, + "refId": "J" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "chain_storage_commits{quantile=\"$quantile\", client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "storage commit (q=$quantile) {{role}}", + "range": true, + "refId": "K" + } + ], + "title": "Block processing", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 64 + }, + "id": 117, + "links": [], + "options": { + "legend": { + "calcs": [ + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_valid{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "valid {{role}}", + "range": true, + "refId": "K" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_invalid{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "invalid {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_underpriced{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "underpriced {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_pending_discard{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "executable discard {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_pending_replace{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "executable replace {{role}}", + "range": true, + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_pending_ratelimit{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "executable ratelimit {{role}}", + "range": true, + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_pending_nofunds{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "executable nofunds {{role}}", + "range": true, + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_queued_discard{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gapped discard {{role}}", + "range": true, + "refId": "G" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_queued_replace{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gapped replace {{role}}", + "range": true, + "refId": "H" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_queued_ratelimit{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gapped ratelimit {{role}}", + "range": true, + "refId": "I" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(txpool_queued_nofunds{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gapped nofunds {{role}}", + "range": true, + "refId": "J" + } + ], + "title": "Transaction propagation", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 74 + }, + "id": 17, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "refId": "A" + } + ], + "title": "Database", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 75 + }, + "id": 35, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(eth_db_chaindata_disk_read{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "leveldb read {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(eth_db_chaindata_disk_write{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "leveldb write {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(eth_db_chaindata_ancient_read{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ancient read {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(eth_db_chaindata_ancient_write{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ancient write {{role}}", + "range": true, + "refId": "D" + } + ], + "title": "Data rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 75 + }, + "id": 118, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_disk_read{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "leveldb read {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_disk_write{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "leveldb write {{role}}", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_ancient_read{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ancient read {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_ancient_write{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ancient write {{role}}", + "range": true, + "refId": "D" + } + ], + "title": "Session totals", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 16, + "y": 75 + }, + "id": 119, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_disk_size{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "leveldb {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "eth_db_chaindata_ancient_size{client_name=~\"$client_name\", role=~\"$instance\"}", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "ancient {{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Storage size", + "type": "timeseries" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 83 + }, + "id": 37, + "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "06O6Z894k" + }, + "refId": "A" + } + ], + "title": "Trie Stats", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 0, + "y": 84 + }, + "id": 120, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(trie_memcache_clean_read{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "hit {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(trie_memcache_clean_write{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "miss {{role}}", + "range": true, + "refId": "B" + } + ], + "title": "Clean cache", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 12, + "x": 12, + "y": 84 + }, + "id": 56, + "links": [], + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "9.5.12", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(trie_memcache_gc_size{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "gc {{role}}", + "range": true, + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(trie_memcache_flush_size{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "hide": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "overflow {{role}}", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "editorMode": "code", + "expr": "rate(trie_memcache_commit_size{client_name=~\"$client_name\", role=~\"$instance\"}[$rate])", + "format": "time_series", + "interval": "1s", + "intervalFactor": 1, + "legendFormat": "commit {{role}}", + "range": true, + "refId": "A" + } + ], + "title": "Dirty cache", + "type": "timeseries" + } + ], + "refresh": "5s", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "label": "datasource", + "multi": false, + "name": "datasource", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": true, + "text": [ + "All" + ], + "value": [ + "$__all" + ] + }, + "datasource": { + "type": "prometheus", + "uid": "${datasource}" + }, + "definition": "label_values(chain_head_block{client_name=\"$client_name\"},role)", + "hide": 1, + "includeAll": true, + "label": "Instance", + "multi": true, + "name": "instance", + "options": [], + "query": { + "query": "label_values(chain_head_block{client_name=\"$client_name\"},role)", + "refId": "PrometheusVariableQueryEditor-VariableQuery" + }, + "refresh": 1, + "regex": "Builder.*", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "0.5", + "value": "0.5" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "quantile", + "options": [ + { + "selected": true, + "text": "0.5", + "value": "0.5" + }, + { + "selected": false, + "text": "0.75", + "value": "0.75" + }, + { + "selected": false, + "text": "0.95", + "value": "0.95" + }, + { + "selected": false, + "text": "0.99", + "value": "0.99" + }, + { + "selected": false, + "text": "0.999", + "value": "0.999" + }, + { + "selected": false, + "text": "0.9999", + "value": "0.9999" + } + ], + "query": "0.5, 0.75, 0.95, 0.99, 0.999, 0.9999", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": false, + "text": "5m", + "value": "5m" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "rate", + "options": [ + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "2m", + "value": "2m" + }, + { + "selected": true, + "text": "5m", + "value": "5m" + } + ], + "query": "1m, 2m, 5m", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { + "selected": false, + "text": "geth", + "value": "geth" + }, + "hide": 2, + "includeAll": false, + "label": "Client", + "multi": false, + "name": "client_name", + "options": [ + { + "selected": true, + "text": "geth", + "value": "geth" + } + ], + "query": "geth", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + } + ] + }, + "time": { + "from": "now-3h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ] + }, + "timezone": "", + "title": "Geth Builder Overview", + "uid": "geth-builder-overview", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/scripts/kurtosis/kurtosis.yml b/scripts/kurtosis/kurtosis.yml new file mode 100644 index 000000000..d41b667c7 --- /dev/null +++ b/scripts/kurtosis/kurtosis.yml @@ -0,0 +1 @@ +name: "github.com/flashbots/builder-startup-script" diff --git a/scripts/kurtosis/main.star b/scripts/kurtosis/main.star new file mode 100644 index 000000000..6836f640b --- /dev/null +++ b/scripts/kurtosis/main.star @@ -0,0 +1,11 @@ +#Use: kurtosis.exe run --enclave explorer ./kurtosis/ '{"file_to_read": "./network_params.json"}' +#Node: works only with config files local to ./kurtosis/ folder where kurtosis.yml is defined + +eth_pkg = import_module( + "github.com/kurtosis-tech/ethereum-package/main.star@main" +) + +def run(plan, file_to_read = "network_params_tmp.json"): + inputs = json.decode(read_file(src=file_to_read)) + plan.print(inputs) + eth_pkg.run(plan, inputs) diff --git a/scripts/kurtosis/network_params.json b/scripts/kurtosis/network_params.json new file mode 100644 index 000000000..f8899aa09 --- /dev/null +++ b/scripts/kurtosis/network_params.json @@ -0,0 +1,137 @@ +{ + "mev_type": "full", + "participants": [ + { + "el_client_type": "nethermind", + "el_client_image": "nethermind/nethermind:latest", + "el_client_log_level": "", + "cl_client_type": "lighthouse", + "cl_client_log_level": "", + "el_extra_params": [], + "beacon_extra_params": [ + "--always-prefer-builder-payload", + "--disable-peer-scoring" + ], + "prometheus_config": { + "scrape_interval": "1s", + "labels": { + "role": "Proposer" + } + } + }, + { + "el_client_type": "REPLACE_WITH_BUILDER", + "el_client_image": "flashbots/builder:dev", + "el_client_log_level": "", + "cl_client_type": "lighthouse", + "cl_client_log_level": "", + "beacon_extra_params": [ + "--always-prepare-payload", + "--prepare-payload-lookahead", + "12000", + "--disable-peer-scoring" + ], + "el_extra_params": [ + "--builder", + "--builder.remote_relay_endpoint=http://mev-relay-api:9062", + "--builder.beacon_endpoints=http://cl-2-lighthouse-geth:4000", + "--builder.bellatrix_fork_version=0x30000038", + "--builder.genesis_fork_version=0x10000038", + "--builder.genesis_validators_root=GENESIS_VALIDATORS_ROOT_PLACEHOLDER", + "--miner.extradata=The_Dev_version_of_builder", + "--builder.algotype=greedy", + "--metrics.builder", + "--metrics.expensive", + "--maxpeers 0" + ], + "validator_count": 0, + "el_extra_env_vars": { + "BUILDER_TX_SIGNING_KEY": "0xef5177cd0b6b21c87db5a0bf35d4084a8a57a9d6a064f86d51ac85f2b873a4e2" + }, + "prometheus_config": { + "scrape_interval": "1s", + "labels": { + "role": "Builder Dev" + } + } + }, + { + "el_client_type": "geth", + "el_client_image": "flashbots/builder:latest", + "el_client_log_level": "", + "cl_client_type": "lighthouse", + "cl_client_log_level": "", + "beacon_extra_params": [ + "--always-prepare-payload", + "--prepare-payload-lookahead", + "12000", + "--disable-peer-scoring" + ], + "el_extra_params": [ + "--builder", + "--builder.remote_relay_endpoint=http://mev-relay-api:9062", + "--builder.beacon_endpoints=http://cl-3-lighthouse-geth:4000", + "--builder.bellatrix_fork_version=0x30000038", + "--builder.genesis_fork_version=0x10000038", + "--builder.genesis_validators_root=GENESIS_VALIDATORS_ROOT_PLACEHOLDER", + "--miner.extradata=Baseline_version_of_builder", + "--builder.algotype=greedy", + "--metrics.builder", + "--metrics.expensive", + "--maxpeers 0" + ], + "validator_count": 0, + "el_extra_env_vars": { + "BUILDER_TX_SIGNING_KEY": "0xef5177cd0b6b21c87db5a0bf35d4084a8a57a9d6a064f86d51ac85f2b873a4e2" + }, + "prometheus_config": { + "scrape_interval": "1s", + "labels": { + "role": "Builder Baseline" + } + } + } + ], + "network_params": { + "capella_fork_epoch": 0, + "seconds_per_slot": 5 + }, + "mev_params": { + "mev_flood_seconds_per_bundle": 4, + "mev_flood_extra_args": [ + "--txsPerBundle=500" + ], + "mev_flood_image": "flashbots/mev-flood:0.0.9", + "mev_relay_image": "flashbots/mev-boost-relay:0.27", + "mev_boost_image": "flashbots/mev-boost:1.6", + "mev_builder_image": "flashbots/builder:latest", + "mev_builder_extra_args": [ + "--metrics.expensive" + ], + "mev_builder_prometheus_config": { + "scrape_interval": "1s", + "labels": { + "role": "Validator" + } + } + }, + "additional_services": [ + "broadcaster", + "tx_spammer", + "custom_flood", + "beacon_metrics_gazer", + "dora", + "prometheus_grafana" + ], + "tx_spammer_params": { + "tx_spammer_extra_args": [ + "--txcount=20" + ] + }, + "custom_flood_params": { + "interval_between_transactions": 0 + }, + "grafana_additional_dashboards": [ + "github.com/flashbots/builder-startup-script/data/grafana" + ] +}