Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into gyani/counts
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa authored Jul 10, 2023
2 parents 6b43288 + 4ba5bed commit f3ea1c8
Show file tree
Hide file tree
Showing 22 changed files with 116 additions and 137 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ For example, this `eth-network-params.json` adds a second node, running a differ
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 12,
"slots_per_epoch": 32,
"genesis_delay": 10,
"capella_fork_epoch": 2,
"genesis_delay": 120,
"deneb_fork_epoch": 500
},
"global_client_log_level": "info"
Expand Down
6 changes: 3 additions & 3 deletions default-network-params.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"el_extra_params": [],
"validator_extra_params": [],
"builder_network_params": null,
"count": 5
"count": 1
}],
"network_params":{
"preregistered_validator_keys_mnemonic": "giant issue aisle success illegal bike spike question tent bar rely arctic volcano long crawl hungry vocal artwork sniff fantasy very lucky have athlete",
Expand All @@ -19,7 +19,7 @@
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 12,
"genesis_delay": 120,
"capella_fork_epoch": 5
"deneb_fork_epoch": 5
},
"global_client_log_level": "info"
}
}
2 changes: 1 addition & 1 deletion kurtosis.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
name: "github.com/kurtosis-tech/eth-network-package"
name: "github.com/barnabasbusa/eth-network-package"
8 changes: 4 additions & 4 deletions main.star
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
participant_network = import_module("github.com/kurtosis-tech/eth-network-package/src/participant_network.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
participant_network = import_module("github.com/barnabasbusa/eth-network-package/src/participant_network.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")

static_files = import_module("github.com/kurtosis-tech/eth-network-package/static_files/static_files.star")
genesis_constants = import_module("github.com/kurtosis-tech/eth-network-package/src/prelaunch_data_generator/genesis_constants/genesis_constants.star")
static_files = import_module("github.com/barnabasbusa/eth-network-package/static_files/static_files.star")
genesis_constants = import_module("github.com/barnabasbusa/eth-network-package/src/prelaunch_data_generator/genesis_constants/genesis_constants.star")

def run(plan, args):
args_with_right_defaults = input_parser.parse_input(args)
Expand Down
9 changes: 2 additions & 7 deletions package_io/input_parser.star
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ def parse_input(input_args):
if result["network_params"]["genesis_delay"] == 0:
fail("genesis_delay is 0 needs to be > 0 ")

if result["network_params"]["capella_fork_epoch"] == 0:
fail("capella_fork_epoch is 0 needs to be > 0 ")

if result["network_params"]["deneb_fork_epoch"] == 0:
fail("deneb_fork_epoch is 0 needs to be > 0 ")

Expand Down Expand Up @@ -123,8 +120,7 @@ def parse_input(input_args):
deposit_contract_address=result["network_params"]["deposit_contract_address"],
seconds_per_slot=result["network_params"]["seconds_per_slot"],
slots_per_epoch=result["network_params"]["slots_per_epoch"],
capella_fork_epoch=result["network_params"]["capella_fork_epoch"],
deneb_fork_epoch=result["network_params"]["deneb_fork_epoch"],
deneb_fork_epoch=result["network_params"]["deneb_fork_epoch"],
genesis_delay=result["network_params"]["genesis_delay"]
),
wait_for_finalization=result["wait_for_finalization"],
Expand Down Expand Up @@ -162,8 +158,7 @@ def default_network_params():
"deposit_contract_address": "0x4242424242424242424242424242424242424242",
"seconds_per_slot": 12,
"slots_per_epoch": 32,
"genesis_delay": 10,
"capella_fork_epoch": 2,
"genesis_delay": 120,
# arbitrarily large while we sort out https://github.com/kurtosis-tech/eth-network-package/issues/42
# this will take 53~ hoours for now
"deneb_fork_epoch": 500,
Expand Down
10 changes: 5 additions & 5 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_metrics_info.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_metrics_info.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

