diff --git a/.github/tests/mix-with-tools-mev.yaml b/.github/tests/mix-with-tools-mev.yaml index 71736f109..d20500b15 100644 --- a/.github/tests/mix-with-tools-mev.yaml +++ b/.github/tests/mix-with-tools-mev.yaml @@ -26,3 +26,4 @@ snooper_enabled: true mev_type: full mev_params: mev_relay_image: flashbots/mev-boost-relay:0.27 +persistent: True diff --git a/README.md b/README.md index b109f55d6..23d1deb76 100644 --- a/README.md +++ b/README.md @@ -323,6 +323,11 @@ disable_peer_scoring: false # A list of locators for grafana dashboards to be loaded be the grafana service grafana_additional_dashboards: [] +# Whether the environment should be persistent; this is WIP and is slowly being rolled out accross services +# Note this requires Kurtosis greater than 0.85.49 to work +# Defaults to False +persistent: False + # Supports three valeus # Default: "null" - no mev boost, mev builder, mev flood or relays are spun up # "mock" - mock-builder & mev-boost are spun up diff --git a/main.star b/main.star index cbaad6b05..ece3db15d 100644 --- a/main.star +++ b/main.star @@ -59,6 +59,7 @@ def run(plan, args={}): network_params = args_with_right_defaults.network_params mev_params = args_with_right_defaults.mev_params parallel_keystore_generation = args_with_right_defaults.parallel_keystore_generation + persistent = args_with_right_defaults.persistent grafana_datasource_config_template = read_file( static_files.GRAFANA_DATASOURCE_CONFIG_TEMPLATE_FILEPATH @@ -222,6 +223,7 @@ def run(plan, args={}): genesis_validators_root, builder_uri, network_params.seconds_per_slot, + persistent, ) mev_flood.spam_in_background( plan, @@ -345,6 +347,7 @@ def run(plan, args={}): all_cl_client_contexts, all_el_client_contexts, network_params.network_id, + persistent, ) plan.print("Successfully launched blobscan") elif additional_service == "full_beaconchain_explorer": @@ -357,6 +360,7 @@ def run(plan, args={}): full_beaconchain_explorer_config_template, all_cl_client_contexts, all_el_client_contexts, + persistent, ) plan.print("Successfully launched full-beaconchain-explorer") elif additional_service == "prometheus_grafana": diff --git a/network_params.yaml b/network_params.yaml index 8601241c6..43b7507c6 100644 --- a/network_params.yaml +++ b/network_params.yaml @@ -74,3 +74,4 @@ mev_params: mev_flood_extra_args: [] mev_flood_seconds_per_bundle: 15 grafana_additional_dashboards: [] +persistent: False diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index d5df2fad0..a8a22ea81 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -58,6 +58,7 @@ def launch_blobscan( cl_client_contexts, el_client_contexts, chain_id, + persistent, ): beacon_node_rpc_uri = "http://{0}:{1}".format( cl_client_contexts[0].ip_addr, cl_client_contexts[0].http_port_num @@ -73,7 +74,7 @@ def launch_blobscan( max_cpu=POSTGRES_MAX_CPU, min_memory=POSTGRES_MIN_MEMORY, max_memory=POSTGRES_MAX_MEMORY, - persistent=False, + persistent=persistent, ) api_config = get_api_config(postgres_output.url, beacon_node_rpc_uri, chain_id) blobscan_config = plan.add_service(API_SERVICE_NAME, api_config) diff --git a/src/full_beaconchain/full_beaconchain_launcher.star b/src/full_beaconchain/full_beaconchain_launcher.star index c12018660..1c22e232d 100644 --- a/src/full_beaconchain/full_beaconchain_launcher.star +++ b/src/full_beaconchain/full_beaconchain_launcher.star @@ -96,6 +96,7 @@ def launch_full_beacon( config_template, cl_client_contexts, el_client_contexts, + persistent, ): postgres_output = postgres.run( plan, @@ -108,7 +109,7 @@ def launch_full_beacon( max_cpu=POSTGRES_MAX_CPU, min_memory=POSTGRES_MIN_MEMORY, max_memory=POSTGRES_MAX_MEMORY, - persistent=False, + persistent=persistent, ) redis_output = redis.run( plan, diff --git a/src/mev/mev_relay/mev_relay_launcher.star b/src/mev/mev_relay/mev_relay_launcher.star index fc4d6f070..02472857d 100644 --- a/src/mev/mev_relay/mev_relay_launcher.star +++ b/src/mev/mev_relay/mev_relay_launcher.star @@ -18,7 +18,6 @@ NETWORK_ID_TO_NAME = { "3": "ropsten", } -DONT_PERSIST_TO_DISK = False LAUNCH_ADMINER = True # The min/max CPU/memory that mev-relay can use @@ -48,6 +47,7 @@ def launch_mev_relay( validator_root, builder_uri, seconds_per_slot, + persistent, ): redis = redis_module.run( plan, @@ -64,7 +64,7 @@ def launch_mev_relay( user="postgres", database="postgres", service_name="mev-relay-postgres", - persistent=DONT_PERSIST_TO_DISK, + persistent=persistent, launch_adminer=LAUNCH_ADMINER, min_cpu=POSTGRES_MIN_CPU, max_cpu=POSTGRES_MAX_CPU, diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 8b13e9d50..6151e6510 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -69,6 +69,7 @@ def input_parser(plan, input_args): result["tx_spammer_params"] = get_default_tx_spammer_params() result["custom_flood_params"] = get_default_custom_flood_params() result["disable_peer_scoring"] = False + result["persistent"] = False for attr in input_args: value = input_args[attr] @@ -216,6 +217,7 @@ def input_parser(plan, input_args): parallel_keystore_generation=result["parallel_keystore_generation"], grafana_additional_dashboards=result["grafana_additional_dashboards"], disable_peer_scoring=result["disable_peer_scoring"], + persistent=result["persistent"], )