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
9f319ceb
Commit
9f319ceb
authored
Nov 09, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better
parent
1b82e6df
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
41 deletions
+36
-41
main.star
main.star
+1
-1
lighthouse_launcher.star
...articipant_network/cl/lighthouse/lighthouse_launcher.star
+10
-11
loadstar_launcher.star
...ipant_network/cl/loadstar_launcher/loadstar_launcher.star
+5
-5
besu_launcher.star
src/participant_network/el/besu/besu_launcher.star
+3
-3
erigon_launcher.star
src/participant_network/el/erigon/erigon_launcher.star
+3
-3
geth_launcher.star
src/participant_network/el/geth/geth_launcher.star
+10
-14
nethermind_launcher.star
...articipant_network/el/nethermind/nethermind_launcher.star
+3
-3
participant_network.star
src/participant_network/participant_network.star
+1
-1
No files found.
main.star
View file @
9f319ceb
...
...
@@ -7,7 +7,7 @@ def main(input_args):
input_args_with_right_defaults = module_io.ModuleInput(parse_input(input_args))
num_participants = len(input_args_with_right_defaults.participants)
print("Launching participant network with {0} participants and the following network params {1}".format(num_participants, input_args_with_right_defaults.network_params))
all_participants, cl_gensis_timestamp = launch_participant_network(input_args_with_right_defaults.participants, input_args_with_right_defaults.network_params, input_args_with_right_defaults.global_log_level)
all_participants, cl_gensis_timestamp = launch_participant_network(input_args_with_right_defaults.participants, input_args_with_right_defaults.network_params, input_args_with_right_defaults.global_
client_
log_level)
print(all_participants)
print(cl_gensis_timestamp)
grafana_info = module_io.GrafanaInfo(
...
...
src/participant_network/cl/lighthouse/lighthouse_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join", "path_dir")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/cl/cl_client_context.star", "new_cl_client_context")
load("github.com/kurtosis-tech/eth2-module/src/cl/cl_node_metrics_info.star", "new_cl_node_metrics_info")
load("github.com/kurtosis-tech/eth2-module/src/mev_boost/mev_boost_context.star", "mev_boost_endpoint")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
cl/cl_client_context.star", "new_cl_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
cl/cl_node_metrics_info.star", "new_cl_node_metrics_info")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
mev_boost/mev_boost_context.star", "mev_boost_endpoint")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -66,8 +66,8 @@ VALIDATOR_USED_PORTS = {
LIGHTHOUSE_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLeve.warn: "warn",
module_io.GlobalClientLogLeve.info: "info",
module_io.GlobalClientLogLeve
l
.warn: "warn",
module_io.GlobalClientLogLeve
l
.info: "info",
module_io.GlobalClientLogLevel.debug: "debug",
module_io.GlobalClientLogLevel.trace: "trace",
}
...
...
@@ -149,11 +149,11 @@ def launch(
def get_beacon_service_config(
genesis_data,
image
image
,
boot_cl_client_ctx,
el_client_ctx,
mev_boost_context,
log_level
log_level
,
extra_params):
el_client_engine_rpc_url_str = "http://%v:%v".format(
...
...
@@ -216,9 +216,8 @@ def get_beacon_service_config(
cmd_args.append(mev_boost_endpoint(mev_boost_context))
if len(extra_params) > 0
{
if len(extra_params) > 0
:
cmd_args.extend(extra_params)
}
return struct(
container_image_name = image,
...
...
@@ -244,7 +243,7 @@ def get_validator_service_config(
extra_params):
# For some reason, Lighthouse takes in the parent directory of the config file (rather than the path to the config file itself)
genesis_config_parent_dirpath_on_client = path_join(GENESIS_DATA_MOUNTPOINT_ON_CLIENTS, path_dir(
launcher.genesisData.GetConfigYMLRelativeFilepath()
))
genesis_config_parent_dirpath_on_client = path_join(GENESIS_DATA_MOUNTPOINT_ON_CLIENTS, path_dir(
genesis_data.config_yml_rel_filepath
))
validator_keys_dirpath = path_join(VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENTS, node_keystore_files.RawKeysRelativeDirpath)
validator_secrets_dirpath = path_join(VALIDATOR_KEYS_MOUNTPOINT_ON_CLIENTS, node_keystore_files.RawSecretsRelativeDirpath)
...
...
@@ -296,7 +295,7 @@ def get_validator_service_config(
def new_lighthouse
s
_launcher(cl_genesi_data):
def new_lighthouse_launcher(cl_genesi_data):
return struct(
cl_genesi_data = cl_genesi_data,
)
\ No newline at end of file
src/participant_network/cl/loadstar_launcher/loadstar_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join", "path_dir")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/cl/cl_client_context.star", "new_cl_client_context")
load("github.com/kurtosis-tech/eth2-module/src/cl/cl_node_metrics_info.star", "new_cl_node_metrics_info")
load("github.com/kurtosis-tech/eth2-module/src/mev_boost/mev_boost_context.star", "mev_boost_endpoint")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
cl/cl_client_context.star", "new_cl_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
cl/cl_node_metrics_info.star", "new_cl_node_metrics_info")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
mev_boost/mev_boost_context.star", "mev_boost_endpoint")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -51,8 +51,8 @@ USED_PORTS = {
LOADSTAR_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLeve.warn: "warn",
module_io.GlobalClientLogLeve.info: "info",
module_io.GlobalClientLogLeve
l
.warn: "warn",
module_io.GlobalClientLogLeve
l
.info: "info",
module_io.GlobalClientLogLevel.debug: "debug",
module_io.GlobalClientLogLevel.trace: "trace",
}
...
...
src/participant_network/el/besu/besu_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/el/el_client_context.star", "new_el_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
el/el_client_context.star", "new_el_client_context")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -47,8 +47,8 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
BESU_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLeve.warn: "WARN",
module_io.GlobalClientLogLeve.info: "INFO",
module_io.GlobalClientLogLeve
l
.warn: "WARN",
module_io.GlobalClientLogLeve
l
.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE",
}
...
...
src/participant_network/el/erigon/erigon_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/el/el_client_context.star", "new_el_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
el/el_client_context.star", "new_el_client_context")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -46,8 +46,8 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
ERIGON_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "1",
module_io.GlobalClientLogLeve.warn: "2",
module_io.GlobalClientLogLeve.info: "3",
module_io.GlobalClientLogLeve
l
.warn: "2",
module_io.GlobalClientLogLeve
l
.info: "3",
module_io.GlobalClientLogLevel.debug: "4",
module_io.GlobalClientLogLevel.trace: "5",
}
...
...
src/participant_network/el/geth/geth_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/el/el_client_context.star", "new_el_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
el/el_client_context.star", "new_el_client_context")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -33,7 +33,7 @@ KEYSTORE_DIRPATH_ON_CLIENT_CONTAINER = EXECUTION_DATA_DIRPATH_ON_CLIENT_CON
EXPECTED_SECONDS_FOR_GETH_INIT = 10
EXPECTED_SECONDS_PER_KEY_IMPORT = 8
EXPECTED_SECONDS_AFTER_NODE_START_UNTIL_HTTP_SERVER_IS_AVAILABLE = 20
GET_NODE_INFO_TIME_BETWEEN_RETRIES = 1 * time.
S
econd
GET_NODE_INFO_TIME_BETWEEN_RETRIES = 1 * time.
s
econd
GETH_ACCOUNT_PASSWORD = "password" # Password that the Geth accounts will be locked with
GETH_ACCOUNT_PASSWORDS_FILE = "/tmp/password.txt" # Importing an account to
...
...
@@ -56,8 +56,8 @@ ENTRYPOINT_ARGS = ["sh", "-c"]
VERBOSITY_LEVELS = {
module_io.GlobalClientLogLevel.error: "1",
module_io.GlobalClientLogLeve.warn: "2",
module_io.GlobalClientLogLeve.info: "3",
module_io.GlobalClientLogLeve
l
.warn: "2",
module_io.GlobalClientLogLeve
l
.info: "3",
module_io.GlobalClientLogLevel.debug: "4",
module_io.GlobalClientLogLevel.trace: "5",
}
...
...
@@ -73,7 +73,7 @@ def launch(
extra_params):
log_level = get_client_log_level_or_default(participant_log_level, global_log_level,
ERIGON_LOG
_LEVELS)
log_level = get_client_log_level_or_default(participant_log_level, global_log_level,
VERBOSITY
_LEVELS)
service_config = get_service_config(launcher.network_id, launcher.el_genesis_data, launcher.prefunded_geth_keys_artifact_uuid,
launcher.prefunded_account_info, image, existing_el_clients, log_level, extra_params)
...
...
@@ -123,7 +123,7 @@ def get_service_config(network_id, genesis_data, prefunded_geth_keys_artifact_uu
launch_node_cmd_args = [
"geth",
"--verbosity=" + verbosity
L
evel,
"--verbosity=" + verbosity
_l
evel,
"--unlock=" + accounts_to_unlock_str,
"--password=" + GETH_ACCOUNT_PASSWORDS_FILE,
"--datadir=" + EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER,
...
...
@@ -142,7 +142,7 @@ def get_service_config(network_id, genesis_data, prefunded_geth_keys_artifact_uu
"--ws.origins=*",
"--allow-insecure-unlock",
"--nat=extip:" + PRIVATE_IP_ADDRESS_PLACEHOLDER,
"--verbosity=" + verbosity
L
evel,
"--verbosity=" + verbosity
_l
evel,
"--authrpc.port={0}".format(ENGINE_RPC_PORT_NUM),
"--authrpc.addr=0.0.0.0",
"--authrpc.vhosts=*",
...
...
@@ -151,19 +151,17 @@ def get_service_config(network_id, genesis_data, prefunded_geth_keys_artifact_uu
]
bootnode_enode = ""
if len(existing_el_clients) > 0
{
if len(existing_el_clients) > 0
:
bootnode_context = existing_el_clients[0]
bootnode_enode = bootnode_context.enode
}
launch_node_cmd_args.append(
launch_node_cmd_args,
'--bootnodes="%s"'.format(bootnode_enode),
)
if len(extraParams) > 0 {
launch_node_cmd_args.extend(extraParams)
}
if len(extra_params) > 0:
launch_node_cmd_args.extend(extra_params)
launch_node_cmd_str = " ".join(launch_node_cmd_args)
...
...
@@ -175,8 +173,6 @@ def get_service_config(network_id, genesis_data, prefunded_geth_keys_artifact_uu
]
command_str = " && ".join(subcommand_strs)
return struct(
container_image_name = image,
used_ports = USED_PORTS,
...
...
src/participant_network/el/nethermind/nethermind_launcher.star
View file @
9f319ceb
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default")
load("github.com/kurtosis-tech/eth2-module/src/el/el_client_context.star", "new_el_client_context")
load("github.com/kurtosis-tech/eth2-module/src/
participant_network/
el/el_client_context.star", "new_el_client_context")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
...
@@ -42,8 +42,8 @@ USED_PORTS = {
NETHERMIND_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "ERROR",
module_io.GlobalClientLogLeve.warn: "WARN",
module_io.GlobalClientLogLeve.info: "INFO",
module_io.GlobalClientLogLeve
l
.warn: "WARN",
module_io.GlobalClientLogLeve
l
.info: "INFO",
module_io.GlobalClientLogLevel.debug: "DEBUG",
module_io.GlobalClientLogLevel.trace: "TRACE",
}
...
...
src/participant_network/participant_network.star
View file @
9f319ceb
...
...
@@ -71,7 +71,7 @@ def launch_participant_network(participants, network_params, global_log_level):
el_launchers = {
# TODO Allow for other types here
module_io.ELClientType.geth : {"launcher": new_geth_launcher(
el_genesis_data, geth_prefunded_keys_artifact_id, PRE_FUNDED_ACCOUNTS, network_params.network_id
), "launch_method": launch_geth}
module_io.ELClientType.geth : {"launcher": new_geth_launcher(
network_params.network_id, el_genesis_data, geth_prefunded_keys_artifact_id, PRE_FUNDED_ACCOUNTS
), "launch_method": launch_geth}
}
all_el_client_contexts = []
...
...
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