11 files changed
The pull request introduces significant updates to the
builder repository by Flashbots, including the addition of new files, functions, and structs, and updates to existing ones. Key changes include the addition of
emulate_network.go file, introduction of new functions like
update_config, and error handling improvements.
The pull request introduces several changes to the
builder repository owned by Flashbots. The main point of these changes is to enhance the functionality of the repository by adding new files, functions, and structs, and updating existing ones.
A new file
emulate_network.go has been added to the
scripts directory. This file contains the main package and imports several packages. Two new structs,
ServiceInfo, have been defined in this file.
Several new functions have been introduced:
parseUserServicesfunction takes a string as input and returns a slice of
ServiceInfoand an error. It splits the input text into lines, iterates over each line, and uses regular expressions to match and extract service information.
getBlockNumberfunction takes a URL string as input and returns the current block number and an error. It sends a JSON-RPC request to the specified URL.
buildfunction builds a Docker image using a given image tag, build directory, and Dockerfile path.
update_configfunction updates the configuration of a network. It reads a JSON file, updates the "seconds_per_slot" value, and updates the participant with "el_client_type" set to "REPLACE_WITH_BUILDER" to use "geth" and the provided image tag.
runfunction has been introduced with several parameters. The body of this function is not shown in the diff.
The pull request also includes error handling for request creation, sending the request, reading the response body, unmarshalling the JSON response, and converting the hexadecimal result to an integer. It also includes error handling for file reading, JSON unmarshalling, and type assertions.
Last updated 5 hours ago
Last updated 04/12 00:17