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

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

Merged
merged 169 commits into from
Nov 15, 2023

Conversation

crodriguezvega
Copy link
Contributor

@crodriguezvega crodriguezvega commented Nov 10, 2023

Description

closes: #XXXX

Co-authored-by: Jack Zampolin [email protected]
Co-authored-by: Steve [email protected]
Co-authored-by: antstalepresh [email protected]
Co-authored-by: Vladislav Markushin [email protected]
Co-authored-by: Blas Rodriguez Irizar [email protected]
Co-authored-by: Jacob Gadikian [email protected]
Co-authored-by: vuong [email protected]
Co-authored-by: Damian Nolan [email protected]
Co-authored-by: Charly [email protected]
Co-authored-by: Colin Axnér [email protected]
Co-authored-by: Cian Hatton [email protected]
Co-authored-by: Jim Fasarakis-Hilliard [email protected]
Co-authored-by: srdtrk [email protected]
Co-authored-by: Pham Anh Minh [email protected]
Co-authored-by: nguyen [email protected]

Commit Message / Changelog Entry

feat: 08-wasm light client proxy module for wasm clients

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

misko9 and others added 30 commits July 6, 2023 08:34
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
* new error

* changed all the errors

* feat: Changed some more erros from sdkerrors to errorsmod

* added ibcerrors

* fixes and linting

---------

Co-authored-by: Carlos Rodriguez <[email protected]>
* imp: add separate go.mod for 08-wasm

* fix e2e build

* remove import

* lint

