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

Improve testing for PruneAcknowledgements rpc #5508

Merged
merged 352 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
352 commits
Select commit Hold shift + click to select a range
ccb00fc
updat MsgUpgradeTimeout resp, add getter directives (#3858)
charleenfei Jun 19, 2023
dc69cd5
ChanUpgradeOpen callback should not return an error. (#3899)
DimitrisJim Jun 19, 2023
e2784ca
chore: pr review followups (#3901)
colin-axner Jun 19, 2023
4e71da3
Remove error return from OnChanUpgradeRestore. (#3902)
DimitrisJim Jun 20, 2023
0766486
chore: refactor `chanUpgradeAck` tests to use expected errors (#3843)
damiannolan Jun 20, 2023
6453bd4
adding result to MsgChannelUpgradeAckResponse (#3845)
damiannolan Jun 20, 2023
4f5f627
update upgrade seq comparison in `ChanUpgradeTimeout` (#3905)
charleenfei Jun 20, 2023
7c5384f
Implement MsgChannelUpgradeCancel message server handler (#3848)
chatton Jun 21, 2023
26daed9
`ChanUpgradeTimeout` `msg_server` function (#3855)
charleenfei Jun 21, 2023
ea0ded0
rm Equal directive (#3908)
charleenfei Jun 21, 2023
f734e49
feat: adding msg server implementation for `ChannelUpgradeAck` (#3849)
damiannolan Jun 21, 2023
742b4bb
chore: make error wrapping and logging consistent for upgrade try msg…
damiannolan Jun 21, 2023
27b39ae
chore: use new version return in transfer app for testing relayers (#…
damiannolan Jun 22, 2023
9af46f7
Remove generation of getters for upgrade types. (#3951)
DimitrisJim Jun 28, 2023
7f3b04d
Add a check for connection state in UpgradeAck. (#3954)
DimitrisJim Jun 28, 2023
86bb6bf
update WriteUpgradeTry to change flush status to `FLUSHCOMPLETE` if t…
charleenfei Jun 28, 2023
16ed527
Add flush status check in SendPacket (#3912)
chatton Jun 28, 2023
32930e7
Add ChanUpgradeOpen core handler. (#3844)
DimitrisJim Jun 29, 2023
a7793bc
Add flushing check to WriteUpgradeAckChannel (#3976)
chatton Jun 30, 2023
e81d2f8
remove depguard from golangci-lint (#4000)
chatton Jul 4, 2023
25fcad4
Set channel state to NOTINFLUSH when Closing (#3995)
chatton Jul 5, 2023
5767ad7
Set Counterparty Last Sequence Send (#4005)
chatton Jul 5, 2023
92f9e56
Add FlushStatus Checks to RecvPacket (#3914)
chatton Jul 5, 2023
118cb71
Add implementation for message server handling of ChanUpgradeOpen. (#…
DimitrisJim Jul 5, 2023
c249e1e
helper function for validating a counterparty upgrade against the sel…
chatton Jul 5, 2023
05c43dc
Make AbortUpgrade panic on failure (#4011)
chatton Jul 6, 2023
dffdb92
Amend AcknowledgePacket to handle flushing (#3922)
DimitrisJim Jul 6, 2023
3203f07
Amend timeout to handle in-flight packets. (#3923)
DimitrisJim Jul 6, 2023
641ad00
change comment
crodriguezvega Jul 8, 2023
ef239b4
chore: adding callback for OnChanUpgradeRestore in abort scenarios (#…
damiannolan Jul 10, 2023
fcd8ded
Pass in counterparty portID, channelID when verifying channel in Chan…
DimitrisJim Jul 12, 2023
af76ade
Remove manual setting of flush status in ChanUpgradeOpen. (#4064)
DimitrisJim Jul 12, 2023
8e53c77
Use counterparty portid, channelid when verifying channel upgrade err…
DimitrisJim Jul 13, 2023
f731de5
feat: adding `OnChanUpgradeInit` handler implementation to `29-fee` (…
damiannolan Jul 17, 2023
0e7e57e
feat: adding `OnChanUpgradeTry` handler implementation for `29-fee` (…
damiannolan Jul 17, 2023
42c79ad
feat: adding `OnChanUpgradeAck` handler implementation to `29-fee` (#…
damiannolan Jul 18, 2023
82ea953
Use counterparty connection hops when verifying channel state (#4074)
DimitrisJim Jul 19, 2023
dcc004f
chore: adding comment to 29-fee OnChanUpgradeOpen callback (#4123)
damiannolan Jul 19, 2023
c39b53e
Add tests for WriteUpgradeOpenChannel. (#4077)
DimitrisJim Jul 19, 2023
98db69b
Add tests for WriteUpgradeCancel. (#4076)
DimitrisJim Jul 19, 2023
ac1acbb
Move channel to OPEN if all in-flight packets have been flushed in Up…
DimitrisJim Jul 19, 2023
347346b
imp: use HasInflightPackets to check if channel has finished flushing…
DimitrisJim Jul 20, 2023
c2bd97b
feat: adding `OnChanUpgradeInit` implementation to transfer (#4126)
damiannolan Jul 24, 2023
edd0cc1
Remove superfluous ignore directive. (#4158)
DimitrisJim Jul 24, 2023
ec2a8c8
feat: adding OnChanUpgradeTry implementation to transfer (#4137)
damiannolan Jul 24, 2023
ace3acd
Call app callback after writting state in Cancel and Timeout. (#4166)
DimitrisJim Jul 24, 2023
4072cbd
helper function to clear state stored during an upgrade (#4147)
crodriguezvega Jul 24, 2023
d9e8131
add `IsUpgradError` func for readability (#4144)
crodriguezvega Jul 25, 2023
65511d2
add check that channel exists in upgrade gRPCs (#4156)
crodriguezvega Jul 25, 2023
f3c9539
consistent connection lookup calls in 04-channel (#4146)
crodriguezvega Jul 27, 2023
e00fb0f
nit: error formatting improvements for channel upgrades (#4097)
crodriguezvega Jul 27, 2023
bf87c3d
added test for event emission (#4020)
chatton Aug 2, 2023
4c3e57e
feat: implement `OnChanUpgradeAck` for transfer (#4215)
damiannolan Aug 2, 2023
c862d24
refactor: simplify OnChanUpgradeTry transfer testing to call module c…
damiannolan Aug 2, 2023
157896d
test: adding test for events in channel upgrade try (#4226)
chatton Aug 3, 2023
e7c54e5
Add store functions for counterparty upgrade. (#4293)
DimitrisJim Aug 7, 2023
9886cbd
Add FLUSHING/FLUSHCOMPLETE to Channel state. (#4300)
DimitrisJim Aug 7, 2023
99a537d
feat: adding `ChannelUpgradeConfirm` rpc and msgs (#4302)
damiannolan Aug 8, 2023
7735de1
chore: move verification before startFlushUpgradeHandshake (#4285)
chatton Aug 8, 2023
d5e63d4
rebase `04-channel-upgrades` branch (#4160)
crodriguezvega Aug 8, 2023
a8b36fa
Revert "rebase `04-channel-upgrades` branch (#4160)"
damiannolan Aug 8, 2023
200f4b5
Merge branch 'main' into 04-channel-upgrades
damiannolan Aug 8, 2023
3dac601
rm unnecessary test matrix file
damiannolan Aug 8, 2023
a02c059
make lint-fix
damiannolan Aug 8, 2023
2f25298
satisfy revive linter
damiannolan Aug 8, 2023
18b64e8
updating feature banch ci workflow for golangci-lint
damiannolan Aug 8, 2023
ac86b3d
bumping golangci-lint action to v3.6.0
damiannolan Aug 8, 2023
1daa1d8
define go version as string in workflow
damiannolan Aug 8, 2023
5721b4d
Delete counterparty upgrade in deleteUpgradeInfo. Move function to ke…
DimitrisJim Aug 8, 2023
e7d651d
Remove check for counterparty timeout in ChanUpgradeTry. (#4301)
DimitrisJim Aug 8, 2023
9d9fb4e
Store counterparty upgrade after ack finishes. (#4299)
DimitrisJim Aug 9, 2023
8fa23dc
call verification of counterparty channel, upgrade in upgradetry. (#4…
DimitrisJim Aug 9, 2023
e7ea589
Add verification calls in ChanUpgradeAck. (#4312)
DimitrisJim Aug 9, 2023
99282a4
Add ChanUpgradeConfirm to endpoint. (#4314)
DimitrisJim Aug 10, 2023
b7573a3
Merge branch 'main' into 04-channel-upgrades
damiannolan Aug 10, 2023
ce03b99
Remove verification calls in StartFlushUpgradeHandshake (#4317)
DimitrisJim Aug 10, 2023
edef7c9
test: add events test for ChannelUpgradeTimeout (#4284)
chatton Aug 14, 2023
b048943
test: add event emission test for ChanUpgradeCancel (#4281)
chatton Aug 14, 2023
0d6d9f1
Check counterparty timeout hasn't elapsed in ChanUpgradeAck. (#4305)
DimitrisJim Aug 15, 2023
5478216
refactor: modify `ChannelUpgradeInit` to only store upgrade fields (#…
damiannolan Aug 15, 2023
4bb551c
Add test for event emission ChanUpgradeAck (#4228)
chatton Aug 15, 2023
65c5a7e
Adding test for events for ChanUpgradeOpen (#4230)
chatton Aug 15, 2023
2b221e6
Move check to fail on incompatible upgrade after proof verification. …
DimitrisJim Aug 15, 2023
d5b35a7
Add functions checkForUpgradeCompatibility and syncUpgradeSequence (#…
chatton Aug 16, 2023
7cd3ddf
refactor: modify upgrade init to not change channel state (#4357)
damiannolan Aug 16, 2023
f648383
refactor: cleanup upgrade init app callback args (#4359)
damiannolan Aug 16, 2023
e6139d0
Add WriteUpgradeConfirm function. (#4303)
DimitrisJim Aug 16, 2023
09e144c
Modify startFlushUpgradeHandshake to be used as a write function (#4360)
chatton Aug 16, 2023
bf37961
Remove restore logic in upgrade TRY handler (#4362)
chatton Aug 17, 2023
b43711d
refactor: remove `FlushStatus` from ack handler and msg (#4364)
damiannolan Aug 17, 2023
61d9853
Amend checkForUpgradeCompatibility to check that versions match (#4366)
DimitrisJim Aug 17, 2023
cd62620
refactor: modify ack handler expected channel state (#4371)
damiannolan Aug 17, 2023
e2c8326
Channel Upgrade Ack (#4372)
chatton Aug 17, 2023
2e8b370
feat: adding `chanUpgradeConfirm` implementation to `04-channel` (#4373)
damiannolan Aug 17, 2023
cd250cb
feat: adding msg server implementation for `ChanUpgradeConfirm` (#4376)
damiannolan Aug 17, 2023
e78a308
Remove check on flush status for send packet. (#4384)
DimitrisJim Aug 18, 2023
c0fd304
Channel Upgrade Open (#4379)
chatton Aug 21, 2023
0f431ca
Implement Channel Upgrade Cancel (#4404)
chatton Aug 22, 2023
2c17724
Refactor `TestWriteUpgradeCancelChannel` (#4424)
ThanhNhann Aug 23, 2023
5c12378
Refactor `TestWriteUpgradeOpenChannel` (#4431)
ThanhNhann Aug 23, 2023
f1e8ae8
refactor: acknowledgePacket handling flushing / flush complete state …
damiannolan Aug 23, 2023
f230633
Add UpgradeTimeout as a params field in the channel submodule (#4411)
chatton Aug 23, 2023
5b1071d
Refactor TestWriteUpgradeTry to remove flush status checks (#4430)
chatton Aug 24, 2023
9c54f23
refactor: use `expResult` in acknowledgePacket tests (#4439)
damiannolan Aug 24, 2023
7302d9b
Implement ChanUpgradeTimeout with spec changes (#4438)
chatton Aug 24, 2023
9372c6c
Amend recvPacket as per spec. (#4386)
DimitrisJim Aug 24, 2023
d6469e0
Update error receipt event emission to use correct event type (#4451)
chatton Aug 24, 2023
f638139
Account for moving channel state to flush complete in timeout process…
chatton Aug 24, 2023
b1131d2
Remove init, try, ack upgrade states (#4455)
chatton Aug 24, 2023
b1ef4c1
refactor: remove `FlushStatus` from channel end (#4457)
damiannolan Aug 24, 2023
404da25
Refactor channel upgradability msgs to reflect updated spec (#4456)
chatton Aug 24, 2023
9d7ddac
Amend timeoutPacket to allow timeouts on any channel state. (#4367)
DimitrisJim Aug 24, 2023
656e1e1
Refactor recvPacket tests to use expError. (#4471)
DimitrisJim Aug 28, 2023
03c55bd
refactor: remove counterparty last sequence send state entry (#4473)
damiannolan Aug 28, 2023
9401a2b
Don't write channel to state when not modified. (#4495)
DimitrisJim Aug 29, 2023
5847b84
refactor: rename channel upgradability flush states (#4488)
damiannolan Aug 29, 2023
0369df2
Don't emit event information for unchanged upgrade. (#4492)
DimitrisJim Aug 29, 2023
efd4321
Add tests for WriteUpgradeConfirm. (#4490)
DimitrisJim Aug 29, 2023
d1df1c6
Allow receiving of packets if the counterparty latest sequence send h…
DimitrisJim Aug 29, 2023
22dc59d
chore: re-enable disabled test case in `chanUpgradeTry` (#4501)
damiannolan Aug 29, 2023
5b58962
Resolve commented out testcases for Channel Upgrades (#4474)
chatton Aug 29, 2023
312d217
refactor: adding additional upgrade fields args to onChanUpgradeOpen …
damiannolan Aug 30, 2023
0851a7a
tests: adding followup tests for in-flight packets on chanUpgradeConf…
damiannolan Aug 30, 2023
c67918f
Use only timestamp only for upgrade timeouts. (#4482)
chatton Aug 30, 2023
b5a3937
Timing out packets on ordered channels when in flushing state aborts …
chatton Aug 30, 2023
f035200
Change UpgradeTimeout to from absolute to relative (#4511)
chatton Aug 30, 2023
e8f9268
refactor: fee middleware onChanUpgradeInit callback (#4514)
damiannolan Aug 30, 2023
633de7e
refactor: fee middleware onChanUpgradeTry callback (#4515)
damiannolan Aug 30, 2023
23a16f2
refactor: implementation for onChanUpgradeAck ics29 (#4523)
damiannolan Aug 31, 2023
81be4fe
feat: adding fee middleware onChanUpgradeOpen callback impl (#4524)
damiannolan Aug 31, 2023
10a6b0c
Merge branch 'main' into 04-channel-upgrades
chatton Sep 4, 2023
b0cb9f1
Merge branch 'main' into 04-channel-upgrades
chatton Sep 5, 2023
a1db4e0
test: adding integration test for fee transfer channel upgrade (#4533)
damiannolan Sep 26, 2023
4383d62
Merge branch 'main' into 04-channel-upgrades
chatton Sep 26, 2023
63c3010
Merge branch 'main' into 04-channel-upgrades
damiannolan Sep 26, 2023
b6e9bd2
fix: check that `MsgChannelUpgradeInit` is signed by authority (#4773)
charleenfei Oct 6, 2023
75da9f5
Chore: consistent argument order (#4545)
ThanhNhann Oct 6, 2023
658b00f
Add ParseProposalIDFromEvents helper function (#4942)
ThanhNhann Oct 25, 2023
34cbe05
imp: remove `LatestSequenceSend` (#5108)
sangier Nov 14, 2023
fa3f92f
chore: rebase 04-channel-upgrades feature branch (#5085)
crodriguezvega Nov 15, 2023
081646c
chore: propagate IBC authority to 04-channel keeper to be used within…
charleenfei Nov 22, 2023
b41b510
Merge branch 'main' into 04-channel-upgrades
chatton Nov 22, 2023
6b9d1e9
Amend validation of upgrade fields to use variable holding supported …
DimitrisJim Nov 22, 2023
ee240e2
refactor: adapt testing endpoint query for channel upgrade proofs (#5…
damiannolan Nov 27, 2023
690e885
test: adding test for crossing hello trys with historical proofs (#5143)
damiannolan Nov 27, 2023
39df8d2
chore: replace dummy error with correct error type (#5177)
chatton Nov 28, 2023
afc82cd
Remove incorrect godoc (#5203)
chatton Nov 29, 2023
0cfd4e5
chore: correct returned error (#5205)
chatton Nov 29, 2023
bbfbcc4
chore: adding comment to add clarity to returned upgrade (#5214)
chatton Nov 29, 2023
4cfd509
Verify channel upgrade can be completed after cancellation is success…
chatton Nov 29, 2023
6fb0f79
Remove last packet sent from new upgrade constructor. (#5210)
DimitrisJim Nov 29, 2023
743b6da
Reorder call to application callback so it happens after we write sta…
DimitrisJim Nov 29, 2023
30fb5af
chore: allow authorized senders to submit empty error receipt proof (…
chatton Nov 29, 2023
6506d9d
remove incorect code (#5235)
GNaD13 Nov 29, 2023
fa97576
chore: panic instead of return err (#5246)
hieuvubk Nov 29, 2023
b3c5164
chore: add comment about version assignment (#5239)
chatton Nov 30, 2023
eaabb85
Add to docstring with explanation about channel state (#5236)
chatton Nov 30, 2023
ff90976
Chore: replace `fmt.Sprintf` with `fmt.Errorf` in `upgrades.go` (#5291)
ThanhNhann Dec 1, 2023
63d7fc1
fix: add event and event emission for `FLUSHCOMPLETE` (#5245)
sontrinh16 Dec 1, 2023
3c396ee
Remove setting counterparty upgrade info in upgrade try (#5238)
chatton Dec 3, 2023
f23dfef
fix: allow error receipt to be nil in case of the msg sender is the a…
charleenfei Dec 4, 2023
25c8247
Move events to message server layer instead of core level (#5264)
chatton Dec 4, 2023
a394cc6
imp: use MetadataFromVersion function in 27-interchain-accounts (#5300)
vishal-kanna Dec 5, 2023
181bd1a
remove channel id (#5307)
GNaD13 Dec 5, 2023
f48f46d
remove comment that unused (#5308)
GNaD13 Dec 5, 2023
b3ecc31
Implement OnChanUpgradeInit on Controller Chain for interchain-accoun…
chatton Dec 5, 2023
b193740
Add a helper function to create a mock contract. (#5162)
DimitrisJim Nov 22, 2023
f620584
docs: improved channel closure docs (#5170)
srdtrk Nov 27, 2023
1b67482
chore: use `GetPrefixedDenom` to create IBC token denom (#5175)
0xstepit Nov 27, 2023
fa2b6c8
build(deps): Bump DavidAnson/markdownlint-cli2-action from 13 to 14 (…
dependabot[bot] Nov 27, 2023
63e9660
docs: readme improvements (#5171)
crodriguezvega Nov 27, 2023
147f976
chore(08-wasm): `Pin` code during app initialisation (#5161)
vuong177 Nov 28, 2023
e784660
e2e: timeout transfer with grandpa light client (#5018)
charleenfei Nov 28, 2023
cd1684a
Change to StoreCodeUnchecked in Genesis and snapshotter (#5167)
GNaD13 Nov 28, 2023
89514b1
build(deps): Bump JamesIves/github-pages-deploy-action from 4.4.3 to …
dependabot[bot] Nov 28, 2023
d3acbcd
build(deps): Bump github.com/hashicorp/go-metrics from 0.5.2 to 0.5.3…
dependabot[bot] Nov 28, 2023
920670d
build(deps): Bump github.com/cometbft/cometbft from 0.38.1 to 0.38.2 …
dependabot[bot] Nov 28, 2023
a7a6de2
build(deps): Bump github.com/spf13/cast from 1.5.1 to 1.6.0 (#5181)
dependabot[bot] Nov 28, 2023
0f414ce
docs: add IBC overview diagram (#5166)
crodriguezvega Nov 28, 2023
24d0a25
Drop step installing tparse. (#5191)
DimitrisJim Nov 28, 2023
42b3bf2
Add capability to dependabot. (#5193)
DimitrisJim Nov 28, 2023
b81f11b
build(deps): Bump sigs.k8s.io/yaml in /modules/capability (#5194)
dependabot[bot] Nov 28, 2023
58fb0fe
build(deps): Bump github.com/cometbft/cometbft in /modules/capability…
dependabot[bot] Nov 28, 2023
52bc5bd
build(deps): Bump cosmossdk.io/store from 1.0.0 to 1.0.1 (#5199)
dependabot[bot] Nov 29, 2023
fe77a0f
update mergify labels for 08-wasm release branches
crodriguezvega Nov 29, 2023
afd5b52
imp: use bytes in wasm contract api instead of wrapped types (#5154)
crodriguezvega Nov 30, 2023
1d56642
build(deps): Bump docker/metadata-action from 5.0.0 to 5.1.0 (#5277)
dependabot[bot] Nov 30, 2023
52d2aa1
Add workflow to build wasm simapp (#5286)
chatton Nov 30, 2023
30ba757
ci: workflow to trigger wasm E2Es with a specific tag (#5288)
chatton Nov 30, 2023
4575cc3
feat: add custom queries to wasm module (#5261)
aeryz Dec 1, 2023
3dfbf1c
mergify task for callbacks v0.2.x and ibc-go v8.0.x (#5295)
crodriguezvega Dec 1, 2023
9a67c36
build(deps): Bump docker/metadata-action from 5.1.0 to 5.2.0 (#5297)
dependabot[bot] Dec 1, 2023
1ecb112
Update CODEOWNERS for 08-wasm (#5296)
DimitrisJim Dec 4, 2023
a1ae8ea
update roadmap
crodriguezvega Dec 4, 2023
6a4493c
build(deps): Bump docker/metadata-action from 5.2.0 to 5.3.0 (#5301)
dependabot[bot] Dec 4, 2023
be5ecc6
Don't panic during any store operations. (#5294)
DimitrisJim Dec 4, 2023
b4f9340
Support wasm tests on forks (#5234)
chatton Dec 4, 2023
c3ab069
docs: remove redundant code examples (#5309)
lukema95 Dec 5, 2023
c1fe926
fix: remove 08-wasm from 02-client exported (#5306)
crodriguezvega Dec 5, 2023
21a1729
Remove pr labeler. (#5302)
DimitrisJim Dec 5, 2023
9eef6ac
Merge branch 'main' into 04-channel-upgrades
damiannolan Dec 5, 2023
4a3d0a5
fix: require authority to pass proof if channel state is in FLUSHCOMP…
charleenfei Dec 7, 2023
73181ec
docs: document MsgChannelUpgradeCancel (#5274)
chatton Dec 7, 2023
1dfc9b7
ChannelUpgradeInit refactor (#5289)
hieuvubk Dec 7, 2023
d6ca63e
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 9, 2023
fed5372
Implement OnChanUpgradeTry on Host Chain for interchain-accounts (#5144)
chatton Dec 11, 2023
b36d112
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 11, 2023
0f8b4f8
Remove `GetSigners` from module 04-channel (#5352)
ThanhNhann Dec 11, 2023
40ace04
fix markdown lint error
crodriguezvega Dec 11, 2023
e1d4b20
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 11, 2023
8865e29
imp: rm app upgrade interface from IBCModule and use type assertions …
damiannolan Dec 12, 2023
6718e3c
Implement OnChanUpgradeAck on Controller Chain for interchain-account…
chatton Dec 12, 2023
b3f5fc1
update error strings
crodriguezvega Dec 13, 2023
a99c84c
chore: adding interface assertions for app upgrade interface (#5390)
damiannolan Dec 13, 2023
0323942
Make sure that the error receipt we write always has a sequence great…
chatton Dec 13, 2023
baa0318
refactor: remove unnecessary decrement when fast forwarding upgrade s…
ThanhNhann Dec 13, 2023
20ae53a
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 13, 2023
72a3d09
Allow verification of channels on TimeoutonClose and ChanCloseConfirm…
DimitrisJim Dec 14, 2023
355d401
imp: add passthrough handlers for callbacks mw module (#5376)
charleenfei Dec 14, 2023
3eef53f
Remove ResponseResult from UpgradeTimeout response, channel-id from U…
DimitrisJim Dec 14, 2023
da415f5
fix: set upgrade sequence correctly in channel recovery (#5374)
charleenfei Dec 14, 2023
d6408a3
docs: `ChanUpgradeInit` and governance gating (#5347)
charleenfei Dec 14, 2023
868ec7f
Add key for pruning sequence, get/set ops for storing/getting it. (#5…
DimitrisJim Dec 14, 2023
1ccb724
Add proto message for pruning acks, msgs, stubs for keeper/msg-server…
DimitrisJim Dec 14, 2023
914a78d
feat: add grpc/CLI for channel params query (#5430)
crodriguezvega Dec 18, 2023
c88abcc
e2e: successful test where the channel is upgraded and fee middleware…
crodriguezvega Dec 18, 2023
7967cfd
chore: update channel upgrades default timeout to 10 mins (#5433)
damiannolan Dec 18, 2023
beb46ae
imp: add upgrade sequence to identified channel (#5436)
crodriguezvega Dec 18, 2023
4d2ce43
docs: reasoning and use cases for channel upgradability (#5346)
charleenfei Dec 18, 2023
9c346c5
revert "imp: remove `LatestSequenceSend` (#5108)" (#5432)
charleenfei Dec 18, 2023
9782bef
disallow ICA upgrades that change channel order + increase test cover…
crodriguezvega Dec 18, 2023
7445417
panic wrap error
crodriguezvega Dec 19, 2023
26fbb37
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 19, 2023
5ec221a
refactor: restructure timeout type (#5404)
colin-axner Dec 19, 2023
2ef99d1
Move order check in keeper function for host/controller. (#5464)
DimitrisJim Dec 20, 2023
5bad8f2
Pass appVersion to callback if version can be parsed. (#5468)
DimitrisJim Dec 20, 2023
ef9a479
Move cast to Upgradable module after checking app is set. (#5465)
DimitrisJim Dec 20, 2023
ab1f96f
ICS4: Fix Sequencing logic in UpgradeTry (#5419)
AdityaSripal Dec 20, 2023
21a2cbf
Add implementations for OnChanUpgradeOpen and OnChanUpgradeRestore fo…
DimitrisJim Dec 20, 2023
34edc2e
imp: add logic for setting `NextSeqRecv`, `NextSeqAck` in `OnChanUpgr…
charleenfei Dec 20, 2023
bb58693
check counterparty `nextSequenceSend` in `recvPacket` (#5469)
crodriguezvega Dec 20, 2023
09c4de8
update swagger
crodriguezvega Dec 21, 2023
6c0db8d
Merge branch 'main' into 04-channel-upgrades
crodriguezvega Dec 21, 2023
01c3699
Add pruning logic, implementation in message server. (#5444)
DimitrisJim Dec 21, 2023
2d90da9
improve testing for PruneAcknowledgements
ThanhNhann Jan 3, 2024
59418b9
Merge branch 'main' of https://github.com/cosmos/ibc-go into nhan/imp…
ThanhNhann Jan 3, 2024
bcb7161
remove function that had already been removed
crodriguezvega Jan 3, 2024
a1e71ab
merge sendMockPackets and sendMockPacketsTimeout functions; time out …
crodriguezvega Jan 3, 2024
04e44cd
Merge branch 'main' into nhan/improve_testing
crodriguezvega Jan 3, 2024
4ddd98e
lint
crodriguezvega Jan 3, 2024
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
91 changes: 75 additions & 16 deletions modules/core/04-channel/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
"success: stale packet state pruned up to limit",
func() {
// Send 10 packets from B -> A, creating 10 packet receipts and 10 packet acks on A.
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)
},
func() {},
func(pruned, left uint64) {
Expand All @@ -616,7 +616,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
"success: stale packet state partially pruned",
func() {
// Send 10 packets from B -> A, creating 10 packet receipts and 10 packet acks on A.
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)
},
func() {
// Prune only 6 packet acks.
Expand All @@ -632,17 +632,37 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
},
nil,
},
{
"success: stale packet state with a higher limit",
func() {
// Send 10 packets from B -> A, creating 10 packet receipts and 10 packet acks on A.
suite.sendMockPackets(path, 10, true)
},
func() {
// Prune 13 packets acks > 10 packets sent.
limit = 13
},
func(pruned, left uint64) {
// We expect 0 to be left and sequenceStart == 11.
postPruneExpState(0, 0, 11)

// We expect 10 to be pruned and 0 left.
suite.Require().Equal(uint64(10), pruned)
suite.Require().Equal(uint64(0), left)
},
nil,
},
{
"success: stale packet state pruned, two upgrades",
func() {
// Send 10 packets from B -> A, creating 10 packet receipts and 10 packet acks on A.
// This is _before_ the first upgrade.
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)
},
func() {
// Previous upgrade is complete, send additional packets and do yet another upgrade.
// This is _after_ the first upgrade.
suite.sendMockPackets(path, 5)
suite.sendMockPackets(path, 5, true)

// Do another upgrade.
upgradeFields = types.UpgradeFields{Version: fmt.Sprintf("%s-v3", ibcmock.Version)}
Expand All @@ -669,7 +689,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
func() {
// Send 10 packets from B -> A, creating 10 packet receipts and 10 packet acks on A.
// This is _before_ the first upgrade.
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)
},
func() {
// Prune 5 on A.
Expand All @@ -690,7 +710,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {

// Previous upgrade is complete, send additional packets and do yet another upgrade.
// This is _after_ the first upgrade.
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)

// Do another upgrade.
upgradeFields = types.UpgradeFields{Version: fmt.Sprintf("%s-v3", ibcmock.Version)}
Expand All @@ -713,14 +733,14 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
func() {
// Send 5 packets from B -> A, creating 5 packet receipts and 5 packet acks on A.
// This is _before_ the first upgrade.
suite.sendMockPackets(path, 5)
suite.sendMockPackets(path, 5, true)

// Set Order for upgrade to Ordered.
upgradeFields = types.UpgradeFields{Version: fmt.Sprintf("%s-v2", ibcmock.Version), Ordering: types.ORDERED}
},
func() {
// Previous upgrade is complete, send additional packets now on ordered channel (only acks!)
suite.sendMockPackets(path, 10)
suite.sendMockPackets(path, 10, true)

// Do another upgrade (go back to Unordered)
upgradeFields = types.UpgradeFields{Version: fmt.Sprintf("%s-v3", ibcmock.Version), Ordering: types.UNORDERED}
Expand All @@ -740,7 +760,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
"success: packets sent before upgrade are pruned, after upgrade are not",
func() {
// Send 5 packets from B -> A, creating 5 packet receipts and 5 packet acks on A.
suite.sendMockPackets(path, 5)
suite.sendMockPackets(path, 5, true)
},
func() {},
func(pruned, left uint64) {
Expand All @@ -749,7 +769,7 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
suite.Require().Equal(uint64(0), left)

// channel upgraded, send additional packets and try and prune.
suite.sendMockPackets(path, 12)
suite.sendMockPackets(path, 12, true)

// attempt to prune 5.
pruned, left, err := suite.chainA.App.GetIBCKeeper().ChannelKeeper.PruneAcknowledgements(
Expand All @@ -768,6 +788,29 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
},
nil,
},
{
"success: packets sent with 2 middle sequences that don't have an ack stored",
func() {
// Send 12 packets from B -> A with 2 packets that timeout
suite.sendMockPackets(path, 5, true)
suite.sendMockPackets(path, 2, false)
suite.sendMockPackets(path, 5, true)
},
func() {
limit = 7
},
func(pruned, left uint64) {
// After pruning 7 sequences we should be left with 5 acks and 5 receipts,
// because the 2 packets that timeout are still counted as pruned, even though
// there was nothing to prune since both packets timed out
postPruneExpState(5, 5, 8)

// We expect 7 to be pruned and 5 left.
suite.Require().Equal(uint64(7), pruned)
suite.Require().Equal(uint64(5), left)
},
nil,
},
{
"failure: packet sequence start not set",
func() {},
Expand Down Expand Up @@ -849,16 +892,32 @@ func (suite *KeeperTestSuite) UpgradeChannel(path *ibctesting.Path, upgradeField
suite.Require().NoError(err)
}

// sendMockPacket sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle).
// sendMockPacket sends a packet from source to dest and acknowledges it on the source (completing the packet lifecycle)
// if acknowledge is true. If acknowledge is false, then the packet will be sent, but timed out.
// Question(jim): find a nicer home for this?
func (suite *KeeperTestSuite) sendMockPackets(path *ibctesting.Path, numPackets int) {
func (suite *KeeperTestSuite) sendMockPackets(path *ibctesting.Path, numPackets int, acknowledge bool) {
for i := 0; i < numPackets; i++ {

sequence, err := path.EndpointB.SendPacket(clienttypes.NewHeight(1, 1000), disabledTimeoutTimestamp, ibctesting.MockPacketData)
suite.Require().NoError(err)
timeoutHeight := clienttypes.NewHeight(1, 1000)
timeoutTimestamp := disabledTimeoutTimestamp
if !acknowledge {
timeoutTimestamp = uint64(suite.chainA.GetContext().BlockTime().UnixNano())
}

packet := types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, clienttypes.NewHeight(1, 1000), disabledTimeoutTimestamp)
err = path.RelayPacket(packet)
sequence, err := path.EndpointB.SendPacket(timeoutHeight, timeoutTimestamp, ibctesting.MockPacketData)
suite.Require().NoError(err)

packet := types.NewPacket(ibctesting.MockPacketData, sequence, path.EndpointB.ChannelConfig.PortID, path.EndpointB.ChannelID, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, timeoutHeight, timeoutTimestamp)

if acknowledge {
err = path.RelayPacket(packet)
suite.Require().NoError(err)
} else {
err = path.EndpointB.UpdateClient()
suite.Require().NoError(err)

err = path.EndpointB.TimeoutPacket(packet)
suite.Require().NoError(err)
}
}
}
2 changes: 2 additions & 0 deletions modules/core/keeper/msg_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,8 @@ func (suite *KeeperTestSuite) TestPruneAcknowledgements() {
if tc.expErr == nil {
suite.Require().NoError(err)
suite.Require().NotNil(resp)
suite.Require().Equal(uint64(0), resp.TotalPrunedSequences)
suite.Require().Equal(uint64(0), resp.TotalRemainingSequences)
} else {
suite.Require().Error(err)
suite.Require().Nil(resp)
Expand Down
Loading