From c6101c356b133a5846b8de6ec5129a5d953e8e04 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 6 Dec 2023 16:28:42 +0100 Subject: [PATCH 01/11] feat: add resource requests/limits to most applications --- .github/tests/mix-with-tools-mev.yaml | 3 + .github/tests/mix-with-tools.yaml | 2 + main.star | 17 +- .../beacon_metrics_gazer_launcher.star | 6 + src/blob_spammer/blob_spammer.star | 10 + src/blobscan/blobscan_launcher.star | 47 ++++- src/broadcaster/broadcaster.star | 10 + src/dora/dora_launcher.star | 9 + .../eip4788_deployment_launcher.star | 10 + src/el/geth/geth_launcher.star | 8 +- src/el_forkmon/el_forkmon_launcher.star | 10 + .../ethereum_metrics_exporter_launcher.star | 10 + .../full_beaconchain_launcher.star | 193 +++++++++++++----- src/goomy_blob/goomy_blob.star | 10 + src/grafana/grafana_launcher.star | 10 + .../mev_boost/mev_boost_context.star | 0 .../mev_boost/mev_boost_launcher.star | 14 +- .../mev_custom_flood_launcher.star | 10 + src/{ => mev}/mev_custom_flood/sender.py | 0 .../mev_flood/mev_flood_launcher.star | 10 + .../mev_relay/mev_relay_launcher.star | 51 ++++- src/{ => mev}/mock_mev/mock_mev_launcher.star | 10 + src/package_io/input_parser.star | 2 +- src/prometheus/prometheus_launcher.star | 10 + src/snooper/snooper_engine_launcher.star | 10 + .../transaction_spammer.star | 10 + 26 files changed, 410 insertions(+), 72 deletions(-) rename src/{ => mev}/mev_boost/mev_boost_context.star (100%) rename src/{ => mev}/mev_boost/mev_boost_launcher.star (84%) rename src/{ => mev}/mev_custom_flood/mev_custom_flood_launcher.star (81%) rename src/{ => mev}/mev_custom_flood/sender.py (100%) rename src/{ => mev}/mev_flood/mev_flood_launcher.star (87%) rename src/{ => mev}/mev_relay/mev_relay_launcher.star (72%) rename src/{ => mev}/mock_mev/mock_mev_launcher.star (81%) diff --git a/.github/tests/mix-with-tools-mev.yaml b/.github/tests/mix-with-tools-mev.yaml index a6c120283..bf1faeb4c 100644 --- a/.github/tests/mix-with-tools-mev.yaml +++ b/.github/tests/mix-with-tools-mev.yaml @@ -21,6 +21,9 @@ additional_services: - goomy_blob - full_beaconchain_explorer - custom_flood + - blobscan +ethereum_metrics_exporter_enabled: true +snooper_enabled: true mev_type: full mev_params: mev_relay_image: flashbots/mev-boost-relay:0.27 diff --git a/.github/tests/mix-with-tools.yaml b/.github/tests/mix-with-tools.yaml index 23e35bb67..cac3f1949 100644 --- a/.github/tests/mix-with-tools.yaml +++ b/.github/tests/mix-with-tools.yaml @@ -22,3 +22,5 @@ additional_services: - full_beaconchain_explorer - custom_flood - blobscan +ethereum_metrics_exporter_enabled: true +snooper_enabled: true diff --git a/main.star b/main.star index d92eec6a6..6da3fd1a3 100644 --- a/main.star +++ b/main.star @@ -27,12 +27,12 @@ full_beaconchain_explorer = import_module( ) prometheus = import_module("./src/prometheus/prometheus_launcher.star") grafana = import_module("./src/grafana/grafana_launcher.star") -mev_boost = import_module("./src/mev_boost/mev_boost_launcher.star") -mock_mev = import_module("./src/mock_mev/mock_mev_launcher.star") -mev_relay = import_module("./src/mev_relay/mev_relay_launcher.star") -mev_flood = import_module("./src/mev_flood/mev_flood_launcher.star") +mev_boost = import_module("./src/mev/mev_boost/mev_boost_launcher.star") +mock_mev = import_module("./src/mev/mock_mev/mock_mev_launcher.star") +mev_relay = import_module("./src/mev/mev_relay/mev_relay_launcher.star") +mev_flood = import_module("./src/mev/mev_flood/mev_flood_launcher.star") mev_custom_flood = import_module( - "./src/mev_custom_flood/mev_custom_flood_launcher.star" + "./src/mev/mev_custom_flood/mev_custom_flood_launcher.star" ) eip4788_deployment = import_module( "./src/eip4788_deployment/eip4788_deployment_launcher.star" @@ -244,8 +244,11 @@ def run(plan, args={}): mev_boost_launcher = mev_boost.new_mev_boost_launcher( MEV_BOOST_SHOULD_CHECK_RELAY, mev_endpoints ) - mev_boost_service_name = "{0}{1}".format( - input_parser.MEV_BOOST_SERVICE_NAME_PREFIX, index + mev_boost_service_name = "{0}-{1}-{2}-{3}".format( + input_parser.MEV_BOOST_SERVICE_NAME_PREFIX, + index, + participant.cl_client_type, + participant.el_client_type, ) mev_boost_context = mev_boost.launch( plan, diff --git a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star index 1dfe097f4..ba04ece4d 100644 --- a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star +++ b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star @@ -24,6 +24,12 @@ USED_PORTS = { ) } +# The min/max CPU/memory that beacon-metrics-gazer can use +MIN_CPU = 10 +MAX_CPU = 500 +MIN_MEMORY = 20 +MAX_MEMORY = 300 + def launch_beacon_metrics_gazer(plan, cl_client_contexts, network_params): config = get_config( diff --git a/src/blob_spammer/blob_spammer.star b/src/blob_spammer/blob_spammer.star index 7abd5a862..05ec06041 100644 --- a/src/blob_spammer/blob_spammer.star +++ b/src/blob_spammer/blob_spammer.star @@ -3,6 +3,12 @@ SERVICE_NAME = "blob-spammer" ENTRYPOINT_ARGS = ["/bin/sh", "-c"] +# The min/max CPU/memory that blob-spammer can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 20 +MAX_MEMORY = 300 + def launch_blob_spammer( plan, @@ -58,4 +64,8 @@ def get_config( ] ) ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index 768fcc28c..d4ac2ec77 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -1,5 +1,5 @@ shared_utils = import_module("../shared_utils/shared_utils.star") -postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star") +postgres = import_module("github.com/barnabasbusa/postgres-package/main.star@patch-1") WEB_SERVICE_NAME = "blobscan-web" API_SERVICE_NAME = "blobscan-api" @@ -28,6 +28,30 @@ API_PORTS = { ENTRYPOINT_ARGS = ["/bin/sh", "-c"] +# The min/max CPU/memory that blobscan-indexer can use +INDEX_MIN_CPU = 10 +INDEX_MAX_CPU = 1000 +INDEX_MIN_MEMORY = 32 +INDEX_MAX_MEMORY = 1024 + +# The min/max CPU/memory that blobscan-api can use +API_MIN_CPU = 100 +API_MAX_CPU = 1000 +API_MIN_MEMORY = 1024 +API_MAX_MEMORY = 2048 + +# The min/max CPU/memory that blobscan-web can use +WEB_MIN_CPU = 100 +WEB_MAX_CPU = 1000 +WEB_MIN_MEMORY = 512 +WEB_MAX_MEMORY = 2048 + +# The min/max CPU/memory that postgres can use +POSTGRES_MIN_CPU = 10 +POSTGRES_MAX_CPU = 1000 +POSTGRES_MIN_MEMORY = 32 +POSTGRES_MAX_MEMORY = 1024 + def launch_blobscan( plan, @@ -42,7 +66,14 @@ def launch_blobscan( el_client_contexts[0].ip_addr, el_client_contexts[0].rpc_port_num ) - postgres_output = postgres.run(plan, service_name="blobscan-postgres") + postgres_output = postgres.run( + plan, + service_name="blobscan-postgres", + min_cpu=POSTGRES_MIN_CPU, + max_cpu=POSTGRES_MAX_CPU, + min_memory=POSTGRES_MIN_MEMORY, + max_memory=POSTGRES_MAX_MEMORY, + ) api_config = get_api_config(postgres_output.url, beacon_node_rpc_uri, chain_id) blobscan_config = plan.add_service(API_SERVICE_NAME, api_config) @@ -83,6 +114,10 @@ def get_api_config(database_url, beacon_node_rpc, chain_id): interval="5s", timeout="5s", ), + min_cpu=API_MIN_CPU, + max_cpu=API_MAX_CPU, + min_memory=API_MIN_MEMORY, + max_memory=API_MAX_MEMORY, ) @@ -103,6 +138,10 @@ def get_web_config(database_url, beacon_node_rpc, chain_id): "CHAIN_ID": chain_id, }, cmd=["web"], + min_cpu=WEB_MIN_CPU, + max_cpu=WEB_MAX_CPU, + min_memory=WEB_MIN_MEMORY, + max_memory=WEB_MAX_MEMORY, ) @@ -119,4 +158,8 @@ def get_indexer_config(beacon_node_rpc, execution_node_rpc, blobscan_api_url): }, entrypoint=ENTRYPOINT_ARGS, cmd=[" && ".join(["sleep 90", "/app/blob-indexer"])], + min_cpu=INDEX_MIN_CPU, + max_cpu=INDEX_MAX_CPU, + min_memory=INDEX_MIN_MEMORY, + max_memory=INDEX_MAX_MEMORY, ) diff --git a/src/broadcaster/broadcaster.star b/src/broadcaster/broadcaster.star index 2a901c8df..5a26b56bb 100644 --- a/src/broadcaster/broadcaster.star +++ b/src/broadcaster/broadcaster.star @@ -2,6 +2,12 @@ IMAGE_NAME = "nethermind/broadcaster:latest" SERVICE_NAME = "broadcaster" PORT = 8545 +# The min/max CPU/memory that broadcaster can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 2048 + def launch_broadcaster(plan, all_el_client_contexts): config = get_config(all_el_client_contexts) @@ -15,4 +21,8 @@ def get_config(all_el_client_contexts): "http://{0}:{1}".format(context.ip_addr, context.rpc_port_num) for context in all_el_client_contexts ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/dora/dora_launcher.star b/src/dora/dora_launcher.star index 59c7ce272..75c230c14 100644 --- a/src/dora/dora_launcher.star +++ b/src/dora/dora_launcher.star @@ -12,6 +12,11 @@ DORA_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config" VALIDATOR_RANGES_MOUNT_DIRPATH_ON_SERVICE = "/validator-ranges" VALIDATOR_RANGES_ARTIFACT_NAME = "validator-ranges" +# The min/max CPU/memory that dora can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 2048 USED_PORTS = { HTTP_PORT_ID: shared_utils.new_port_spec( @@ -81,6 +86,10 @@ def get_config( constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_data_files_artifact_uuid, }, cmd=["-config", config_file_path], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/eip4788_deployment/eip4788_deployment_launcher.star b/src/eip4788_deployment/eip4788_deployment_launcher.star index 0d54de508..421a30f52 100644 --- a/src/eip4788_deployment/eip4788_deployment_launcher.star +++ b/src/eip4788_deployment/eip4788_deployment_launcher.star @@ -1,6 +1,12 @@ PYTHON_IMAGE = "ethpandaops/python-web3" EIP4788_DEPLOYMENT_SERVICE_NAME = "eip4788-contract-deployment" +# The min/max CPU/memory that deployer can use +MIN_CPU = 10 +MAX_CPU = 100 +MIN_MEMORY = 10 +MAX_MEMORY = 300 + def deploy_eip4788_contract_in_background(plan, sender_key, el_uri): sender_script = plan.upload_files( @@ -17,6 +23,10 @@ def deploy_eip4788_contract_in_background(plan, sender_key, el_uri): "SENDER_PRIVATE_KEY": sender_key, "EL_RPC_URI": el_uri, }, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ), ) diff --git a/src/el/geth/geth_launcher.star b/src/el/geth/geth_launcher.star index 77a99cc0a..caee6a9d3 100644 --- a/src/el/geth/geth_launcher.star +++ b/src/el/geth/geth_launcher.star @@ -16,10 +16,10 @@ ENGINE_RPC_PORT_NUM = 8551 METRICS_PORT_NUM = 9001 # The min/max CPU/memory that the execution node can use -EXECUTION_MIN_CPU = 100 -EXECUTION_MAX_CPU = 1000 -EXECUTION_MIN_MEMORY = 256 -EXECUTION_MAX_MEMORY = 1024 +EXECUTION_MIN_CPU = 300 +EXECUTION_MAX_CPU = 2000 +EXECUTION_MIN_MEMORY = 512 +EXECUTION_MAX_MEMORY = 2048 # Port IDs RPC_PORT_ID = "rpc" diff --git a/src/el_forkmon/el_forkmon_launcher.star b/src/el_forkmon/el_forkmon_launcher.star index 908fb71df..0f0beceee 100644 --- a/src/el_forkmon/el_forkmon_launcher.star +++ b/src/el_forkmon/el_forkmon_launcher.star @@ -19,6 +19,12 @@ USED_PORTS = { ) } +# The min/max CPU/memory that el-forkmon can use +MIN_CPU = 10 +MAX_CPU = 100 +MIN_MEMORY = 32 +MAX_MEMORY = 256 + def launch_el_forkmon( plan, @@ -62,6 +68,10 @@ def get_config(config_files_artifact_name): EL_FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE: config_files_artifact_name, }, cmd=[config_file_path], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star b/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star index c52355ae6..608ccd6df 100644 --- a/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star +++ b/src/ethereum_metrics_exporter/ethereum_metrics_exporter_launcher.star @@ -9,6 +9,12 @@ METRICS_PORT_NUMBER = 9090 DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE = "ethpandaops/ethereum-metrics-exporter:0.22.0" +# The min/max CPU/memory that ethereum-metrics-exporter can use +MIN_CPU = 10 +MAX_CPU = 100 +MIN_MEMORY = 16 +MAX_MEMORY = 128 + def launch( plan, @@ -42,6 +48,10 @@ def launch( el_client_context.rpc_port_num, ), ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ), ) diff --git a/src/full_beaconchain/full_beaconchain_launcher.star b/src/full_beaconchain/full_beaconchain_launcher.star index d4bbb20ff..9d23e7594 100644 --- a/src/full_beaconchain/full_beaconchain_launcher.star +++ b/src/full_beaconchain/full_beaconchain_launcher.star @@ -1,5 +1,8 @@ shared_utils = import_module("../shared_utils/shared_utils.star") -IMAGE_NAME = "gobitfly/eth2-beaconchain-explorer:kurtosis" +postgres = import_module("github.com/barnabasbusa/postgres-package/main.star@patch-1") +redis = import_module("github.com/barnabasbusa/redis-package/main.star@patch-1") + +IMAGE_NAME = "gobitfly/eth2-beaconchain-explorer:latest" POSTGRES_PORT_ID = "postgres" POSTGRES_PORT_NUMBER = 5432 @@ -27,6 +30,66 @@ USED_PORTS = { ) } +# The min/max CPU/memory that postgres can use +POSTGRES_MIN_CPU = 10 +POSTGRES_MAX_CPU = 1000 +POSTGRES_MIN_MEMORY = 32 +POSTGRES_MAX_MEMORY = 1024 + +# The min/max CPU/memory that redis can use +REDIS_MIN_CPU = 10 +REDIS_MAX_CPU = 1000 +REDIS_MIN_MEMORY = 32 +REDIS_MAX_MEMORY = 1024 + +# The min/max CPU/memory that littlebigtable can use +LITTLE_BIGTABLE_MIN_CPU = 100 +LITTLE_BIGTABLE_MAX_CPU = 1000 +LITTLE_BIGTABLE_MIN_MEMORY = 128 +LITTLE_BIGTABLE_MAX_MEMORY = 2048 + +# The min/max CPU/memory that the indexer can use +INDEXER_MIN_CPU = 100 +INDEXER_MAX_CPU = 1000 +INDEXER_MIN_MEMORY = 1024 +INDEXER_MAX_MEMORY = 2048 + +# The min/max CPU/memory that the init can use +INIT_MIN_CPU = 10 +INIT_MAX_CPU = 100 +INIT_MIN_MEMORY = 32 +INIT_MAX_MEMORY = 128 + +# The min/max CPU/memory that the eth1indexer can use +ETH1INDEXER_MIN_CPU = 100 +ETH1INDEXER_MAX_CPU = 1000 +ETH1INDEXER_MIN_MEMORY = 128 +ETH1INDEXER_MAX_MEMORY = 1024 + +# The min/max CPU/memory that the rewards-exporter can use +REWARDSEXPORTER_MIN_CPU = 10 +REWARDSEXPORTER_MAX_CPU = 100 +REWARDSEXPORTER_MIN_MEMORY = 32 +REWARDSEXPORTER_MAX_MEMORY = 128 + +# The min/max CPU/memory that the statistics can use +STATISTICS_MIN_CPU = 10 +STATISTICS_MAX_CPU = 100 +STATISTICS_MIN_MEMORY = 32 +STATISTICS_MAX_MEMORY = 128 + +# The min/max CPU/memory that the frontend-data-updater can use +FDU_MIN_CPU = 10 +FDU_MAX_CPU = 100 +FDU_MIN_MEMORY = 32 +FDU_MAX_MEMORY = 128 + +# The min/max CPU/memory that the frontend can use +FRONTEND_MIN_CPU = 100 +FRONTEND_MAX_CPU = 1000 +FRONTEND_MIN_MEMORY = 512 +FRONTEND_MAX_MEMORY = 2048 + def launch_full_beacon( plan, @@ -34,59 +97,57 @@ def launch_full_beacon( cl_client_contexts, el_client_contexts, ): - # TODO perhaps use the official redis & postgres packages - db_services = plan.add_services( - configs={ - # Add a Postgres server - "explorer-postgres": ServiceConfig( - image="postgres:15.2-alpine", - ports={ - POSTGRES_PORT_ID: PortSpec( - POSTGRES_PORT_NUMBER, application_protocol="postgresql" - ), - }, - env_vars={ - "POSTGRES_DB": POSTGRES_DB, - "POSTGRES_USER": POSTGRES_USER, - "POSTGRES_PASSWORD": POSTGRES_PASSWORD, - }, - ), - # Add a Redis server - "explorer-redis": ServiceConfig( - image="redis:7", - ports={ - REDIS_PORT_ID: PortSpec( - REDIS_PORT_NUMBER, application_protocol="tcp" - ), - }, - ), - # Add a Bigtable Emulator server - "explorer-littlebigtable": ServiceConfig( - image="gobitfly/little_bigtable:latest", - ports={ - LITTLE_BIGTABLE_PORT_ID: PortSpec( - LITTLE_BIGTABLE_PORT_NUMBER, application_protocol="tcp" - ), - }, - ), - } + postgres_output = postgres.run( + plan, + service_name="beaconchain-postgres", + image="postgres:15.2-alpine", + user=POSTGRES_USER, + password=POSTGRES_PASSWORD, + database=POSTGRES_DB, + min_cpu=POSTGRES_MIN_CPU, + max_cpu=POSTGRES_MAX_CPU, + min_memory=POSTGRES_MIN_MEMORY, + max_memory=POSTGRES_MAX_MEMORY, + ) + redis_output = redis.run( + plan, + service_name="beaconchain-redis", + image="redis:7", + min_cpu=REDIS_MIN_CPU, + max_cpu=REDIS_MAX_CPU, + min_memory=REDIS_MIN_MEMORY, + max_memory=REDIS_MAX_MEMORY, + ) + # TODO perhaps create a new service for the littlebigtable + little_bigtable = plan.add_service( + name="beaconchain-littlebigtable", + config=ServiceConfig( + image="gobitfly/little_bigtable:latest", + ports={ + LITTLE_BIGTABLE_PORT_ID: PortSpec( + LITTLE_BIGTABLE_PORT_NUMBER, application_protocol="tcp" + ) + }, + min_cpu=LITTLE_BIGTABLE_MIN_CPU, + max_cpu=LITTLE_BIGTABLE_MAX_CPU, + min_memory=LITTLE_BIGTABLE_MIN_MEMORY, + max_memory=LITTLE_BIGTABLE_MAX_MEMORY, + ) ) el_uri = "http://{0}:{1}".format( el_client_contexts[0].ip_addr, el_client_contexts[0].rpc_port_num ) - redis_uri = "{0}:{1}".format( - db_services["explorer-redis"].ip_address, REDIS_PORT_NUMBER - ) + redis_url = "{}:{}".format(redis_output.hostname, redis_output.port_number) template_data = new_config_template_data( cl_client_contexts[0], el_uri, - db_services["explorer-littlebigtable"].ip_address, + little_bigtable.ip_address, LITTLE_BIGTABLE_PORT_NUMBER, - db_services["explorer-postgres"].ip_address, + postgres_output.url, POSTGRES_PORT_NUMBER, - redis_uri, + redis_url, FRONTEND_PORT_NUMBER, ) @@ -104,13 +165,17 @@ def launch_full_beacon( # Initialize the db schema initdbschema = plan.add_service( - name="explorer-schema-initializer", + name="beaconchain-schema-initializer", config=ServiceConfig( image=IMAGE_NAME, files={ "/app/config/": config_files_artifact_name, }, entrypoint=["tail", "-f", "/dev/null"], + min_cpu=INIT_MIN_CPU, + max_cpu=INIT_MAX_CPU, + min_memory=INIT_MIN_MEMORY, + max_memory=INIT_MAX_MEMORY, ), ) @@ -139,7 +204,7 @@ def launch_full_beacon( # Start the indexer indexer = plan.add_service( - name="explorer-indexer", + name="beaconchain-indexer", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -153,11 +218,15 @@ def launch_full_beacon( env_vars={ "INDEXER_ENABLED": "TRUE", }, + min_cpu=INDEXER_MIN_CPU, + max_cpu=INDEXER_MAX_CPU, + min_memory=INDEXER_MIN_MEMORY, + max_memory=INDEXER_MAX_MEMORY, ), ) # Start the eth1indexer eth1indexer = plan.add_service( - name="explorer-eth1indexer", + name="beaconchain-eth1indexer", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -175,11 +244,15 @@ def launch_full_beacon( "1", "-balances.enabled", ], + min_cpu=ETH1INDEXER_MIN_CPU, + max_cpu=ETH1INDEXER_MAX_CPU, + min_memory=ETH1INDEXER_MIN_MEMORY, + max_memory=ETH1INDEXER_MAX_MEMORY, ), ) rewardsexporter = plan.add_service( - name="explorer-rewardsexporter", + name="beaconchain-rewardsexporter", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -190,11 +263,15 @@ def launch_full_beacon( "-config", "/app/config/config.yml", ], + min_cpu=REWARDSEXPORTER_MIN_CPU, + max_cpu=REWARDSEXPORTER_MAX_CPU, + min_memory=REWARDSEXPORTER_MIN_MEMORY, + max_memory=REWARDSEXPORTER_MAX_MEMORY, ), ) statistics = plan.add_service( - name="explorer-statistics", + name="beaconchain-statistics", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -208,11 +285,15 @@ def launch_full_beacon( "-graffiti.enabled", "-validators.enabled", ], + min_cpu=STATISTICS_MIN_CPU, + max_cpu=STATISTICS_MAX_CPU, + min_memory=STATISTICS_MIN_MEMORY, + max_memory=STATISTICS_MAX_MEMORY, ), ) fdu = plan.add_service( - name="explorer-fdu", + name="beaconchain-fdu", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -223,11 +304,15 @@ def launch_full_beacon( "-config", "/app/config/config.yml", ], + min_cpu=FDU_MIN_CPU, + max_cpu=FDU_MAX_CPU, + min_memory=FDU_MIN_MEMORY, + max_memory=FDU_MAX_MEMORY, ), ) frontend = plan.add_service( - name="explorer-frontend", + name="beaconchain-frontend", config=ServiceConfig( image=IMAGE_NAME, files={ @@ -246,12 +331,16 @@ def launch_full_beacon( FRONTEND_PORT_NUMBER, application_protocol="http" ), }, + min_cpu=FRONTEND_MIN_CPU, + max_cpu=FRONTEND_MAX_CPU, + min_memory=FRONTEND_MIN_MEMORY, + max_memory=FRONTEND_MAX_MEMORY, ), ) def new_config_template_data( - cl_node_info, el_uri, lbt_host, lbt_port, db_host, db_port, redis_uri, frontend_port + cl_node_info, el_uri, lbt_host, lbt_port, db_host, db_port, redis_url, frontend_port ): return { "CLNodeHost": cl_node_info.ip_addr, @@ -261,7 +350,7 @@ def new_config_template_data( "LBTPort": lbt_port, "DBHost": db_host, "DBPort": db_port, - "RedisEndpoint": redis_uri, + "RedisEndpoint": redis_url, "FrontendPort": frontend_port, } diff --git a/src/goomy_blob/goomy_blob.star b/src/goomy_blob/goomy_blob.star index d1ae775c2..d62c2c756 100644 --- a/src/goomy_blob/goomy_blob.star +++ b/src/goomy_blob/goomy_blob.star @@ -3,6 +3,12 @@ IMAGE_NAME = "ethpandaops/goomy-blob:master" ENTRYPOINT_ARGS = ["/bin/sh", "-c"] +# The min/max CPU/memory that goomy can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 20 +MAX_MEMORY = 300 + def launch_goomy_blob( plan, @@ -67,4 +73,8 @@ def get_config( ] ) ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/grafana/grafana_launcher.star b/src/grafana/grafana_launcher.star index a858657f9..b7f335214 100644 --- a/src/grafana/grafana_launcher.star +++ b/src/grafana/grafana_launcher.star @@ -38,6 +38,12 @@ USED_PORTS = { ) } +# The min/max CPU/memory that grafana can use +MIN_CPU = 10 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 2048 + def launch_grafana( plan, @@ -136,6 +142,10 @@ def get_config( GRAFANA_CONFIG_DIRPATH_ON_SERVICE: grafana_config_artifacts_name, GRAFANA_DASHBOARDS_DIRPATH_ON_SERVICE: grafana_dashboards_artifacts_name, }, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/mev_boost/mev_boost_context.star b/src/mev/mev_boost/mev_boost_context.star similarity index 100% rename from src/mev_boost/mev_boost_context.star rename to src/mev/mev_boost/mev_boost_context.star diff --git a/src/mev_boost/mev_boost_launcher.star b/src/mev/mev_boost/mev_boost_launcher.star similarity index 84% rename from src/mev_boost/mev_boost_launcher.star rename to src/mev/mev_boost/mev_boost_launcher.star index db5686c11..904344692 100644 --- a/src/mev_boost/mev_boost_launcher.star +++ b/src/mev/mev_boost/mev_boost_launcher.star @@ -1,6 +1,6 @@ -shared_utils = import_module("../shared_utils/shared_utils.star") +shared_utils = import_module("../../shared_utils/shared_utils.star") mev_boost_context_module = import_module("../mev_boost/mev_boost_context.star") -input_parser = import_module("../package_io/input_parser.star") +input_parser = import_module("../../package_io/input_parser.star") FLASHBOTS_MEV_BOOST_PROTOCOL = "TCP" @@ -16,6 +16,12 @@ NETWORK_ID_TO_NAME = { "3": "ropsten", } +# The min/max CPU/memory that mev-boost can use +MIN_CPU = 10 +MAX_CPU = 500 +MIN_MEMORY = 16 +MAX_MEMORY = 256 + def launch(plan, mev_boost_launcher, service_name, network_id, mev_boost_image): config = get_config(mev_boost_launcher, network_id, mev_boost_image) @@ -50,6 +56,10 @@ def get_config(mev_boost_launcher, network_id, mev_boost_image): "SKIP_RELAY_SIGNATURE_CHECK": "1", "RELAYS": mev_boost_launcher.relay_end_points[0], }, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/mev_custom_flood/mev_custom_flood_launcher.star b/src/mev/mev_custom_flood/mev_custom_flood_launcher.star similarity index 81% rename from src/mev_custom_flood/mev_custom_flood_launcher.star rename to src/mev/mev_custom_flood/mev_custom_flood_launcher.star index 14b854235..928682624 100644 --- a/src/mev_custom_flood/mev_custom_flood_launcher.star +++ b/src/mev/mev_custom_flood/mev_custom_flood_launcher.star @@ -1,6 +1,12 @@ PYTHON_IMAGE = "ethpandaops/python-web3" CUSTOM_FLOOD_SERVICE_NAME = "mev-custom-flood" +# The min/max CPU/memory that mev-custom-flood can use +MIN_CPU = 10 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 1024 + def spam_in_background(plan, sender_key, receiver_key, el_uri, params): sender_script = plan.upload_files(src="./sender.py", name="mev-custom-flood-sender") @@ -16,6 +22,10 @@ def spam_in_background(plan, sender_key, receiver_key, el_uri, params): "RECEIVER_PUBLIC_KEY": receiver_key, "EL_RPC_URI": el_uri, }, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ), ) diff --git a/src/mev_custom_flood/sender.py b/src/mev/mev_custom_flood/sender.py similarity index 100% rename from src/mev_custom_flood/sender.py rename to src/mev/mev_custom_flood/sender.py diff --git a/src/mev_flood/mev_flood_launcher.star b/src/mev/mev_flood/mev_flood_launcher.star similarity index 87% rename from src/mev_flood/mev_flood_launcher.star rename to src/mev/mev_flood/mev_flood_launcher.star index ab7287fcb..6cf8100e4 100644 --- a/src/mev_flood/mev_flood_launcher.star +++ b/src/mev/mev_flood/mev_flood_launcher.star @@ -1,6 +1,12 @@ ADMIN_KEY_INDEX = 0 USER_KEY_INDEX = 2 +# The min/max CPU/memory that mev-flood can use +MIN_CPU = 10 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 1024 + def prefixed_address(address): return "0x" + address @@ -12,6 +18,10 @@ def launch_mev_flood(plan, image, el_uri, contract_owner, normal_user): config=ServiceConfig( image=image, entrypoint=["/bin/sh", "-c", "touch main.log && tail -F main.log"], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ), ) diff --git a/src/mev_relay/mev_relay_launcher.star b/src/mev/mev_relay/mev_relay_launcher.star similarity index 72% rename from src/mev_relay/mev_relay_launcher.star rename to src/mev/mev_relay/mev_relay_launcher.star index 0ba5aeac3..c6edae1d5 100644 --- a/src/mev_relay/mev_relay_launcher.star +++ b/src/mev/mev_relay/mev_relay_launcher.star @@ -1,6 +1,8 @@ -redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star") -postgres_module = import_module("github.com/kurtosis-tech/postgres-package/main.star") -constants = import_module("../package_io/constants.star") +redis_module = import_module("github.com/barnabasbusa/redis-package/main.star@patch-1") +postgres_module = import_module( + "github.com/barnabasbusa/postgres-package/main.star@patch-1" +) +constants = import_module("../../package_io/constants.star") DUMMY_SECRET_KEY = "0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2" DUMMY_PUB_KEY = "0xa55c1285d84ba83a5ad26420cd5ad3091e49c55a813eee651cd467db38a8c8e63192f47955e9376f6b42f6d190571cb5" @@ -21,6 +23,24 @@ NETWORK_ID_TO_NAME = { DONT_PERSIST_TO_DISK = False LAUNCH_ADMINER = True +# The min/max CPU/memory that mev-relay can use +RELAY_MIN_CPU = 100 +RELAY_MAX_CPU = 1000 +RELAY_MIN_MEMORY = 128 +RELAY_MAX_MEMORY = 1024 + +# The min/max CPU/memory that postgres can use +POSTGRES_MIN_CPU = 10 +POSTGRES_MAX_CPU = 1000 +POSTGRES_MIN_MEMORY = 32 +POSTGRES_MAX_MEMORY = 1024 + +# The min/max CPU/memory that redis can use +REDIS_MIN_CPU = 10 +REDIS_MAX_CPU = 1000 +REDIS_MIN_MEMORY = 16 +REDIS_MAX_MEMORY = 1024 + def launch_mev_relay( plan, @@ -31,7 +51,14 @@ def launch_mev_relay( builder_uri, seconds_per_slot, ): - redis = redis_module.run(plan) + redis = redis_module.run( + plan, + service_name="mev-relay-redis", + min_cpu=REDIS_MIN_CPU, + max_cpu=REDIS_MAX_CPU, + min_memory=REDIS_MIN_MEMORY, + max_memory=REDIS_MAX_MEMORY, + ) # making the password postgres as the relay expects it to be postgres postgres = postgres_module.run( plan, @@ -41,6 +68,10 @@ def launch_mev_relay( service_name="mev-relay-postgres", persistent=DONT_PERSIST_TO_DISK, launch_adminer=LAUNCH_ADMINER, + min_cpu=POSTGRES_MIN_CPU, + max_cpu=POSTGRES_MAX_CPU, + min_memory=POSTGRES_MIN_MEMORY, + max_memory=POSTGRES_MAX_MEMORY, ) network_name = NETWORK_ID_TO_NAME.get(network_id, network_id) @@ -75,6 +106,10 @@ def launch_mev_relay( ] + mev_params.mev_relay_housekeeper_extra_args, env_vars=env_vars, + min_cpu=RELAY_MIN_CPU, + max_cpu=RELAY_MAX_CPU, + min_memory=RELAY_MIN_MEMORY, + max_memory=RELAY_MAX_MEMORY, ), ) @@ -106,6 +141,10 @@ def launch_mev_relay( ) }, env_vars=env_vars, + min_cpu=RELAY_MIN_CPU, + max_cpu=RELAY_MAX_CPU, + min_memory=RELAY_MIN_MEMORY, + max_memory=RELAY_MAX_MEMORY, ), ) @@ -134,6 +173,10 @@ def launch_mev_relay( ) }, env_vars=env_vars, + min_cpu=RELAY_MIN_CPU, + max_cpu=RELAY_MAX_CPU, + min_memory=RELAY_MIN_MEMORY, + max_memory=RELAY_MAX_MEMORY, ), ) diff --git a/src/mock_mev/mock_mev_launcher.star b/src/mev/mock_mev/mock_mev_launcher.star similarity index 81% rename from src/mock_mev/mock_mev_launcher.star rename to src/mev/mock_mev/mock_mev_launcher.star index ea82775ce..a7205f61b 100644 --- a/src/mock_mev/mock_mev_launcher.star +++ b/src/mev/mock_mev/mock_mev_launcher.star @@ -3,6 +3,12 @@ MOCK_MEV_SERVICE_NAME = "mock-mev" MOCK_MEV_BUILDER_PORT = 18550 DEFAULT_MOCK_MEV_PUB_KEY = "0x95fde78acd5f6886ddaf5d0056610167c513d09c1c0efabbc7cdcc69beea113779c4a81e2d24daafc5387dbf6ac5fe48" +# The min/max CPU/memory that mev-mock-builder can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 1024 + def launch_mock_mev(plan, el_uri, beacon_uri, jwt_secret, global_client_log_level): mock_builder = plan.add_service( @@ -21,6 +27,10 @@ def launch_mock_mev(plan, el_uri, beacon_uri, jwt_secret, global_client_log_leve "--bid-multiplier=5", # TODO: This could be customizable "--log-level={0}".format(global_client_log_level), ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ), ) return "http://{0}@{1}:{2}".format( diff --git a/src/package_io/input_parser.star b/src/package_io/input_parser.star index 5b09f51bf..c59cf551c 100644 --- a/src/package_io/input_parser.star +++ b/src/package_io/input_parser.star @@ -34,7 +34,7 @@ HIGH_DENEB_VALUE_FORK_VERKLE = 20000 # MEV Params FLASHBOTS_MEV_BOOST_PORT = 18550 -MEV_BOOST_SERVICE_NAME_PREFIX = "mev-boost-" +MEV_BOOST_SERVICE_NAME_PREFIX = "mev-boost" # Minimum number of validators required for a network to be valid is 64 MIN_VALIDATORS = 64 diff --git a/src/prometheus/prometheus_launcher.star b/src/prometheus/prometheus_launcher.star index 2987d74a2..aa0519ca6 100644 --- a/src/prometheus/prometheus_launcher.star +++ b/src/prometheus/prometheus_launcher.star @@ -30,6 +30,12 @@ USED_PORTS = { ) } +# The min/max CPU/memory that prometheus can use +MIN_CPU = 10 +MAX_CPU = 1000 +MIN_MEMORY = 128 +MAX_MEMORY = 2048 + def launch_prometheus( plan, @@ -84,6 +90,10 @@ def get_config(config_files_artifact_name): "--web.console.templates=/etc/prometheus/consoles", "--web.enable-lifecycle", ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/snooper/snooper_engine_launcher.star b/src/snooper/snooper_engine_launcher.star index da1f9c011..24bc94b2e 100644 --- a/src/snooper/snooper_engine_launcher.star +++ b/src/snooper/snooper_engine_launcher.star @@ -18,6 +18,12 @@ SNOOPER_USED_PORTS = { ), } +# The min/max CPU/memory that snooper can use +MIN_CPU = 10 +MAX_CPU = 100 +MIN_MEMORY = 10 +MAX_MEMORY = 300 + def launch(plan, service_name, el_client_context): snooper_service_name = "{0}".format(service_name) @@ -48,4 +54,8 @@ def get_config(service_name, el_client_context): ports=SNOOPER_USED_PORTS, cmd=cmd, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/transaction_spammer/transaction_spammer.star b/src/transaction_spammer/transaction_spammer.star index d924a8b94..8aa3c4e71 100644 --- a/src/transaction_spammer/transaction_spammer.star +++ b/src/transaction_spammer/transaction_spammer.star @@ -1,6 +1,12 @@ shared_utils = import_module("../shared_utils/shared_utils.star") SERVICE_NAME = "transaction-spammer" +# The min/max CPU/memory that tx-spammer can use +MIN_CPU = 100 +MAX_CPU = 1000 +MIN_MEMORY = 20 +MAX_MEMORY = 300 + def launch_transaction_spammer( plan, prefunded_addresses, el_uri, tx_spammer_params, electra_fork_epoch @@ -33,4 +39,8 @@ def get_config(prefunded_addresses, el_uri, tx_spammer_extra_args, electra_fork_ return ServiceConfig( image=tx_spammer_image, cmd=cmd, + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) From 4ead389ef88b5499535d589414fd2a44c41bb83c Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 6 Dec 2023 16:33:52 +0100 Subject: [PATCH 02/11] fix lint --- src/full_beaconchain/full_beaconchain_launcher.star | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/full_beaconchain/full_beaconchain_launcher.star b/src/full_beaconchain/full_beaconchain_launcher.star index 9d23e7594..fb525cc34 100644 --- a/src/full_beaconchain/full_beaconchain_launcher.star +++ b/src/full_beaconchain/full_beaconchain_launcher.star @@ -132,7 +132,7 @@ def launch_full_beacon( max_cpu=LITTLE_BIGTABLE_MAX_CPU, min_memory=LITTLE_BIGTABLE_MIN_MEMORY, max_memory=LITTLE_BIGTABLE_MAX_MEMORY, - ) + ), ) el_uri = "http://{0}:{1}".format( From de51f4ecd1daf52dd0d40635f49ea677c2910516 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 6 Dec 2023 17:50:31 +0100 Subject: [PATCH 03/11] fix prysm ethjs limits --- src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star | 4 ++++ src/cl/prysm/prysm_launcher.star | 4 ++-- src/el/ethereumjs/ethereumjs_launcher.star | 2 +- src/mev/mev_flood/mev_flood_launcher.star | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star index ba04ece4d..bce574e50 100644 --- a/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star +++ b/src/beacon_metrics_gazer/beacon_metrics_gazer_launcher.star @@ -72,4 +72,8 @@ def get_config(ip_addr, http_port_num): "0.0.0.0", "-v", ], + min_cpu=MIN_CPU, + max_cpu=MAX_CPU, + min_memory=MIN_MEMORY, + max_memory=MAX_MEMORY, ) diff --git a/src/cl/prysm/prysm_launcher.star b/src/cl/prysm/prysm_launcher.star index 3626e120e..93290927a 100644 --- a/src/cl/prysm/prysm_launcher.star +++ b/src/cl/prysm/prysm_launcher.star @@ -26,8 +26,8 @@ HTTP_PORT_NUM = 3500 BEACON_MONITORING_PORT_NUM = 8080 # The min/max CPU/memory that the beacon node can use -BEACON_MIN_CPU = 50 -BEACON_MAX_CPU = 1000 +BEACON_MIN_CPU = 100 +BEACON_MAX_CPU = 2000 BEACON_MIN_MEMORY = 256 BEACON_MAX_MEMORY = 1024 diff --git a/src/el/ethereumjs/ethereumjs_launcher.star b/src/el/ethereumjs/ethereumjs_launcher.star index 1ca3672cd..9edd4d5d2 100644 --- a/src/el/ethereumjs/ethereumjs_launcher.star +++ b/src/el/ethereumjs/ethereumjs_launcher.star @@ -16,7 +16,7 @@ METRICS_PORT_NUM = 9001 # The min/max CPU/memory that the execution node can use EXECUTION_MIN_CPU = 100 -EXECUTION_MAX_CPU = 1000 +EXECUTION_MAX_CPU = 2000 EXECUTION_MIN_MEMORY = 256 EXECUTION_MAX_MEMORY = 1024 diff --git a/src/mev/mev_flood/mev_flood_launcher.star b/src/mev/mev_flood/mev_flood_launcher.star index 6cf8100e4..1715e9e4a 100644 --- a/src/mev/mev_flood/mev_flood_launcher.star +++ b/src/mev/mev_flood/mev_flood_launcher.star @@ -2,8 +2,8 @@ ADMIN_KEY_INDEX = 0 USER_KEY_INDEX = 2 # The min/max CPU/memory that mev-flood can use -MIN_CPU = 10 -MAX_CPU = 1000 +MIN_CPU = 100 +MAX_CPU = 2000 MIN_MEMORY = 128 MAX_MEMORY = 1024 From 3fa95a90b779380c24d77466f781cbf2dc875ff9 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Wed, 6 Dec 2023 22:21:43 +0100 Subject: [PATCH 04/11] fix overrides --- src/blobscan/blobscan_launcher.star | 2 +- src/full_beaconchain/full_beaconchain_launcher.star | 4 ++-- src/mev/mev_relay/mev_relay_launcher.star | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index d4ac2ec77..cd988c0e2 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -1,5 +1,5 @@ shared_utils = import_module("../shared_utils/shared_utils.star") -postgres = import_module("github.com/barnabasbusa/postgres-package/main.star@patch-1") +postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star@patch-1") WEB_SERVICE_NAME = "blobscan-web" API_SERVICE_NAME = "blobscan-api" diff --git a/src/full_beaconchain/full_beaconchain_launcher.star b/src/full_beaconchain/full_beaconchain_launcher.star index fb525cc34..cf0eb82e9 100644 --- a/src/full_beaconchain/full_beaconchain_launcher.star +++ b/src/full_beaconchain/full_beaconchain_launcher.star @@ -1,6 +1,6 @@ shared_utils = import_module("../shared_utils/shared_utils.star") -postgres = import_module("github.com/barnabasbusa/postgres-package/main.star@patch-1") -redis = import_module("github.com/barnabasbusa/redis-package/main.star@patch-1") +postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star") +redis = import_module("github.com/kurtosis-tech/redis-package/main.star") IMAGE_NAME = "gobitfly/eth2-beaconchain-explorer:latest" diff --git a/src/mev/mev_relay/mev_relay_launcher.star b/src/mev/mev_relay/mev_relay_launcher.star index c6edae1d5..955ccee76 100644 --- a/src/mev/mev_relay/mev_relay_launcher.star +++ b/src/mev/mev_relay/mev_relay_launcher.star @@ -1,6 +1,6 @@ -redis_module = import_module("github.com/barnabasbusa/redis-package/main.star@patch-1") +redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star@patch-1") postgres_module = import_module( - "github.com/barnabasbusa/postgres-package/main.star@patch-1" + "github.com/kurtosis-tech/postgres-package/main.star@patch-1" ) constants = import_module("../../package_io/constants.star") From d8961202057e226d822be3ee2b2780de1d0317bf Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Fri, 8 Dec 2023 15:19:14 +0530 Subject: [PATCH 05/11] Update full_beaconchain_launcher.star --- src/full_beaconchain/full_beaconchain_launcher.star | 1 + 1 file changed, 1 insertion(+) diff --git a/src/full_beaconchain/full_beaconchain_launcher.star b/src/full_beaconchain/full_beaconchain_launcher.star index cf0eb82e9..c12018660 100644 --- a/src/full_beaconchain/full_beaconchain_launcher.star +++ b/src/full_beaconchain/full_beaconchain_launcher.star @@ -108,6 +108,7 @@ def launch_full_beacon( max_cpu=POSTGRES_MAX_CPU, min_memory=POSTGRES_MIN_MEMORY, max_memory=POSTGRES_MAX_MEMORY, + persistent=False, ) redis_output = redis.run( plan, From ad48658dd12fc62c56b2e77d501ba3f7f244d282 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 8 Dec 2023 10:59:13 +0100 Subject: [PATCH 06/11] fix package name --- src/blobscan/blobscan_launcher.star | 2 +- src/mev/mev_relay/mev_relay_launcher.star | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index cd988c0e2..a9d699a09 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -1,5 +1,5 @@ shared_utils = import_module("../shared_utils/shared_utils.star") -postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star@patch-1") +postgres = import_module("github.com/kurtosis-tech/postgres-package/main.star") WEB_SERVICE_NAME = "blobscan-web" API_SERVICE_NAME = "blobscan-api" diff --git a/src/mev/mev_relay/mev_relay_launcher.star b/src/mev/mev_relay/mev_relay_launcher.star index 955ccee76..f14e3f8e2 100644 --- a/src/mev/mev_relay/mev_relay_launcher.star +++ b/src/mev/mev_relay/mev_relay_launcher.star @@ -1,6 +1,6 @@ -redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star@patch-1") +redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star") postgres_module = import_module( - "github.com/kurtosis-tech/postgres-package/main.star@patch-1" + "github.com/kurtosis-tech/postgres-package/main.star" ) constants = import_module("../../package_io/constants.star") From 0ceb4292a8fff461fa6dae9145c12b4efc2d8a0d Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 8 Dec 2023 11:00:41 +0100 Subject: [PATCH 07/11] fix lint --- src/mev/mev_relay/mev_relay_launcher.star | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/mev/mev_relay/mev_relay_launcher.star b/src/mev/mev_relay/mev_relay_launcher.star index f14e3f8e2..fc4d6f070 100644 --- a/src/mev/mev_relay/mev_relay_launcher.star +++ b/src/mev/mev_relay/mev_relay_launcher.star @@ -1,7 +1,5 @@ redis_module = import_module("github.com/kurtosis-tech/redis-package/main.star") -postgres_module = import_module( - "github.com/kurtosis-tech/postgres-package/main.star" -) +postgres_module = import_module("github.com/kurtosis-tech/postgres-package/main.star") constants = import_module("../../package_io/constants.star") DUMMY_SECRET_KEY = "0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2" From af5af10265005adc7bfe7044b4d8a95b0ede7d98 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 8 Dec 2023 11:09:42 +0100 Subject: [PATCH 08/11] disable beaconchain explorer --- .github/tests/mix-with-tools-mev.yaml | 2 +- .github/tests/mix-with-tools.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/tests/mix-with-tools-mev.yaml b/.github/tests/mix-with-tools-mev.yaml index bf1faeb4c..8f335cb6a 100644 --- a/.github/tests/mix-with-tools-mev.yaml +++ b/.github/tests/mix-with-tools-mev.yaml @@ -19,7 +19,7 @@ additional_services: - dora - prometheus_grafana - goomy_blob - - full_beaconchain_explorer + #- full_beaconchain_explorer - custom_flood - blobscan ethereum_metrics_exporter_enabled: true diff --git a/.github/tests/mix-with-tools.yaml b/.github/tests/mix-with-tools.yaml index cac3f1949..47886c58c 100644 --- a/.github/tests/mix-with-tools.yaml +++ b/.github/tests/mix-with-tools.yaml @@ -19,7 +19,7 @@ additional_services: - dora - prometheus_grafana - goomy_blob - - full_beaconchain_explorer + #- full_beaconchain_explorer - custom_flood - blobscan ethereum_metrics_exporter_enabled: true From 6ffb2d5d645a3c6b4dd36a8e0d6ec331471e4fd0 Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Fri, 8 Dec 2023 16:38:02 +0530 Subject: [PATCH 09/11] run ci From d7a6221d3a4ebc88ec6779af146a3bccb5801b2a Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 8 Dec 2023 12:36:42 +0100 Subject: [PATCH 10/11] remove beaconchain explorer --- .github/tests/mix-with-tools-mev.yaml | 1 - .github/tests/mix-with-tools.yaml | 1 - src/blobscan/blobscan_launcher.star | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/tests/mix-with-tools-mev.yaml b/.github/tests/mix-with-tools-mev.yaml index 8f335cb6a..71736f109 100644 --- a/.github/tests/mix-with-tools-mev.yaml +++ b/.github/tests/mix-with-tools-mev.yaml @@ -19,7 +19,6 @@ additional_services: - dora - prometheus_grafana - goomy_blob - #- full_beaconchain_explorer - custom_flood - blobscan ethereum_metrics_exporter_enabled: true diff --git a/.github/tests/mix-with-tools.yaml b/.github/tests/mix-with-tools.yaml index 47886c58c..2853d3a18 100644 --- a/.github/tests/mix-with-tools.yaml +++ b/.github/tests/mix-with-tools.yaml @@ -19,7 +19,6 @@ additional_services: - dora - prometheus_grafana - goomy_blob - #- full_beaconchain_explorer - custom_flood - blobscan ethereum_metrics_exporter_enabled: true diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index a9d699a09..e6cfe62ea 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -73,6 +73,7 @@ def launch_blobscan( max_cpu=POSTGRES_MAX_CPU, min_memory=POSTGRES_MIN_MEMORY, max_memory=POSTGRES_MAX_MEMORY, + persistent=False, ) api_config = get_api_config(postgres_output.url, beacon_node_rpc_uri, chain_id) blobscan_config = plan.add_service(API_SERVICE_NAME, api_config) From 2e3166d158231d11af19acb3b10541c360173825 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Fri, 8 Dec 2023 13:49:11 +0100 Subject: [PATCH 11/11] add blobscan api port --- src/blobscan/blobscan_launcher.star | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blobscan/blobscan_launcher.star b/src/blobscan/blobscan_launcher.star index e6cfe62ea..d5df2fad0 100644 --- a/src/blobscan/blobscan_launcher.star +++ b/src/blobscan/blobscan_launcher.star @@ -102,6 +102,7 @@ def get_api_config(database_url, beacon_node_rpc, chain_id): "CHAIN_ID": chain_id, "DATABASE_URL": database_url, "SECRET_KEY": "supersecret", + "BLOBSCAN_API_PORT": str(API_HTTP_PORT_NUMBER), }, cmd=["api"], ready_conditions=ReadyCondition(