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

Sdk 46 ibcv3 #1274

Closed
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
9d79e86
Backport commits from main to v3 release branch (#682)
colin-axner Jan 5, 2022
151907a
improve 04-channel logging (#692) (#698)
mergify[bot] Jan 10, 2022
6738a96
add cli to get denom hash from trace path and base denom (#679) (#711)
mergify[bot] Jan 12, 2022
b482493
removing unused proto imports in interchain-accounts (#718) (#720)
mergify[bot] Jan 12, 2022
22fbe82
fix: support custom chain IDs for testing (#774) (#797)
mergify[bot] Jan 27, 2022
a536701
Merge branch 'release/v3.0.x' of github.com:cosmos/ibc-go into colin/…
colin-axner Jan 31, 2022
d3b0a36
Merge pull request #815 from cosmos/colin/backport-v3
colin-axner Jan 31, 2022
349bddf
Defensive checks for active channel (#785)
seantking Jan 31, 2022
2e6e861
Merge pull request #817 from cosmos/mergify/bp/release/v3.0.x/pr-785
colin-axner Feb 1, 2022
f0ea30a
build(deps): bump github.com/cosmos/cosmos-sdk from 0.44.5 to 0.45.0 …
mergify[bot] Feb 2, 2022
c230603
rename portid and port prefix for interchain accounts submodules (#77…
mergify[bot] Feb 2, 2022
dea0505
test: adding ica test for multiple controllers, single host (#816) (#…
mergify[bot] Feb 2, 2022
60fdc75
the ica_auth page was renamed to auth-modules (#792) (#830)
mergify[bot] Feb 2, 2022
3f882c7
chore: replace error string in transfer acks with const (#818) (#831)
mergify[bot] Feb 2, 2022
5d9e7db
refactor: active channel key format (#823) (#832)
mergify[bot] Feb 2, 2022
6d95456
refactor: RegisterInterchainAccount (#814) (#835)
mergify[bot] Feb 2, 2022
578847c
refactor: reformat KeyOwnerAccount (#833) (#836)
mergify[bot] Feb 2, 2022
3903308
chore: adding encoding and txType fields to metadata (#824) (#837)
mergify[bot] Feb 2, 2022
8306273
refactor: include transaction response in ics27 channel acknowledgeme…
mergify[bot] Feb 2, 2022
a59c033
test: ensure ics27 optimistic packet sends are disallowed (#842) (#843)
mergify[bot] Feb 3, 2022
53cad5d
ADR 003: ICS27 Ack format (#812) (#844)
mergify[bot] Feb 3, 2022
bb867fd
docs: add security model to ics27 docs (#841) (#845)
mergify[bot] Feb 3, 2022
3262969
test: Register using same owner address on multiple connections (#846…
mergify[bot] Feb 4, 2022
c53829f
Move emissions to functions (#783) (#855)
mergify[bot] Feb 7, 2022
402a3bf
build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.0 to 0.45.1 …
mergify[bot] Feb 7, 2022
45a84f2
Added ChannelId to MsgChannelOpenInitResponse (#848) (#856)
mergify[bot] Feb 7, 2022
37bbee1
fix: ica host OnRecvPacket error acknowledgement (#885) (#886)
mergify[bot] Feb 8, 2022
6511e9c
chore: add defensive check to ensure metadata does not change when re…
mergify[bot] Feb 9, 2022
6c9cf52
bug: use custom ante handler to reject redundant transactions in sima…
mergify[bot] Feb 10, 2022
45b8e92
refactor: allow the mock module to be used multiple times as base ibc…
mergify[bot] Feb 10, 2022
2641fa1
imp: support custom keys for testing (#893) (#902)
mergify[bot] Feb 10, 2022
96ca59b
chore: add ParsePacketFromEvents testing helper function (#904) (#919)
mergify[bot] Feb 15, 2022
f418799
fix: correctly claim capability for mock module, handle genesis expor…
mergify[bot] Feb 15, 2022
053e00e
docs: update migration docs for upgrade proposal in relation to ICS27…
mergify[bot] Feb 15, 2022
f68514c
chore(ica): add trail of bits audit report (#903) (#944)
mergify[bot] Feb 17, 2022
5534418
refactor: WriteAcknowledgement API (backport #882) (#943)
mergify[bot] Feb 17, 2022
8c17224
add changelog entry for bump of SDK
crodriguezvega Feb 18, 2022
523c596
testing: adding multiple sender accounts for testing purposes (#935) …
mergify[bot] Feb 22, 2022
b604030
fix: classify client states without consensus states as expired (#941…
mergify[bot] Feb 22, 2022
e93162c
Create test chain with multiple validators (#942) (#960)
mergify[bot] Feb 22, 2022
0b18651
chore: update migration docs (#985) (#986)
mergify[bot] Feb 23, 2022
3c33f77
bug: support base denoms with slashes (#978) (#1019)
mergify[bot] Mar 1, 2022
171498a
ibctesting: make `testing.T` public (#1020) (#1030)
mergify[bot] Mar 1, 2022
4af1e62
upgrade ics23 to v0.7 (#948) (#1028)
mergify[bot] Mar 1, 2022
dcb5247
feat: Add a function to initialize the ICS27 module via an upgrade pr…
mergify[bot] Mar 2, 2022
11c018f
fix package import (#1007) (#1036)
mergify[bot] Mar 2, 2022
571ba40
docs: add missing args to NewKeeper in integration docs (#1038) (#1054)
mergify[bot] Mar 3, 2022
e43079e
chore: fix mispelled words (#991) (#1072)
mergify[bot] Mar 3, 2022
6f2bf38
chore: fix broken link (#972) (#1066)
mergify[bot] Mar 3, 2022
2160689
update changelog
crodriguezvega Mar 3, 2022
22bea13
small fixes for v2 to v3 migration (#1016) (#1074)
mergify[bot] Mar 4, 2022
227a609
call packet.GetSequence() rather than passing the func as argument (b…
mergify[bot] Mar 8, 2022
5c0bf8b
Add counterpartyChannelID param to IBCModule.OnChanOpenAck (#1086) (#…
mergify[bot] Mar 9, 2022
549d9bf
fix mirgation docs (#1091) (#1092)
mergify[bot] Mar 9, 2022
45fdb81
fix: handle testing update client errors (#1094) (#1095)
mergify[bot] Mar 10, 2022
16c65c6
replace channel keeper with IBC keeper in AnteDecorator (#950) (#1096)
mergify[bot] Mar 10, 2022
1f346a7
ibctesting: custom voting power reduction for testing (#939) (#1104)
mergify[bot] Mar 11, 2022
b3823d4
update changelog
crodriguezvega Mar 15, 2022
eaf9d67
update changelog
crodriguezvega Mar 15, 2022
6e1b25a
fix: adjust InitModule to account for empty controller and host keepe…
mergify[bot] Mar 15, 2022
fde4494
update changelog
crodriguezvega Mar 15, 2022
0ab8568
Merge pull request from GHSA-j658-c98j-fww4 (#1127)
crodriguezvega Mar 15, 2022
46e0206
fixes for the documentation about handling ack for SDK <= 0.45 (#1122…
mergify[bot] Mar 15, 2022
93ee2d7
deps: upgrade of SDK to 0.46 and tendermint to 0.35
crodriguezvega Mar 30, 2022
34f03df
some changes from review comments
crodriguezvega Mar 31, 2022
2cd80fc
bump sdk and remove amino.go
faddat Apr 19, 2022
c9cfb67
Merge tag 'v3.0.0' of https://github.com/cosmos/ibc-go into sdk-46-ibcv3
faddat Apr 19, 2022
5e9e8eb
Merge branch 'carlos/upgrade-sdk-0.46-tendermint-0.35' into sdk-46-ibcv3
faddat Apr 25, 2022
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
Prev Previous commit
Next Next commit
fix: support custom chain IDs for testing (#774) (#797)
* Backport commits from main to v3 release branch (#682)

* reorganize channel handshake handler (#647)

* reorganize channel handshake handler

split out channel state changes into its own function.

* readjust 27-interchain-accounts to not rely on state being set before the application callback

* add changelog and migration doc entry

* Update modules/core/04-channel/keeper/handshake.go

* docs: ICA Overview (#626)

* docs: ica overview

* fix: ordering

* add spacing

* fix: spacing

* fix: remove bulletpoints

* fix: wording

* update go mod for security vulnerabilities (#655)

* update go mod for security vulnerabilities

* update package-lock.json

* update vue dependency (#662)

* bump glob-parent version in json package (#663)

* build(deps): bump actions/setup-go from 2.1.4 to 2.1.5 (#656)

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v2.1.4...v2.1.5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: colin axnér <[email protected]>

* docs: begin removal of internal "spec" directories (#634)

* begin removal of spec docs within core ibc

* remove broken link

* Apply suggestions from code review

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

* remove broken link

* remove broken links

* Apply suggestions from code review

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

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

* Modify `OnChanOpenTry` application callback to perform app version negotitation (#646)

* remove NegotiateAppVersion and AppVersion gRPC (#643)

The NegotiateAppVersion callback has been removed from the IBC Application interface.
The gRPC AppVersion has been removed.
The app version negoitation will be handled by applications by returning the version in OnChanOpenTry.

* Modify `OnChanOpenTry` to return application version (#650)

* modify OnChanOpenTry to return negotiated version

modify IBCModule interface function OnChanOpenTry to return the negotiated app version. Tests have not been updated

* fix ibc_module_test.go tests

* fix tests

* Apply suggestions from code review

* add handshake test case

* add CHANGELOG and migration docs

* update documentation

* fix broken link

* fix broken link (#664)

* chore: update make build-docs, add docs build checker (#667)

* update Makefile, add docs build checker

* Update .github/workflows/check-docs.yml

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

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

* register ICA query server, fix panics in params query cli (#666)

Register the controller and host query servers to a chain.
Returns an error upon cli params query failure instead of panicing.

* update of roadmap with latest release (#653)

* update of roadmap with latest release and changed the way release versions are encoded

* fixed typo

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

* build(deps): bump actions/checkout from 2.3.1 to 2.4.0 (#672)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2.3.1...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* allow ics20 to connect to middleware (#675)

* allow ics20 to connect to middleware

Creates ics4Wrapper which allows middleware applications to only implement SendPacket to connect ics20 as an application in its middleware stack

* add changelog and migration doc

* fix migration doc spelling

* fix: register InterchainAccount as x/auth GenesisAccount (#676)

* adding GenesisAccount interface registration for InterchainAccount impl

* updating RegisterInterfaces ica godoc

* enable mergify for backports (#678)

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

Co-authored-by: Sean King <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>

* fixes evmos tests

* cleanup

* changelog and cleanup

* pr suggestions. bump chainid

Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Sean King <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Marko <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Federico Kunze Küllmer <[email protected]>
(cherry picked from commit 8dfbc9c)

Co-authored-by: Ramiro Carlucho <[email protected]>
mergify[bot] and ramacarlucho authored Jan 27, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 22fbe825790df06e8383a9c25680f62d239b2e25
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -42,6 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### API Breaking

* (testing) [\#774](https://github.com/cosmos/ibc-go/pull/774) Added `ChainID` arg to `SetupWithGenesisValSet` on the testing app. `Coordinator` generated ChainIDs now starts at index 1
* (transfer) [\#675](https://github.com/cosmos/ibc-go/pull/675) Transfer `NewKeeper` now takes in an ICS4Wrapper. The ICS4Wrapper may be the IBC Channel Keeper when ICS20 is not used in a middleware stack. The ICS4Wrapper is required for applications wishing to connect middleware to ICS20.
* (core) [\#650](https://github.com/cosmos/ibc-go/pull/650) Modify `OnChanOpenTry` IBC application module callback to return the negotiated app version. The version passed into the `MsgChanOpenTry` has been deprecated and will be ignored by core IBC.
* (core) [\#629](https://github.com/cosmos/ibc-go/pull/629) Removes the `GetProofSpecs` from the ClientState interface. This function was previously unused by core IBC.
Original file line number Diff line number Diff line change
@@ -45,8 +45,8 @@ func TestICATestSuite(t *testing.T) {

func (suite *InterchainAccountsTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ type KeeperTestSuite struct {

func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 3)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3))
}

func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
4 changes: 2 additions & 2 deletions modules/apps/27-interchain-accounts/host/ibc_module_test.go
Original file line number Diff line number Diff line change
@@ -47,8 +47,8 @@ func TestICATestSuite(t *testing.T) {

func (suite *InterchainAccountsTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
Original file line number Diff line number Diff line change
@@ -38,9 +38,9 @@ type KeeperTestSuite struct {

func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 3)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3))
}

func NewICAPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
4 changes: 2 additions & 2 deletions modules/apps/27-interchain-accounts/types/account_test.go
Original file line number Diff line number Diff line change
@@ -33,8 +33,8 @@ type TypesTestSuite struct {
func (suite *TypesTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func TestTypesTestSuite(t *testing.T) {
6 changes: 3 additions & 3 deletions modules/apps/transfer/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -27,9 +27,9 @@ type KeeperTestSuite struct {

func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 3)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3))

queryHelper := baseapp.NewQueryServerTestHelper(suite.chainA.GetContext(), suite.chainA.GetSimApp().InterfaceRegistry())
types.RegisterQueryServer(queryHelper, suite.chainA.GetSimApp().TransferKeeper)
6 changes: 3 additions & 3 deletions modules/apps/transfer/transfer_test.go
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ type TransferTestSuite struct {

func (suite *TransferTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 3)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
suite.chainC = suite.coordinator.GetChain(ibctesting.GetChainID(3))
}

func NewTransferPath(chainA, chainB *ibctesting.TestChain) *ibctesting.Path {
4 changes: 2 additions & 2 deletions modules/core/02-client/abci_test.go
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ type ClientTestSuite struct {
func (suite *ClientTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))

// set localhost client
revision := types.ParseChainID(suite.chainA.GetContext().ChainID())
4 changes: 2 additions & 2 deletions modules/core/02-client/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -73,8 +73,8 @@ type KeeperTestSuite struct {
func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))

isCheckTx := false
suite.now = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC)
4 changes: 2 additions & 2 deletions modules/core/02-client/legacy/v100/store_test.go
Original file line number Diff line number Diff line change
@@ -32,8 +32,8 @@ func TestLegacyTestSuite(t *testing.T) {
// SetupTest creates a coordinator with 2 test chains.
func (suite *LegacyTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
suite.coordinator.CommitNBlocks(suite.chainA, 2)
suite.coordinator.CommitNBlocks(suite.chainB, 2)
4 changes: 2 additions & 2 deletions modules/core/02-client/types/msgs_test.go
Original file line number Diff line number Diff line change
@@ -26,8 +26,8 @@ type TypesTestSuite struct {

func (suite *TypesTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func TestTypesTestSuite(t *testing.T) {
4 changes: 2 additions & 2 deletions modules/core/03-connection/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -22,8 +22,8 @@ type KeeperTestSuite struct {

func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func TestKeeperTestSuite(t *testing.T) {
4 changes: 2 additions & 2 deletions modules/core/03-connection/types/msgs_test.go
Original file line number Diff line number Diff line change
@@ -42,8 +42,8 @@ type MsgTestSuite struct {
func (suite *MsgTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))

app := simapp.Setup(false)
db := dbm.NewMemDB()
4 changes: 2 additions & 2 deletions modules/core/04-channel/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -28,8 +28,8 @@ func TestKeeperTestSuite(t *testing.T) {
// SetupTest creates a coordinator with 2 test chains.
func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
suite.coordinator.CommitNBlocks(suite.chainA, 2)
suite.coordinator.CommitNBlocks(suite.chainB, 2)
4 changes: 2 additions & 2 deletions modules/core/ante/ante_test.go
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ type AnteTestSuite struct {
// SetupTest creates a coordinator with 2 test chains.
func (suite *AnteTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
suite.coordinator.CommitNBlocks(suite.chainA, 2)
suite.coordinator.CommitNBlocks(suite.chainB, 2)
4 changes: 2 additions & 2 deletions modules/core/genesis_test.go
Original file line number Diff line number Diff line change
@@ -50,8 +50,8 @@ type IBCTestSuite struct {
func (suite *IBCTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
}

func TestIBCTestSuite(t *testing.T) {
4 changes: 2 additions & 2 deletions modules/core/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ type KeeperTestSuite struct {
func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)

suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))

// TODO: remove
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
4 changes: 2 additions & 2 deletions modules/core/legacy/v100/genesis_test.go
Original file line number Diff line number Diff line change
@@ -38,8 +38,8 @@ func TestLegacyTestSuite(t *testing.T) {
// SetupTest creates a coordinator with 2 test chains.
func (suite *LegacyTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
suite.coordinator.CommitNBlocks(suite.chainA, 2)
suite.coordinator.CommitNBlocks(suite.chainB, 2)
Original file line number Diff line number Diff line change
@@ -34,8 +34,8 @@ type SoloMachineTestSuite struct {

func (suite *SoloMachineTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))

suite.solomachine = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachinesingle", "testing", 1)
suite.solomachineMulti = ibctesting.NewSolomachine(suite.T(), suite.chainA.Codec, "solomachinemulti", "testing", 4)
Original file line number Diff line number Diff line change
@@ -57,8 +57,8 @@ type TendermintTestSuite struct {

func (suite *TendermintTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2)
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1))
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2))
// commit some blocks so that QueryProof returns valid proof (cannot return valid query if height <= 1)
suite.coordinator.CommitNBlocks(suite.chainA, 2)
suite.coordinator.CommitNBlocks(suite.chainB, 2)
4 changes: 2 additions & 2 deletions testing/README.md
Original file line number Diff line number Diff line change
@@ -155,8 +155,8 @@ func TestKeeperTestSuite(t *testing.T) {
// SetupTest creates a coordinator with 2 test chains.
func (suite *KeeperTestSuite) SetupTest() {
suite.coordinator = ibctesting.NewCoordinator(suite.T(), 2) // initializes 2 test chains
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(0)) // convenience and readability
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(1)) // convenience and readability
suite.chainA = suite.coordinator.GetChain(ibctesting.GetChainID(1)) // convenience and readability
suite.chainB = suite.coordinator.GetChain(ibctesting.GetChainID(2)) // convenience and readability
}

```
4 changes: 3 additions & 1 deletion testing/app.go
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ func SetupTestingApp() (TestingApp, map[string]json.RawMessage) {
// that also act as delegators. For simplicity, each validator is bonded with a delegation
// of one consensus engine unit (10^6) in the default token of the simapp from first genesis
// account. A Nop logger is set in SimApp.
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) TestingApp {
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, balances ...banktypes.Balance) TestingApp {
app, genesisState := DefaultTestingAppInit()
// set genesis accounts
authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs)
@@ -117,6 +117,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs
// init chain will set the validator set and initialize the genesis accounts
app.InitChain(
abci.RequestInitChain{
ChainId: chainID,
Validators: []abci.ValidatorUpdate{},
ConsensusParams: simapp.DefaultConsensusParams,
AppStateBytes: stateBytes,
@@ -126,6 +127,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs
// commit genesis changes
app.Commit()
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
ChainID: chainID,
Height: app.LastBlockHeight() + 1,
AppHash: app.LastCommitID().Hash,
ValidatorsHash: valSet.Hash(),
2 changes: 1 addition & 1 deletion testing/chain.go
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain {
Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, amount)),
}

app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, balance)
app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{acc}, chainID, balance)

// create current header and call begin block
header := tmproto.Header{
5 changes: 2 additions & 3 deletions testing/coordinator.go
Original file line number Diff line number Diff line change
@@ -10,9 +10,8 @@ import (
abci "github.com/tendermint/tendermint/abci/types"
)

const ChainIDPrefix = "testchain"

var (
ChainIDPrefix = "testchain"
globalStartTime = time.Date(2020, 1, 2, 0, 0, 0, 0, time.UTC)
TimeIncrement = time.Second * 5
)
@@ -34,7 +33,7 @@ func NewCoordinator(t *testing.T, n int) *Coordinator {
CurrentTime: globalStartTime,
}

for i := 0; i < n; i++ {
for i := 1; i <= n; i++ {
chainID := GetChainID(i)
chains[chainID] = NewTestChain(t, coord, chainID)
}