Skip to content

Commit

Permalink
Upgrade: [email protected], [email protected], ibc-go@v7, (#235)
Browse files Browse the repository at this point in the history
* wasmd v0.46, cosmos-sdk v0.47.8, ibc-go v7

* progress on migration

* more progress

* bump

* bump cmd logic, directly add cometbft & cometbft-db,

* build proto files, compiles

* v17 upgrade keeper

* reformat & prints blocks

* remove merkle

* remove stale merkledrop proto and core mod

* handle v0.47sdk upgrade, initialize pinned wasm code on setup,

* ci: build docker images on release

* bump

* docker bump

* bump

* bump

* bump

* add test node script, reformat dockerfile

* docker bump

* format go module to upgrade verison

* bypass ci test until next release

* .gitignore

* reformat test helpers

* fix v18 upgrade constant

* prep e2e upgrade test & CI for next release

* add build makefile cli for cross-platform compilation

* bump changelog

* bump upgrade version

* bump v18 upgrade package

* remove ante-test

* bump proto & remove event boilerplate

* add sha256sum release scripts

* bump

* add init-from-export-state

* add ibctm

* cleanup details

* ref: https://github.com/cosmos/cosmos-sdk/blob/main/UPGRADING.md#replaces

* bump readme & changelog

---------

Co-authored-by: hard-nett <[email protected]>
  • Loading branch information
hard-nett and hard-nett authored Nov 27, 2024
1 parent 6caaf5f commit 50b4082
Show file tree
Hide file tree
Showing 187 changed files with 7,357 additions and 13,092 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Build Docker Image on PR

on:
push:
branches:
- master
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build without push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: false
build-args: arch=x86_64
102 changes: 102 additions & 0 deletions .github/workflows/interchaintest-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: ictest E2E

on:
pull_request:
push:
tags:
- "**"
branches:
- "main"
- "master"

permissions:
contents: read
packages: write

env:
GO_VERSION: 1.22.0
TAR_PATH: /tmp/bitsong-docker-image.tar
IMAGE_NAME: bitsong-docker-image

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and export
uses: docker/build-push-action@v5
with:
context: .
tags: bitsong:local
outputs: type=docker,dest=${{ env.TAR_PATH }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: ${{ env.TAR_PATH }}

e2e-tests:
needs: build-docker
runs-on: ubuntu-latest
strategy:
matrix: 899
# names of `make` commands to run tests
test:
# - "e2e-basic"
# - "e2e-upgrade"
fail-fast: false

steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: interchaintest/go.sum

- name: checkout chain
uses: actions/checkout@v4

- name: Download Tarball Artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.IMAGE_NAME }}
path: /tmp

- name: Load Docker Image
run: |
docker image load -i ${{ env.TAR_PATH }}
docker image ls -a
- name: Run Test
id: run_test
continue-on-error: true
run: make ${{ matrix.test }}

- name: Retry Failed Test
if: steps.run_test.outcome == 'failure'
run: |
for i in 1 2; do
echo "Retry attempt $i"
if make ${{ matrix.test }}; then
echo "Test passed on retry"
exit 0
fi
done
echo "Test failed after retries"
exit 1
72 changes: 72 additions & 0 deletions .github/workflows/push-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# This workflow pushes new Bitsong docker images on every new tag.
#
# On every new `vX.Y.Z` tag the following images are pushed:
#
# bitsongofficial/go-bitsong:vX.Y.Z # is pushed
# bitsongofficial/go-bitsong:X.Y.Z # is pushed
# bitsongofficial/go-bitsong:X.Y # is updated to X.Y.Z
# bitsongofficial/go-bitsong:X # is updated to X.Y.Z
# bitsongofficial/go-bitsong:latest # is updated to X.Y.Z
#
# bitsongofficial/go-bitsong-e2e:vX.Y.Z # is pushed
# bitsongofficial/go-bitsong-e2e:X.Y.Z # is pushed
# bitsongofficial/go-bitsong-e2e:X.Y # is updated to X.Y.Z
# bitsongofficial/go-bitsong-e2e:X # is updated to X.Y.Z
# bitsongofficial/go-bitsong-e2e:latest # is updated to X.Y.Z
#
# All the images above have support for linux/amd64 and linux/arm64.

name: Push Docker Images

on:
release:
types: [published, created, edited]
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc

jobs:
terp-images:
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Parse tag
id: tag
run: |
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
MAJOR_VERSION=$(echo $VERSION | cut -d '.' -f 1)
MINOR_VERSION=$(echo $VERSION | cut -d '.' -f 2)
PATCH_VERSION=$(echo $VERSION | cut -d '.' -f 3)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV
-
name: Build and push
id: build_push_image
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/bitsongofficial/go-bitsong:${{ env.MAJOR_VERSION }}
ghcr.io/bitsongofficial/go-bitsong:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/bitsongofficial/go-bitsong:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
ghcr.io/bitsongofficial/go-bitsong:v${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go 🧰
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.22

- name: Unshallow
run: git fetch --prune --unshallow --tags --force
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Setup Go 🧰
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.22

- name: Build the binary 🏭
run: |
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Setup Go 🧰
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.22

- name: Compute diff 📜
uses: technote-space/[email protected]
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
- name: Setup Go 🧰
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.22

- name: Build the binary 🏭
run: |
Expand Down
10 changes: 6 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
# Build
vendor
build
tools/bin/*
examples/build/*
docs/_build
docs/tutorial
dist
tools-stamp

Expand All @@ -28,6 +24,9 @@ mytestnet
coverage.txt
profile.out

# heighliner
heighliner

# Vagrant
.vagrant/
*.box
Expand All @@ -50,3 +49,6 @@ buf-stamp

data
state_export.json

github.com*
gogoproto*
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: go get && go build ./... && go test ./... && make
command: go run .


25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## [v0.18.x]
### Features
- Interchaintest package support added
- New CI support to build & release docker image
- New CI support to run interchain tests
- New script at `scripts/test_node.sh` that is a basic script to test setting up and starting a node.
### Improvements
- Improved Makefile cli top-level command scripting
- Replaced tendermint with cometbft
- Bumped wasmd to `v0.45.0`
- Bumped Cosmos-SDK to `v0.47.8`
- Bumped IBC-Go to `v7.4.0`
- Bumped Paket-Forward-Middleware to `v7.1.3`
- Reformatted app test suite

### Depreceated
- remove `x/merkledrop` module

### State Breaking
- Bumped required minimum Go version to `v1.22`

## [v0.16.0]
### Bug fixes
- patch for v0.16.0 that fixed Packet Forward Middleware bug.

## [v0.15.0] - 2024-03-06
- Updated Cosmos-sdk to v0.45.16 for improved stability and security
- Upgraded ibc-go to v4.4.2 for enhanced interoperability between different blockchain networks
Expand Down
Loading

0 comments on commit 50b4082

Please sign in to comment.