Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
46d67fc5
Unverified
Commit
46d67fc5
authored
Aug 30, 2023
by
Gyanendra Mishra
Committed by
GitHub
Aug 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: dont spin up extra el/cl client for mock-mev (#158)
parent
0165ef1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
21 deletions
+37
-21
parse_input.star
src/package_io/parse_input.star
+37
-21
No files found.
src/package_io/parse_input.star
View file @
46d67fc5
...
...
@@ -117,7 +117,7 @@ def parse_input(input_args):
if result.get("mev_type") in ("mock", "full"):
result = enrich_mev_extra_params(result, MEV_BOOST_SERVICE_NAME_PREFIX, FLASHBOTS_MEV_BOOST_PORT)
result = enrich_mev_extra_params(result, MEV_BOOST_SERVICE_NAME_PREFIX, FLASHBOTS_MEV_BOOST_PORT
, result.get("mev_type")
)
return struct(
participants=[struct(
...
...
@@ -230,7 +230,7 @@ def get_default_mev_params():
# TODO perhaps clean this up into a map
def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port):
def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port
, mev_type
):
for index, participant in enumerate(parsed_arguments_dict["participants"]):
mev_url = "http://{0}{1}:{2}".format(mev_prefix, index, mev_port)
...
...
@@ -253,24 +253,40 @@ def enrich_mev_extra_params(parsed_arguments_dict, mev_prefix, mev_port):
num_participants = len(parsed_arguments_dict["participants"])
mev_url = "http://{0}{1}:{2}".format(mev_prefix, num_participants, mev_port)
mev_participant = {
"el_client_type": "geth",
# TODO replace with actual when flashbots/builder is published
"el_client_image": "h4ck3rk3y/builder",
"el_client_log_level": "",
"cl_client_type": "lighthouse",
# THIS overrides the beacon image
"cl_client_image": "sigp/lighthouse",
"cl_client_log_level": "",
"beacon_extra_params": ["--builder={0}".format(mev_url), "--always-prepare-payload", "--prepare-payload-lookahead", "12000"],
# TODO(maybe) make parts of this more passable like the mev-relay-endpoint & forks
"el_extra_params": ["--builder", "--builder.remote_relay_endpoint=http://mev-relay-api:9062", "--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000".format(num_participants+1), "--builder.bellatrix_fork_version=0x30000038", "--builder.genesis_fork_version=0x10000038", "--builder.genesis_validators_root={0}".format(package_io.GENESIS_VALIDATORS_ROOT_PLACEHOLDER), "--miner.extradata=\"Illuminate Dmocratize Dstribute\"", "--miner.algotype=greedy"] + parsed_arguments_dict["mev_params"]["mev_builder_extra_args"],
"validator_extra_params": ["--builder-proposals"],
"builder_network_params": None
}
parsed_arguments_dict["participants"].append(mev_participant)
if mev_type == "full":
mev_url = "http://{0}{1}:{2}".format(mev_prefix, num_participants, mev_port)
mev_participant = {
"el_client_type": "geth",
# TODO replace with actual when flashbots/builder is published
"el_client_image": "h4ck3rk3y/builder",
"el_client_log_level": "",
"cl_client_type": "lighthouse",
# THIS overrides the beacon image
"cl_client_image": "sigp/lighthouse",
"cl_client_log_level": "",
"beacon_extra_params": [
"--builder={0}".format(mev_url),
"--always-prepare-payload",
"--prepare-payload-lookahead",
"12000"
],
# TODO(maybe) make parts of this more passable like the mev-relay-endpoint & forks
"el_extra_params": [
"--builder",
"--builder.remote_relay_endpoint=http://mev-relay-api:9062",
"--builder.beacon_endpoints=http://cl-{0}-lighthouse-geth:4000".format(num_participants+1),
"--builder.bellatrix_fork_version=0x30000038",
"--builder.genesis_fork_version=0x10000038",
"--builder.genesis_validators_root={0}".format(package_io.GENESIS_VALIDATORS_ROOT_PLACEHOLDER),
"--miner.extradata=\"Illuminate Dmocratize Dstribute\"",
"--miner.algotype=greedy"
] + parsed_arguments_dict["mev_params"]["mev_builder_extra_args"],
"validator_extra_params": ["--builder-proposals"],
"builder_network_params": None
}
parsed_arguments_dict["participants"].append(mev_participant)
return parsed_arguments_dict
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment