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

Support 5.1.0 #32

Merged
merged 159 commits into from
May 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
159 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
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
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
Mar 15, 2022
eaf9d67
update changelog
Mar 15, 2022
6e1b25a
fix: adjust InitModule to account for empty controller and host keepe…
mergify[bot] Mar 15, 2022
fde4494
update changelog
Mar 15, 2022
0ab8568
Merge pull request from GHSA-j658-c98j-fww4 (#1127)
Mar 15, 2022
46e0206
fixes for the documentation about handling ack for SDK <= 0.45 (#1122…
mergify[bot] Mar 15, 2022
10ebf0d
call packet.GetSequence() rather than passing the func as argument (b…
mergify[bot] Mar 21, 2022
d538bc4
fixes for go-releaser configuration (#1148) (#1157)
mergify[bot] Mar 22, 2022
c0a8e81
add versions for new releases (#1175) (#1183)
mergify[bot] Mar 28, 2022
ea52a75
fix typos in the controller params (#1172) (#1182)
mergify[bot] Mar 28, 2022
7662473
requirements document for ICA (#1173) (#1209)
mergify[bot] Apr 4, 2022
f49b8bc
imp: improve Logger performance (#1160) (#1218)
mergify[bot] Apr 6, 2022
73dca92
docs: replace links in apps with correct ones (#1255) (#1261)
mergify[bot] Apr 14, 2022
52f00fb
update godoc of `RegisterInterchainAccount` (#1256) (#1262)
mergify[bot] Apr 14, 2022
70d8472
build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.1 to 0.45.3 …
mergify[bot] Apr 21, 2022
0645553
add missing changelog entry for bump of sdk 0.45.3 (#1272) (#1277)
mergify[bot] Apr 25, 2022
5883227
fixing dead links from sdk default branch update (#1301) (#1303)
mergify[bot] Apr 27, 2022
33b063e
override default docsBranch (#1355) (#1389)
mergify[bot] May 17, 2022
75ee548
build(deps): bump github.com/cosmos/cosmos-sdk from 0.45.3 to 0.45.4 …
mergify[bot] May 18, 2022
f58b8c9
add empty keepers checking in ibc NewKeeper (backport #1284) (#1381)
mergify[bot] May 18, 2022
8111f7a
fix: prefix ResponseResultType enum for proto linting (#1143) (#1392)
mergify[bot] May 18, 2022
41a0733
feat: Add sender to fungible_token_packet events (backport #1414) (#1…
mergify[bot] May 24, 2022
0337676
add swagger for interchain accounts (#1402) (#1410)
mergify[bot] May 24, 2022
c26c51c
add actual parameter example to denom-trace and denom-hash CLI querie…
mergify[bot] May 30, 2022
968d697
Emit channel close event on ordered channel close (backport #1464) (#…
mergify[bot] Jun 2, 2022
d745ace
chore: improve DenomTrace grpc (backport #1342) (#1503)
mergify[bot] Jun 9, 2022
da89037
Emit an event to indicate a successful acknowledgement in the ICA mod…
mergify[bot] Jun 9, 2022
1842464
Update CHANGELOG.md
Jun 14, 2022
b84992c
Update CHANGELOG.md
Jun 14, 2022
23f555c
Update CHANGELOG.md
Jun 14, 2022
df58f1d
Update CHANGELOG.md
Jun 14, 2022
ae866d8
Update versions
Jun 16, 2022
79eeb56
Delete v3-to-v4.md
Jun 20, 2022
53e1594
docs: add upgrade client proposal event (#1596) (#1634)
mergify[bot] Jul 1, 2022
b91ef4e
feat: emitting an event when handling a client upgrade proposal (back…
mergify[bot] Jul 5, 2022
2c986a0
fix broken link (#1776) (#1806)
mergify[bot] Jul 28, 2022
93611dd
fix: add cosmos_proto.implements_interface (backport #1740) (#1815)
mergify[bot] Jul 29, 2022
f0c3d3a
Update CHANGELOG.md
Aug 2, 2022
79a4af5
Update CHANGELOG.md
Aug 2, 2022
3a514ef
Update CHANGELOG.md
Aug 2, 2022
7533807
chore: adding dockerfile and release task to release/3.0.x (#1928)
chatton Aug 9, 2022
0ec1fcc
Fixing github action workflows (backport #1428) (#1937)
mergify[bot] Aug 11, 2022
5c407ab
fix: "acknowledgement written" logs unsupported type (backport #1919)…
mergify[bot] Aug 12, 2022
02b55a3
fix broken link (#2059) (#2094)
mergify[bot] Aug 23, 2022
3252455
chore: fix broken link to bank module spec (backport #2201) (#2206)
mergify[bot] Sep 7, 2022
c87a53d
fix broken link/update link (#2338) (#2343)
mergify[bot] Sep 21, 2022
773e22b
Fix ICAControllerKeeper (#2303) (#2329)
mergify[bot] Sep 21, 2022
4ae2834
Adding `paramsKeeper.Subspace(icahosttypes.SubModuleName)` (#2220) (#…
mergify[bot] Sep 21, 2022
466e428
fix: add nil checks for controller and host keeper services (backport…
mergify[bot] Sep 21, 2022
5f25ecd
Move client specific logic to SelfClient interface
liorzilp Nov 16, 2022
fbb8b30
Merge pull request #2 from dymensionxyz/liorzilp/01-client-agnostic
liorzilp Nov 16, 2022
68a2df9
Creating TestChainClientI and TestChainTendermint having the Tendermi…
liorzilp Nov 17, 2022
ea1aea0
Fixing all the places where tendermint logic was used from TestChain
liorzilp Nov 17, 2022
e168d15
Merge pull request #4 from dymensionxyz/liorzilp/02-multi-client-type…
liorzilp Nov 17, 2022
3a8e98b
Move ClientConfig logic to tendermint chain
liorzilp Nov 20, 2022
3035c5c
Merge pull request #8 from dymensionxyz/liorzilp/07-additions-light-c…
liorzilp Nov 20, 2022
11afc18
Make ConstructUpdateClientHeader TestChainClientI method instead of s…
liorzilp Nov 20, 2022
6a5cb1b
Merge pull request #9 from dymensionxyz/liorzilp/07-additions-light-c…
liorzilp Nov 20, 2022
c29ed84
Merge branch 'liorzilp/07-additions-light-client-agnostic' of github.…
liorzilp Nov 20, 2022
309d690
fix lint warning
liorzilp Nov 21, 2022
6eb5038
Merge pull request #10 from dymensionxyz/liorzilp/07-additions-light-…
liorzilp Nov 21, 2022
3e3d47b
Merge branch 'liorzilp/07-additions-light-client-agnostic' of github.…
liorzilp Nov 21, 2022
ce25fe2
Copy 07-tendermint, rename and create 01-dymint
liorzilp Nov 21, 2022
99cf0cb
move ConstructUpdateClientHeader to common testChain code using a new…
liorzilp Nov 22, 2022
f8b752d
fix CreateClient to use the correct ClientConfig
liorzilp Nov 22, 2022
95151b9
07-tendermint assumes the other chain is also tendermint - fix it
liorzilp Nov 22, 2022
40169cc
Merge pull request #11 from dymensionxyz/liorzilp/07-additions-light-…
liorzilp Nov 22, 2022
e62908e
Merge branch 'liorzilp/07-additions-light-client-agnostic' of github.…
liorzilp Nov 22, 2022
07debb3
Support dymint<->tendermint IBC tests
liorzilp Nov 22, 2022
48327aa
Merge pull request #12 from dymensionxyz/liorzilp/05-dymint-client
liorzilp Nov 22, 2022
2220c9a
* remove validator set checking
liorzilp Nov 23, 2022
7fe3911
enhance Validate Commit to check the commit and the proposer signatur…
liorzilp Nov 23, 2022
70780bb
ignore ConsensusState->NextValidatorsHash
liorzilp Nov 23, 2022
a67ae1b
clean TrustLevel and UnbondingPeriod leftovers
liorzilp Nov 23, 2022
4799d14
ignore Header->TrustedValidators
liorzilp Nov 23, 2022
d4c02a3
Merge pull request #13 from dymensionxyz/liorzilp/06-update-state
liorzilp Nov 23, 2022
8c8d008
Update README.md
liorzilp Nov 24, 2022
8dc49fc
Update README.md
liorzilp Nov 24, 2022
e03dadc
add clientHooks
liorzilp Nov 28, 2022
d6b464a
Merge pull request #15 from dymensionxyz/liorzilp/14-client-hooks
liorzilp Nov 29, 2022
86c9ec9
remove redundant test cases
liorzilp Nov 29, 2022
efd1f9f
Merge pull request #17 from dymensionxyz/liorzilp/16-fix-misbehaviour…
liorzilp Nov 29, 2022
33f4824
add GetChainID
liorzilp Nov 30, 2022
78f09f4
Merge pull request #19 from dymensionxyz/liorzilp/18-get-chain-id
liorzilp Nov 30, 2022
ba5bed4
add GetLastHeader
liorzilp Dec 6, 2022
1e5a27e
fix missing EndBlock() / remove BeginBlock()
liorzilp Dec 6, 2022
2bdb22e
Merge pull request #21 from dymensionxyz/liorzilp/20-test-chain-changes
liorzilp Dec 6, 2022
06ff366
support dymint signatures verification + add dymint to the default-al…
ItzhakBokris Dec 21, 2022
bcb8546
Liorzilp/25 upgrade v3.4.0 (#26)
liorzilp Jan 4, 2023
1870174
added backward compatible interface (#27)
mtsitrin Jan 5, 2023
e315bbf
feat: message interceptor (#29)
liorzilp Mar 12, 2023
1c5a349
Merge branch 'main-dym' into support_5.1.0
mtsitrin May 2, 2023
408ecdc
compiles. removed in the meanwhile all related to self client. will b…
mtsitrin May 2, 2023
e157265
running keeper with Dymint light client
mtsitrin May 3, 2023
7eecb10
cleanup after comparing with origin/v5.1.0
mtsitrin May 3, 2023
37af5a3
wrapped 02-client keeper to an interface. added core NewKeeperWithDymint
mtsitrin May 3, 2023
2b6ccef
added dymint keepers
mtsitrin May 3, 2023
657cfa8
original tests compiles and run
mtsitrin May 3, 2023
2a4f330
Trying to make dymint tests work. WIP
mtsitrin May 3, 2023
97171e2
fixed linter
mtsitrin May 11, 2023
483b0ed
gofumpt
mtsitrin May 11, 2023
ff99454
fixed goimports
mtsitrin May 11, 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
Prev Previous commit
Next Next commit
ibctesting: custom voting power reduction for testing (cosmos#939) (c…
…osmos#1104)

* ibctesting: custom voting power reduction for testing

* changelog

* fix

* make T public

* fix

* revert changes

* fix test

(cherry picked from commit c32e4be)

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
  • Loading branch information
mergify[bot] and fedekunze authored Mar 11, 2022
commit 1f346a7219176a2827be4872562d30e35486d016
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -44,7 +44,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (core) [\#709](https://github.com/cosmos/ibc-go/pull/709) Replace github.com/pkg/errors with stdlib errors

### API Breaking


* (testing) [\#939](https://github.com/cosmos/ibc-go/pull/939) Support custom power reduction for testing.
* (modules/core/05-port) [\#1086](https://github.com/cosmos/ibc-go/pull/1086) Added `counterpartyChannelID` argument to IBCModule.OnChanOpenAck
* (channel) [\#848](https://github.com/cosmos/ibc-go/pull/848) Added `ChannelId` to MsgChannelOpenInitResponse
* (testing) [\#813](https://github.com/cosmos/ibc-go/pull/813) The `ack` argument to the testing function `RelayPacket` has been removed as it is no longer needed.
4 changes: 0 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -466,7 +466,6 @@ github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIv
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
@@ -801,7 +800,6 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa h1:0U2s5loxrTy6/VgfVoLuVLFJcURKLH49ie0zSch7gh4=
github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM=
@@ -1313,7 +1311,6 @@ google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdr
google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=
google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1426,7 +1423,6 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg=
google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
18 changes: 13 additions & 5 deletions testing/app.go
Original file line number Diff line number Diff line change
@@ -58,16 +58,17 @@ 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, chainID string, balances ...banktypes.Balance) TestingApp {
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, powerReduction sdk.Int, balances ...banktypes.Balance) TestingApp {
app, genesisState := DefaultTestingAppInit()

// set genesis accounts
authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs)
genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis)

validators := make([]stakingtypes.Validator, 0, len(valSet.Validators))
delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators))

bondAmt := sdk.NewInt(1000000)
bondAmt := sdk.TokensFromConsensusPower(1, powerReduction)

for _, val := range valSet.Validators {
pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey)
@@ -87,21 +88,28 @@ func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs
Commission: stakingtypes.NewCommission(sdk.ZeroDec(), sdk.ZeroDec(), sdk.ZeroDec()),
MinSelfDelegation: sdk.ZeroInt(),
}

validators = append(validators, validator)
delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()))
}

// set validators and delegations
var stakingGenesis stakingtypes.GenesisState
app.AppCodec().MustUnmarshalJSON(genesisState[stakingtypes.ModuleName], &stakingGenesis)

bondDenom := stakingGenesis.Params.BondDenom

totalSupply := sdk.NewCoins()

// add bonded amount to bonded pool module account
balances = append(balances, banktypes.Balance{
Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(),
Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt.Mul(sdk.NewInt(int64(len(valSet.Validators)))))},
Coins: sdk.Coins{sdk.NewCoin(bondDenom, bondAmt.Mul(sdk.NewInt(int64(len(valSet.Validators)))))},
})

// set validators and delegations
stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations)
genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis)
stakingGenesis = *stakingtypes.NewGenesisState(stakingGenesis.Params, validators, delegations)
genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(&stakingGenesis)

// update total supply
bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{})
15 changes: 6 additions & 9 deletions testing/chain.go
Original file line number Diff line number Diff line change
@@ -113,7 +113,7 @@ func NewTestChainWithValSet(t *testing.T, coord *Coordinator, chainID string, va
senderAccs = append(senderAccs, senderAcc)
}

app := SetupWithGenesisValSet(t, valSet, genAccs, chainID, genBals...)
app := SetupWithGenesisValSet(t, valSet, genAccs, chainID, sdk.DefaultPowerReduction, genBals...)

// create current header and call begin block
header := tmproto.Header{
@@ -453,6 +453,7 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64,
EvidenceHash: tmhash.Sum([]byte("evidence_hash")),
ProposerAddress: tmValSet.Proposer.Address, //nolint:staticcheck
}

hhash := tmHeader.Hash()
blockID := MakeBlockID(hhash, 3, tmhash.Sum([]byte("part_set")))
voteSet := tmtypes.NewVoteSet(chainID, blockHeight, 1, tmproto.PrecommitType, tmValSet)
@@ -467,16 +468,12 @@ func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64,

if tmValSet != nil {
valSet, err = tmValSet.ToProto()
if err != nil {
panic(err)
}
require.NoError(chain.T, err)
}

if tmTrustedVals != nil {
trustedVals, err = tmTrustedVals.ToProto()
if err != nil {
panic(err)
}
require.NoError(chain.T, err)
}

// The trusted fields may be nil. They may be filled before relaying messages to a client.
@@ -505,8 +502,8 @@ func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) tmtypes.Bl
// sorting of ValidatorSet.
// The sorting is first by .VotingPower (descending), with secondary index of .Address (ascending).
func CreateSortedSignerArray(altPrivVal, suitePrivVal tmtypes.PrivValidator,
altVal, suiteVal *tmtypes.Validator) []tmtypes.PrivValidator {

altVal, suiteVal *tmtypes.Validator,
) []tmtypes.PrivValidator {
switch {
case altVal.VotingPower > suiteVal.VotingPower:
return []tmtypes.PrivValidator{altPrivVal, suitePrivVal}
12 changes: 2 additions & 10 deletions testing/coordinator.go
Original file line number Diff line number Diff line change
@@ -212,11 +212,7 @@ func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error {
return err
}

if err := path.EndpointB.UpdateClient(); err != nil {
return err
}

return nil
return path.EndpointB.UpdateClient()
}

// ChanOpenInitOnBothChains initializes a channel on the source chain and counterparty chain
@@ -237,9 +233,5 @@ func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error {
return err
}

if err := path.EndpointB.UpdateClient(); err != nil {
return err
}

return nil
return path.EndpointB.UpdateClient()
}
4 changes: 2 additions & 2 deletions testing/endpoint.go
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ func (endpoint *Endpoint) QueryProof(key []byte) ([]byte, clienttypes.Height) {
}

// QueryProofAtHeight queries proof associated with this endpoint using the proof height
// providied
// provided
func (endpoint *Endpoint) QueryProofAtHeight(key []byte, height uint64) ([]byte, clienttypes.Height) {
// query proof on the counterparty using the latest height of the IBC client
return endpoint.Chain.QueryProofAtHeight(key, int64(height))
@@ -98,7 +98,7 @@ func (endpoint *Endpoint) CreateClient() (err error) {
consensusState = endpoint.Counterparty.Chain.LastHeader.ConsensusState()
case exported.Solomachine:
// TODO
// solo := NewSolomachine(Chain.T, endpoint.Chain.Codec, clientID, "", 1)
// solo := NewSolomachine(endpoint.Chain.T, endpoint.Chain.Codec, clientID, "", 1)
// clientState = solo.ClientState()
// consensusState = solo.ConsensusState()