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
Hide 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
module:
name: "github.com/kurtosis-tech/eth2-module"
\ No newline at end of file
name: "github.com/kurtosis-tech/eth2-module"
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")
def main():
network_params = new_network_params()
print("Launching participant network")
launch_participant_network(network_params)
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))))
launch_participant_network(num_participants, network_params)
def new_network_params():
# this is temporary till we get params working
...
...
@@ -15,4 +15,4 @@ def new_network_params():
network_id = "3151908",
deposit_contract_address = "0x4242424242424242424242424242424242424242",
seconds_per_slot = 12,
)
\ No newline at end of file
)
scripts/
build
.sh
→
scripts/
run
.sh
View file @
2d23d52d
...
...
@@ -13,4 +13,4 @@ root_dirpath="$(dirname "${script_dirpath}")"
if
!
"kurtosis"
"startosis"
"exec"
"
${
root_dirpath
}
"
;
then
echo
"Error: running the startosis script"
fi
\ No newline at end of file
fi
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
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")
def launch_participant_network(network_params):
num_participants = 2
def launch_participant_network(num_participants, network_params):
print("Generating cl validator key stores")
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(
config_yml_rel_filepath = config_yml_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"
def generate_cl_validator_keystores(
mnemonic,
num_nodes,
num_validators_per_node
,
):
num_validators_per_node
):
service_id = launch_prelaunch_data_generator(
{},
)
...
...
@@ -43,14 +43,11 @@ def generate_cl_validator_keystores(
all_output_dirpaths = []
all_sub_command_strs = []
# TODO Parallelize this to increase perf, which will require Docker exec operations not holding the Kurtosis mutex!
start_index = 0
stop_index = num_validators_per_node
for i in range(0, num_nodes):
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(
i,
)
for i in range(num_nodes):
output_dirpath = NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR.format(i)
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,
...
...
@@ -110,4 +107,4 @@ def generate_cl_validator_keystores(
keystore_files,
)
return result
\ No newline at end of file
return result
src/participant_network/prelaunch_data_generator/cl_validator_keystores/generate_keystores_result.star
View file @
2d23d52d
...
...
@@ -10,4 +10,4 @@ def new_generate_keystores_result(prysm_password_artifact_uuid, prysm_password_r
# Contains keystores-per-client-type for each node in the network
PerNodeKeystores = per_node_keystores
)
\ No newline at end of file
)
src/participant_network/prelaunch_data_generator/el_genesis/el_genesis_data.star
View file @
2d23d52d
...
...
@@ -4,8 +4,7 @@ def new_el_genesis_data(
geth_genesis_json_relative_filepath,
erigon_genesis_json_relative_filepath,
nethermind_genesis_json_relative_filepath,
besu_genesis_json_relative_filepath,
):
besu_genesis_json_relative_filepath):
return struct(
files_artifact_uuid = files_artifact_uuid,
jwt_secret_relative_filepath = jwt_secret_relative_filepath,
...
...
@@ -13,4 +12,4 @@ def new_el_genesis_data(
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,
)
\ No newline at end of file
)
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"
OUTPUT_DIRPATH_ON_GENERATOR = "/output"
GETH_GENESIS_FILENAME = "ge
th
.json"
GETH_GENESIS_FILENAME = "ge
nesis
.json"
ERIGON_GENESIS_FILENAME = "erigon.json"
NETHERMIND_GENESIS_FILENAME = "nethermind.json"
BESU_GENESIS_FILENAME = "besu.json"
...
...
@@ -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)
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
genesis_generation_config_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
...
...
@@ -128,4 +128,4 @@ def genesis_generation_config_template_data(network_id, deposit_contract_address
"NetworkId": network_id,
"DepositContractAddress": deposit_contract_address,
"UnixTimestamp": unix_timestamp,
}
\ No newline at end of file
}
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)
# This information was generated by:
...
...
@@ -42,4 +42,4 @@ new_prefunded_account(
"0x1F6298457C5d76270325B724Da5d1953923a6B88",
"7da08f856b5956d40a72968f93396f6acff17193f013e8053f6fbb6c08c194d6",
),
]
\ No newline at end of file
]
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-"
...
...
@@ -9,9 +9,7 @@ ENTRYPOINT_ARGS = [
]
# Launches a prelaunch data generator IMAGE, for use in various of the genesis generation
def launch_prelaunch_data_generator(
files_artifact_mountpoints,
):
def launch_prelaunch_data_generator(files_artifact_mountpoints):
service_config = get_service_config(files_artifact_mountpoints)
...
...
@@ -33,4 +31,4 @@ def get_service_config(
container_image_name = IMAGE,
entry_point_args = ENTRYPOINT_ARGS,
files_artifact_mount_dirpaths = files_artifact_mountpoints,
)
\ No newline at end of file
)
src/shared_utils/shared_utils.star
View file @
2d23d52d
def new_template_and_data(template, template_data_json):
return {"template": template, "template_data_json": template_data_json}
def path_join(*args):
joined_path = "/".join(args)
return joined_path.replace("//", "/")
def path_base(path):
split_path = path.split("/")
return split_path[-1]
def new_port_spec(number, 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
# `2**14` (= 16,384)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: {{ .NumValidatorKeysToPreregister }}
MIN_GENESIS_TIME: {{ .UnixTimestamp }}
GENESIS_FORK_VERSION: 0x1000
5555
GENESIS_DELAY:
12
0
GENESIS_FORK_VERSION: 0x1000
0038
GENESIS_DELAY:
30
0
# Forking
# ---------------------------------------------------------------
...
...
@@ -21,20 +21,23 @@ GENESIS_DELAY: 120
# are all hardcoded to zero.
# Altair
ALTAIR_FORK_VERSION: 0x
11005555
ALTAIR_FORK_VERSION: 0x
20000038
ALTAIR_FORK_EPOCH: 0
# Merge
BELLATRIX_FORK_VERSION: 0x
12005555
BELLATRIX_FORK_VERSION: 0x
30000038
BELLATRIX_FORK_EPOCH: 0
TERMINAL_TOTAL_DIFFICULTY: 0
# 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
# NOTE: This is commented out because Nimbus warns us that it's an unrecognized parameter
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
# Capella
CAPELLA_FORK_VERSION: 0x40000038
CAPELLA_FORK_EPOCH: 18446744073709551615
# Sharding
SHARDING_FORK_VERSION: 0x
13005555
SHARDING_FORK_VERSION: 0x
03001020
SHARDING_FORK_EPOCH: 18446744073709551615
# Time parameters
...
...
@@ -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
# jitter will cause the Beacon nodes to think they're far behind the Eth1 nodes and give up syncing
SECONDS_PER_ETH1_BLOCK: 10
ETH1_FOLLOW_DISTANCE:
30
ETH1_FOLLOW_DISTANCE:
12
# Validator cycle
...
...
@@ -69,4 +72,4 @@ CHURN_LIMIT_QUOTIENT: 65536
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: {{ .NetworkId }}
DEPOSIT_NETWORK_ID: {{ .NetworkId }}
DEPOSIT_CONTRACT_ADDRESS: {{ .DepositContractAddress }}
DEPOSIT_CONTRACT_ADDRESS: {{ .DepositContractAddress }}
\ No newline at end of file
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