1- redis_module = import_module ("github.com/kurtosis-tech/redis-package/main.star@0503b6d727015d85c498c4602c93e18c7c992445" ) # TODO when Kurtosis has proper version-pinning, use that!!!
1+ redis_module = import_module ("github.com/kurtosis-tech/redis-package/main.star" )
22postgres_module = import_module ("github.com/kurtosis-tech/postgres-package/main.star" )
33
44DUMMY_SECRET_KEY = "0x607a11b45a7219cc61a3d9c5fd08c7eebd602a6a19a977f8d3771d5711a550f2"
@@ -18,7 +18,7 @@ NETWORK_ID_TO_NAME = {
1818}
1919
2020def launch_mev_relay (plan , mev_params , network_id , beacon_uris , validator_root , builder_uri , seconds_per_slot ):
21- redis = redis_module .run (plan , {} )
21+ redis = redis_module .run (plan )
2222 # making the password postgres as the relay expects it to be postgres
2323 postgres = postgres_module .run (plan , password = "postgres" , user = "postgres" , database = "postgres" , service_name = "postgres" )
2424
@@ -36,11 +36,13 @@ def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root,
3636 "SEC_PER_SLOT" : str (seconds_per_slot )
3737 }
3838
39+ redis_url = "{}:{}" .format (redis .hostname , redis .port_number )
40+ postgres_url = postgres .url + "?sslmode=disable"
3941 plan .add_service (
4042 name = MEV_RELAY_HOUSEKEEPER ,
4143 config = ServiceConfig (
4244 image = image ,
43- cmd = ["housekeeper" , "--network" , "custom" , "--db" , "postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable" , "--redis-uri" , "redis:6379" , "--beacon-uris" , beacon_uris ] + mev_params .mev_relay_housekeeper_extra_args ,
45+ cmd = ["housekeeper" , "--network" , "custom" , "--db" , postgres_url , "--redis-uri" , redis_url , "--beacon-uris" , beacon_uris ] + mev_params .mev_relay_housekeeper_extra_args ,
4446 env_vars = env_vars
4547 )
4648 )
@@ -49,7 +51,7 @@ def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root,
4951 name = MEV_RELAY_ENDPOINT ,
5052 config = ServiceConfig (
5153 image = image ,
52- cmd = ["api" , "--network" , "custom" , "--db" , "postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable" , "--secret-key" , DUMMY_SECRET_KEY , "--listen-addr" , "0.0.0.0:{0}" .format (MEV_RELAY_ENDPOINT_PORT ), "--redis-uri" , "redis:6379" , "--beacon-uris" , beacon_uris , "--blocksim" , builder_uri ] + mev_params .mev_relay_api_extra_args ,
54+ cmd = ["api" , "--network" , "custom" , "--db" , postgres_url , "--secret-key" , DUMMY_SECRET_KEY , "--listen-addr" , "0.0.0.0:{0}" .format (MEV_RELAY_ENDPOINT_PORT ), "--redis-uri" , redis_url , "--beacon-uris" , beacon_uris , "--blocksim" , builder_uri ] + mev_params .mev_relay_api_extra_args ,
5355 ports = {
5456 "api" : PortSpec (number = MEV_RELAY_ENDPOINT_PORT , transport_protocol = "TCP" )
5557 },
@@ -61,7 +63,7 @@ def launch_mev_relay(plan, mev_params, network_id, beacon_uris, validator_root,
6163 name = MEV_RELAY_WEBSITE ,
6264 config = ServiceConfig (
6365 image = image ,
64- cmd = ["website" , "--network" , "custom" , "--db" , "postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable" , "--listen-addr" , "0.0.0.0:{0}" .format (MEV_RELAY_WEBSITE_PORT ), "--redis-uri" , "redis:6379" , "https://{0}@{1}" .format (DUMMY_PUB_KEY , MEV_RELAY_ENDPOINT )] + mev_params .mev_relay_website_extra_args ,
66+ cmd = ["website" , "--network" , "custom" , "--db" , postgres_url , "--listen-addr" , "0.0.0.0:{0}" .format (MEV_RELAY_WEBSITE_PORT ), "--redis-uri" , redis_url , "https://{0}@{1}" .format (DUMMY_PUB_KEY , MEV_RELAY_ENDPOINT )] + mev_params .mev_relay_website_extra_args ,
6567 ports = {
6668 "api" : PortSpec (number = MEV_RELAY_WEBSITE_PORT , transport_protocol = "TCP" , application_protocol = "http" )
6769 },
0 commit comments