-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: initialize kurtosis package #1
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
25169a3
feat: initialize kurtosis package
MSevey 7cff748
testing
MSevey 3b19c3b
fix: working mvp of kurtosis instance
MSevey a1a16be
chore: use docker iamge
MSevey 4a8197a
feat: reduce docker image size
MSevey 2eda1f2
testing smaller docker image
MSevey 3600d62
chore: revert docker workflow workaround
MSevey 0413835
fix(ci): spelling error in dockerfile lint
MSevey bf3964f
fix: markdownlint error
MSevey 5eefc6a
chore: update to working docker image
MSevey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
name: github.com/rollkit/cosmwasm | ||
description: |- | ||
Kurtosis package for a Rollkit CosmWasm rollup | ||
replace: {} |
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# This Kurtosis package spins up a minimal CosmWasm rollup that connects to a DA node | ||
# | ||
# NOTE: currently this is only connecting to a local DA node | ||
|
||
da_node = import_module("github.com/rollkit/local-da/[email protected]") | ||
|
||
def run(plan): | ||
########## | ||
# DA | ||
########## | ||
|
||
da_address = da_node.run( | ||
plan, | ||
) | ||
plan.print("connecting to da layer via {0}".format(da_address)) | ||
|
||
################# | ||
# CosmWasm Rollup | ||
################# | ||
plan.print("Adding CosmWasm service") | ||
rpc_port_number = 36657 | ||
grpc_port_number = 9290 | ||
p2p_port_number = 36656 | ||
wasmd_start_cmd = [ | ||
"wasmd", | ||
"start", | ||
"--rollkit.aggregator", | ||
"--rollkit.da_address {0}".format(da_address), | ||
"--rpc.laddr tcp://127.0.0.1:{0}".format(rpc_port_number), | ||
"--grpc.address 127.0.0.1:{0}".format(grpc_port_number), | ||
"--p2p.laddr 0.0.0.0:{0}".format(p2p_port_number), | ||
"--minimum-gas-prices='0.025uwasm'", | ||
] | ||
wasmd_ports = { | ||
"rpc-laddr": defaultPortSpec(rpc_port_number), | ||
# "grpc-addr": defaultPortSpec(grpc_port_number), | ||
# "p2p-laddr": defaultPortSpec(p2p_port_number), | ||
} | ||
wasm = plan.add_service( | ||
name="wasm", | ||
config=ServiceConfig( | ||
# Using CosmWasm version v0.1.0 | ||
# image="ghcr.io/rollkit/cosmwasm:xxxxx", | ||
image = ImageBuildSpec( | ||
image_name="cosmwasm", | ||
build_context_dir=".", | ||
), | ||
cmd=["/bin/sh", "-c", " ".join(wasmd_start_cmd)], | ||
ports=wasmd_ports, | ||
public_ports=wasmd_ports, | ||
ready_conditions=ReadyCondition( | ||
recipe=ExecRecipe( | ||
command=["wasmd", "status", "-n tcp://localhost:{0}".format(rpc_port_number)], | ||
extract={ | ||
"output": "fromjson | .node_info.network", | ||
}, | ||
), | ||
field="extract.output", | ||
assertion="==", | ||
target_value="localwasm", | ||
interval="1s", | ||
timeout="1m", | ||
), | ||
), | ||
) | ||
|
||
wasm_address = "http://{0}:{1}".format( | ||
wasm.ip_address, wasm.ports["rpc-laddr"].number | ||
) | ||
plan.print("CosmWasm service is available at {0}".format(wasm_address)) | ||
|
||
def defaultPortSpec(port_number): | ||
return PortSpec( | ||
number=port_number, | ||
transport_protocol="TCP", | ||
application_protocol="http", | ||
) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: need to bump this on .github and release new version of figure out how to reduce the image size.