Skip to content

Commit

Permalink
chore: final cleanup for v0.50.3 (#173)
Browse files Browse the repository at this point in the history
* testnet: simply output information & add more docs

* bump: ICT & local-ic v8.5.0

* `git checkout v0.50.3`

* add `make get-localic` to docs

* `cfg.Bech32Prefix = strings.ToLower` (fixes testnet)

* chore(deps): bump spawn ICT + local-ic

* fix: docs/demo
  • Loading branch information
Reecepbcups authored Jul 2, 2024
1 parent 5559512 commit 1a52a76
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0/local-ic && chmod +x local-ic
RUN wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.5.0/local-ic && chmod +x local-ic
RUN mv ./local-ic /go/bin

# Build Spawn
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In this tutorial, we'll create and interact with a new Cosmos-SDK blockchain cal
```shell
git clone https://github.com/rollchains/spawn.git
cd spawn
git checkout v0.50.2
git checkout v0.50.3
make install
```

Expand Down Expand Up @@ -97,6 +97,7 @@ sleep 10

# Interact with the other chain without having to install the cosmos binary
# - Endpoints found at: GET http://127.0.0.1:8080/info
# - make get-localic
local-ic interact localcosmos-1 query 'bank balances cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr'
```

Expand Down
1 change: 1 addition & 0 deletions docs/TAGGED_RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This document outlines the steps required to verify the functionality of spawn a

- Update the README document to be the next spawn tag version (i.e. v0.50.X) that the next release will be.
- Verify the README running docs work as expected for the example chain
- Verify docs/demo works

## Semi-Automatic Verification

Expand Down
10 changes: 5 additions & 5 deletions docs/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,18 @@ The chain will begin to mint new blocks, which you can interact with.

### Interaction

Using the newly built binary (rolld from the --bin flag when we created the chain), we are going to execute the `set` transaction to "myname". This links user1's address (in the keyring) to the desired name in the keeper.
Using the newly built binary (rolld from the --bin flag when we created the chain), we are going to execute the `set` transaction to "myname". This links acc1's address (in the keyring) to the desired name in the keeper.

Then, we resolve this name with the nameservice lookup. `$(rolld keys show user1 -a)` is a substitute for the user1's address. You can also use just `roll1hj5fveer5cjtn4wd6wstzugjfdxzl0xpg2te87` here.
Then, we resolve this name with the nameservice lookup. `$(rolld keys show acc1 -a)` is a substitute for the acc1's address. You can also use just `roll1hj5fveer5cjtn4wd6wstzugjfdxzl0xpg2te87` here.

```bash
rolld tx nameservice set myname --from=user1 --yes
rolld tx nameservice set myname --from=acc1 --yes

# rolld q tx 088382C43C35440676438359B88899D97A8092F34BBDADD32345498297D332BA
# rolld q tx 97BC4F78716C97038A4AA30BDA5BDA53A8B0CBF5B051AAFAF51E3AAAFE6256B1

sleep 2

rolld q nameservice resolve $(rolld keys show user1 -a) --output=json
rolld q nameservice resolve $(rolld keys show acc1 -a) --output=json
```

The expected result should be:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ require (
github.com/rollchains/spawn/simapp v0.0.0-00000000-000000000000
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240529015140-2e881e296463
github.com/strangelove-ventures/interchaintest/v8 v8.4.0
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240702161508-2aba342441d5
github.com/strangelove-ventures/interchaintest/v8 v8.5.0
github.com/stretchr/testify v1.9.0
golang.org/x/mod v0.17.0
golang.org/x/text v0.14.0
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2 h1:G/cVeTAbB9S/6FSWWqpFV0v49hiuHLbJPu9hTZ0UR2A=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2/go.mod h1:Q5BxOd9FxJqYp4vCiLGVdetecPcWTmUQIu0bRigYosU=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20240603204351-26b456ae3afe h1:0fcCSfvBgbagEsEMkZuxgA3Ex7IN9i1Hon0fwgMLpQw=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20240603204351-26b456ae3afe/go.mod h1:Q5BxOd9FxJqYp4vCiLGVdetecPcWTmUQIu0bRigYosU=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
Expand Down Expand Up @@ -1036,10 +1036,10 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ=
github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk=
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240529015140-2e881e296463 h1:uNO9lOtZ0jZOo6QEXkoQo8c+UnE7nGT35Jhc2/oG6u0=
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240529015140-2e881e296463/go.mod h1:L440QlxIzdeOgxAkCNP5JQRCqVbYUa4/qHNv4M6oL68=
github.com/strangelove-ventures/interchaintest/v8 v8.4.0 h1:UHLmJfmkFXuJHfSE8qmOuEy4FWZWuRw4G6XZHm9hC6w=
github.com/strangelove-ventures/interchaintest/v8 v8.4.0/go.mod h1:nfPgRi1yjnzi+qF+0Fs9qN9kkS1Fk0oqgpKvqg5a200=
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240702161508-2aba342441d5 h1:R9j2Qj803syCdmUW7COHTNX7aB/P98xjvWgNrHYaksI=
github.com/strangelove-ventures/interchaintest/local-interchain v0.0.0-20240702161508-2aba342441d5/go.mod h1:a+A2JAmYZ5x52rW7LBqK/H1gtWjbSg9u04zd0TTYOzM=
github.com/strangelove-ventures/interchaintest/v8 v8.5.0 h1:U5zh42iq5KkTq0oI1GdQjFnhoiaxbzM3Ud8OKfa/poA=
github.com/strangelove-ventures/interchaintest/v8 v8.5.0/go.mod h1:UPMvR1joIXO8RMxDozoHIInLZWmd2345PSGLJYWyrwY=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
Expand Down
2 changes: 1 addition & 1 deletion scripts/bump_localic.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# sh scripts/bump_localic.sh

NEW_VERSION=v8.4.0
NEW_VERSION=v8.5.0

find . -type f -name "*.yml" -exec sed -i "s/v[0-9]\.[0-9]\.[0-9]\/local-ic/$NEW_VERSION\/local-ic/g" {} \;
find . -type f -name "*.yml.optional" -exec sed -i "s/v[0-9]\.[0-9]\.[0-9]\/local-ic/$NEW_VERSION\/local-ic/g" {} \;
Expand Down
8 changes: 0 additions & 8 deletions simapp/.github/testnet.md

This file was deleted.

27 changes: 14 additions & 13 deletions simapp/.github/workflows/testnet-hetzner.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: cloud testnet
name: public cloud testnet

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc

# https://github.com/<org>/<repo>/settings/secrets/actions/new
# - HCLOUD_TOKEN
# - SSH_PRIVATE_KEY
# - HCLOUD_TOKEN # console.hetzner.cloud -> [select project] -> security -> API Tokens -> Generate API Token (Red)
# - SSH_PRIVATE_KEY # The raw contents of an RSA / ed25519 private key (cat ~/.ssh/id_ed25519)

env:
# NOTE: Your repo must be public to use this action. If not, use the self hosted action.
GO_VERSION: 1.22.3
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
LOCALIC_PORT: 8080
LOCALIC_AUTH_KEY: ""
HETZNER_SSH_KEY: "reece-hetzner"
# HETZNER_MACHINE_TYPE: "cpx31" # shared 4vCPU ($7/Mo)
HETZNER_MACHINE_TYPE: "ccx23" # dedicated 4 CPU 16GB Ram ($25/Mo)z
HETZNER_SSH_KEY: "reece-hetzner" # console.hetzner.cloud -> [select project] -> security -> Add SSH Key
# HETZNER_MACHINE_TYPE: "cpx31" # shared 4vCPU ($7/Mo)
HETZNER_MACHINE_TYPE: "ccx23" # dedicated 4 CPU 16GB Ram ($25/Mo)z

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -48,12 +49,12 @@ jobs:
echo "GITHUB_REF_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
echo "LOCALIC_PORT=${{ env.LOCALIC_PORT }}" >> $GITHUB_ENV
- uses: JasonEtco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/testnet.md
update_existing: true
- name: Output Information
run: |
echo "Server IP: ${{ env.SERVER_IPV4_ADDR }}"
echo "GITHUB_SHA: $GITHUB_SHA"
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "LOCAL_IC API: http://${{ env.SERVER_IPV4_ADDR }}:${{ env.LOCALIC_PORT }}"
- name: Testnet setup
uses: appleboy/[email protected]
Expand All @@ -76,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.4.0/local-ic && chmod +x local-ic
wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.5.0/local-ic && chmod +x local-ic
sudo mv local-ic /usr/local/bin
git clone https://github.com/strangelove-ventures/heighliner.git && cd heighliner
Expand Down
2 changes: 1 addition & 1 deletion simapp/.github/workflows/testnet-self-hosted.yml.optional
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0/local-ic && chmod +x local-ic
wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.5.0/local-ic && chmod +x local-ic
sudo mv local-ic /usr/local/bin

git clone https://github.com/strangelove-ventures/heighliner.git && cd heighliner
Expand Down
2 changes: 1 addition & 1 deletion simapp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ proto-check-breaking:
## --- Testnet Utilities ---
get-localic:
@echo "Installing local-interchain"
git clone --branch v8.4.0 https://github.com/strangelove-ventures/interchaintest.git interchaintest-downloader
git clone --branch v8.5.0 https://github.com/strangelove-ventures/interchaintest.git interchaintest-downloader
cd interchaintest-downloader/local-interchain && make install
@echo ✅ local-interchain installed $(shell which local-ic)

Expand Down
4 changes: 2 additions & 2 deletions simapp/interchaintest/go.mod_
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/cosmos/ibc-go/v8 v8.2.1
github.com/cosmos/interchain-security/v5 v5.0.0
github.com/strangelove-ventures/globalfee v0.50.0
github.com/strangelove-ventures/interchaintest/v8 v8.4.0
github.com/strangelove-ventures/interchaintest/v8 v8.5.0
github.com/strangelove-ventures/poa v0.50.0
github.com/strangelove-ventures/tokenfactory v0.50.0
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -180,7 +180,7 @@ require (
github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2 // indirect
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20240603204351-26b456ae3afe // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions simapp/interchaintest/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1533,8 +1533,8 @@ github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2 h1:G/cVeTAbB9S/6FSWWqpFV0v49hiuHLbJPu9hTZ0UR2A=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20230913220906-b988ea7da0c2/go.mod h1:Q5BxOd9FxJqYp4vCiLGVdetecPcWTmUQIu0bRigYosU=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20240603204351-26b456ae3afe h1:0fcCSfvBgbagEsEMkZuxgA3Ex7IN9i1Hon0fwgMLpQw=
github.com/misko9/go-substrate-rpc-client/v4 v4.0.0-20240603204351-26b456ae3afe/go.mod h1:Q5BxOd9FxJqYp4vCiLGVdetecPcWTmUQIu0bRigYosU=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand Down Expand Up @@ -1794,8 +1794,8 @@ github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
github.com/strangelove-ventures/globalfee v0.50.0 h1:f2G+0s7quSUSsNvfaDSflPDS48DaLs1sFIdTGxSrzZ8=
github.com/strangelove-ventures/globalfee v0.50.0/go.mod h1:PSXvznw0SrYj0M36vfnUf5+BVuPJgY58do+wU7HpC2Y=
github.com/strangelove-ventures/interchaintest/v8 v8.4.0 h1:UHLmJfmkFXuJHfSE8qmOuEy4FWZWuRw4G6XZHm9hC6w=
github.com/strangelove-ventures/interchaintest/v8 v8.4.0/go.mod h1:nfPgRi1yjnzi+qF+0Fs9qN9kkS1Fk0oqgpKvqg5a200=
github.com/strangelove-ventures/interchaintest/v8 v8.5.0 h1:U5zh42iq5KkTq0oI1GdQjFnhoiaxbzM3Ud8OKfa/poA=
github.com/strangelove-ventures/interchaintest/v8 v8.5.0/go.mod h1:UPMvR1joIXO8RMxDozoHIInLZWmd2345PSGLJYWyrwY=
github.com/strangelove-ventures/poa v0.50.0 h1:ZLDVv4ZK+FeKyAcJ9ahS6SgAOch8wvGr/txAKWQmcvg=
github.com/strangelove-ventures/poa v0.50.0/go.mod h1:LcmorSGWRyn/M5hch7dAW7l0aYL+VSw28uzdsjdOduc=
github.com/strangelove-ventures/tokenfactory v0.50.0 h1:r5ja0CDrACAeCdP/LMhfdXZQFK6YEXE7yfNZ1+jZyg4=
Expand Down
1 change: 1 addition & 0 deletions spawn/cfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func (cfg *NewChainConfig) Validate() error {
return ErrCfgEmptyBech32
}

cfg.Bech32Prefix = strings.ToLower(cfg.Bech32Prefix)
if !isAlphaFn(cfg.Bech32Prefix) {
return ErrCfgBech32Alpha
}
Expand Down

0 comments on commit 1a52a76

Please sign in to comment.