Skip to content

Commit

Permalink
Merge branch 'main' into damian/wasm-simapp-docker-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan authored Jul 10, 2024
2 parents 9f523f1 + ecbf479 commit 4532360
Show file tree
Hide file tree
Showing 105 changed files with 4,670 additions and 2,489 deletions.
16 changes: 16 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ pull_request_rules:
backport:
branches:
- 08-wasm/release/v0.1.x+ibc-go-v7.3.x-wasmvm-v1.5.x
- name: backport patches to v0.2.x wasm ibc-go v7.3.x & wasmvm 1.5.x branch
conditions:
- base=main
- label=backport-wasm-v0.2.x+ibc-go-v7.3.x-wasmvm-v1.5.x
actions:
backport:
branches:
- 08-wasm/release/v0.2.x+ibc-go-v7.3.x-wasmvm-v1.5.x
- name: backport patches to v0.1.x wasm ibc-go v8.0.x & wasmvm 1.5.x branch
conditions:
- base=main
Expand All @@ -74,6 +82,14 @@ pull_request_rules:
backport:
branches:
- 08-wasm/release/v0.2.x+ibc-go-v8.3.x-wasmvm-v2.0.x
- name: backport patches to v0.3.x wasm ibc-go v8.3.x & wasmvm 2.0.x branch
conditions:
- base=main
- label=backport-wasm-v0.3.x+ibc-go-v8.3.x-wasmvm-v2.0.x
actions:
backport:
branches:
- 08-wasm/release/v0.3.x+ibc-go-v8.3.x-wasmvm-v2.0.x
- name: backport patches to v7.4.x branch
conditions:
- base=main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
run: make build-docs

- name: Deploy 🚀
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].3
with:
branch: gh-pages
folder: docs/build
Expand Down
80 changes: 42 additions & 38 deletions .github/workflows/e2e-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ on:

# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# dynamically build a matrix of test/test suite pairs to run
build-test-matrix:
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -35,7 +36,8 @@ jobs:

# dynamically build a matrix of test/test suite pairs to run
build-test-matrix-wasm:
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
Expand All @@ -59,7 +61,8 @@ jobs:
CHAIN_IMAGE: ibc-go-simd
RELAYER_ID: "hermes" # by default use hermes for fork e2es.
FORK: "true"
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
needs:
- build-test-matrix
runs-on: ubuntu-latest
Expand All @@ -81,37 +84,38 @@ jobs:
make e2e-test test=${{ matrix.test }}
# this workflow runs only the wasm tests.
e2e-fork-wasm:
env:
CHAIN_A_TAG: latest
CHAIN_B_TAG: latest
CHAIN_IMAGE: ibc-go-wasm-simd
RELAYER_ID: "hyperspace" # by default use hyperspace relayer for fork wasm tests.
FORK: "true"
if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
needs: build-test-matrix-wasm
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.build-test-matrix-wasm.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: make python-install-deps
- name: Docker Build Wasm
run: |
version="$(scripts/get-libwasm-version.py --get-version)"
checksum="$(scripts/get-libwasm-version.py --get-checksum)"
docker build . -t "${CHAIN_IMAGE}:${CHAIN_A_TAG}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum}
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: 'e2e/go.sum'
- name: Run e2e Test
run: |
cd e2e
make e2e-test test=${{ matrix.test }}
# e2e-fork-wasm:
# env:
# CHAIN_A_TAG: latest
# CHAIN_B_TAG: latest
# CHAIN_IMAGE: ibc-go-wasm-simd
# RELAYER_ID: "hyperspace" # by default use hyperspace relayer for fork wasm tests.
# FORK: "true"
# run this job on forks and copies of ibc-go, for example: a public fork or a private copy of ibc-go.
# if: ${{ github.repository != 'cosmos/ibc-go' || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }}
# needs: build-test-matrix-wasm
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix: ${{ fromJSON(needs.build-test-matrix-wasm.outputs.matrix) }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: '3.10'
# - name: Install dependencies
# run: make python-install-deps
# - name: Docker Build Wasm
# run: |
# version="$(scripts/get-libwasm-version.py --get-version)"
# checksum="$(scripts/get-libwasm-version.py --get-checksum)"
# docker build . -t "${CHAIN_IMAGE}:${CHAIN_A_TAG}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum}
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# go-version: '1.22'
# cache-dependency-path: 'e2e/go.sum'
# - name: Run e2e Test
# run: |
# cd e2e
# make e2e-test test=${{ matrix.test }}
51 changes: 51 additions & 0 deletions .github/workflows/e2e-test-workflow-call.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
required: false
type: string
default: '' # empty string means run all tests
temp-run-full-suite:
description: 'This flag exists to run a hard coded set of tests and will be phased out'
required: false
type: boolean
default: false
test:
description: 'test name to run as standalone'
required: false
Expand Down Expand Up @@ -253,3 +258,49 @@ jobs:
name: '${{ matrix.entrypoint }}-${{ matrix.test }}'
path: e2e/diagnostics
retention-days: 5

e2e-test-suites:
# temporary flag. eventually this field will not exist and this will be the default.
if: ${{ inputs.temp-run-full-suite }}
runs-on: ubuntu-latest
needs:
- build-test-matrix
- docker-build
- docker-build-wasm
env:
CHAIN_IMAGE: '${{ inputs.chain-image }}'
CHAIN_A_TAG: '${{ inputs.chain-a-tag }}'
CHAIN_B_TAG: '${{ inputs.chain-b-tag }}'
RELAYER_IMAGE: '${{ inputs.relayer-image }}'
RELAYER_TAG: '${{ inputs.relayer-tag }}'
RELAYER_ID: '${{ inputs.relayer-type }}'
CHAIN_BINARY: '${{ inputs.chain-binary }}'
CHAIN_UPGRADE_TAG: '${{ inputs.chain-upgrade-tag }}'
CHAIN_UPGRADE_PLAN: '${{ inputs.upgrade-plan-name }}'
strategy:
fail-fast: false
matrix:
include:
# for now we explicitly specify this test suite.
- entrypoint: TestTransferTestSuite
steps:
- uses: actions/checkout@v4
with:
repository: cosmos/ibc-go
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache-dependency-path: 'e2e/go.sum'
- name: Run e2e Test
id: e2e_test
run: |
cd e2e
make e2e-suite entrypoint=${{ matrix.entrypoint }}
- name: Upload Diagnostics
uses: actions/upload-artifact@v4
if: ${{ failure() && inputs.upload-logs }}
continue-on-error: true
with:
name: '${{ matrix.entrypoint }}-${{ matrix.test }}'
path: e2e/diagnostics
retention-days: 5
2 changes: 1 addition & 1 deletion .github/workflows/e2e-wasm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ on:
- 'LICENSE'
# cancel workflows if a new one is triggered on the same branch.
concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# determine-image-tag will either output the PR number e.g. pr-1234 or the string main.
# this will be used to tag the images that are built during the workflow.
determine-image-tag:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
outputs:
simd-tag: ${{ steps.get-tag.outputs.simd-tag }}
Expand All @@ -50,7 +50,7 @@ jobs:
e2e:
# we will be running this job if the PR has not yet been marked for review, and we push additional changes.
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
if: ${{ !github.event.pull_request.draft && github.repository == 'cosmos/ibc-go' && github.actor != 'dependabot[bot]' }}
needs: determine-image-tag # we are required to have a docker tag before we can build any images.
uses: ./.github/workflows/e2e-test-workflow-call.yml
# unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
Expand All @@ -67,4 +67,6 @@ jobs:
chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
chain-binary: 'simd'
# on regular PRs we won't run upgrade tests.
test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite'
# NOTE: we are exluding TestTransferTestSuite as we run this full suite instead of each individual test.
test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite,TestTransferTestSuite'
temp-run-full-suite: true
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (23-commmitment) [\#6644](https://github.com/cosmos/ibc-go/pull/6644) Introduce commitment/v2 `MerklePath` to include `repeated bytes` in favour of `repeated string`. This supports using merkle path keys which include non UTF-8 encoded runes.
* (23-commmitment) [\#6633](https://github.com/cosmos/ibc-go/pull/6633) MerklePath has been changed to use `repeated bytes` in favour of `repeated strings`.
* (apps/27-interchain-accounts) [\#6749](https://github.com/cosmos/ibc-go/pull/6749) The ICA controller `NewIBCMiddleware` constructor function sets by default the auth module to nil.
* (core, core/02-client) [\#6763](https://github.com/cosmos/ibc-go/pull/6763) Move prometheus metric labels for 02-client and core into a separate `metrics` package on core.
* (core/02-client) [\#6777](https://github.com/cosmos/ibc-go/pull/6777) The `NewClientProposalHandler` of `02-client` has been removed.

### State Machine Breaking

Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN test -n "${IBC_GO_VERSION}"
# Copy relevant files before go mod download. Replace directives to local paths break if local
# files are not copied before go mod download.
ADD internal internal
ADD simapp simapp
ADD testing testing
ADD modules modules
ADD LICENSE LICENSE
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COMMIT := $(shell git log -1 --format='%H')
LEDGER_ENABLED ?= true
BINDIR ?= $(GOPATH)/bin
BUILDDIR ?= $(CURDIR)/build
SIMAPP = ./testing/simapp
SIMAPP = ./simapp
MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/cosmos/ibc-go.git
DOCKER := $(shell which docker)
Expand Down Expand Up @@ -116,7 +116,7 @@ build-linux:
GOOS=linux GOARCH=amd64 LEDGER_ENABLED=false $(MAKE) build

$(BUILD_TARGETS): go.sum $(BUILDDIR)/
go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...
cd simapp && go $@ -mod=readonly $(BUILD_FLAGS) $(BUILD_ARGS) ./...

$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</div>
<div align="center">
<a href="https://github.com/cosmos/ibc-go">
<img alt="Lines Of Code" src="https://tokei.rs/b1/github/cosmos/ibc-go" />
<img alt="Lines Of Code" src="https://sonarcloud.io/api/project_badges/measure?project=cosmos_ibc-go&metric=ncloc" />
</a>
<a href="https://discord.com/invite/interchain">
<img alt="Discord" src="https://img.shields.io/discord/669268347736686612.svg" />
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-ibc/13-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Identifying which channel to use can be difficult as it requires verifying infor
Channels are based on a light client. A chain can be uniquely identified by its chain ID, validator set pairing. It is unsafe to rely only on the chain ID.
Any user can create a client with any chain ID, but only the chain with correct validator set and chain ID can produce headers which would update that client.

Which channel to use is based on social consensus. The desired channel should have the following properities:
Which channel to use is based on social consensus. The desired channel should have the following properties:

- based on a valid client (can only be updated by the chain it connects to)
- has sizable activity
Expand Down
Loading

0 comments on commit 4532360

Please sign in to comment.