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

Add simulations for 27-interchain-accounts app #1352

Closed
3 tasks
alpe opened this issue May 13, 2022 · 4 comments · Fixed by #2160
Closed
3 tasks

Add simulations for 27-interchain-accounts app #1352

alpe opened this issue May 13, 2022 · 4 comments · Fixed by #2160
Assignees
Milestone

Comments

@alpe
Copy link
Contributor

alpe commented May 13, 2022

Summary

Please support Cosmos-SDK simulation


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner
Copy link
Contributor

Hey @alpe, do you have a specific use case in mind? What sort of support are you looking for?

We haven't added simulation to IBC application before because we have previously deemed such changes too complex to implement for two simapps connecting to each other (simulating handshakes, client/connection/channel creation) and we deemed simulation support unnecessary. Simulations have historically been used to catch math bugs (staking, distribution etc), but the IBC applications thus far haven't not been very math heavy.

We do have the testing package, but perhaps this is not sufficient for your use case?

I'd love to see IBC testing expanded to include full integration tests and fuzz testing, but want to make sure we put our efforts towards the right solutions

@alpe
Copy link
Contributor Author

alpe commented May 25, 2022

Thanks for the feedback! I found simulations very helpful to detect integration issues in the past. Personally, I see them also as a mechanism to plug in test sets from different modules to the app, where they can add value without requiring people to have deeper knowledge of the module.
I do understand your point though, that ibc requires state which makes things more complicated.
If this makes sense for you, I can do a spike with one or two messages to get this started

Sorry, my original issue should be refined to: implement the AppModuleSimulation interface in the interchain account module. Otherwise the state export in sim tests fails when exporting params.

--- FAIL: TestAppImportExport (10.65s)
panic: UnmarshalJSON cannot decode empty bytes [recovered]
	panic: UnmarshalJSON cannot decode empty bytes

goroutine 10 [running]:
testing.tRunner.func1.2({0x5300d40, 0xc0057e5d00})
	/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1389 +0x24e
testing.tRunner.func1()
	/usr/local/Cellar/go/1.18.2/libexec/src/testing/testing.go:1392 +0x39f
panic({0x5300d40, 0xc0057e5d00})
	/usr/local/Cellar/go/1.18.2/libexec/src/runtime/panic.go:838 +0x207
github.com/cosmos/cosmos-sdk/x/params/types.Subspace.Get({{0x5e0c958, 0xc0005a62b0}, 0xc0001222b8, {0x5def400, 0xc0005a7f80}, {0x5def450, 0xc000e74050}, {0xc000d16210, 0x7, 0x14}, ...}, ...)
	/Users/alex/go/pkg/mod/github.com/cosmos/cosmos-sdk@v0.45.4/x/params/types/subspace.go:109 +0x307
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.Keeper.IsHostEnabled(...)
	/Users/alex/go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/params.go:13
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.Keeper.GetParams({{0x5def400, 0xc000e74020}, {0x5e0c958, 0xc0005a62b0}, {{0x5e0c958, 0xc0005a62b0}, 0xc0001222b8, {0x5def400, 0xc0005a7f80}, {0x5def450, ...}, ...}, ...}, ...)
	/Users/alex/go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/params.go:26 +0x148
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts/host/keeper.ExportGenesis({{0x5e03358, 0xc000126008}, {0x5e0dbc0, 0xc0034ffdc0}, {{0x0, 0x0}, {0x0, 0x0}, 0x1, {0x388c9fa0, ...}, ...}, ...}, ...)
	/Users/alex/go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/host/keeper/genesis.go:38 +0x1b8
github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts.AppModule.ExportGenesis({{}, _, _}, {{0x5e03358, 0xc000126008}, {0x5e0dbc0, 0xc0034ffdc0}, {{0x0, 0x0}, {0x0, ...}, ...}, ...}, ...)
	/Users/alex/go/pkg/mod/github.com/cosmos/ibc-go/v3@v3.0.0/modules/apps/27-interchain-accounts/module.go:181 +0x298

A GenerateGenesisState with defaults and otherwise boilerplate code would be enough. No operations needed to make it pass.

gsora added a commit to elesto-dao/elesto that referenced this issue Aug 3, 2022
simulation handlers are nonexistent.

This commit works around the issue described here: cosmos/ibc-go#1352
gsora added a commit to elesto-dao/elesto that referenced this issue Aug 4, 2022
…ts (#202)

simulation handlers are nonexistent.

This commit works around the issue described here: cosmos/ibc-go#1352
@gosuri
Copy link

gosuri commented Aug 15, 2022

Hey guys, any ETA on when this will be merged?

/cc @alessio

noandrea pushed a commit to elesto-dao/elesto that referenced this issue Aug 27, 2022
…ts (#202)

simulation handlers are nonexistent.

This commit works around the issue described here: cosmos/ibc-go#1352
@crodriguezvega
Copy link
Contributor

Sorry for the late reply... We're going to try to work on this in the coming 2 or 3 weeks. We will try to keep you all updated!

@colin-axner colin-axner self-assigned this Aug 31, 2022
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description



ref: #1352, #2151 

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit 23a7515)
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit 23a7515)
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description



ref: #1352, #2151

---

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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit eb508b5)

# Conflicts:
#	CHANGELOG.md
#	modules/apps/27-interchain-accounts/module.go
mergify bot pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit eb508b5)

# Conflicts:
#	CHANGELOG.md
#	modules/apps/27-interchain-accounts/module.go
damiannolan pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit 23a7515)

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
damiannolan pushed a commit that referenced this issue Aug 31, 2022
## Description

ref: #1352, #2151

---

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](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit 23a7515)

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
@crodriguezvega crodriguezvega added this to the v5.0.0 milestone Sep 6, 2022
colin-axner added a commit that referenced this issue Sep 7, 2022
…2168)

* feat: add genesis simulation generation for ics27 (#2154)

## Description

ref: #1352, #2151

---

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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit eb508b5)

# Conflicts:
#	CHANGELOG.md
#	modules/apps/27-interchain-accounts/module.go

* fix conflicts

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
colin-axner added a commit that referenced this issue Sep 8, 2022
…2169)

* feat: add genesis simulation generation for ics27 (#2154)

## Description

ref: #1352, #2151

---

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.

- [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
- [ ] Review `Codecov Report` in the comment section below once CI passes

(cherry picked from commit eb508b5)

# Conflicts:
#	CHANGELOG.md
#	modules/apps/27-interchain-accounts/module.go

* fix conflicts

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

4 participants