Commit f95c6a1a authored by Gyanendra Mishra's avatar Gyanendra Mishra

this should work

parent e872658d
...@@ -104,7 +104,7 @@ def parse_input(input_args): ...@@ -104,7 +104,7 @@ def parse_input(input_args):
fail("seconds_per_slot is 0 needs to be > 0 ") fail("seconds_per_slot is 0 needs to be > 0 ")
required_num_validtors = 2 * result["network_params"]["slots_per_epoch"] required_num_validtors = 2 * result["network_params"]["slots_per_epoch"]
actual_num_validators = len(result["participants"]) * result["network_params"]["num_validators_per_keynode"] actual_num_validators = len(result["participants"]) * result["network_params"]["num_validator_keys_per_node"]
if required_num_validtors > actual_num_validators: if required_num_validtors > actual_num_validators:
fail("required_num_validtors - {0} is greater than actual_num_validators - {1}".format(required_num_validtors, actual_num_validators)) fail("required_num_validtors - {0} is greater than actual_num_validators - {1}".format(required_num_validtors, actual_num_validators))
...@@ -149,7 +149,7 @@ def default_network_params(): ...@@ -149,7 +149,7 @@ def default_network_params():
# this is temporary till we get params working # this is temporary till we get params working
return { 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_validators_per_keynode" : 64, "num_validator_keys_per_node" : 64,
"network_id" : "3151908", "network_id" : "3151908",
"deposit_contract_address" : "0x4242424242424242424242424242424242424242", "deposit_contract_address" : "0x4242424242424242424242424242424242424242",
"seconds_per_slot" : 12, "seconds_per_slot" : 12,
......
...@@ -54,7 +54,7 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -54,7 +54,7 @@ def launch_participant_network(participants, network_params, global_log_level):
cl_validator_data = generate_cl_validator_keystores( cl_validator_data = generate_cl_validator_keystores(
network_params.preregistered_validator_keys_mnemonic, network_params.preregistered_validator_keys_mnemonic,
num_participants, num_participants,
network_params.num_validators_per_keynode network_params.num_validator_keys_per_node,
) )
...@@ -118,7 +118,7 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -118,7 +118,7 @@ def launch_participant_network(participants, network_params, global_log_level):
genesis_generation_config_yml_template = read_file(CL_GENESIS_GENERATION_CONFIG_TEMPLATE_FILEPATH) genesis_generation_config_yml_template = read_file(CL_GENESIS_GENERATION_CONFIG_TEMPLATE_FILEPATH)
genesis_generation_mnemonics_yml_template = read_file(CL_GENESIS_GENERATION_MNEMONICS_TEMPLATE_FILEPATH) genesis_generation_mnemonics_yml_template = read_file(CL_GENESIS_GENERATION_MNEMONICS_TEMPLATE_FILEPATH)
total_number_of_validator_keys = network_params.num_validators_per_keynode * num_participants total_number_of_validator_keys = network_params.num_validator_keys_per_node * num_participants
cl_genesis_data = generate_cl_genesis_data( cl_genesis_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,
......
...@@ -110,7 +110,7 @@ message NetworkParams { ...@@ -110,7 +110,7 @@ message NetworkParams {
// Number of slots in an epoch on the Beacon chain // Number of slots in an epoch on the Beacon chain
optional uint32 slots_per_epoch = 4; optional uint32 slots_per_epoch = 4;
// The number of validator keys that each CL validator node should get // The number of validator keys that each CL validator node should get
optional uint32 num_validators_per_keynode = 5; optional uint32 num_validator_keys_per_node = 5;
// This menmonic will a) be used to create keystores for all the types of validators that we have and b) be used to generate a CL genesis.ssz that has the children // This menmonic will a) be used to create keystores for all the types of validators that we have and b) be used to generate a CL genesis.ssz that has the children
// validator keys already preregistered as validators // validator keys already preregistered as validators
optional string preregistered_validator_keys_mnemonic = 6; optional string preregistered_validator_keys_mnemonic = 6;
......
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