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
85cf74c1
Commit
85cf74c1
authored
Nov 08, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more cleanup
parent
fd9aab5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
13 deletions
+63
-13
besu_launcher.star
src/participant_network/el/besu/besu_launcher.star
+10
-13
erigon_launcher.star
src/participant_network/el/erigon/erigon_launcher.star
+53
-0
No files found.
src/participant_network/el/besu/besu_launcher.star
View file @
85cf74c1
...
@@ -23,6 +23,8 @@ UDP_DISCOVERY_PORT_ID = "udp-discovery"
...
@@ -23,6 +23,8 @@ UDP_DISCOVERY_PORT_ID = "udp-discovery"
ENGINE_HTTP_RPC_PORT_ID = "engineHttpRpc"
ENGINE_HTTP_RPC_PORT_ID = "engineHttpRpc"
ENGINE_WS_RPC_PORT_ID = "engineWsRpc"
ENGINE_WS_RPC_PORT_ID = "engineWsRpc"
# required for wait & fact maybe
# TODO see if it is otherwise remove
GET_NODE_INFO_MAX_RETRIES = 20
GET_NODE_INFO_MAX_RETRIES = 20
GET_NODE_INFO_TIME_BETWEEN_RETRIES = 1 * time.second
GET_NODE_INFO_TIME_BETWEEN_RETRIES = 1 * time.second
...
@@ -30,14 +32,14 @@ PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
...
@@ -30,14 +32,14 @@ PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
# TODO push this into shared_utils
# TODO push this into shared_utils
TCP_PROTOCOL = "TCP"
TCP_PROTOCOL = "TCP"
UDP_PROTOCOL = "
TC
P"
UDP_PROTOCOL = "
UD
P"
USED_PORTS = {
USED_PORTS = {
RPC_PORT_ID: new_port_spec(RPC_PORT_NUM, TCP_PROTOCOL),
RPC_PORT_ID: new_port_spec(RPC_PORT_NUM, TCP_PROTOCOL),
WS_PORT_ID: new_port_spec(WS_PORT_NUM, TCP_PROTOCOL),
WS_PORT_ID: new_port_spec(WS_PORT_NUM, TCP_PROTOCOL),
TCP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, TCP_PROTOCOL),
TCP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, TCP_PROTOCOL),
UDP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, UDP_PROTOCOL),
UDP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, UDP_PROTOCOL),
ENGINE_HTTP_RPC_PORT_ID: new_port_spec(ENGINE_
WS
_RPC_PORT_NUM, TCP_PROTOCOL)
ENGINE_HTTP_RPC_PORT_ID: new_port_spec(ENGINE_
HTTP
_RPC_PORT_NUM, TCP_PROTOCOL)
ENGINE_WS_RPC_PORT_ID: new_port_spec(ENGINE_WS_RPC_PORT_NUM, TCP_PROTOCOL)
ENGINE_WS_RPC_PORT_ID: new_port_spec(ENGINE_WS_RPC_PORT_NUM, TCP_PROTOCOL)
}
}
...
@@ -54,7 +56,8 @@ BESU_LOG_LEVELS = {
...
@@ -54,7 +56,8 @@ BESU_LOG_LEVELS = {
def launch(
def launch(
launcher,
network_id,
el_genesis_data,
service_id,
service_id,
image,
image,
participant_log_level,
participant_log_level,
...
@@ -64,7 +67,7 @@ def launch(
...
@@ -64,7 +67,7 @@ def launch(
log_level = get_client_log_level_or_default(participant_log_level, global_log_level, BESU_LOG_LEVELS)
log_level = get_client_log_level_or_default(participant_log_level, global_log_level, BESU_LOG_LEVELS)
service_config = get_service_config(
launcher
, image, network_id, existing_el_clients, log_level, extra_params)
service_config = get_service_config(
network_id, el_genesis_data
, image, network_id, existing_el_clients, log_level, extra_params)
service = add_service(service_id, service_config)
service = add_service(service_id, service_config)
...
@@ -80,9 +83,9 @@ def launch(
...
@@ -80,9 +83,9 @@ def launch(
)
)
def get_service_config(
launcher
, image, existing_el_clients, log_level, extra_params):
def get_service_config(
network_id, el_genesis_data
, image, existing_el_clients, log_level, extra_params):
network_id =
launcher.
network_id
network_id = network_id
genesis_data =
launcher.
el_genesis_data
genesis_data = el_genesis_data
if len(existing_el_clients) < 0:
if len(existing_el_clients) < 0:
fail("Besu node cannot be boot nodes, and due to a bug it requires two nodes to exist beforehand")
fail("Besu node cannot be boot nodes, and due to a bug it requires two nodes to exist beforehand")
...
@@ -137,9 +140,3 @@ def get_service_config(launcher, image, existing_el_clients, log_level, extra_pa
...
@@ -137,9 +140,3 @@ def get_service_config(launcher, image, existing_el_clients, log_level, extra_pa
# https://github.com/kurtosis-tech/kurtosis/pull/290
# https://github.com/kurtosis-tech/kurtosis/pull/290
)
)
def new_besu_el_client_launcher(el_genesis_data, network_id):
return struct(
el_genesis_data = el_genesis_data,
network_id = network_id,
)
src/participant_network/el/erigon/erigon_launcher.star
0 → 100644
View file @
85cf74c1
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")
module_io = import_types("github.com/kurtosis-tech/eth2-module/types.proto")
# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/home/erigon/execution-data"
GENESIS_DATA_MOUNT_DIRPATH = "/genesis"
RPC_PORT_NUM = 8545
WS_PORT_NUM = 8546
DISCOVERY_PORT_NUM = 30303
ENGINE_RPC_PORT_NUM = 8550
# Port IDs
RPC_PORT_ID = "rpc"
WS_PORT_ID = "ws"
TCP_DISCOVERY_PORT_ID = "tcp-discovery"
UDP_DISCOVERY_PORT_ID = "udp-discovery"
ENGINE_RPC_PORT_ID = "engine-rpc"
# required for wait & fact maybe
# TODO see if it is otherwise remove
EXPECTED_SECONDS_FOR_ERIGON_INIT = 10
EXPECTED_SECONDS_AFTER_NODE_START_UNTIL_HTTP_SERVER_IS_AVAILABLE = 20
GET_NODE_INFO_TIME_BETWEEN_RETRIES = 1 * time.second
PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
# TODO push this into shared_utils
TCP_PROTOCOL = "TCP"
UDP_PROTOCOL = "UDP"
USED_PORTS = {
RPC_PORT_ID: new_port_spec(RPC_PORT_NUM, TCP_PROTOCOL),
WS_PORT_ID: new_port_spec(WS_PORT_NUM, TCP_PROTOCOL),
TCP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, TCP_PROTOCOL),
UDP_DISCOVERY_PORT_ID: new_port_spec(DISCOVERY_PORT_NUM, UDP_PROTOCOL),
ENGINE_RPC_PORT_ID: new_port_spec(ENGINE_RPC_PORT_NUM, TCP_PROTOCOL)
}
ENTRYPOINT_ARGS = ["sh", "-c"]
ERIGON_LOG_LEVELS = {
module_io.GlobalClientLogLevel.error: "1",
module_io.GlobalClientLogLeve.warn: "2",
module_io.GlobalClientLogLeve.info: "3",
module_io.GlobalClientLogLevel.debug: "4",
module_io.GlobalClientLogLevel.trace: "5",
}
\ 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