diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e1305f1..77c9a0e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: '1.22.3' + go-version: '1.23.0' - name: Clean up dist directory run: rm -rf dist @@ -78,4 +78,4 @@ jobs: platforms: linux/amd64 tags: | ${{ env.DOCKER_REGISTRY }}/spawn:latest - ${{ env.DOCKER_REGISTRY }}/spawn:${{ github.ref_name }} \ No newline at end of file + ${{ env.DOCKER_REGISTRY }}/spawn:${{ github.ref_name }} diff --git a/Dockerfile b/Dockerfile index d27bd39..a3e6e10 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN go mod tidy COPY . . # Download local-ic (nested spawn add on) -RUN wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.0/local-ic && chmod +x local-ic +RUN wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.1/local-ic && chmod +x local-ic RUN mv ./local-ic /go/bin # Build Spawn diff --git a/README.md b/README.md index 6336910..1aa985b 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ If you do not have [`go 1.22+`](https://go.dev/doc/install), [`Docker`](https:// ```bash # Download the the Spawn repository -git clone https://github.com/rollchains/spawn.git --depth=1 --branch v0.50.13 +git clone https://github.com/rollchains/spawn.git --depth=1 --branch v0.50.14 cd spawn # Install Spawn @@ -43,6 +43,39 @@ echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc source ~/.bashrc ``` +## Build an EVM Chain + +Cosmos EVM chain, CoinType 60, Full foundry support + +```bash +# flags are optional +spawn new mychain --consensus=proof-of-stake --binary=simd --denom=token --disable=explorer + +cd mychain + +make sh-testnet + +# foundry works as you expect +cast block + +# cosmos works as you expect +simd status +``` + +## Build a Cosmos Chain + +```bash +# flags are optional +spawn new mychain --consensus=proof-of-stake --binary=simd --denom=token --disable=explorer,evm + +cd mychain + +make sh-testnet + +# cosmos works as you expect +simd status +``` + ## Spawn in Action In this 4 minute demo we: diff --git a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md index 8316784..987ff06 100644 --- a/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md +++ b/docs/versioned_docs/version-v0.50.x/01-setup/02-install-spawn.md @@ -19,7 +19,7 @@ Install Spawn from source. ```bash # Install from latest source -git clone https://github.com/rollchains/spawn.git --depth 1 --branch v0.50.13 +git clone https://github.com/rollchains/spawn.git --depth 1 --branch v0.50.14 # Change to this directory cd spawn diff --git a/install.sh b/install.sh index 261884b..c69e935 100644 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ # curl -sSL https://raw.githubusercontent.com/rollchains/spawn/release/v0.50/install.sh | bash # -VERSION=${1:-"v0.50.13"} +VERSION=${1:-"v0.50.14"} BASE_URL="https://github.com/rollchains/spawn/releases/download/$VERSION" ARCH=$(uname -m) diff --git a/scripts/bump_docs.sh b/scripts/bump_docs.sh index 46189d4..cad2de6 100644 --- a/scripts/bump_docs.sh +++ b/scripts/bump_docs.sh @@ -1,7 +1,7 @@ # bumps docs versions for spawn -OLD_VERSION=v0.50.12 -NEW_VERSION=v0.50.13 +OLD_VERSION=v0.50.13 +NEW_VERSION=v0.50.14 findAndReplace() { find . -type f -name "$1" -not -path "*node_modules*" -exec sed -i "$2" {} \; diff --git a/scripts/bump_localic.sh b/scripts/bump_localic.sh index 907a7de..70fd690 100644 --- a/scripts/bump_localic.sh +++ b/scripts/bump_localic.sh @@ -1,7 +1,7 @@ #!/bin/sh # sh scripts/bump_localic.sh -NEW_VERSION=v8.8.0 +NEW_VERSION=v8.8.1 find . -type f -name "*.md" diff --git a/simapp/.github/workflows/testnet-hetzner.yml b/simapp/.github/workflows/testnet-hetzner.yml index 9b35ece..a56dcd1 100644 --- a/simapp/.github/workflows/testnet-hetzner.yml +++ b/simapp/.github/workflows/testnet-hetzner.yml @@ -77,7 +77,7 @@ jobs: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install docker.io docker-compose sudo apt-get update - wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.0/local-ic && chmod +x local-ic + wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.1/local-ic && chmod +x local-ic sudo mv local-ic /usr/local/bin git clone https://github.com/strangelove-ventures/heighliner.git && cd heighliner diff --git a/simapp/.github/workflows/testnet-self-hosted.yml.optional b/simapp/.github/workflows/testnet-self-hosted.yml.optional index 9904bf6..7acc0b5 100644 --- a/simapp/.github/workflows/testnet-self-hosted.yml.optional +++ b/simapp/.github/workflows/testnet-self-hosted.yml.optional @@ -42,7 +42,7 @@ jobs: sudo DEBIAN_FRONTEND=noninteractive apt-get -y install docker.io docker-compose sudo apt-get update - wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.0/local-ic && chmod +x local-ic + wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.8.1/local-ic && chmod +x local-ic sudo mv local-ic /usr/local/bin git clone https://github.com/strangelove-ventures/heighliner.git && cd heighliner diff --git a/simapp/scripts/test_ics_node.sh b/simapp/scripts/test_ics_node.sh index c6faee4..12e6a7e 100644 --- a/simapp/scripts/test_ics_node.sh +++ b/simapp/scripts/test_ics_node.sh @@ -43,8 +43,6 @@ if [ -z `which $BINARY` ]; then fi fi -alias BINARY="$BINARY --home=$HOME_DIR" - command -v $BINARY > /dev/null 2>&1 || { echo >&2 "$BINARY command not found. Ensure this is setup / properly installed in your GOPATH (make install)."; exit 1; } command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; } @@ -71,7 +69,7 @@ from_scratch () { add_key() { key=$1 mnemonic=$2 - echo $mnemonic | BINARY keys add $key --keyring-backend $KEYRING --algo $KEYALGO --recover + echo $mnemonic | $BINARY keys add $key --keyring-backend $KEYRING --algo $KEYALGO --home $HOME_DIR --recover } # cosmos1efd63aw40lxf3n4mhf7dzhjkr453axur6cpk92 @@ -79,7 +77,7 @@ from_scratch () { # cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr add_key $KEY2 "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" - BINARY init $MONIKER --chain-id $CHAIN_ID --overwrite --default-denom $DENOM + $BINARY init $MONIKER --chain-id $CHAIN_ID --home $HOME_DIR --overwrite --default-denom $DENOM update_test_genesis () { cat $HOME_DIR/config/genesis.json | jq "$1" > $HOME_DIR/config/tmp_genesis.json && mv $HOME_DIR/config/tmp_genesis.json $HOME_DIR/config/genesis.json @@ -98,11 +96,12 @@ from_scratch () { update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_fee"]=[]' update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_gas_consume"]=100000' - BINARY keys list --keyring-backend $KEYRING + $BINARY keys list --keyring-backend $KEYRING --home $HOME_DIR # Allocate genesis accounts - BINARY genesis add-genesis-account $KEY 10000000$DENOM,900test --keyring-backend $KEYRING --append - BINARY genesis add-genesis-account $KEY2 10000000$DENOM,800test --keyring-backend $KEYRING --append + BASE_GENESIS_ALLOCATIONS="100000000000000000000000000$DENOM,100000000test" + $BINARY genesis add-genesis-account $KEY $BASE_GENESIS_ALLOCATIONS --keyring-backend $KEYRING --append --home $HOME_DIR + $BINARY genesis add-genesis-account $KEY2 $BASE_GENESIS_ALLOCATIONS --keyring-backend $KEYRING --append --home $HOME_DIR # ICS provider genesis hack HACK_DIR=icshack-1 && echo $HACK_DIR @@ -150,4 +149,4 @@ sed -i -e 's/address = ":8080"/address = "0.0.0.0:'$ROSETTA'"/g' $HOME_DIR/confi sed -i -e 's/timeout_commit = "5s"/timeout_commit = "'$BLOCK_TIME'"/g' $HOME_DIR/config/config.toml # Start the daemon in the background -BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" +$BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" --home $HOME_DIR diff --git a/simapp/scripts/test_node.sh b/simapp/scripts/test_node.sh index 94f1aec..3c4ef50 100644 --- a/simapp/scripts/test_node.sh +++ b/simapp/scripts/test_node.sh @@ -38,8 +38,6 @@ if [ -z `which $BINARY` ]; then fi fi -alias BINARY="$BINARY --home=$HOME_DIR" - command -v $BINARY > /dev/null 2>&1 || { echo >&2 "$BINARY command not found. Ensure this is setup / properly installed in your GOPATH (make install)."; exit 1; } command -v jq > /dev/null 2>&1 || { echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"; exit 1; } @@ -67,7 +65,7 @@ from_scratch () { add_key() { key=$1 mnemonic=$2 - echo $mnemonic | BINARY keys add $key --keyring-backend $KEYRING --algo $KEYALGO --recover + echo $mnemonic | $BINARY keys add $key --keyring-backend $KEYRING --algo $KEYALGO --home $HOME_DIR --recover } # wasm1efd63aw40lxf3n4mhf7dzhjkr453axursysrvp @@ -75,7 +73,7 @@ from_scratch () { # wasm1hj5fveer5cjtn4wd6wstzugjfdxzl0xpvsr89g add_key $KEY2 "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" - BINARY init $MONIKER --chain-id $CHAIN_ID --default-denom $DENOM + $BINARY init $MONIKER --chain-id $CHAIN_ID --default-denom $DENOM --home $HOME_DIR update_test_genesis () { cat $HOME_DIR/config/genesis.json | jq "$1" > $HOME_DIR/config/tmp_genesis.json && mv $HOME_DIR/config/tmp_genesis.json $HOME_DIR/config/genesis.json @@ -116,16 +114,19 @@ from_scratch () { update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_fee"]=[]' update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_gas_consume"]=100000' + + BASE_GENESIS_ALLOCATIONS="100000000000000000000000000$DENOM,100000000test" + # Allocate genesis accounts - BINARY genesis add-genesis-account $KEY 100000000000000000000000000$DENOM,100000000test --keyring-backend $KEYRING --append - BINARY genesis add-genesis-account $KEY2 100000000000000000000000000$DENOM,90000000test --keyring-backend $KEYRING --append + $BINARY genesis add-genesis-account $KEY $BASE_GENESIS_ALLOCATIONS --keyring-backend $KEYRING --home $HOME_DIR --append + $BINARY genesis add-genesis-account $KEY2 $BASE_GENESIS_ALLOCATIONS --keyring-backend $KEYRING --home $HOME_DIR --append # Sign genesis transaction - BINARY genesis gentx $KEY 1000000000000000000000$DENOM --gas-prices 0${DENOM} --keyring-backend $KEYRING --chain-id $CHAIN_ID + $BINARY genesis gentx $KEY 1000000000000000000000$DENOM --gas-prices 0${DENOM} --keyring-backend $KEYRING --chain-id $CHAIN_ID --home $HOME_DIR - BINARY genesis collect-gentxs + $BINARY genesis collect-gentxs --home $HOME_DIR - BINARY genesis validate-genesis + $BINARY genesis validate-genesis --home $HOME_DIR err=$? if [ $err -ne 0 ]; then echo "Failed to validate genesis" @@ -164,4 +165,4 @@ sed -i -e 's/address = ":8080"/address = "0.0.0.0:'$ROSETTA'"/g' $HOME_DIR/confi # Faster blocks sed -i -e 's/timeout_commit = "5s"/timeout_commit = "'$BLOCK_TIME'"/g' $HOME_DIR/config/config.toml -BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" +$BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" --home $HOME_DIR diff --git a/spawn/file_content.go b/spawn/file_content.go index 3346c11..7da93a2 100644 --- a/spawn/file_content.go +++ b/spawn/file_content.go @@ -109,7 +109,7 @@ func (fc *FileContent) ReplaceTestNodeScript(cfg *NewChainConfig) { fc.ReplaceAll(`wasm1hj5fveer5cjtn4wd6wstzugjfdxzl0xpvsr89g`, `wasm1r6yue0vuyj9m7xw78npspt9drq2tmtvgdttkxx`) // the same for both ics & normal test nodes - baseStartCmd := `BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC"` + baseStartCmd := `$BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" --home $HOME_DIR` fc.ReplaceAll(baseStartCmd, fmt.Sprintf(`%s --json-rpc.api=eth,txpool,personal,net,debug,web3 --chain-id="$CHAIN_ID"`, baseStartCmd)) }