Commit c6b5c340 authored by Gyanendra Mishra's avatar Gyanendra Mishra

loadstar -> lodestar

parent 8fe60808
...@@ -52,8 +52,8 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https: ...@@ -52,8 +52,8 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
- [x] lighthouse DEMO - [x] lighthouse DEMO
- [x] facts and waits - [x] facts and waits
- [x] framework TESTED - [x] framework TESTED
- [ ] loadstar - [ ] lodestar
- [ ] facts and waits - [x] facts and waits
- [x] framework - [x] framework
- [ ] nymbus - [ ] nymbus
- [ ] facts and waits - [ ] facts and waits
......
...@@ -38,6 +38,8 @@ PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" ...@@ -38,6 +38,8 @@ PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
TCP_PROTOCOL = "TCP" TCP_PROTOCOL = "TCP"
UDP_PROTOCOL = "UDP" UDP_PROTOCOL = "UDP"
BEACON_ENR_FACT_NAME = "beacon-enr-fact"
BEACON_HEALTH_FACT_NAME = "beacon-health-fact"
# TODO verify this - why do we pass the same used ports to both # TODO verify this - why do we pass the same used ports to both
USED_PORTS = { USED_PORTS = {
...@@ -49,7 +51,7 @@ USED_PORTS = { ...@@ -49,7 +51,7 @@ USED_PORTS = {
} }
LOADSTAR_LOG_LEVELS = { LODESTAR_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "error", module_io.GlobalClientLogLevel.error: "error",
module_io.GlobalClientLogLevel.warn: "warn", module_io.GlobalClientLogLevel.warn: "warn",
module_io.GlobalClientLogLevel.info: "info", module_io.GlobalClientLogLevel.info: "info",
...@@ -74,7 +76,7 @@ def launch( ...@@ -74,7 +76,7 @@ def launch(
beacon_node_service_id = "{0}-{1}".format(service_id, BEACON_SUFFIX_SERVICE_ID) beacon_node_service_id = "{0}-{1}".format(service_id, BEACON_SUFFIX_SERVICE_ID)
validator_node_service_id = "{0}-{1}".format(service_id, VALIDATOR_SUFFIX_SERVICE_ID) validator_node_service_id = "{0}-{1}".format(service_id, VALIDATOR_SUFFIX_SERVICE_ID)
log_level = get_client_log_level_or_default(participant_log_level, global_log_level, LOADSTAR_LOG_LEVELS) log_level = get_client_log_level_or_default(participant_log_level, global_log_level, LODESTAR_LOG_LEVELS)
# Launch Beacon node # Launch Beacon node
beacon_service_config = get_beacon_service_config( beacon_service_config = get_beacon_service_config(
...@@ -91,7 +93,11 @@ def launch( ...@@ -91,7 +93,11 @@ def launch(
beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID] beacon_http_port = beacon_service.ports[BEACON_HTTP_PORT_ID]
# TODO add facts & waits # TODO the Golang code checks whether its 200, 206 or 503, maybe add that
# TODO this fact might start breaking if the endpoint requires a leading slash, currently breaks with a leading slash
define_fact(service_id = beacon_node_service_id, fact_name = BEACON_HEALTH_FACT_NAME, fact_recipe = struct(method= "GET", endpoint = "eth/v1/node/health", content_type = "application/json", port_id = BEACON_HTTP_PORT_ID))
wait(service_id = beacon_node_service_id, fact_name = BEACON_HEALTH_FACT_NAME)
# Launch validator node # Launch validator node
beacon_http_url = "http://{0}:{1}".format(beacon_service.ip_address, beacon_http_port.number) beacon_http_url = "http://{0}:{1}".format(beacon_service.ip_address, beacon_http_port.number)
...@@ -111,8 +117,9 @@ def launch( ...@@ -111,8 +117,9 @@ def launch(
# TODO add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module # TODO add validator availability using the validator API: https://ethereum.github.io/beacon-APIs/?urls.primaryName=v1#/ValidatorRequiredApi | from eth2-merge-kurtosis-module
# TODO get node identity using facts and waits # TODO this fact might start breaking if the endpoint requires a leading slash, currently breaks with a leading slash
beacon_node_enr = "" define_fact(service_id = beacon_node_service_id, fact_name = BEACON_ENR_FACT_NAME, fact_recipe = struct(method= "GET", endpoint = "eth/v1/node/identity", field_extractor = ".data.enr", content_type = "application/json", port_id = BEACON_HTTP_PORT_ID))
beacon_node_enr = wait(service_id = beacon_node_service_id, fact_name = BEACON_ENR_FACT_NAME)
beacon_metrics_port = beacon_service.ports[BEACON_METRICS_PORT_ID] beacon_metrics_port = beacon_service.ports[BEACON_METRICS_PORT_ID]
beacon_metrics_url = "{0}:{1}".format(beacon_service.ip_address, beacon_metrics_port.number) beacon_metrics_url = "{0}:{1}".format(beacon_service.ip_address, beacon_metrics_port.number)
...@@ -123,7 +130,7 @@ def launch( ...@@ -123,7 +130,7 @@ def launch(
nodes_metrics_info = [beacon_node_metrics_info] nodes_metrics_info = [beacon_node_metrics_info]
result = new_cl_client_context( result = new_cl_client_context(
"loadstar", "lodestar",
beacon_node_enr, beacon_node_enr,
beacon_service.ip_address, beacon_service.ip_address,
HTTP_PORT_NUM, HTTP_PORT_NUM,
...@@ -266,7 +273,7 @@ def get_validator_service_config( ...@@ -266,7 +273,7 @@ def get_validator_service_config(
) )
def new_loadstar_launcher(cl_genesi_data): def new_lodestar_launcher(cl_genesi_data):
return struct( return struct(
cl_genesi_data = cl_genesi_data, cl_genesi_data = cl_genesi_data,
) )
\ No newline at end of file
...@@ -14,6 +14,7 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/el/nethermind ...@@ -14,6 +14,7 @@ load("github.com/kurtosis-tech/eth2-module/src/participant_network/el/nethermind
load("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/lighthouse/lighthouse_launcher.star", launch_lighthouse="launch", "new_lighthouse_launcher") load("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/lighthouse/lighthouse_launcher.star", launch_lighthouse="launch", "new_lighthouse_launcher")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/cl/lodestar/lodestar_launcher.star", launch_lodestar="launch", "new_lodestar_launcher")
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/prelaunch_data_generator/genesis_constants/genesis_constants.star", "PRE_FUNDED_ACCOUNTS")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant.star", "new_participant") load("github.com/kurtosis-tech/eth2-module/src/participant_network/participant.star", "new_participant")
...@@ -75,7 +76,6 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -75,7 +76,6 @@ def launch_participant_network(participants, network_params, global_log_level):
print("Uploaded GETH files succesfully, launching EL participants") print("Uploaded GETH files succesfully, launching EL participants")
el_launchers = { el_launchers = {
# TODO Allow for other types here
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}, 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},
module_io.ELClientType.besu : {"launcher": new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": launch_besu}, module_io.ELClientType.besu : {"launcher": new_besu_launcher(network_params.network_id, el_genesis_data), "launch_method": launch_besu},
module_io.ELClientType.erigon : {"launcher": new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": launch_erigon}, module_io.ELClientType.erigon : {"launcher": new_erigon_launcher(network_params.network_id, el_genesis_data), "launch_method": launch_erigon},
...@@ -127,7 +127,8 @@ def launch_participant_network(participants, network_params, global_log_level): ...@@ -127,7 +127,8 @@ def launch_participant_network(participants, network_params, global_log_level):
cl_launchers = { cl_launchers = {
# TODO Allow for other types here # TODO Allow for other types here
module_io.CLClientType.lighthouse : {"launcher": new_lighthouse_launcher(cl_genesis_data), "launch_method": launch_lighthouse} module_io.CLClientType.lighthouse : {"launcher": new_lighthouse_launcher(cl_genesis_data), "launch_method": launch_lighthouse},
module_io.CLClientType.lodestar: {"launcher": new_lodestar_launcher(cl_genesis_data), "launch_method": launch_lodestar}
} }
all_cl_client_contexts = [] all_cl_client_contexts = []
......
...@@ -54,7 +54,7 @@ enum CLClientType { ...@@ -54,7 +54,7 @@ enum CLClientType {
teku = 1; teku = 1;
nimbus = 2; nimbus = 2;
prysm = 3; prysm = 3;
loadstar = 4; lodestar = 4;
} }
message BuilderNetworkParams { message BuilderNetworkParams {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment