-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: working celestia da node on arabica
- Loading branch information
Showing
1 changed file
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,62 @@ | ||
# This Kurtosis package spins up a minimal GM rollup that connects to a DA node | ||
# | ||
# NOTE: currently this is only connecting to a local DA node | ||
|
||
# DA Types | ||
celestia = "celestia" | ||
avail = "avail" | ||
local_da = "local-da" | ||
|
||
|
||
def run(plan, da=local_da): | ||
def run( | ||
plan, | ||
da=local_da, | ||
da_namespace="00000000000000000000000000000000000000000008e5f679bf7116cb", | ||
): | ||
# Define vars | ||
da_address = None | ||
da_rpc_address = None | ||
da_auth_token = None | ||
da_wallet_address = None | ||
da_height = None | ||
|
||
# Start up the DA node | ||
plan.print("Starting up GM rollup with DA: {0}".format(da)) | ||
if da == local_da: | ||
plan.print("Using local-da") | ||
da_node = import_module("github.com/rollkit/local-da/[email protected]") | ||
da_address = da_node.run( | ||
da_rpc_address = da_node.run( | ||
plan, | ||
) | ||
elif da == celestia: | ||
# Uses arabica by default | ||
# TODO: add inputs to target mocha | ||
plan.print("Using celestia for DA") | ||
da_node = import_module("github.com/MSevey/celestia-da-node-package/main.star") | ||
da_address, da_auth_token = da_node.run( | ||
da_node = import_module( | ||
"github.com/rollkit/kurtosis-celestia-da-node/main.star" | ||
) | ||
da_rpc_address, da_auth_token, da_wallet_address, da_height = da_node.run( | ||
plan, | ||
) | ||
else: | ||
fail("Unknown DA: {0}".format(da)) | ||
|
||
plan.print("connecting to da layer via {0}".format(da_address)) | ||
plan.print("connecting to da layer via {0}".format(da_rpc_address)) | ||
##### | ||
# GM | ||
##### | ||
|
||
plan.print("Adding GM service") | ||
plan.print("NOTE: This can take a few minutes to start up...") | ||
gm_start_cmd = [] | ||
if da == celestia: | ||
gm_start_cmd = rollkitCMD( | ||
da, | ||
da_auth_token=da_auth_token, | ||
da_namespace="00000000000000000000000000000000000000000008e5f679bf7116cb", # Make an input, people can set this to whatever they want | ||
da_start_height=2535482, # Make an input, people can pull this from a block explorer | ||
) | ||
elif da == avail: | ||
fail("Avail DA is not yet supported") | ||
elif da == local_da: | ||
gm_start_cmd = rollkitCMD(da, da_address) | ||
else: | ||
fail("Unknown DA: {0}".format(da)) | ||
|
||
# Generate start command | ||
gm_start_cmd = rollkitCMD( | ||
da, | ||
da_address=da_rpc_address, | ||
da_auth_token=da_auth_token, | ||
da_namespace=da_namespace, | ||
da_start_height=da_height, | ||
) | ||
plan.print("GM start command: {0}".format(gm_start_cmd)) | ||
|
||
# Build GM Service Spec | ||
gm_port_number = 26657 | ||
gm_port_spec = PortSpec( | ||
number=gm_port_number, transport_protocol="TCP", application_protocol="http" | ||
|
@@ -123,10 +127,11 @@ def rollkitCMD( | |
"rollkit", | ||
"start", | ||
"--rollkit.aggregator", | ||
"--rollkit.da_address {0}".format(da_address), | ||
"--rollkit.da_auth_token {0}".format(da_auth_token), | ||
"--rollkit.da_namespace {0}".format(da_namespace), | ||
"--rollkit.da_start_height {0}".format(da_start_height), | ||
"--minimum-gas-price=0.025stake", | ||
"--minimum-gas-prices=0.025stake", | ||
] | ||
elif da == avail: | ||
fail("Avail DA is not yet supported") | ||
|