LIGHTHOUSE_BINARY_COMMAND = "lighthouse"

Expand Down
22 changes: 11 additions & 11 deletions src/cl/lodestar/lodestar_launcher.star
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_ready_conditions.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_ready_conditions.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

CONSENSUS_DATA_DIRPATH_ON_SERVICE_CONTAINER = "/consensus-data"
GENESIS_DATA_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/genesis"
Expand All @@ -13,14 +13,14 @@ VALIDATOR_KEYS_MOUNT_DIRPATH_ON_SERVICE_CONTAINER = "/validator-keys"
# Port IDs
TCP_DISCOVERY_PORT_ID = "tcp-discovery"
UDP_DISCOVERY_PORT_ID = "udp-discovery"
HTTP_PORT_ID = "http"
METRICS_PORT_ID = "metrics"
HTTP_PORT_ID = "http"
METRICS_PORT_ID = "metrics"
VALIDATOR_METRICS_PORT_ID = "validator-metrics"

# Port nums
DISCOVERY_PORT_NUM = 9000
HTTP_PORT_NUM = 4000
METRICS_PORT_NUM = 8008
HTTP_PORT_NUM = 4000
METRICS_PORT_NUM = 8008

BEACON_SUFFIX_SERVICE_NAME = "beacon"
VALIDATOR_SUFFIX_SERVICE_NAME = "validator"
Expand Down Expand Up @@ -216,7 +216,7 @@ def get_validator_config(
"--logLevel=" + log_level,
"--dataDir=" + root_dirpath,
"--paramsFile=" + genesis_config_filepath,
"--server=" + beacon_client_http_url,
"--beaconNodes=" + beacon_client_http_url,
"--keystoresDir=" + validator_keys_dirpath,
"--secretsDir=" + validator_secrets_dirpath,
# vvvvvvvvvvvvvvvvvvv PROMETHEUS CONFIG vvvvvvvvvvvvvvvvvvvvv
Expand Down
14 changes: 7 additions & 7 deletions src/cl/nimbus/nimbus_launcher.star
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_ready_conditions.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_ready_conditions.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

GENESIS_DATA_MOUNTPOINT_ON_CLIENT = "/genesis-data"

Expand Down Expand Up @@ -130,7 +130,7 @@ def get_config(
# 1) https://github.com/status-im/nimbus-eth2/blob/stable/scripts/launch_local_testnet.sh
# 2) https://github.com/status-im/nimbus-eth2/blob/67ab477a27e358d605e99bffeb67f98d18218eca/scripts/launch_local_testnet.sh#L417
# WARNING: Do NOT set the --max-peers flag here, as doing so to the exact number of nodes seems to mess things up!
# See: https://github.com/kurtosis-tech/eth2-merge-kurtosis-module/issues/26
# See: https://github.com/barnabasbusa/eth2-merge-kurtosis-module/issues/26
cmd = [
"mkdir",
CONSENSUS_DATA_DIRPATH_IN_SERVICE_CONTAINER,
Expand Down
12 changes: 6 additions & 6 deletions src/cl/prysm/prysm_launcher.star
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_ready_conditions.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_ready_conditions.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

IMAGE_SEPARATOR_DELIMITER = ","
EXPECTED_NUM_IMAGES = 2
Expand Down
12 changes: 6 additions & 6 deletions src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/kurtosis-tech/eth-network-package/src/cl/cl_node_ready_conditions.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
cl_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_client_context.star")
cl_node_metrics = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_metrics_info.star")
cl_node_ready_conditions = import_module("github.com/barnabasbusa/eth-network-package/src/cl/cl_node_ready_conditions.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

TEKU_BINARY_FILEPATH_IN_IMAGE = "/opt/teku/bin/teku"

Expand Down
17 changes: 7 additions & 10 deletions src/el/besu/besu_launcher.star
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_admin_node_info.star")
package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_admin_node_info.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/opt/besu/execution-data"
Expand All @@ -12,16 +12,14 @@ GENESIS_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/opt/besu/genesis"
RPC_PORT_NUM = 8545
WS_PORT_NUM = 8546
DISCOVERY_PORT_NUM = 30303
ENGINE_HTTP_RPC_PORT_NUM = 8550
ENGINE_WS_RPC_PORT_NUM = 8551
ENGINE_HTTP_RPC_PORT_NUM = 8551

# Port IDs
RPC_PORT_ID = "rpc"
WS_PORT_ID = "ws"
TCP_DISCOVERY_PORT_ID = "tcp-discovery"
UDP_DISCOVERY_PORT_ID = "udp-discovery"
ENGINE_HTTP_RPC_PORT_ID = "engineHttpRpc"
ENGINE_WS_RPC_PORT_ID = "engineWsRpc"
ENGINE_HTTP_RPC_PORT_ID = "engine-rpc"

PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"

Expand All @@ -31,7 +29,6 @@ USED_PORTS = {
TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL),
UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL),
ENGINE_HTTP_RPC_PORT_ID: shared_utils.new_port_spec(ENGINE_HTTP_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL),
ENGINE_WS_RPC_PORT_ID: shared_utils.new_port_spec(ENGINE_WS_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL)
}

ENTRYPOINT_ARGS = ["sh", "-c"]
Expand Down
12 changes: 6 additions & 6 deletions src/el/erigon/erigon_launcher.star
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
el_admin_node_info = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_admin_node_info.star")
el_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_client_context.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
el_admin_node_info = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_admin_node_info.star")
el_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_client_context.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/home/erigon/execution-data"
Expand Down Expand Up @@ -86,7 +86,7 @@ def get_config(network_id, genesis_data, image, existing_el_clients, verbosity_l
genesis_json_filepath_on_client,
)

# TODO remove this based on https://github.com/kurtosis-tech/eth2-merge-kurtosis-module/issues/152
# TODO remove this based on https://github.com/barnabasbusa/eth2-merge-kurtosis-module/issues/152
if len(existing_el_clients) == 0:
fail("Erigon needs at least one node to exist, which it treats as the bootnode")

Expand Down
11 changes: 5 additions & 6 deletions src/el/geth/geth_launcher.star
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_admin_node_info.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_admin_node_info.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")


RPC_PORT_NUM = 8545
Expand All @@ -17,7 +17,6 @@ WS_PORT_ID = "ws"
TCP_DISCOVERY_PORT_ID = "tcp-discovery"
UDP_DISCOVERY_PORT_ID = "udp-discovery"
ENGINE_RPC_PORT_ID = "engine-rpc"
ENGINE_WS_PORT_ID = "engineWs"

# TODO(old) Scale this dynamically based on CPUs available and Geth nodes mining
NUM_MINING_THREADS = 1
Expand Down
10 changes: 5 additions & 5 deletions src/el/nethermind/nethermind_launcher.star
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
shared_utils = import_module("github.com/kurtosis-tech/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/kurtosis-tech/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/kurtosis-tech/eth-network-package/src/el/el_admin_node_info.star")
shared_utils = import_module("github.com/barnabasbusa/eth-network-package/shared_utils/shared_utils.star")
input_parser = import_module("github.com/barnabasbusa/eth-network-package/package_io/input_parser.star")
el_client_context = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_client_context.star")
el_admin_node_info = import_module("github.com/barnabasbusa/eth-network-package/src/el/el_admin_node_info.star")

package_io = import_module("github.com/kurtosis-tech/eth-network-package/package_io/constants.star")
package_io = import_module("github.com/barnabasbusa/eth-network-package/package_io/constants.star")

# The dirpath of the execution data directory on the client container
EXECUTION_DATA_DIRPATH_ON_CLIENT_CONTAINER = "/execution-data"
Expand Down
Loading

0 comments on commit f3ea1c8

Please sign in to comment.