Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cosmos/ibc-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: notional-labs/ibc-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: testnet-ibc
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
Loading
Showing with 19,007 additions and 1,049 deletions.
  1. +11 −1 .github/dependabot.yml
  2. +44 −0 .github/workflows/build-wasm-simd-image-from-tag.yml
  3. +1 −21 .github/workflows/e2e.yaml
  4. +8 −2 .github/workflows/test.yml
  5. +58 −0 .github/workflows/wasm-client.yml
  6. +6 −0 .gitignore
  7. +577 −577 CHANGELOG.md
  8. +1 −2 Dockerfile
  9. +9 −1 Makefile
  10. +761 −0 docs/.vuepress/config.js
  11. +122 −92 docs/architecture/adr-027-ibc-wasm.md
  12. +8 −0 docs/client/config.json
  13. +451 −64 docs/client/swagger-ui/swagger.yaml
  14. BIN docs/docs/03-light-clients/01-developer-guide/wasm/audits/Ethan Frey - Wasm Client Review.pdf
  15. BIN docs/docs/03-light-clients/01-developer-guide/wasm/audits/Halborn audit report.pdf
  16. +31 −0 docs/docs/03-light-clients/04-wasm/01-overview.md
  17. +74 −0 docs/docs/03-light-clients/04-wasm/02-concepts.md
  18. +221 −0 docs/docs/03-light-clients/04-wasm/03-integration.md
  19. +29 −0 docs/docs/03-light-clients/04-wasm/04-messages.md
  20. +52 −0 docs/docs/03-light-clients/04-wasm/05-deployment.md
  21. +17 −0 docs/docs/03-light-clients/04-wasm/06-events.md
  22. +141 −0 docs/docs/03-light-clients/04-wasm/07-client.md
  23. +5 −0 docs/docs/03-light-clients/04-wasm/_category_.json
  24. +65 −31 e2e/go.mod
  25. +165 −73 e2e/go.sum
  26. +22 −3 e2e/relayer/relayer.go
  27. +3 −0 e2e/sample.config.yaml
  28. +2 −1 e2e/scripts/run-e2e.sh
  29. +5 −6 e2e/tests/core/02-client/client_test.go
  30. BIN e2e/tests/data/ics10_grandpa_cw.wasm
  31. +4 −5 e2e/tests/interchain_accounts/base_test.go
  32. +1 −1 e2e/tests/interchain_accounts/gov_test.go
  33. +1 −1 e2e/tests/interchain_accounts/groups_test.go
  34. +2 −2 e2e/tests/interchain_accounts/incentivized_test.go
  35. +2 −2 e2e/tests/interchain_accounts/localhost_test.go
  36. +2 −2 e2e/tests/interchain_accounts/params_test.go
  37. +3 −3 e2e/tests/transfer/base_test.go
  38. +3 −3 e2e/tests/upgrades/genesis_test.go
  39. +12 −12 e2e/tests/upgrades/upgrade_test.go
  40. +338 −0 e2e/tests/wasm/grandpa_test.go
  41. +2 −0 e2e/testsuite/codec.go
  42. +26 −5 e2e/testsuite/grpc_query.go
  43. +49 −10 e2e/testsuite/testconfig.go
  44. +39 −33 e2e/testsuite/testsuite.go
  45. +44 −23 e2e/testsuite/tx.go
  46. +9 −4 e2e/testvalues/values.go
  47. +10 −7 go.mod
  48. +14 −14 go.sum
  49. +10 −0 modules/apps/27-interchain-accounts/controller/types/msgs.go
  50. +14 −0 modules/apps/27-interchain-accounts/controller/types/msgs_test.go
  51. +1 −1 modules/apps/27-interchain-accounts/types/account_test.go
  52. +6 −0 modules/apps/29-fee/types/msgs.go
  53. +7 −0 modules/apps/29-fee/types/msgs_test.go
  54. +7 −7 modules/apps/callbacks/go.mod
  55. +14 −14 modules/apps/callbacks/go.sum
  56. +1 −0 modules/apps/transfer/types/errors.go
  57. +11 −0 modules/apps/transfer/types/msgs.go
  58. +2 −0 modules/apps/transfer/types/msgs_test.go
  59. +4 −4 modules/capability/CHANGELOG.md
  60. +1 −0 modules/core/02-client/keeper/keeper.go
  61. +1 −1 modules/core/02-client/types/params.go
  62. +0 −1 modules/core/03-connection/keeper/verify_test.go
  63. +2 −0 modules/core/03-connection/types/msgs.go
  64. +6 −0 modules/core/03-connection/types/msgs_test.go
  65. +6 −0 modules/core/03-connection/types/version.go
  66. +5 −0 modules/core/04-channel/types/channel.go
  67. +6 −0 modules/core/04-channel/types/msgs.go
  68. +6 −0 modules/core/04-channel/types/msgs_test.go
  69. +3 −0 modules/core/exported/client.go
  70. +6 −0 modules/light-clients/06-solomachine/module.go
  71. +6 −0 modules/light-clients/07-tendermint/module.go
  72. +38 −0 modules/light-clients/08-wasm/Dockerfile
  73. +43 −0 modules/light-clients/08-wasm/client/cli/cli.go
  74. +80 −0 modules/light-clients/08-wasm/client/cli/query.go
  75. +123 −0 modules/light-clients/08-wasm/client/cli/tx.go
  76. +8 −0 modules/light-clients/08-wasm/doc.go
  77. +200 −0 modules/light-clients/08-wasm/go.mod
  78. +1,712 −0 modules/light-clients/08-wasm/go.sum
  79. +85 −0 modules/light-clients/08-wasm/internal/ibcwasm/expected_interfaces.go
  80. +32 −0 modules/light-clients/08-wasm/internal/ibcwasm/wasm.go
  81. +23 −0 modules/light-clients/08-wasm/keeper/events.go
  82. +42 −0 modules/light-clients/08-wasm/keeper/genesis.go
  83. +92 −0 modules/light-clients/08-wasm/keeper/genesis_test.go
  84. +62 −0 modules/light-clients/08-wasm/keeper/grpc_query.go
  85. +122 −0 modules/light-clients/08-wasm/keeper/grpc_query_test.go
  86. +134 −0 modules/light-clients/08-wasm/keeper/keeper.go
  87. +129 −0 modules/light-clients/08-wasm/keeper/keeper_test.go
  88. +33 −0 modules/light-clients/08-wasm/keeper/msg_server.go
  89. +98 −0 modules/light-clients/08-wasm/keeper/msg_server_test.go
  90. +138 −0 modules/light-clients/08-wasm/module.go
  91. +40 −0 modules/light-clients/08-wasm/simulation/proposals.go
  92. +41 −0 modules/light-clients/08-wasm/simulation/proposals_test.go
  93. +58 −0 modules/light-clients/08-wasm/test_data/README.md
  94. +19 −0 modules/light-clients/08-wasm/test_data/data.json
  95. +1,254 −0 modules/light-clients/08-wasm/test_data/genesis.json
  96. BIN modules/light-clients/08-wasm/test_data/ics07_tendermint_cw.wasm.gz
  97. BIN modules/light-clients/08-wasm/test_data/ics10_grandpa_cw.wasm.gz
  98. +220 −0 modules/light-clients/08-wasm/testing/mock_engine.go
  99. +5 −0 modules/light-clients/08-wasm/testing/simapp/README.md
  100. +50 −0 modules/light-clients/08-wasm/testing/simapp/ante_handler.go
  101. +1,091 −0 modules/light-clients/08-wasm/testing/simapp/app.go
  102. +18 −0 modules/light-clients/08-wasm/testing/simapp/encoding.go
  103. +249 −0 modules/light-clients/08-wasm/testing/simapp/export.go
  104. +14 −0 modules/light-clients/08-wasm/testing/simapp/genesis.go
  105. +47 −0 modules/light-clients/08-wasm/testing/simapp/genesis_account.go
  106. +27 −0 modules/light-clients/08-wasm/testing/simapp/params/amino.go
  107. +19 −0 modules/light-clients/08-wasm/testing/simapp/params/doc.go
  108. +16 −0 modules/light-clients/08-wasm/testing/simapp/params/encoding.go
  109. +27 −0 modules/light-clients/08-wasm/testing/simapp/params/proto.go
  110. +428 −0 modules/light-clients/08-wasm/testing/simapp/simd/cmd/root.go
  111. +20 −0 modules/light-clients/08-wasm/testing/simapp/simd/main.go
  112. +58 −0 modules/light-clients/08-wasm/testing/wasm_endpoint.go
  113. +23 −0 modules/light-clients/08-wasm/types/client_message.go
  114. +51 −0 modules/light-clients/08-wasm/types/client_message_test.go
  115. +217 −0 modules/light-clients/08-wasm/types/client_state.go
  116. +1,188 −0 modules/light-clients/08-wasm/types/client_state_test.go
  117. +32 −0 modules/light-clients/08-wasm/types/codec.go
  118. +64 −0 modules/light-clients/08-wasm/types/codec_test.go
  119. +41 −0 modules/light-clients/08-wasm/types/config.go
  120. +35 −0 modules/light-clients/08-wasm/types/consensus_state.go
  121. +46 −0 modules/light-clients/08-wasm/types/consensus_state_test.go
  122. +133 −0 modules/light-clients/08-wasm/types/contract_api.go
  123. +19 −0 modules/light-clients/08-wasm/types/errors.go
  124. +10 −0 modules/light-clients/08-wasm/types/events.go
  125. +24 −0 modules/light-clients/08-wasm/types/export_test.go
  126. +214 −0 modules/light-clients/08-wasm/types/gas_register.go
  127. +39 −0 modules/light-clients/08-wasm/types/genesis.go
  128. +504 −0 modules/light-clients/08-wasm/types/genesis.pb.go
  129. +106 −0 modules/light-clients/08-wasm/types/genesis_test.go
  130. +12 −0 modules/light-clients/08-wasm/types/keys.go
  131. +30 −0 modules/light-clients/08-wasm/types/misbehaviour_handle.go
  132. +195 −0 modules/light-clients/08-wasm/types/misbehaviour_handle_test.go
  133. +38 −0 modules/light-clients/08-wasm/types/msgs.go
  134. +85 −0 modules/light-clients/08-wasm/types/msgs_test.go
  135. +45 −0 modules/light-clients/08-wasm/types/proposal_handle.go
  136. +286 −0 modules/light-clients/08-wasm/types/proposal_handle_test.go
  137. +927 −0 modules/light-clients/08-wasm/types/query.pb.go
  138. +254 −0 modules/light-clients/08-wasm/types/query.pb.gw.go
  139. +176 −0 modules/light-clients/08-wasm/types/store.go
  140. +79 −0 modules/light-clients/08-wasm/types/store_test.go
  141. +641 −0 modules/light-clients/08-wasm/types/tx.pb.go
  142. +208 −0 modules/light-clients/08-wasm/types/types_test.go
  143. +75 −0 modules/light-clients/08-wasm/types/update.go
  144. +726 −0 modules/light-clients/08-wasm/types/update_test.go
  145. +57 −0 modules/light-clients/08-wasm/types/upgrade.go
  146. +231 −0 modules/light-clients/08-wasm/types/upgrade_test.go
  147. +54 −0 modules/light-clients/08-wasm/types/utils.go
  148. +21 −0 modules/light-clients/08-wasm/types/validation.go
  149. +57 −0 modules/light-clients/08-wasm/types/validation_test.go
  150. +182 −0 modules/light-clients/08-wasm/types/vm.go
  151. +61 −0 modules/light-clients/08-wasm/types/wasm.go
  152. +930 −0 modules/light-clients/08-wasm/types/wasm.pb.go
  153. +120 −0 modules/light-clients/08-wasm/types/wasm_test.go
  154. +20 −0 proto/ibc/lightclients/wasm/v1/genesis.proto
  155. +39 −0 proto/ibc/lightclients/wasm/v1/query.proto
  156. +29 −0 proto/ibc/lightclients/wasm/v1/tx.proto
  157. +39 −0 proto/ibc/lightclients/wasm/v1/wasm.proto
  158. +1 −0 requirements.txt
  159. +97 −0 scripts/get-libwasm-version.py
  160. +2 −2 scripts/go-lint-all.sh
  161. +1 −1 scripts/go-mod-tidy-all.sh
  162. +3 −0 testing/chain.go
  163. +6 −0 testing/coordinator.go
  164. +9 −10 testing/endpoint.go
  165. +13 −0 testing/mock/mock.go
  166. +2 −5 testing/simapp/app.go
  167. +28 −1 testing/simapp/simd/cmd/root.go
  168. +10 −0 testing/utils.go
  169. +2 −1 testing/values.go
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -28,4 +28,14 @@ updates:
interval: daily
open-pull-requests-limit: 10
labels:
- dependencies
- dependencies

