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
67d8f6ac
Commit
67d8f6ac
authored
Nov 22, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
this looks good
parent
e35a0a11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
22 deletions
+22
-22
main.star
main.star
+22
-22
No files found.
main.star
View file @
67d8f6ac
load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_network.star", "launch_participant_network
")
participant_network = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/participant_network.star
")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "parse_input
")
parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star
")
load("github.com/kurtosis-tech/eth2-module/src/static_files/static_files.star", "GRAFANA_DASHBOARDS_CONFIG_DIRPATH", "GRAFANA_DASHBOARD_PROVIDERS_CONFIG_TEMPLATE_FILEPATH", "GRAFANA_DATASOURCE_CONFIG_TEMPLATE_FILEPATH", "PROMETHEUS_CONFIG_TEMPLATE_FILEPATH", "FORKMON_CONFIG_TEMPLATE_FILEPATH
")
static_files = import_module("github.com/kurtosis-tech/eth2-module/src/static_files/static_files.star
")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star", "PRE_FUNDED_ACCOUNTS
")
genesis_constants = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/prelaunch_data_generator/genesis_constants/genesis_constants.star
")
load("github.com/kurtosis-tech/eth2-module/src/transaction_spammer/transaction_spammer.star", "launch_transaction_spamme
r")
transaction_spammer = import_module("github.com/kurtosis-tech/eth2-module/src/transaction_spammer/transaction_spammer.sta
r")
load("github.com/kurtosis-tech/eth2-module/src/forkmon/forkmon_launcher.star", "launch_forkmon
")
forkmon = import_module("github.com/kurtosis-tech/eth2-module/src/forkmon/forkmon_launcher.star
")
load("github.com/kurtosis-tech/eth2-module/src/prometheus/prometheus_launcher.star", "launch_prometheus
")
prometheus = import_module("github.com/kurtosis-tech/eth2-module/src/prometheus/prometheus_launcher.star
")
load("github.com/kurtosis-tech/eth2-module/src/grafana/grafana_launcher.star", "launch_grafana
")
grafana =import_module("github.com/kurtosis-tech/eth2-module/src/grafana/grafana_launcher.star
")
load("github.com/kurtosis-tech/eth2-module/src/testnet_verifier/testnet_verifier.star", "run_synchronous_testnet_verification", "launch_testnet_verifie
r")
testnet_verifier = import_module("github.com/kurtosis-tech/eth2-module/src/testnet_verifier/testnet_verifier.sta
r")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...
@@ -20,18 +20,18 @@ FIRST_NODE_FINALIZATION_FACT = "cl-boot-finalization-fact"
...
@@ -20,18 +20,18 @@ FIRST_NODE_FINALIZATION_FACT = "cl-boot-finalization-fact"
HTTP_PORT_ID_FOR_FACT = "http"
HTTP_PORT_ID_FOR_FACT = "http"
def main(input_args):
def main(input_args):
input_args_with_right_defaults = module_io.ModuleInput(parse_input(input_args))
input_args_with_right_defaults = module_io.ModuleInput(parse_input
.parse_input
(input_args))
num_participants = len(input_args_with_right_defaults.participants)
num_participants = len(input_args_with_right_defaults.participants)
network_params = input_args_with_right_defaults.network_params
network_params = input_args_with_right_defaults.network_params
grafana_datasource_config_template = read_file(GRAFANA_DATASOURCE_CONFIG_TEMPLATE_FILEPATH)
grafana_datasource_config_template = read_file(
static_files.
GRAFANA_DATASOURCE_CONFIG_TEMPLATE_FILEPATH)
grafana_dashboards_config_template = read_file(GRAFANA_DASHBOARD_PROVIDERS_CONFIG_TEMPLATE_FILEPATH)
grafana_dashboards_config_template = read_file(
static_files.
GRAFANA_DASHBOARD_PROVIDERS_CONFIG_TEMPLATE_FILEPATH)
prometheus_config_template = read_file(PROMETHEUS_CONFIG_TEMPLATE_FILEPATH)
prometheus_config_template = read_file(
static_files.
PROMETHEUS_CONFIG_TEMPLATE_FILEPATH)
print("Read the prometheus, grafana templates")
print("Read the prometheus, grafana templates")
print("Launching participant network with {0} participants and the following network params {1}".format(num_participants, network_params))
print("Launching participant network with {0} participants and the following network params {1}".format(num_participants, network_params))
all_participants, cl_gensis_timestamp = launch_participant_network(input_args_with_right_defaults.participants, network_params, input_args_with_right_defaults.global_client_log_level)
all_participants, cl_gensis_timestamp =
participant_network.
launch_participant_network(input_args_with_right_defaults.participants, network_params, input_args_with_right_defaults.global_client_log_level)
all_el_client_contexts = []
all_el_client_contexts = []
all_cl_client_contexts = []
all_cl_client_contexts = []
...
@@ -44,35 +44,35 @@ def main(input_args):
...
@@ -44,35 +44,35 @@ def main(input_args):
return
return
print("Launching transaction spammer")
print("Launching transaction spammer")
launch_transaction_spammer(
PRE_FUNDED_ACCOUNTS, all_el_client_contexts[0])
transaction_spammer.launch_transaction_spammer(genesis_constants.
PRE_FUNDED_ACCOUNTS, all_el_client_contexts[0])
print("Succesfully launched transaction spammer")
print("Succesfully launched transaction spammer")
# We need a way to do time.sleep
# We need a way to do time.sleep
# TODO add code that waits for CL genesis
# TODO add code that waits for CL genesis
print("Launching forkmon")
print("Launching forkmon")
forkmon_config_template = read_file(FORKMON_CONFIG_TEMPLATE_FILEPATH)
forkmon_config_template = read_file(
static_files.
FORKMON_CONFIG_TEMPLATE_FILEPATH)
launch_forkmon(forkmon_config_template, all_cl_client_contexts, cl_gensis_timestamp, network_params.seconds_per_slot, network_params.slots_per_epoch)
forkmon.
launch_forkmon(forkmon_config_template, all_cl_client_contexts, cl_gensis_timestamp, network_params.seconds_per_slot, network_params.slots_per_epoch)
print("Succesfully launched forkmon")
print("Succesfully launched forkmon")
print("Launching prometheus...")
print("Launching prometheus...")
prometheus_private_url = launch_prometheus(
prometheus
.prometheus
_private_url = launch_prometheus(
prometheus_config_template,
prometheus_config_template,
all_cl_client_contexts,
all_cl_client_contexts,
)
)
print("Successfully launched Prometheus")
print("Successfully launched Prometheus")
print("Launching grafana...")
print("Launching grafana...")
launch_grafana(grafana_datasource_config_template, grafana_dashboards_config_template, prometheus_private_url)
grafana.
launch_grafana(grafana_datasource_config_template, grafana_dashboards_config_template, prometheus_private_url)
print("Succesfully launched grafana")
print("Succesfully launched grafana")
if input_args_with_right_defaults.wait_for_verifications:
if input_args_with_right_defaults.wait_for_verifications:
print("Running synchrnous testnet verifier")
print("Running synchrnous testnet verifier")
run_synchronous_testnet_verification(input_args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
testnet_verifier.
run_synchronous_testnet_verification(input_args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
print("Verification succeeded")
print("Verification succeeded")
else:
else:
print("Running asynchronous verification")
print("Running asynchronous verification")
launch_testnet_verifier(input_args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
testnet_verifier.
launch_testnet_verifier(input_args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
print("Succesfully launched asynchronous verifier")
print("Succesfully launched asynchronous verifier")
if input_args_with_right_defaults.wait_for_finalization:
if input_args_with_right_defaults.wait_for_finalization:
print("Waiting for the first finalized epoch")
print("Waiting for the first finalized epoch")
...
@@ -85,7 +85,7 @@ def main(input_args):
...
@@ -85,7 +85,7 @@ def main(input_args):
grafana_info = module_io.GrafanaInfo(
grafana_info = module_io.GrafanaInfo(
dashboard_path = GRAFANA_DASHBOARD_PATH_URL,
dashboard_path =
static_files.
GRAFANA_DASHBOARD_PATH_URL,
user = GRAFANA_USER,
user = GRAFANA_USER,
password = GRAFANA_PASSWORD
password = GRAFANA_PASSWORD
)
)
...
...
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