Commit 765334f7 authored by Gyanendra Mishra's avatar Gyanendra Mishra

fix geth

parent 12215c2e
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
### Fixes ### Fixes
- Renamed `num_validators_per_keynode` to `num_validator_keys_per_node` - Renamed `num_validators_per_keynode` to `num_validator_keys_per_node`
- Moved away from `load` infavor of `import_module`
# 0.0.1 # 0.0.1
......
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "path_join", "TCP_PROTOCOL", "UDP_PROTOCOL") shared_utils = import_module("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star")
load("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star", "get_client_log_level_or_default") parse_input = import_module("github.com/kurtosis-tech/eth2-module/src/module_io/parse_input.star")
load("github.com/kurtosis-tech/eth2-module/src/participant_network/el/el_client_context.star", "new_el_client_context") el_client_context = import_module("github.com/kurtosis-tech/eth2-module/src/participant_network/el/el_client_context.star")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto") module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
...@@ -35,11 +35,11 @@ GETH_ACCOUNT_PASSWORDS_FILE = "/tmp/password.txt" # Importing an account to ...@@ -35,11 +35,11 @@ GETH_ACCOUNT_PASSWORDS_FILE = "/tmp/password.txt" # Importing an account to
PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
USED_PORTS = { USED_PORTS = {
RPC_PORT_ID: new_port_spec(RPC_PORT_NUM, TCP_PROTOCOL), RPC_PORT_ID: shared_utils.new_port_spec(RPC_PORT_NUM, shared_utils.TCP_PROTOCOL),
WS_PORT_ID: new_port_spec(WS_PORT_NUM, TCP_PROTOCOL), WS_PORT_ID: shared_utils.new_port_spec(WS_PORT_NUM, shared_utils.TCP_PROTOCOL),
TCP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, TCP_PROTOCOL), TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL),
UDP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, UDP_PROTOCOL), UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL),
ENGINE_RPC_PORT_ID: new_port_spec(ENGINE_RPC_PORT_NUM, TCP_PROTOCOL) ENGINE_RPC_PORT_ID: shared_utils.new_port_spec(ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL)
} }
ENTRYPOINT_ARGS = ["sh", "-c"] ENTRYPOINT_ARGS = ["sh", "-c"]
...@@ -66,7 +66,7 @@ def launch( ...@@ -66,7 +66,7 @@ def launch(
extra_params): extra_params):
log_level = get_client_log_level_or_default(participant_log_level, global_log_level, VERBOSITY_LEVELS) log_level = pars_input.get_client_log_level_or_default(participant_log_level, global_log_level, VERBOSITY_LEVELS)
config = get_config(launcher.network_id, launcher.el_genesis_data, launcher.prefunded_geth_keys_artifact_uuid, config = get_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) launcher.prefunded_account_info, image, existing_el_clients, log_level, extra_params)
...@@ -79,7 +79,7 @@ def launch( ...@@ -79,7 +79,7 @@ def launch(
define_fact(service_id = service_id, fact_name = ENODE_FACT_NAME, fact_recipe = struct(method= "POST", endpoint = "", field_extractor = ".result.enode", body = '{"method":"admin_nodeInfo","params":[],"id":1,"jsonrpc":"2.0"}', content_type = "application/json", port_id = RPC_PORT_ID)) define_fact(service_id = service_id, fact_name = ENODE_FACT_NAME, fact_recipe = struct(method= "POST", endpoint = "", field_extractor = ".result.enode", body = '{"method":"admin_nodeInfo","params":[],"id":1,"jsonrpc":"2.0"}', content_type = "application/json", port_id = RPC_PORT_ID))
enode = wait(service_id = service_id, fact_name = ENODE_FACT_NAME) enode = wait(service_id = service_id, fact_name = ENODE_FACT_NAME)
return new_el_client_context( return el_client_context.new_el_client_context(
"geth", "geth",
enr, enr,
enode, enode,
...@@ -91,8 +91,8 @@ def launch( ...@@ -91,8 +91,8 @@ def launch(
def get_config(network_id, genesis_data, prefunded_geth_keys_artifact_uuid, prefunded_account_info, image, existing_el_clients, verbosity_level, extra_params): def get_config(network_id, genesis_data, prefunded_geth_keys_artifact_uuid, prefunded_account_info, image, existing_el_clients, verbosity_level, extra_params):
genesis_json_filepath_on_client = path_join(GENESIS_DATA_MOUNT_DIRPATH, genesis_data.geth_genesis_json_relative_filepath) genesis_json_filepath_on_client = shared_utils.path_join(GENESIS_DATA_MOUNT_DIRPATH, genesis_data.geth_genesis_json_relative_filepath)
jwt_secret_json_filepath_on_client = path_join(GENESIS_DATA_MOUNT_DIRPATH, genesis_data.jwt_secret_relative_filepath) jwt_secret_json_filepath_on_client = shared_utils.path_join(GENESIS_DATA_MOUNT_DIRPATH, genesis_data.jwt_secret_relative_filepath)
account_addresses_to_unlock = [] account_addresses_to_unlock = []
for prefunded_account in prefunded_account_info: for prefunded_account in prefunded_account_info:
......
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