-
Notifications
You must be signed in to change notification settings - Fork 81
/
main.star
46 lines (42 loc) · 1.43 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
# This Kurtosis package spins up a defund rollup that connects to a DA node
# Import the local da kurtosis package
da_node = import_module("github.com/rollkit/local-da/main.star@v0.3.0")
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 defund start command
defund_start_cmd = [
"rollkit",
"start",
"--rollkit.aggregator",
"--rollkit.da_address {0}".format(da_address),
"--rollkit.block_time 0.1ms",
"--minimum-gas-prices 0.01stake",
]
# Define the jsonrpc ports
defund_ports = {
"jsonrpc": PortSpec(
number=26657, transport_protocol="TCP", application_protocol="http"
),
"rest": PortSpec(
number=1317, transport_protocol="TCP", application_protocol="http"
),
"grpc": PortSpec(
number=9090, transport_protocol="TCP", application_protocol="http"
),
}
# Start the defund chain
defund = plan.add_service(
name="defund",
config=ServiceConfig(
# Use the defund image we just built
image="mysticlabss/defund:v0.1.1",
# Set the command to start the defund chain in the docker container
cmd=["/bin/sh", "-c", " ".join(defund_start_cmd)],
ports=defund_ports,
public_ports=defund_ports,
),
)