-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.star
49 lines (46 loc) · 1.47 KB
/
main.star
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This Kurtosis package spins up a wordle rollup that connects to a DA node
# Import the local da kurtosis package
da_node = import_module("github.com/rollkit/local-da/[email protected]")
def run(plan):
# Start the DA node
da_address = da_node.run(
plan,
)
plan.print("connecting to da layer via {0}".format(da_address))
# Define the wordle start command
wordle_start_cmd = [
"rollkit",
"start",
"--rollkit.aggregator",
"--rollkit.da_address {0}".format(da_address),
]
# Define the jsonrpc ports
wordle_ports = {
"jsonrpc": PortSpec(
number=26657, transport_protocol="TCP", application_protocol="http"
),
}
# Start the wordle chain
wordle = plan.add_service(
name="wordle",
config=ServiceConfig(
# Locally built wordle image
image="wordle",
cmd=["/bin/sh", "-c", " ".join(wordle_start_cmd)],
ports=wordle_ports,
public_ports=wordle_ports,
ready_conditions=ReadyCondition(
recipe=ExecRecipe(
command=["rollkit", "status"],
extract={
"output": "fromjson | .node_info.network",
},
),
field="extract.output",
assertion="==",
target_value="wordle",
interval="1s",
timeout="1m",
),
),
)