Skip to content

Commit

Permalink
feat: 08-wasm light client proxy module for wasm clients (backport #5079
Browse files Browse the repository at this point in the history
) (#5121)

* feat: 08-wasm light client proxy module for wasm clients (#5079)

Co-authored-by: Steve <steve@strange.love>
Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: antstalepresh <stalepresh121@outlook.com>
Co-authored-by: Vladislav Markushin <negigic@gmail.com>
Co-authored-by: Blas Rodriguez Irizar <rodrigblas@gmail.com>
Co-authored-by: Jacob Gadikian <jacobgadikian@gmail.com>
Co-authored-by: vuong <nguyenvuong1122000@gmail.com>
Co-authored-by: Vishal Potpelliwar <71565171+vishal-kanna@users.noreply.github.com>
Co-authored-by: Charly <charly@interchain.berlin>
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
Co-authored-by: Reece Williams <31943163+Reecepbcups@users.noreply.github.com>
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
Co-authored-by: Cian Hatton <cian@interchain.io>
Co-authored-by: Adi <103246632+adiraviraj@users.noreply.github.com>
Co-authored-by: chatton <github.qpeyb@simplelogin.fr>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Charly <charly@interchain.io>
Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com>
Co-authored-by: Muku <44918265+muku314115@users.noreply.github.com>
Co-authored-by: Pham Anh Minh <1phamminh0811@gmail.com>
Co-authored-by: nguyen <trinity6569@gmail.com>
(cherry picked from commit 08d36eb)

# Conflicts:
#	.github/workflows/e2e-test-workflow-call.yml
#	.github/workflows/e2e.yaml
#	.github/workflows/test.yml
#	docs/architecture/adr-027-ibc-wasm.md
#	docs/docs/01-ibc/06-proposals.md
#	e2e/go.mod
#	e2e/go.sum
#	e2e/relayer/relayer.go
#	e2e/sample.config.yaml
#	e2e/scripts/run-e2e.sh
#	e2e/tests/core/02-client/client_test.go
#	e2e/tests/interchain_accounts/base_test.go
#	e2e/tests/interchain_accounts/gov_test.go
#	e2e/tests/interchain_accounts/groups_test.go
#	e2e/tests/interchain_accounts/incentivized_test.go
#	e2e/tests/interchain_accounts/localhost_test.go
#	e2e/tests/interchain_accounts/params_test.go
#	e2e/tests/transfer/base_test.go
#	e2e/tests/upgrades/genesis_test.go
#	e2e/tests/upgrades/upgrade_test.go
#	e2e/testsuite/codec.go
#	e2e/testsuite/grpc_query.go
#	e2e/testsuite/testconfig.go
#	e2e/testsuite/testsuite.go
#	e2e/testsuite/tx.go
#	e2e/testvalues/values.go
#	scripts/go-mod-tidy-all.sh

* rm e2e folder.

* rm build step for e2es in test.yml

* Fix conflict in proposals doc.

* Fix conflict in ADR.

* remove pin to local ibc-go

* Revert "remove pin to local ibc-go"

This reverts commit 7204fa2.

* address review comments

---------

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
Co-authored-by: DimitrisJim <d.f.hilliard@gmail.com>
  • Loading branch information
3 people authored Nov 28, 2023
1 parent 1101972 commit 8ce1911
Show file tree
Hide file tree
Showing 127 changed files with 17,882 additions and 179 deletions.
12 changes: 9 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
/modules/light-clients/ @colin-axner @AdityaSripal @damiannolan
/proto/ibc/lightclients/ @colin-axner @AdityaSripal @damiannolan

# CODEOWNERS for 08-wasm light client module

/modules/light-clients/08-wasm/ @colin-axner @AdityaSripal @damiannolan @charleenfei @chatton @DimitrisJim @srdtrk

# CODEOWNERS for ICS 20

/modules/apps/transfer/ @colin-axner @AdityaSripal @damiannolan
Expand All @@ -38,9 +42,11 @@
/modules/apps/29-fee/ @AdityaSripal @charleenfei @colin-axner @damiannolan
/proto/ibc/applications/fee/ @AdityaSripal @charleenfei @colin-axner @damiannolan

# CODEOWNERS for docs
/docs/ @colin-axner @AdityaSripal @crodriguezvega @charleenfei @damiannolan @chatton @DimitrisJim @srdtrk

# CODEOWNERS for callbacks middleware

/modules/apps/callbacks/ @colin-axner @AdityaSripal @damiannolan @srdtrk

# CODEOWNERS for docs

/docs/ @colin-axner @AdityaSripal @crodriguezvega @charleenfei @damiannolan @chatton @DimitrisJim @srdtrk

12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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


2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
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
Expand Up @@ -27,6 +27,7 @@ artifacts
baseapp/data/*
client/lcd/keys/*
mytestnet
modules/light-clients/08-wasm/**/ibc_08-wasm_client_data/

# Testing
coverage.txt
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY go.sum .

RUN go mod download

RUN BUILD_TAGS=muslc make build
RUN make build

FROM alpine:3.18
ARG IBC_GO_VERSION
Expand All @@ -33,4 +33,3 @@ LABEL "org.cosmos.ibc-go" "${IBC_GO_VERSION}"
COPY --from=builder /go/build/simd /bin/simd

ENTRYPOINT ["simd"]

1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
endif
ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))

BUILD_FLAGS := -tags "$(build_tags)" -ldflags '$(ldflags)'
# check for nostrip option
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
Expand Down
Loading

0 comments on commit 8ce1911

Please sign in to comment.