Skip to content

Commit

Permalink
feat: pass slots per epoch to mev-boost-relay (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y authored Sep 19, 2023
1 parent a787b38 commit 14acb6f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def run(plan, args = {}):
)
plan.wait(recipe = epoch_recipe, field = "extract.epoch", assertion = ">=", target_value = str(network_params.capella_fork_epoch), timeout = "20m", service_name = first_client_beacon_name)
plan.print("epoch 2 reached, can begin mev stuff")
endpoint = mev_relay_launcher_module.launch_mev_relay(plan, mev_params, network_params.network_id, beacon_uris, genesis_validators_root, builder_uri, network_params.seconds_per_slot)
endpoint = mev_relay_launcher_module.launch_mev_relay(plan, mev_params, network_params.network_id, beacon_uris, genesis_validators_root, builder_uri, network_params.seconds_per_slot, network_params.slots_per_epoch)
mev_flood_module.spam_in_background(plan, el_uri, mev_params.mev_flood_extra_args, mev_params.mev_flood_seconds_per_bundle, genesis_constants.PRE_FUNDED_ACCOUNTS)
if args_with_right_defaults.mev_params.launch_custom_flood:
mev_custom_flood_module.spam_in_background(plan, genesis_constants.PRE_FUNDED_ACCOUNTS[-1].private_key, genesis_constants.PRE_FUNDED_ACCOUNTS[0].address, el_uri)
Expand Down
5 changes: 3 additions & 2 deletions src/mev_relay/mev_relay_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ NETWORK_ID_TO_NAME = {
"3": "ropsten",
}

def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root, builder_uri, seconds_per_slot):
def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root, builder_uri, seconds_per_slot, slots_per_epoch = 32):
redis = redis_module.run(plan)
# making the password postgres as the relay expects it to be postgres
postgres = postgres_module.run(plan, password = "postgres", user = "postgres", database = "postgres", service_name = "postgres")
Expand All @@ -33,7 +33,8 @@ def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root,
"CAPELLA_FORK_VERSION": "0x40000038",
"DENEB_FORK_VERSION": "0x50000038",
"GENESIS_VALIDATORS_ROOT": validator_root,
"SEC_PER_SLOT": str(seconds_per_slot)
"SEC_PER_SLOT": str(seconds_per_slot),
"SLOTS_PER_EPOCH": str(slots_per_epoch)
}

redis_url = "{}:{}".format(redis.hostname, redis.port_number)
Expand Down

0 comments on commit 14acb6f

Please sign in to comment.