Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: sdk50 and ibc8 with wasm client #4675

Closed
wants to merge 126 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
01e8548
feat: add wasm light client module to feat/wasm-clients branch (#3486)
misko9 Jul 6, 2023
40337dd
Merge branch 'main' into feat/wasm-clients
Jul 6, 2023
90ed894
linting
Jul 7, 2023
cf6fbfe
Migrated the errors to new package (#4058)
vishal-kanna Jul 12, 2023
28d46c1
Merge branch 'main' into feat/wasm-client
charleenfei Jul 12, 2023
255905a
imp: make separate go.mod for 08-wasm (#4026)
Jul 13, 2023
8bc0c68
imp: remove code id key from genesis contract (#4032)
Jul 14, 2023
b6e8a3a
fix imports
Jul 14, 2023
2901cf8
bump wasmvm (#4086)
Jul 14, 2023
581a27f
build and test wasm client on PR (#4095)
Reecepbcups Jul 16, 2023
5a1a249
add authority param to wasm NewKeeper (#4092)
Reecepbcups Jul 16, 2023
3607dd2
Merge `storeWasmCode` and `importWasmCode` functions (#4088)
Jul 17, 2023
9298fe6
Pin code to the wasm VM cache (#4093)
Reecepbcups Jul 18, 2023
731dbbf
just some renaming
Jul 20, 2023
59ccad5
renaming to align with x/wasm naming (#4091)
Jul 20, 2023
62ed4fb
imp: disallow submessage execution (#4130)
Jul 20, 2023
341350a
use sudo (#4131)
Jul 20, 2023
f822b4f
fix wrapf warning (#4172)
DimitrisJim Jul 25, 2023
bffb649
Merge branch 'main' into feat/wasm-clients
Jul 30, 2023
bf9d465
Add linting for 08-wasm module (#4206)
DimitrisJim Aug 1, 2023
ed41863
add 08-wasm global store key (#4185)
Aug 1, 2023
de89920
imp: delegate store operation of `clientState` and `consensusState` i…
Aug 1, 2023
644367f
imp: remove `timestamp` from `consensusState` and query contract to r…
Aug 1, 2023
20d4d7e
imp: remove `height` from `header` and merge `header` with `misbehavi…
Aug 1, 2023
54f29ee
imp: add query and sudo message types to encapsulate all variants of …
Aug 1, 2023
c4f8da4
add 08-wasm Keeper constructor that accepts pointer to Wasm VM instan…
Aug 1, 2023
2e17bb2
Allow same VM to be assigned to the global vm. (#4236)
DimitrisJim Aug 3, 2023
49c5e7d
Disallow events, attributes being returned from a contract. (#4222)
DimitrisJim Aug 3, 2023
607aea9
Unit tests: temporarily disable grandpa testing, update
misko9 Aug 7, 2023
4f0a711
Clean up vm entry points (#4279)
DimitrisJim Aug 14, 2023
479f470
Merge branch 'main' into feat/wasm-clients
Aug 14, 2023
2a7c242
add halborn audit report
adiraviraj Aug 15, 2023
fb9eed5
Add files via upload
adiraviraj Aug 15, 2023
03d077b
add wasm client audit reports (#4351)
adiraviraj Aug 15, 2023
16e1026
Document contract api. (#4283)
DimitrisJim Aug 15, 2023
2913dbd
oh linter you. (#4369)
DimitrisJim Aug 17, 2023
c34fd15
TestVerifyMembershipGrandpa working again
misko9 Aug 30, 2023
86dcf72
TestVerifyNonMembershipGrandpa, TestInitializeGrandpa,
misko9 Aug 30, 2023
81abf1e
TestCheckSubstituteAndUpdateStateGrandpa, TestVerifyHeaderGrandpa,
misko9 Aug 30, 2023
33fa18b
Run linter
misko9 Aug 30, 2023
25548ba
Add instructions for re-creating grandpa test data
misko9 Aug 30, 2023
01757b9
Add space after comment delimiter
misko9 Aug 31, 2023
83ca9bb
deps(08-wasm): bump SDK v0.47.5 (#4540)
Sep 1, 2023
fb745e8
add 08-wasm to dependabot
Sep 1, 2023
1425ca2
Merge branch 'main' into feat/wasm-clients
Sep 1, 2023
17d255c
cherry pick commit fixing broken links
Sep 5, 2023
8f5354b
Fix dependabot file.
DimitrisJim Sep 7, 2023
120d45b
Add new cmd to store code via a gov proposal. (#4565)
DimitrisJim Sep 7, 2023
2efea92
update wasmVM
faddat Sep 8, 2023
285da92
shore: use 08-wasm specific events instead of 02-client ones
Sep 8, 2023
d554b86
use go 1.21 for wasm client
faddat Sep 8, 2023
b57444b
update expected values
faddat Sep 8, 2023
070f004
Merge branch 'faddat/update-wasmvm' of https://github.com/notional-la…
faddat Sep 8, 2023
55da45e
rebuild protos
faddat Sep 8, 2023
b52e90d
Revert "update expected values"
faddat Sep 8, 2023
7114e90
update Dockerfile with correct wasmvm
faddat Sep 8, 2023
93fcb7c
Implement appmodule.AppModule interface
Sep 8, 2023
81086e4
update wasm clients branch linter to match main (#4609)
faddat Sep 9, 2023
15e5dec
Merge remote-tracking branch 'origin/carlos/implement-interface-08-wa…
faddat Sep 9, 2023
c0dab17
Unit tests: temporarily disable grandpa testing, update
misko9 Aug 7, 2023
7416eb3
TestVerifyMembershipGrandpa working again
misko9 Aug 30, 2023
6b2719c
TestVerifyNonMembershipGrandpa, TestInitializeGrandpa,
misko9 Aug 30, 2023
69d2f8c
TestCheckSubstituteAndUpdateStateGrandpa, TestVerifyHeaderGrandpa,
misko9 Aug 30, 2023
bcd9303
Run linter
misko9 Aug 30, 2023
7f3528a
Add instructions for re-creating grandpa test data
misko9 Aug 30, 2023
0a62b7f
Add space after comment delimiter
misko9 Aug 31, 2023
a6ec685
Merge branch 'faddat/cherry-picks-from-strangelove' into faddat/updat…
faddat Sep 9, 2023
f2a6971
tidy, please the linter
faddat Sep 9, 2023
3722182
add snapshotter
trinitys7 Sep 10, 2023
ac49db0
defind AbsoluteCodePositionLen and testing
trinitys7 Sep 10, 2023
a1e523e
fix IterateCode
trinitys7 Sep 10, 2023
bf55119
init TestIterateCode
trinitys7 Sep 10, 2023
15d56ae
nits
trinitys7 Sep 10, 2023
39a3697
linter fix
Sep 10, 2023
94f380d
chore: implement `appmodule.AppModule` interface (#4607)
Sep 11, 2023
6072ed0
add snapshotter manager to simapp
trinitys7 Sep 11, 2023
12d74a9
add proposal simulator interface and tests (#4608)
Sep 14, 2023
bbec01f
ci: use go1.21 for wasm clients (#4610)
faddat Sep 14, 2023
090bc9f
remove toolchain / go mod tidy
Sep 14, 2023
bb9821c
this should get us out of the fork
Sep 14, 2023
81a35b3
let's see if this works
Sep 14, 2023
5d694b1
Update e2e/go.mod
Sep 14, 2023
a960ae3
Merge branch 'main' into carlos/remove-colin-form-interchaintest
Sep 14, 2023
7030272
Merge remote-tracking branch 'origin/feat/wasm-clients' into snapshotter
trinitys7 Sep 14, 2023
d66e570
Merge branch 'main' into carlos/remove-colin-form-interchaintest
Sep 14, 2023
aaaab5a
Updated instructions for regenerating test data
misko9 Sep 14, 2023
4f1bfa3
Merge branch 'feat/wasm-clients' into steve/feat/wasm-clients
misko9 Sep 14, 2023
1bc5845
Update wasm light client unit tests and tendermint/grandpa cw contrac…
misko9 Sep 15, 2023
aa8598d
PR 4306 comments
Sep 15, 2023
cacd086
Merge remote-tracking branch 'origin/feat/wasm-clients' into faddat/u…
faddat Sep 16, 2023
d71c022
lint
faddat Sep 16, 2023
f8ae25a
update broken hyperlinks
faddat Sep 16, 2023
32221b0
remove readme (added elsewhere)
faddat Sep 16, 2023
c6f3ba2
make client state test match feature branch
faddat Sep 16, 2023
91e3b07
Merge remote-tracking branch 'origin/feat/wasm-clients' into carlos/u…
faddat Sep 16, 2023
37d9598
Merge remote-tracking branch 'origin/main' into faddat/merge-carlos-u…
faddat Sep 16, 2023
b96af27
Merge remote-tracking branch 'caelus/snapshotter' into faddat/merge-c…
faddat Sep 16, 2023
2c47688
check errors in testing
faddat Sep 16, 2023
69f0ecd
restore v6 to v7 docs
faddat Sep 16, 2023
7041f67
Merge branch 'faddat/update-wasmvm' into faddat/merge-carlos-upgrade-v8
faddat Sep 16, 2023
9731243
update to latest sdk
faddat Sep 16, 2023
782fa95
Merge remote-tracking branch 'origin/carlos/remove-colin-form-interch…
faddat Sep 16, 2023
0778e8d
wasm linter autofixes
faddat Sep 16, 2023
cd09422
fix manual lints in the snapshot tests
faddat Sep 16, 2023
37cae02
update dockerfile
faddat Sep 16, 2023
c5a3cb2
sync
faddat Sep 16, 2023
6be2b52
add preblocker
faddat Sep 16, 2023
0949cad
remove cmd_test.go
faddat Sep 16, 2023
585b502
rearrange callbacks Dockerfile
faddat Sep 16, 2023
1edfb43
Merge branch 'main' into faddat/merge-carlos-upgrade-v8
faddat Sep 16, 2023
152f065
adjust main Dockerfile
faddat Sep 16, 2023
06bcde2
Merge branch 'faddat/merge-carlos-upgrade-v8' of https://github.com/n…
faddat Sep 16, 2023
951b437
update callbacks Dockerfile
faddat Sep 16, 2023
a5ee7f6
update go.work.example
faddat Sep 16, 2023
afbbcc6
update Dockerfiles
faddat Sep 16, 2023
428d0dc
get the client context in there...
faddat Sep 16, 2023
c603eeb
bump client
faddat Sep 16, 2023
1c11973
tidy
faddat Sep 16, 2023
f4a6666
mass tidying
faddat Sep 16, 2023
4f77fa5
directly use autocliopts
faddat Sep 16, 2023
59c33b3
don't build anything arm32
faddat Sep 16, 2023
c8ed5eb
update interchaintest
faddat Sep 16, 2023
64eef27
only amd64 for callbacks for now
faddat Sep 16, 2023
c32917d
Merge remote-tracking branch 'strangelove/steve/feat/wasm-clients' in…
faddat Sep 16, 2023
3acd9d4
Merge branch 'main' into faddat/merge-carlos-upgrade-v8
faddat Sep 16, 2023
1efe927
Merge remote-tracking branch 'origin/main' into faddat/merge-carlos-u…
faddat Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/callbacks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm', 'arm64']
go-arch: ['amd64']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/capability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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
13 changes: 10 additions & 3 deletions .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 All @@ -49,15 +49,22 @@ jobs:
**/**.go
go.mod
go.sum
# 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 ibc-go
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
run: GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 LEDGER_ENABLED=false make build
- 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"
GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 go test -c "$dir"
fi
done

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/[email protected]
with:
version: v1.53.1
args: --timeout 5m
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 ./...
3 changes: 3 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 @@ -56,6 +57,8 @@ dependency-graph.png

*.history

tmp/
*.wasm
# Go
go.work
go.work.sum
18 changes: 16 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
FROM golang:1.21-alpine3.18 as builder
ARG arch=x86_64
ARG IBC_GO_VERSION

RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make;
RUN set -eux; apk add --no-cache git libusb-dev linux-headers gcc musl-dev make ca-certificates build-base;

ENV GOPATH=""
ENV GOMODULE="on"

# ensure the ibc go version is being specified for this image.
RUN test -n "${IBC_GO_VERSION}"

# Grab the static library and copy it to location that will be found by the linker flag `-lwasmvm_muslc`.
# TODO: nice to have: a script to download version matching the wasmvm version in go.mod.
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 2a72c7062e3c791792b3dab781c815c9a76083a7997ce6f9f2799aaf577f3c25
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 8ea2e3b5fae83e671da2bb51115adc88591045953f509955ec38dc02ea5a7b94

# Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc`
RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a

# 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
Expand All @@ -24,7 +35,10 @@ COPY go.sum .

RUN go mod download

RUN BUILD_TAGS=muslc make build
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build



FROM alpine:3.18
ARG IBC_GO_VERSION
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ endif
ifeq (,$(findstring nostrip,$(COSMOS_BUILD_OPTIONS)))
ldflags += -w -s
endif
# Direct linker to statically link.
ifeq ($(LINK_STATICALLY),true)
ldflags += -linkmode=external -extldflags "-Wl,-z,muldefs -static"
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
Loading