* Amend CI testing to not build on arm, correctly cross compile on arm64. (#4065)

* Use alpine for building simd in docker. Link statically. (#4066)

---------

Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
* remove code ID key from genesis type

* address review comment
* bump wasmvm to v1.2.4

* go mod tidy e2e

* Update Dockerfile

* update libwasm sha

* more go mod tidy

---------

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
* build and test wasm-client on pull request

* add arm64 for wasm build only
* merge functions

* address review comment
* pin code to the wasm VM cache

* follow ibc-go error wrapping standards

* Update modules/light-clients/08-wasm/keeper/keeper.go

Co-authored-by: Reece Williams <[email protected]>

---------

Co-authored-by: Damian Nolan <[email protected]>
* renaming to align with x/wasm naming

* fix typo

* Update docs/architecture/adr-027-ibc-wasm.md

Co-authored-by: Damian Nolan <[email protected]>

* address review comments

* review comment

---------

Co-authored-by: Damian Nolan <[email protected]>
* disallow submessage execution

* fix error code

* alignment

* fix
# Conflicts:
#	Dockerfile
#	testing/chain.go
* Add linting for 08-wasm.

* Go mod tidy.

* Please the linter.
* add 08-wasm global store key

* Update client_state.go

* Update modules/light-clients/08-wasm/types/vm.go

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>

---------

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
…n `initialize` to contract (#4033)

* remove calls to set client state and consensus state from initialize

* linting

* Update contracts

* use errorsmod

---------

Co-authored-by: Vladislav Markushin <[email protected]>
…etrieve it (#4034)

* imp: remove timestamp from consensus state

* more linting

* make types unexported

* make proto-all

* code hash for code id

* Use hasConsensusState instead of GetConsensusState (#4171)

* Use hasConsensusState instead of GetConsensusState.

* Use wasmQuery for the rest of the query functions. (#4176)

* Use wasmQuery for the rest of the query functions.

---------

Co-authored-by: Carlos Rodriguez <[email protected]>

* review comments

* Remove check for consensus state.

* Add linting for 08-wasm module (#4206)

* Add linting for 08-wasm.

* Go mod tidy.

* Please the linter.

* add 08-wasm global store key (#4185)

* add 08-wasm global store key

* Update client_state.go

* Update modules/light-clients/08-wasm/types/vm.go

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>

---------

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>

* solve conflicts

* review comments/fix linter warnings

* address comments

* add missing check

* remove check that was wrong

---------

Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
…our` (#4049)

* imp: merge header and misbehaviour types

* remove unused code
…calls (#4133)

* defined query and sudo message types to encapsulate all variants for calls

* pass client message

* add ClientMessage from #4049

* address review comments

* linter

* gofumpt

* review comment

* more gofumpt
…ce (#4109)

* add constructor that accepts pointer to Wasm VM instance

* typo

* add functions that returns wasm config with default values

* review comment

* Apply suggestions from code review

Co-authored-by: Cian Hatton <[email protected]>

* review comments

* rename constructor function

* address review comments

* set contract debug mode to false

---------

Co-authored-by: Cian Hatton <[email protected]>
* Rename from call to wasmCall.

* Move wasmQuery, wasmCall into vm.

* Add wasmInit, mirroring wasmCall and wasmQuery.

* Directly return after wasmInit.
# Conflicts:
#	testing/config.go
crodriguezvega and others added 5 commits November 14, 2023 15:39
* add 08-wasm code owners

* fix
)

* imp: check response for wasm instantiate and migrate calls

* Apply suggestions from code review

Co-authored-by: DimitrisJim <[email protected]>

---------

Co-authored-by: DimitrisJim <[email protected]>
Copy link
Contributor

@charleenfei charleenfei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny nit, thanks everyone for all the work!!

crodriguezvega and others added 6 commits November 15, 2023 10:56
* Add an error-ing implementation for GoAPI.

* Move var to top level, add assertions in tests.

* Clean up responses in sucess cases.
* Rename occurences of codehash in proto files.

* Documentation. Output code_hash as json key for encoded client state.

* Rename occurences triggering the compiler.

* Fix issues triggering the linter.

* First round of renames.

* Fix rename in e2e/

* Use new contract with renamed code hash.

* gzip it.

* Additional soft renames.

* Final one, fingers crossed.

* Replace occurences in e2e/, cli.
Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack changes, wonderful!

@crodriguezvega crodriguezvega merged commit 08d36eb into main Nov 15, 2023
mergify bot pushed a commit that referenced this pull request Nov 15, 2023
Co-authored-by: Steve <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: chatton <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Muku <[email protected]>
Co-authored-by: Pham Anh Minh <[email protected]>
Co-authored-by: nguyen <[email protected]>
(cherry picked from commit 08d36eb)

# Conflicts:
#	.github/dependabot.yml
#	.github/workflows/e2e-test-workflow-call.yml
#	.github/workflows/e2e.yaml
#	.github/workflows/test.yml
#	.gitignore
#	Dockerfile
#	docs/.vuepress/config.js
#	docs/architecture/adr-027-ibc-wasm.md
#	docs/client/config.json
#	docs/client/swagger-ui/swagger.yaml
#	docs/ibc/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
#	go.work.example
#	modules/core/02-client/types/params.go
#	scripts/go-lint-all.sh
#	scripts/go-mod-tidy-all.sh
#	testing/chain.go
mergify bot pushed a commit that referenced this pull request Nov 15, 2023
Co-authored-by: Steve <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: chatton <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Muku <[email protected]>
Co-authored-by: Pham Anh Minh <[email protected]>
Co-authored-by: nguyen <[email protected]>
(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
crodriguezvega added a commit that referenced this pull request Nov 28, 2023
) (#5121)

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

Co-authored-by: Steve <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: chatton <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Muku <[email protected]>
Co-authored-by: Pham Anh Minh <[email protected]>
Co-authored-by: nguyen <[email protected]>
(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 <[email protected]>
Co-authored-by: DimitrisJim <[email protected]>
damiannolan pushed a commit that referenced this pull request Nov 29, 2023
* feat: 08-wasm light client proxy module for wasm clients (#5079)

Co-authored-by: Steve <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: chatton <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Muku <[email protected]>
Co-authored-by: Pham Anh Minh <[email protected]>
Co-authored-by: nguyen <[email protected]>
(cherry picked from commit 08d36eb)

# Conflicts:
#	.github/dependabot.yml
#	.github/workflows/e2e-test-workflow-call.yml
#	.github/workflows/e2e.yaml
#	.github/workflows/test.yml
#	.gitignore
#	Dockerfile
#	docs/.vuepress/config.js
#	docs/architecture/adr-027-ibc-wasm.md
#	docs/client/config.json
#	docs/client/swagger-ui/swagger.yaml
#	docs/ibc/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
#	go.work.example
#	modules/core/02-client/types/params.go
#	scripts/go-lint-all.sh
#	scripts/go-mod-tidy-all.sh
#	testing/chain.go

* rm e2e related stuff.

* paths point to ibc-go/v7.

* Fix some of the conflicts in code.

* chore: wip

* fix conflicts

* add wasmvm import & use ibc-go v7.3.0 tag

* remove CLI for submitting gov proposal to store code (only supported from SDK v0.50)

* re-implement GetSigners for 08-wasm messages

* Fix test in codec_test.go.

* Fix storetypes import.

* Revert changes to module.go

* Use testing.T, call GetEvents from sdk.Result in wasm_endpoint.

* comment out usages of collections.

* go build finally working, my soul is dark.

* Add snapshotter registration to simapp.

* Remove last occurence of duplicate import.

* Regen proto for Checksums.

* green 08-wasm tests.

* shhhh linter, its all okay.

* Pls

* remove docs folder that did not exist in the release branch

* rm unecessary files for e2e's, makefile changes, config.js, go.work.example.

* Docustrings for store ops, use fallible serialization funcs.

* Remove superfluous init of WasmKeeper before checking for mockVM.

* remove table item with broken link

* remove broken link

* Revert "remove CLI for submitting gov proposal to store code (only supported from SDK v0.50)"

This reverts commit 7e9f5ea.

* deps: bump SDK to v0.47.6

---------

Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: chatton <[email protected]>
hoangdv2429 pushed a commit to hoangdv2429/ibc-go that referenced this pull request Dec 9, 2023
Co-authored-by: Steve <[email protected]>
Co-authored-by: Jack Zampolin <[email protected]>
Co-authored-by: antstalepresh <[email protected]>
Co-authored-by: Vladislav Markushin <[email protected]>
Co-authored-by: Blas Rodriguez Irizar <[email protected]>
Co-authored-by: Jacob Gadikian <[email protected]>
Co-authored-by: vuong <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: Jim Fasarakis-Hilliard <[email protected]>
Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Adi <[email protected]>
Co-authored-by: chatton <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Charly <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Muku <[email protected]>
Co-authored-by: Pham Anh Minh <[email protected]>
Co-authored-by: nguyen <[email protected]>
@crodriguezvega crodriguezvega deleted the feat/wasm-clients branch July 9, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02-client 03-connection 06-solomachine 07-tendermint 08-wasm CLI core dependencies Issues or PRs to update a dependency docs Improvements or additions to documentation e2e github_actions Pull requests that update Github_actions code gRPC Issues for gRPC endpoints priority PRs that need prompt reviews protobuf Proto file definitions and protobuf code generation testing Testing package and unit/integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.