Skip to content

Commit f5f5dfc

Browse files
committed
integrate tool config changes to kurtosis
1 parent 9e6e6c5 commit f5f5dfc

File tree

3 files changed

+12
-25
lines changed

3 files changed

+12
-25
lines changed

src/package_io/input_parser.star

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

16821682
polling_config = {
1683-
"interval": polling_args.get("interval", "3s"),
1683+
"interval": polling_args.get("interval", "0.5s"),
16841684
"timeout": polling_args.get("timeout", "3s"),
16851685
}
16861686

@@ -1690,9 +1690,12 @@ def get_txpool_viz_params(input_args):
16901690

16911691
focil_enabled = filters_args.get("focil_enabled", "false")
16921692

1693+
log_level = filters_args.get("log_level", "info")
1694+
16931695
return {
16941696
"polling": polling_config,
16951697
"filters": filters_config,
1696-
"focil_enabled": focil_enabled
1698+
"focil_enabled": focil_enabled,
1699+
"log_level": log_level
16971700
}
16981701

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: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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)