- package-ecosystem: gomod
directory: "/modules/light-clients/08-wasm"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- dependencies


44 changes: 44 additions & 0 deletions .github/workflows/build-wasm-simd-image-from-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Wasm Simd Image
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag of the image to build'
required: true
type: string

env:
REGISTRY: ghcr.io
ORG: cosmos
IMAGE_NAME: ibc-go-wasm-simd
GIT_TAG: "${{ inputs.tag }}"

jobs:
build-image-at-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "${{ env.GIT_TAG }}"
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: make python-install-deps
- name: Log in to the Container registry
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
# remove any `/` characters from the docker tag and replace them with a -
version="$(scripts/get-libwasm-version.py --get-version)"
checksum="$(scripts/get-libwasm-version.py --get-checksum)"
docker_tag="$(echo $GIT_TAG | sed 's/\//-/')"
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}" -f modules/light-clients/08-wasm/Dockerfile --build-arg LIBWASM_VERSION=${version} --build-arg LIBWASM_CHECKSUM=${checksum}
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${docker_tag}"
22 changes: 1 addition & 21 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -40,34 +40,14 @@ jobs:
echo "Using tag $tag"
echo "simd-tag=$tag" >> $GITHUB_OUTPUT
fi
# build-e2e ensures that all test code compiles.
build-e2e:
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build e2e
run: |
cd e2e
find ./tests -type d | while IFS= read -r dir
do
if ls "${dir}"/*.go >/dev/null 2>&1; then
go test -c "$dir"
fi
done
# e2e generates the e2e tests for the non-forked PRs. It does so by using the
# e2e-test-workflow-call.yml each test runs the jobs defined in that file.
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]' }}
needs:
- determine-image-tag # we are required to have a docker tag before we can build any images.
- build-e2e # don't attempt any tests unless the e2e code compiles successfully.
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
# provided to the workflow. This would cause privileged operations to fail.
10 changes: 8 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm', 'arm64']
go-arch: ['amd64', 'arm64']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
@@ -51,13 +51,19 @@ jobs:
go.sum
- name: Build ibc-go
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
- name: Install compiler for arm64.
if: matrix.go-arch == 'arm64'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Build e2e
run: |
cd e2e
find ./tests -type d | while IFS= read -r dir
do
if ls "${dir}"/*.go >/dev/null 2>&1; then
GOARCH=${{ matrix.go-arch }} go test -c "$dir"
CGO_ENABLED=1 GOARCH=${{ matrix.go-arch }} go test -c "$dir"
fi
done
58 changes: 58 additions & 0 deletions .github/workflows/wasm-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Wasm Light-Client
# This workflow runs when a PR is opened that targets code that is part of the wasm light-client.
on:
pull_request:
paths:
- '.github/workflows/wasm-client.yml'
- 'modules/light-clients/08-wasm/**'
- 'proto/ibc/lightclients/wasm/**'
permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3.6.0
with:
version: v1.54.2
args: --timeout 10m
working-directory: modules/light-clients/08-wasm

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm64']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
# Install cross compiler for ARM64. Export CC env variable.
- name: Install compiler for arm64.
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
if: matrix.go-arch == 'arm64'
- name: Build wasm-client
run: |
cd modules/light-clients/08-wasm
GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 go build ./...
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Go Test
run: |
cd modules/light-clients/08-wasm
go test -v -mod=readonly ./...
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ artifacts
baseapp/data/*
client/lcd/keys/*
mytestnet
modules/light-clients/08-wasm/**/ibc_08-wasm_client_data/

# Testing
coverage.txt
@@ -58,9 +59,14 @@ dependency-graph.png

*.history

tmp/
*.wasm
# Go
go.work
go.work.sum

# E2E WASM contract
!ics10_grandpa_cw.wasm

# Python
venv
Loading