Commit fd133293 authored by Gyanendra Mishra's avatar Gyanendra Mishra

fix typo

parent 0effbd16
...@@ -2,11 +2,14 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_n ...@@ -2,11 +2,14 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_n
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
def main(input_args): def main(input_args):
network_params = new_network_params() print(input_args)
print(input_args.wait_for_verifications)
module_input = default_module_input()
print(module_input)
network_params = module_input.network_params
num_participants = 2 num_participants = 2
print("Launching participant network with {0} participants and the following network params {1}".format(num_participants, json.indent(json.encode(network_params)))) print("Launching participant network with {0} participants and the following network params {1}".format(num_participants, json.indent(json.encode(network_params))))
launch_participant_network(num_participants, network_params) launch_participant_network(num_participants, network_params)
print(input_args)
# TODO replace with actual values # TODO replace with actual values
grafana_info = module_io.GrafanaInfo({ grafana_info = module_io.GrafanaInfo({
"dashboard_path": "dummy_path", "dashboard_path": "dummy_path",
...@@ -14,16 +17,45 @@ def main(input_args): ...@@ -14,16 +17,45 @@ def main(input_args):
"password": "password" "password": "password"
}) })
output = module_io.ModuleOutput({"grafana_info": grafana_info}) output = module_io.ModuleOutput({"grafana_info": grafana_info})
print(output) print(output)
return output return output
def new_network_params():
def default_module_input():
network_params = default_network_params()
participants = default_partitcipants()
return module_io.ModuleInput({
"participants": participants,
"network_params": network_params,
"launch_additional_services": True,
"wait_for_finalization": False,
"wait_for_verifications": False,
"verifications_epoch_limit": 5,
"global_log_level": "info",
})
def default_network_params():
# this is temporary till we get params working # this is temporary till we get params working
return struct( return {
preregistered_validator_keys_mnemonic = "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete", "preregistered_validator_keys_mnemonic" : "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete",
num_validator_keys_per_node = 64, "num_validators_per_keynode" : 64,
network_id = "3151908", "network_id" : "3151908",
deposit_contract_address = "0x4242424242424242424242424242424242424242", "deposit_contract_address" : "0x4242424242424242424242424242424242424242",
seconds_per_slot = 12, "seconds_per_slot" : 12,
mev_boost_relay_endpoints = [] "slots_per_epoch" : 32,
) }
def default_partitcipants():
return [
{
"el_client_type": "geth",
"el_client_image": "",
"el_client_log_level": "",
"cl_client_type": "lighthouse",
"cl_client_image": "",
"cl_client_log_level": ""
}
]
...@@ -15,7 +15,7 @@ def launch_participant_network(num_participants, network_params): ...@@ -15,7 +15,7 @@ def launch_participant_network(num_participants, network_params):
keystore_result = generate_cl_validator_keystores( keystore_result = generate_cl_validator_keystores(
network_params.preregistered_validator_keys_mnemonic, network_params.preregistered_validator_keys_mnemonic,
num_participants, num_participants,
network_params.num_validator_keys_per_node network_params.num_validators_per_keynode
) )
...@@ -38,7 +38,7 @@ def launch_participant_network(num_participants, network_params): ...@@ -38,7 +38,7 @@ def launch_participant_network(num_participants, network_params):
print("Generating CL data") print("Generating CL data")
genesis_generation_config_yml_template = read_file("github.com/kurtosis-tech/eth2-module/static_files/genesis-generation-config/cl/config.yaml.tmpl") genesis_generation_config_yml_template = read_file("github.com/kurtosis-tech/eth2-module/static_files/genesis-generation-config/cl/config.yaml.tmpl")
genesis_generation_mnemonics_yml_template = read_file("github.com/kurtosis-tech/eth2-module/static_files/genesis-generation-config/cl/mnemonics.yaml.tmpl") genesis_generation_mnemonics_yml_template = read_file("github.com/kurtosis-tech/eth2-module/static_files/genesis-generation-config/cl/mnemonics.yaml.tmpl")
total_number_of_validator_keys = network_params.num_validator_keys_per_node * num_participants total_number_of_validator_keys = network_params.num_validators_per_keynode * num_participants
cl_data = generate_cl_genesis_data( cl_data = generate_cl_genesis_data(
genesis_generation_config_yml_template, genesis_generation_config_yml_template,
genesis_generation_mnemonics_yml_template, genesis_generation_mnemonics_yml_template,
...@@ -57,7 +57,7 @@ def launch_participant_network(num_participants, network_params): ...@@ -57,7 +57,7 @@ def launch_participant_network(num_participants, network_params):
print("launching mev boost") print("launching mev boost")
# TODO make this launch only for participants that have the participants[i].builderNetworkParams.relayEndpoints defined # TODO make this launch only for participants that have the participants[i].builderNetworkParams.relayEndpoints defined
# At the moment this lies here just to test, and the relay end points is an empty list # At the moment this lies here just to test, and the relay end points is an empty list
mev_boost_launcher = new_mev_boost_launcher(MEV_BOOST_SHOULD_RELAY, network_params.mev_boost_relay_endpoints) mev_boost_launcher = new_mev_boost_launcher(MEV_BOOST_SHOULD_RELAY, [])
mev_boost_service_id = MEV_BOOST_SERVICE_ID_PREFIX.format(1) mev_boost_service_id = MEV_BOOST_SERVICE_ID_PREFIX.format(1)
mev_boost_context = launch_mevboost(mev_boost_launcher, mev_boost_service_id, network_params.network_id) mev_boost_context = launch_mevboost(mev_boost_launcher, mev_boost_service_id, network_params.network_id)
print(mev_boost_endpoint(mev_boost_context)) print(mev_boost_endpoint(mev_boost_context))
...@@ -77,7 +77,7 @@ message Participant { ...@@ -77,7 +77,7 @@ message Participant {
repeated string el_extra_params = 4; repeated string el_extra_params = 4;
// The type of CL client that should be started // The type of CL client that should be started
CLClientType cl_client_Type = 5; CLClientType cl_client_type = 5;
// The Docker image that should be used for the EL client; leave blank to use the default // The Docker image that should be used for the EL client; leave blank to use the default
// NOTE: Prysm is different in that it requires two images - a Beacon and a validator // NOTE: Prysm is different in that it requires two images - a Beacon and a validator
// For Prysm and Prysm only, this field should contain a comma-separated string of "beacon_image,validator_image" // For Prysm and Prysm only, this field should contain a comma-separated string of "beacon_image,validator_image"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment