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
b71852af
Commit
b71852af
authored
Nov 22, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix load import
parent
a56cda47
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
el_genesis_data_generator.star
..._data_generator/el_genesis/el_genesis_data_generator.star
+12
-12
No files found.
src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star
View file @
b71852af
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_template_and_data", "path_join", "path_base
")
shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star
")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star", "new_el_genesis_data
")
el_genesis = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star
")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star", "launch_prelaunch_data_generato
r")
prelaunch_data_generator_launcher = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.sta
r")
CONFIG_DIRPATH_ON_GENERATOR = "/config"
CONFIG_DIRPATH_ON_GENERATOR = "/config"
GENESIS_CONFIG_FILENAME = "genesis-config.yaml"
GENESIS_CONFIG_FILENAME = "genesis-config.yaml"
...
@@ -37,7 +37,7 @@ def generate_el_genesis_data(
...
@@ -37,7 +37,7 @@ def generate_el_genesis_data(
genesis_unix_timestamp,
genesis_unix_timestamp,
))
))
genesis_config_file_template_and_data = new_template_and_data(genesis_generation_config_template, template_data)
genesis_config_file_template_and_data =
shared_utils.
new_template_and_data(genesis_generation_config_template, template_data)
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[GENESIS_CONFIG_FILENAME] = genesis_config_file_template_and_data
template_and_data_by_rel_dest_filepath[GENESIS_CONFIG_FILENAME] = genesis_config_file_template_and_data
...
@@ -46,7 +46,7 @@ def generate_el_genesis_data(
...
@@ -46,7 +46,7 @@ def generate_el_genesis_data(
# TODO(old) Make this the actual data generator - comment copied from the original module
# TODO(old) Make this the actual data generator - comment copied from the original module
launcher_service_id = launch_prelaunch_data_generator(
launcher_service_id =
prelaunch_data_generator_launcher.
launch_prelaunch_data_generator(
{
{
genesis_generation_config_artifact_uuid: CONFIG_DIRPATH_ON_GENERATOR,
genesis_generation_config_artifact_uuid: CONFIG_DIRPATH_ON_GENERATOR,
},
},
...
@@ -75,11 +75,11 @@ def generate_el_genesis_data(
...
@@ -75,11 +75,11 @@ def generate_el_genesis_data(
exec(launcher_service_id, dir_creation_cmd, SUCCESSFUL_EXEC_CMD_EXIT_CODE)
exec(launcher_service_id, dir_creation_cmd, SUCCESSFUL_EXEC_CMD_EXIT_CODE)
genesis_config_filepath_on_generator = path_join(CONFIG_DIRPATH_ON_GENERATOR, GENESIS_CONFIG_FILENAME)
genesis_config_filepath_on_generator =
shared_utils.
path_join(CONFIG_DIRPATH_ON_GENERATOR, GENESIS_CONFIG_FILENAME)
genesis_filename_to_relative_filepath_in_artifact = {}
genesis_filename_to_relative_filepath_in_artifact = {}
for output_filename, generation_cmd in all_genesis_generation_cmds.items():
for output_filename, generation_cmd in all_genesis_generation_cmds.items():
cmd = generation_cmd(genesis_config_filepath_on_generator)
cmd = generation_cmd(genesis_config_filepath_on_generator)
output_filepath_on_generator = path_join(OUTPUT_DIRPATH_ON_GENERATOR, output_filename)
output_filepath_on_generator =
shared_utils.
path_join(OUTPUT_DIRPATH_ON_GENERATOR, output_filename)
cmd.append(">")
cmd.append(">")
cmd.append(output_filepath_on_generator)
cmd.append(output_filepath_on_generator)
cmd_to_execute = [
cmd_to_execute = [
...
@@ -90,13 +90,13 @@ def generate_el_genesis_data(
...
@@ -90,13 +90,13 @@ def generate_el_genesis_data(
exec(launcher_service_id, cmd_to_execute, SUCCESSFUL_EXEC_CMD_EXIT_CODE)
exec(launcher_service_id, cmd_to_execute, SUCCESSFUL_EXEC_CMD_EXIT_CODE)
genesis_filename_to_relative_filepath_in_artifact[output_filename] = path_join(
genesis_filename_to_relative_filepath_in_artifact[output_filename] =
shared_utils.
path_join(
path_base(OUTPUT_DIRPATH_ON_GENERATOR),
shared_utils.
path_base(OUTPUT_DIRPATH_ON_GENERATOR),
output_filename,
output_filename,
)
)
jwt_secret_filepath_on_generator = path_join(OUTPUT_DIRPATH_ON_GENERATOR, JWT_SECRET_FILENAME)
jwt_secret_filepath_on_generator =
shared_utils.
path_join(OUTPUT_DIRPATH_ON_GENERATOR, JWT_SECRET_FILENAME)
jwt_secret_generation_cmd = [
jwt_secret_generation_cmd = [
"bash",
"bash",
"-c",
"-c",
...
@@ -109,9 +109,9 @@ def generate_el_genesis_data(
...
@@ -109,9 +109,9 @@ def generate_el_genesis_data(
elGenesisDataArtifactUuid = store_file_from_service(launcher_service_id, OUTPUT_DIRPATH_ON_GENERATOR)
elGenesisDataArtifactUuid = store_file_from_service(launcher_service_id, OUTPUT_DIRPATH_ON_GENERATOR)
result = new_el_genesis_data(
result =
el_genesis.
new_el_genesis_data(
elGenesisDataArtifactUuid,
elGenesisDataArtifactUuid,
path_join(
path_base(OUTPUT_DIRPATH_ON_GENERATOR), JWT_SECRET_FILENAME),
shared_utils.path_join(shared_utils.
path_base(OUTPUT_DIRPATH_ON_GENERATOR), JWT_SECRET_FILENAME),
genesis_filename_to_relative_filepath_in_artifact[GETH_GENESIS_FILENAME],
genesis_filename_to_relative_filepath_in_artifact[GETH_GENESIS_FILENAME],
genesis_filename_to_relative_filepath_in_artifact[ERIGON_GENESIS_FILENAME],
genesis_filename_to_relative_filepath_in_artifact[ERIGON_GENESIS_FILENAME],
genesis_filename_to_relative_filepath_in_artifact[NETHERMIND_GENESIS_FILENAME],
genesis_filename_to_relative_filepath_in_artifact[NETHERMIND_GENESIS_FILENAME],
...
...
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