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
2d23d52d
Commit
2d23d52d
authored
Nov 03, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into gyani/ontop-of-network
parents
262a043b
79c06978
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
38 additions
and
42 deletions
+38
-42
kurtosis.mod
kurtosis.mod
+1
-1
main.star
main.star
+4
-4
run.sh
scripts/run.sh
+1
-1
participant_network.star
src/participant_network/participant_network.star
+1
-2
cl_genesis_data.star
.../prelaunch_data_generator/cl_genesis/cl_genesis_data.star
+0
-3
cl_validator_keystore_generator.star
..._validator_keystores/cl_validator_keystore_generator.star
+5
-8
generate_keystores_result.star
...tor/cl_validator_keystores/generate_keystores_result.star
+1
-1
el_genesis_data.star
.../prelaunch_data_generator/el_genesis/el_genesis_data.star
+2
-3
el_genesis_data_generator.star
..._data_generator/el_genesis/el_genesis_data_generator.star
+3
-3
genesis_constants.star
...h_data_generator/genesis_constants/genesis_constants.star
+2
-2
prelaunch_data_generator_launcher.star
...generator_launcher/prelaunch_data_generator_launcher.star
+3
-5
shared_utils.star
src/shared_utils/shared_utils.star
+3
-0
config.yaml.tmpl
static_files/genesis-generation-config/cl/config.yaml.tmpl
+12
-9
No files found.
kurtosis.mod
View file @
2d23d52d
main.star
View file @
2d23d52d
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star", "PRE_FUNDED_ACCOUNTS")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_network.star", "launch_participant_network")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_network.star", "launch_participant_network")
def main():
def main():
network_params = new_network_params()
network_params = new_network_params()
print("Launching participant network")
num_participants = 2
launch_participant_network(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)
def new_network_params():
def new_network_params():
# this is temporary till we get params working
# this is temporary till we get params working
...
...
scripts/
build
.sh
→
scripts/
run
.sh
View file @
2d23d52d
src/participant_network/participant_network.star
View file @
2d23d52d
...
@@ -2,8 +2,7 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_dat
...
@@ -2,8 +2,7 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_dat
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star", "generate_el_genesis_data")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star", "generate_el_genesis_data")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data_generator.star", "generate_cl_genesis_data")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data_generator.star", "generate_cl_genesis_data")
def launch_participant_network(network_params):
def launch_participant_network(num_participants, network_params):
num_participants = 2
print("Generating cl validator key stores")
print("Generating cl validator key stores")
keystore_result = generate_cl_validator_keystores(
keystore_result = generate_cl_validator_keystores(
...
...
src/participant_network/prelaunch_data_generator/cl_genesis/cl_genesis_data.star
View file @
2d23d52d
...
@@ -10,6 +10,3 @@ def new_cl_genesis_data(
...
@@ -10,6 +10,3 @@ def new_cl_genesis_data(
config_yml_rel_filepath = config_yml_rel_filepath,
config_yml_rel_filepath = config_yml_rel_filepath,
genesis_ssz_rel_filepath = genesis_ssz_rel_filepath,
genesis_ssz_rel_filepath = genesis_ssz_rel_filepath,
)
)
\ No newline at end of file
src/participant_network/prelaunch_data_generator/cl_validator_keystores/cl_validator_keystore_generator.star
View file @
2d23d52d
...
@@ -31,8 +31,8 @@ TEKU_SECRETS_DIRNAME = "teku-secrets"
...
@@ -31,8 +31,8 @@ TEKU_SECRETS_DIRNAME = "teku-secrets"
def generate_cl_validator_keystores(
def generate_cl_validator_keystores(
mnemonic,
mnemonic,
num_nodes,
num_nodes,
num_validators_per_node
,
num_validators_per_node
):
):
service_id = launch_prelaunch_data_generator(
service_id = launch_prelaunch_data_generator(
{},
{},
)
)
...
@@ -43,14 +43,11 @@ def generate_cl_validator_keystores(
...
@@ -43,14 +43,11 @@ def generate_cl_validator_keystores(
all_output_dirpaths = []
all_output_dirpaths = []
all_sub_command_strs = []
all_sub_command_strs = []
# TODO Parallelize this to increase perf, which will require Docker exec operations not holding the Kurtosis mutex!
start_index = 0
start_index = 0
stop_index = num_validators_per_node
stop_index = num_validators_per_node
for i in range(0, num_nodes):
for i in range(num_nodes):
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(i)
i,
)
generate_keystores_cmd = "{0} keystores --insecure --prysm-pass {1} --out-loc {2} --source-mnemonic \"{3}\" --source-min {4} --source-max {5}".format(
generate_keystores_cmd = "{0} keystores --insecure --prysm-pass {1} --out-loc {2} --source-mnemonic \"{3}\" --source-min {4} --source-max {5}".format(
KEYSTORES_GENERATION_TOOL_NAME,
KEYSTORES_GENERATION_TOOL_NAME,
...
...
src/participant_network/prelaunch_data_generator/cl_validator_keystores/generate_keystores_result.star
View file @
2d23d52d
src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star
View file @
2d23d52d
...
@@ -4,8 +4,7 @@ def new_el_genesis_data(
...
@@ -4,8 +4,7 @@ def new_el_genesis_data(
geth_genesis_json_relative_filepath,
geth_genesis_json_relative_filepath,
erigon_genesis_json_relative_filepath,
erigon_genesis_json_relative_filepath,
nethermind_genesis_json_relative_filepath,
nethermind_genesis_json_relative_filepath,
besu_genesis_json_relative_filepath,
besu_genesis_json_relative_filepath):
):
return struct(
return struct(
files_artifact_uuid = files_artifact_uuid,
files_artifact_uuid = files_artifact_uuid,
jwt_secret_relative_filepath = jwt_secret_relative_filepath,
jwt_secret_relative_filepath = jwt_secret_relative_filepath,
...
...
src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data_generator.star
View file @
2d23d52d
...
@@ -7,7 +7,7 @@ GENESIS_CONFIG_FILENAME = "genesis-config.yaml"
...
@@ -7,7 +7,7 @@ GENESIS_CONFIG_FILENAME = "genesis-config.yaml"
OUTPUT_DIRPATH_ON_GENERATOR = "/output"
OUTPUT_DIRPATH_ON_GENERATOR = "/output"
GETH_GENESIS_FILENAME = "ge
th
.json"
GETH_GENESIS_FILENAME = "ge
nesis
.json"
ERIGON_GENESIS_FILENAME = "erigon.json"
ERIGON_GENESIS_FILENAME = "erigon.json"
NETHERMIND_GENESIS_FILENAME = "nethermind.json"
NETHERMIND_GENESIS_FILENAME = "nethermind.json"
BESU_GENESIS_FILENAME = "besu.json"
BESU_GENESIS_FILENAME = "besu.json"
...
@@ -39,7 +39,7 @@ def generate_el_genesis_data(
...
@@ -39,7 +39,7 @@ def generate_el_genesis_data(
genesis_config_file_template_and_data = new_template_and_data(genesis_generation_config_template, template_data)
genesis_config_file_template_and_data = 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
genesis_generation_config_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
genesis_generation_config_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
...
...
src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star
View file @
2d23d52d
def new_prefunded_account(address, private_key)
:
def new_prefunded_account(address, private_key):
return struct(address = address, private_key = private_key)
return struct(address = address, private_key = private_key)
# This information was generated by:
# This information was generated by:
...
...
src/participant_network/prelaunch_data_generator/prelaunch_data_generator_launcher/prelaunch_data_generator_launcher.star
View file @
2d23d52d
IMAGE = "ethpandaops/ethereum-genesis-generator:
latest
"
IMAGE = "ethpandaops/ethereum-genesis-generator:
1.0.2
"
SERVICE_ID_PREFIX = "prelaunch-data-generator-"
SERVICE_ID_PREFIX = "prelaunch-data-generator-"
...
@@ -9,9 +9,7 @@ ENTRYPOINT_ARGS = [
...
@@ -9,9 +9,7 @@ ENTRYPOINT_ARGS = [
]
]
# Launches a prelaunch data generator IMAGE, for use in various of the genesis generation
# Launches a prelaunch data generator IMAGE, for use in various of the genesis generation
def launch_prelaunch_data_generator(
def launch_prelaunch_data_generator(files_artifact_mountpoints):
files_artifact_mountpoints,
):
service_config = get_service_config(files_artifact_mountpoints)
service_config = get_service_config(files_artifact_mountpoints)
...
...
src/shared_utils/shared_utils.star
View file @
2d23d52d
def new_template_and_data(template, template_data_json):
def new_template_and_data(template, template_data_json):
return {"template": template, "template_data_json": template_data_json}
return {"template": template, "template_data_json": template_data_json}
def path_join(*args):
def path_join(*args):
joined_path = "/".join(args)
joined_path = "/".join(args)
return joined_path.replace("//", "/")
return joined_path.replace("//", "/")
def path_base(path):
def path_base(path):
split_path = path.split("/")
split_path = path.split("/")
return split_path[-1]
return split_path[-1]
def new_port_spec(number, protocol):
def new_port_spec(number, protocol):
return struct(number = number, protocol = protocol)
return struct(number = number, protocol = protocol)
\ No newline at end of file
static_files/genesis-generation-config/cl/config.yaml.tmpl
View file @
2d23d52d
...
@@ -8,8 +8,8 @@ CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts w
...
@@ -8,8 +8,8 @@ CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts w
# `2**14` (= 16,384)
# `2**14` (= 16,384)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: {{ .NumValidatorKeysToPreregister }}
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: {{ .NumValidatorKeysToPreregister }}
MIN_GENESIS_TIME: {{ .UnixTimestamp }}
MIN_GENESIS_TIME: {{ .UnixTimestamp }}
GENESIS_FORK_VERSION: 0x1000
5555
GENESIS_FORK_VERSION: 0x1000
0038
GENESIS_DELAY:
12
0
GENESIS_DELAY:
30
0
# Forking
# Forking
# ---------------------------------------------------------------
# ---------------------------------------------------------------
...
@@ -21,20 +21,23 @@ GENESIS_DELAY: 120
...
@@ -21,20 +21,23 @@ GENESIS_DELAY: 120
# are all hardcoded to zero.
# are all hardcoded to zero.
# Altair
# Altair
ALTAIR_FORK_VERSION: 0x
11005555
ALTAIR_FORK_VERSION: 0x
20000038
ALTAIR_FORK_EPOCH: 0
ALTAIR_FORK_EPOCH: 0
# Merge
# Merge
BELLATRIX_FORK_VERSION: 0x
12005555
BELLATRIX_FORK_VERSION: 0x
30000038
BELLATRIX_FORK_EPOCH: 0
BELLATRIX_FORK_EPOCH: 0
TERMINAL_TOTAL_DIFFICULTY: 0
TERMINAL_TOTAL_DIFFICULTY: 0
# 0x0000...000 indicates that we use TERMINAL_TOTAL_DIFFICULTY instead of a block has to trigger the merge
# 0x0000...000 indicates that we use TERMINAL_TOTAL_DIFFICULTY instead of a block has to trigger the merge
# See also: https://eips.ethereum.org/EIPS/eip-3675
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
# NOTE: This is commented out because Nimbus warns us that it's an unrecognized parameter
# NOTE: This is commented out because Nimbus warns us that it's an unrecognized parameter
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
# Capella
CAPELLA_FORK_VERSION: 0x40000038
CAPELLA_FORK_EPOCH: 18446744073709551615
# Sharding
# Sharding
SHARDING_FORK_VERSION: 0x
13005555
SHARDING_FORK_VERSION: 0x
03001020
SHARDING_FORK_EPOCH: 18446744073709551615
SHARDING_FORK_EPOCH: 18446744073709551615
# Time parameters
# Time parameters
...
@@ -48,7 +51,7 @@ SHARD_COMMITTEE_PERIOD: 256
...
@@ -48,7 +51,7 @@ SHARD_COMMITTEE_PERIOD: 256
# It's very important that SECONDS_PER_ETH1_BLOCK * ETH1_FOLLOW_DISTANCE is a good amount of time, else
# It's very important that SECONDS_PER_ETH1_BLOCK * ETH1_FOLLOW_DISTANCE is a good amount of time, else
# jitter will cause the Beacon nodes to think they're far behind the Eth1 nodes and give up syncing
# jitter will cause the Beacon nodes to think they're far behind the Eth1 nodes and give up syncing
SECONDS_PER_ETH1_BLOCK: 10
SECONDS_PER_ETH1_BLOCK: 10
ETH1_FOLLOW_DISTANCE:
30
ETH1_FOLLOW_DISTANCE:
12
# Validator cycle
# Validator cycle
...
...
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