Skip to content

Commit ddef3b6

Browse files
committed
integrate tool config changes to kurtosis
1 parent 005a566 commit ddef3b6

3 files changed

Lines changed: 13 additions & 26 deletions

File tree

src/package_io/input_parser.star

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,7 +1663,7 @@ def get_txpool_viz_params(input_args):
16631663
filters_args = input_args.get("txpool_viz_params", {}).get("filters", {})
16641664

16651665
polling_config = {
1666-
"interval": polling_args.get("interval", "3s"),
1666+
"interval": polling_args.get("interval", "0.5s"),
16671667
"timeout": polling_args.get("timeout", "3s"),
16681668
}
16691669

@@ -1673,9 +1673,12 @@ def get_txpool_viz_params(input_args):
16731673

16741674
focil_enabled = filters_args.get("focil_enabled", "false")
16751675

1676+
log_level = filters_args.get("log_level", "info")
1677+
16761678
return {
16771679
"polling": polling_config,
16781680
"filters": filters_config,
1679-
"focil_enabled": focil_enabled
1681+
"focil_enabled": focil_enabled,
1682+
"log_level": log_level
16801683
}
16811684

src/package_io/sanity_check.star

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ SUBCATEGORY_PARAMS = {
302302
"txpool_viz_params": [
303303
"polling",
304304
"filters",
305-
"focil_enabled"
305+
"focil_enabled",
306+
"log_level"
306307
]
307308
}
308309

src/txpool_viz/txpool_viz.star

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def launch_txpool_viz(
4444
txpoolviz = plan.add_service(
4545
name=TXPOOL_VIZ_SERVICE_NAME,
4646
config=ServiceConfig(
47-
image="punkhazardlabs/txpool-viz:latest",
47+
image="punkhazardlabs/txpool-viz:dev",
4848
ports= {
4949
shared_utils.HTTP_APPLICATION_PROTOCOL: PortSpec(
5050
number=HTTP_PORT_NUMBER,
@@ -57,38 +57,21 @@ def launch_txpool_viz(
5757
"REDIS_URL": redis_url,
5858
"CONFIG_JSON": config_json,
5959
"PORT": str(HTTP_PORT_NUMBER),
60+
"ENV": "prod" # Default for Kurtosis
6061
},
6162
)
6263
)
6364

6465
def create_config(
6566
endpoint_list,
6667
network_participants,
67-
txpoolviz_params
68+
config
6869
):
69-
config = {}
70-
71-
# endpoints list
70+
# add endpoints
7271
config["endpoints"] = endpoint_list
7372

74-
if txpoolviz_params["focil_enabled"] == "true":
73+
# add beacon sse if focil_enabled?
74+
if config["focil_enabled"] == "true":
7575
config["beacon_sse_url"] = network_participants[0].cl_context.beacon_http_url
7676

77-
# polling config
78-
polling_config = {}
79-
polling_config["interval"] = getattr(
80-
txpoolviz_params, "polling_interval", "3s" # 3s default
81-
)
82-
polling_config["timeout"] = getattr(
83-
txpoolviz_params, "polling_timeout", "3s" # 3s default
84-
)
85-
config["polling"] = polling_config
86-
87-
# filters config
88-
filters_config = {}
89-
filters_config["min_gas_price"] = getattr(
90-
txpoolviz_params, "min_gas_price", "1gwei" # 1gwei default
91-
)
92-
config["filters"] = filters_config
93-
9477
return config

0 commit comments

Comments
 (0)