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

chore: add unreceived acks rpc #7562

Merged
merged 2 commits into from
Nov 14, 2024
Merged

Conversation

DimitrisJim
Copy link
Contributor

@DimitrisJim DimitrisJim commented Nov 14, 2024

Description

ref: #7478


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 the correct branch (see CONTRIBUTING.md).
  • Linked to GitHub issue with discussion and accepted design, OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/).
  • Added relevant godoc comments.
  • Provide a conventional commit message to follow the repository standards.
  • Include a descriptive changelog entry when appropriate. This may be left to the discretion of the PR reviewers. (e.g. chores should be omitted from changelog)
  • Re-reviewed Files changed in the GitHub PR explorer.
  • Review SonarCloud Report in the comment section below once CI passes.

@DimitrisJim DimitrisJim force-pushed the jim/unreceived-acks-rpc branch from 47bda68 to 2c0f498 Compare November 14, 2024 10:34
@DimitrisJim DimitrisJim force-pushed the jim/unreceived-acks-rpc branch from 2c0f498 to b6634c6 Compare November 14, 2024 10:50
@DimitrisJim DimitrisJim marked this pull request as ready for review November 14, 2024 10:50
@DimitrisJim DimitrisJim force-pushed the jim/unreceived-acks-rpc branch from b6634c6 to 23cdb79 Compare November 14, 2024 10:51
Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM just one nit!

modules/core/04-channel/v2/keeper/grpc_query_test.go Outdated Show resolved Hide resolved
Copy link

@DimitrisJim DimitrisJim merged commit a2d377c into feat/ibc-eureka Nov 14, 2024
66 checks passed
@DimitrisJim DimitrisJim deleted the jim/unreceived-acks-rpc branch November 14, 2024 14:54
gjermundgaraba added a commit that referenced this pull request Feb 7, 2025
* Cherry-pick: Add MsgRegisterCounterparty Struct and Handler from ibc-lite (#6982)

* feat(lite): counterparty client logic (#6307)

* imp: added counterparty client store

* imp: added provide counterparty to proto

* imp: ran 'make proto-all'

* imp: added logic to counterparty client

* imp: fix proto

* imp: fix proto

* imp: ran 'make proto-all'

* feat: finished counterparty client logic

* change counterparty to include custom prefix

* fix imports

* import fixes, review suggestions

* rm lite comment

* applying review suggestions

* add creator tests

* addressing aditya review

* Update proto/ibc/core/client/v1/client.proto

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

* Update modules/core/02-client/types/msgs.go

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

* Update modules/core/keeper/msg_server.go

Co-authored-by: colin axnér <[email protected]>

* addressing jim review

* refactor(proto): use counterparty type in MsgProvideCounterparty. Validate Counterparty type.

* refactor(keys): move Counterparty key to 02-client keys.go

* feat(core): delete creator after registering counterparty.

* chore(core): make GetCreator return a boolean if not found.

* tests(02-client): add tests for counterparty validation.

* tests(02-client): add tests for msg_server provide counterparty handler.

* nit(core): remove stale key for counterparty in host.

* Update modules/core/02-client/keeper/keeper_test.go

---------

Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Aditya Sripal <[email protected]>
Co-authored-by: Stefano Angieri <[email protected]>
Co-authored-by: DimitrisJim <[email protected]>
Co-authored-by: colin axnér <[email protected]>

* chore: move status checks from connection verify_* functions to 02-client verify_* functions. (#7006)

* chore: split out packet handling rpcs (#7007)

* chore: split out packet handling rpcs

* add keeper, expected interfaces, merkle tweaks.

* add verify functions of client keeper.

* self review

* Add versions to packet and create Eureka packet commitment (#6986)

* add versions to packet and separate commitment function

* use IBC Version to switch hashing

* fix build and tests, found bug in switch logic

* add documentation

* improve code docstrings

* address jim review

* rename eureka to v2

* feat(tests): add helper functions, keeper test suite. (#7052)

* feat(tests): add helper functions, keeper test suite.

* wire up packet server in app

---------

Co-authored-by: Aditya Sripal <[email protected]>

* feat(core/eureka): add packet handler (#7048)

* send packet eureka

* test progress

* add tests

* lint

* nit

* lint moar

* refactor tests

* feat(core/eureka): add recv handler (#7041)

* feat(core/eureka): add recv handler.

* review: address feedback, self review.

* tests(core/packet-server): add tests for recv.

* chore: make lint-fix.

* chore: address review nits.

* feat(core/eureka): add timeout handler (#7060)

* timeout eureka implementation

* test progress

* continued progress with tests

* tests

* cleanup and docs

* use sentinel channel in sendPacket events

* address review

* test review fixes

* lint

* feat(core/eureka): add writeack, ack handler. (#7049)

* feat(core/eureka): add writeack, ack handler.

* tests(core/packet-server): add tests for write acknowledgement.

* chore: add packet protocol version checks to both.

* fix: add check for packet receipt being present.

* tests(core/packet-server): add tests for ack.

* tests: address review, add FreezeClient helper to endpoint.

* feat(core): Wire packet handler to core message server (#7091)

* chore: return app version in handlers

* add expected keeper interface for packet handler functions.

* add switch in msg_server to dispatch based on protocol version.

* guard TimeoutExecuted with version check for time being.

* rename interface.

* inline timeoutExecuted

* slipped WriteAck.

* use msg-server entrypoints for packet flow in testing.

* use endpoint.SendPacket in recv test.

* feat(eureka): fix condition in commit packet, added test for zero timeout height (#7109)

* fix condition in commit packet, added test for zero timeout height, change some error messages and add some more comments

* error for verify functions

* refactor: reduce channel lookup for timeout flow (#7149)

* imp: require stricter usage of app version in packet (#7146)

* fix: add validation of protocol version and app version to packet validatebasic

* Update modules/core/04-channel/types/packet_test.go

* Update modules/core/04-channel/types/packet.go

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

---------

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

* chore: remove unnecessary comments (#7155)

* imp: add tests for BuildMerklePath, make merkle path non-nullable in counterparty (#7160)

* refactor: regenerate merkle path as non-nullable + add tests to build merkle path

* fix: avoid mutating prefix provided

* fix test build

---------

Co-authored-by: Aditya Sripal <[email protected]>

* chore: add godoc to packet server handlers (#7156)

* chore: add godoc

* Apply suggestions from code review

---------

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

* feat(eureka): add tests for `MsgProvideCounterparty` (#7179)

* add tests for MsgProvideCounterparty ValidateBasic

* address review comments

* add submodule to logger (#7196)

* add submodule for  logger

* add submodule in keys.go

* tests: msg server tests for eureka (#7162)

* test: TestAcknowledgePacketV2

* fix up recv tests

* add timeout v2 tests

* imp: use expErr instead of expPass

---------

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

* Validate MerklePathPrefix and Path (#7193)

* merkle validation funcs

* add merkle prefix validation and testing

* address comments

---------

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

* add helper to retrieve handler and module based on protocol version (#7198)

* add helper to retrieve handler and module based on protocol version

* address self review comments

* returning values instead of binding vars

* chore: clean up case for v1.

---------

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

* feat(eureka): Add gRPC query for Counterparty for a given client identifier (#7120)

* chore: add grpc query for counterParty

* chpre: made changes to the proto

* chore: updated goDoc

* chore: added creator to the respone

* fix: fixes in the grpc_query

* fixes

* improve implementation and add tests

* trying to fix weird linter error

* fix build

* chore: make counterparty field of response a non pointer.

* chore: simplify logic, remove uneeded ifs

* chore(tests): use expError pattern.

---------

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

* feat(eureka): add CLI to submit `MsgProvideCounterparty` (#7118)

* wip

* wip

* chore: added description

* fix: fixed lint issues

* address my self-review

* lint

* accept hex-encoded strings for merkle path prefix

* fix build error

---------

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

* Use client and counterparty terminology in packet server  (#7195)

* Use client and counterparty terminology in packet server rather than channel

* add counterparty not found error

* add ErrCounterpartyNotFound

* improve comment

---------

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

* chore: require app version be non-empty when protocol version is version 2 (#7209)

* chore: require app version be non-empty when protocol version is version 2.

* chore(tests): use constructor instead of direct struct initialization.

* chore(tests): update usages in msg_server, packet_server tests to use non-empty app version.

* chore(tests): add case for latest height err case. (#7212)

* feat(events): dont emit channel information for eureka handlers) (#7230)

* feat(02-client/cli): add query for client counterparty. (#7235)

* feat(02-client/cli): add query for client counterparty.

* chore: mirror grpc name.

* Apply suggestions from code review

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

---------

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

* chore: move handler implementations into a relay.go file. (#7271)

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

* refactor: Move Counterparty to packet server (#7280)

* refactor: move Counterparty to packet-server

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

* chore: remove old structs/impls

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

* nit(tests): use second client id to check counterparty isn't found.

---------

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

* chore(packet-server): add queryServer to packet-server (#7283)

* chore(packet-server): add queryServer to packet-server

* chore(packet-server): return error if non of creator/counterparty is stored.

* feat(packet-server): add client. (#7284)

* Add PacketV2 Protos and CommitmentV2 function (#7287)

* chore: adding proto for packetV2

* chore: adding commitV2 hash fn

* chore: addressing PR feedback

* chore: removed accidental comment

* chore: add conversion function from PacketV1 to PacketV2 (#7292)

* chore: adding proto for packetV2

* chore: adding commitV2 hash fn

* chore: addressing PR feedback

* chore: add conversion function from PacketV1 to PacketV2

* chore: added check for protocol version

* go mod tidy and remove function

* chore: default to json encoding in conversion

* pr feedback

---------

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

* refactor: change counterparty structure. (#7328)

* refactor: change counterparty structure.

* refactor: add channel id to Counterparty.

* refactor: use client identifier in relay functions.

* chore: suffix _id to identifier.

* chore: move PacketV2 to channel/v2 proto and rename it to Packet (#7357)

* chore: move PacketV2 to channel/v2

* remove file accidentally added

* chore: created packet.go for v2

* rename

* Add fallback function to grab counterparty for non-eureka channels (#7358)

* Add channel keeper v2 (#7377)

* chore: add scaffolding for channel keeper v2

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

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

---------

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

* chore: Added SendPacket RPC skeleton and relative proto message (#7364)

* chore: Added SendPacket RPC skeleton

* chore: register new message

* linter

* add v2 codec.go

* rename alias

* linter

* Add new keys and getter / setter functions (#7378)

* chore: adding keys and keeper getter and setter functions

* chore: use BigEndian for sequence in keys

* chore: add MsgRecvPacket skeleton (#7379)

* chore: add MsgRecvPacket skeleton

* Add RPC proto definition for RecvPacket

* chore: add MsgTimeout skeleton (#7380)

* add MsgTimeout skeleton

* missing saved file

* restore docstring

* chore: add Acknowledgement message proto. (#7381)

* chore: add Acknowledgment message!

* chore: fix proto mess

* random fixes

* chore: Add PacketV2 ValidateBasic() function (#7389)

* chore: Add PacketV2 ValidateBasic() function

* remove unused function

* PR feedback

* Added tests

* linter

* solve import cycle

* create ValidateBasic for PacketData

* refactor: Add CreateChannel rpc (#7382)

* refactor: add protos + implementation + validation + tests for CreateChannel rpc.

* Update proto/ibc/core/packetserver/v1/tx.proto

Co-authored-by: colin axnér <[email protected]>

* chore: move signer as final arg

---------

Co-authored-by: colin axnér <[email protected]>

* chore: adding implementation for SendPacket message server (#7383)

* chore: adding implementation for SendPacket message server

* chore: adding issue links

* chore: add additional issue link

* chore: using sourceID

* chore: adding commented aliasing code

* chore: adding tests for aliasing and required functions

* chore: moved IBCModule interface into api directort

* Adding router v2 (#7392)

* chore: adding router v2

* chore: addressing PR feedback

* chore: address PR feedback and fix linter

* Add mock ibc module v2 (#7398)

* chore: adding router v2

* chore: addressing PR feedback

* chore: address PR feedback and fix linter

* chore: adding mock v2 module

* chore: add RecvPacket to V2 (#7399)

* chore: add RecvPacket to V2

* fix wrong log

* Update modules/core/04-channel/v2/keeper/relay.go

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

* PR feeback

---------

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

* chore: create helper function for counterparty falllback. (#7405)

* chore: create helper function for counterparty falllback.

* Fix source/dest ID

* Update modules/core/04-channel/v2/keeper/relay.go

Co-authored-by: colin axnér <[email protected]>

* Update modules/core/04-channel/v2/keeper/relay.go

Co-authored-by: colin axnér <[email protected]>

---------

Co-authored-by: colin axnér <[email protected]>

* chore: Add Timeout to Channel Keeper (#7400)

* chore: Add Timeout to Channel Keeper

* reintroduce method

* linter

* pr feedback

* use helper fn

* chore: register v2 msg service and rename (#7407)

* Wire up simapp to use mock v2 modules (#7401)

* chore: adding router v2

* chore: addressing PR feedback

* chore: address PR feedback and fix linter

* chore: adding mock v2 module

* chore: adding mock application wiring in simapp

* chore: fix linter

* chore: add pluming necessary for testing CreateChannel (#7406)

* chore: add pluming necessary for testings.

* chore: docustring for event func.

* chore: wire up call to emit in msg_server

* chore: fix linter mess.

* chore: review touch ups.

* chore: add OnRecvPacket to IBCModule V2 interface (#7415)

* chore: add OnTimeoutPacket to IBCModule V2 interface (#7418)

* refactor: host keys apis to use uint64 sequence and fmt big endian bytes internally (#7419)

* feat: create channel before invoking provide counterparty. (#7420)

* chore: clean up ProvideCounterparty tx. (#7422)

* chore: clean up msgprovidecounterparty.

* Update modules/core/keeper/msg_server_test.go

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

---------

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

* Rename Id Fields to Channel for Packet V2 (#7428)

* change id fields to channel

* Apply suggestions from code review

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

---------

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

* packetserver: Rename Counterparty to Channel (#7429)

* chore: clean up msgprovidecounterparty.

* Update modules/core/keeper/msg_server_test.go

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

* rename counterparty to channel in packetserver

* change var names

* chore: fix merge mess.

---------

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

* feat: add acknowledgePacket handler to channel/v2 (#7412)

* chore: add commitment.go with temporary commit acknowledgement func

* feat: impl acknowledgePacket handler in channel/v2

* nit: vanity nits

* chore: add placeholder event func and logs

* chore: fix conflict and address todo

* nit: update to pointer recvr args

* chore: update ids in log

* channel/v2: Rename Counterparty to Channel (#7432)

* rename counterparty to channel in v2 folder

* rename getV1Channel to getV2Channel

* fix var naming err from last pr

* Implement MsgSendPacket RPC handler and tests (#7413)

* chore: added application callback to SendPacketV2 rpc

* chore: adding additional msg server tests

* chore: adding additional tests

* chore: address PR feedback

* chore: rename sourceID to sourceChannel

* chore: ensure correct usage of ids. (#7433)

* chore: cleanup ids in eureka branch (#7434)

* chore: sourceID -> channelID

* chore: clientID -> channelID

* chore: move tx's to channel/v2 (#7435)

* chore: move tx's to channel/v2

* Use channel identifier when setting creator.

* chore: Add OnAcknowledgmentPacket to IBCModule V2 Interface (#7438)

* Add OnAcknowledgmentPacket to IBCModule V2 Interface

* chore: fix typo

* nit: reorder proto msgs (#7446)

* chore: fix naming of parameters sourceID/destinationID (#7448)

* Add OnAcknowledgmentPacket to IBCModule V2 Interface

* chore: fix typo

* chore: PR feedback

* chore: fix wrong merge conflict resolution

* Implement v2 RecvPacket rpc handler (#7421)

* chore: added application callback to SendPacketV2 rpc

* chore: adding additional msg server tests

* chore: adding additional tests

* chore: adding on recv handler

* chore: add recv packet happy path

* chore: added test for failed recv result

* chore: adding additional tests

* chore: misc cleanup on self review

* chore: moved fn into packet.go and added no-op telemetry v2 functions

* chore: addressing PR feedback

* chore: add issue links

* chore: ensure no-op case works as intended

* chore: add NoOp test case

* chore: fix ack v2 commitment

* chore: PR feedback

---------

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

* chore: Move initialization of next sequence send to create channel rpc handler. (#7449)

* chore: Implement v2 Acknowledgement rpc handler  (#7452)

* chore: added application callback to SendPacketV2 rpc

* chore: adding additional msg server tests

* chore: adding additional tests

* chore: adding on recv handler

* chore: add recv packet happy path

* chore: added test for failed recv result

* chore: adding additional tests

* chore: misc cleanup on self review

* chore: moved fn into packet.go and added no-op telemetry v2 functions

* chore: implement Acknowledgment RPC handler

* chore: add MsgAcknowledgment and test skeleton

* wip

* chore: fix set packet ack

* add more test cases

* merge conflicts

* unneeded file!

* removed duplicate method

* revert error checking

* chore: linter

* PR feedback

* typo

---------

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

* chore: replace stale references to clientId. (#7457)

* fix: start error code from 2. (#7458)

* chore: add cli/tx for create channel. (#7460)

* chore: remove stale references to packet-server in channel/v2. (#7451)

* Remove duplication of ConvertToErrorEvents (#7467)

* chore: move convert to errors to internal directory

* chore: removed empty file

* chore: add ValidateBasic for MsgSendPacket (#7468)

* Add helper functions for MsgSendPacket, MsgRecvPacket and MsgAcknowledgePacket (#7465)

* chore: added msg send packet fucntion on endpoint

* chore: added MsgRecvPacket to endpoint

* chore: modify ack test to use new endpoint send and recv functions

* chore: refactored msg ack to use new endpoint fn

* chore: added test case to verify proof failure

* Update testing/endpoint_v2.go

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

---------

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

* chore: add ValidateBasic and test for MsgRecvPacket (#7470)

* chore: add ValidateBasic and test for MsgRecvPacket

* merge

* chore: address reviews.

---------

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

* chore: Implement v2 Timeout rpc handler (#7463)

* msgTimeout test

* better wording for comment

* chore: use deletepacketcommitment instead of setting an empty one

* typo

* Update modules/core/04-channel/v2/keeper/msg_server_test.go

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

* chore: use deletepacketcommitment instead of setting an empty one

* wip

* chore: debugging timeout test

* chore: removed unneeded proto field and added helper function for endpoint MsgTimeout

---------

Co-authored-by: Aditya <[email protected]>
Co-authored-by: chatton <[email protected]>

* channel/v2: Add Keeper Tests (#7456)

* test progress

* use export_test and fix send_packet

* fix test build

* in-progress fixing tests

* remove test file

* fix mockv2 acknowledgment

* comment on export_test

* appease linter

* fix bug

* fix nits and add test case

* add writeAck tests

* use existing endpoint test fns

* fix: timeout tests after timeout as seconds. (#7480)

* chore: add validation for MsgAcknowledgement. (#7473)

* chore: remove packet-server. (#7481)

* chore: remove packet-server.

* chore: remove commented out test funcs.

* chore: add ValidateBasic for MsgTimeout in ChannelKeeper V2 (#7482)

* chore: add ValidateBasic for MsgTimeout in ChannelKeeper V2

* rename

* chore: rename PacketData to Payload (#7483)

* chore: rename PacketData to Payload

* Update modules/core/04-channel/v2/types/msgs.go

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

* Update proto/ibc/core/channel/v2/tx.proto

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

* Update modules/core/04-channel/v2/keeper/packet.go

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

* Update modules/core/04-channel/v2/keeper/msg_server_test.go

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

* Update modules/core/04-channel/v2/keeper/export_test.go

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

* fixes after renaming - PR feedback

---------

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

* chore: remove copyloopvar check

* chore: further renaming of packetdata to payload (#7485)

* chore: generate distinct channel identifiers in testing library. (#7489)

* chore: limit packet data to length of one. (#7484)

* chore: remove fallback logic for GetChannel in timeout handler (#7490)

* chore: remove fallback logic for GetChannel in timeout handler

* Update modules/core/04-channel/v2/keeper/packet.go

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

---------

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

* chore: remove unecessary KeyChannelStorePrefix (#7496)

* tests: fix ProvideCounterparty test. (#7501)

* chore: clean up ctx unwrapping in channel/v2/keeper. (#7497)

* chore: remove notion of protocol version, revert packet/v1 diffs. (#7498)

* chore: Undo split to packet-server in 04-channel/v1. Move v2 testing functions to endpoint_v2. Fix comments in module.go for channel/v2. (#7495)

* chore: revert v1 event changes. (#7499)

* chore: add tests for Channel.Validate (#7504)

* chore: add tests for Channel.Validate

* Update modules/core/04-channel/v2/types/channel_test.go

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

* Update modules/core/04-channel/v2/types/channel_test.go

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

---------

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

* refactor: check timeouts directly in channel/v2 (#7464)

* refactor: check timeouts directly

* chore: add seconds to nanos conversion

* rm stupid if

* chore: regen protos

* Update modules/core/04-channel/v2/keeper/packet.go

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

* Update modules/core/04-channel/v2/keeper/packet.go

* chore: compare timeouts as was done in the olden days

* chore: update comments and use secs in recvPacket

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

* chore: fix the compiler error breakage

---------

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

* chore: rename apis to align with spec (#7511)

* chore: rename apis to align with spec

* nit: order interface assertions

* chore: reorder the order of the order of functions

* chore: add v2 packet commitment query (#7494)

* feat: add v2 packet commitment query

* chore: add cli for packet commitment query with abci proof

* chore: correct channel query url path, correct errors numbering

* chore: impl packet acknowledgement query (#7507)

* feat: add v2 packet commitment query

* chore: add cli for packet commitment query with abci proof

* chore: impl packet acknowledgement query

* fix: update identifier validation in grpcs

* chore: remove creator field from channel query (#7523)

* chore: impl packet receipt query (#7513)

* feat: add v2 packet commitment query

* chore: add cli for packet commitment query with abci proof

* chore: impl packet acknowledgement query

* fix: update identifier validation in grpcs

* chore: impl packet receipt query

* Add MaxTimeout condition (#7521)

* enforce maxTimeout

* fixes

* fix error

* run gofumpt

* Apply review suggestions

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

* address review comments

* errors

* use time package

---------

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

* chore: remove usage of v1 errors from v2 (#7528)

* chore: remove usage of v1 errors from v2

* linter

* chore: reduce number of timeout errors, cleanup (#7529)

* chore: add redundancy checks for V2 Msgs (#7509)

* chore: add redundant checks for V2 Msgs

* reintroduce tests

* chore: create ResultType for ChannelV2 (#7534)

* chore: lockin v0.50.10 (#7532)

* chore: create ResultType for ChannelV2

* move redundancy chgecks to new result type

* empty commit

* Revert "chore: lockin v0.50.10 (#7532)"

This reverts commit 5911185.

* Fix timeout in ante tests for V2

---------

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

* feat: add protobuf files for channel/v2 genesis storage. (#7502)

* wire channel query server v2 (#7537)

* wire channel query server v2

* register grpc gateway routes

* fix: channel must exist before channel creator check (#7538)

* fix: channel must exist before channel creator check

* Update modules/core/04-channel/v2/keeper/msg_server.go

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

* fixed failing test

---------

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

* feat: add paginated packet commitments query to channel/v2 (#7533)

* feat: add paginated packet commitments query to channel/v2

* chore: add cli handler

* chore: rm commented code

* chore: make lint-fix

---------

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

* chore: revert re-ordering for v1 channel msg.

* chore: revert exporting of deletePacketCommitment.

* Match commitment to specification (#7544)

* fix hash

* prepend hash with byte 0x02

* fix hash to spec

* chore: update function documentation to align with implementation.

---------

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

* chore: drop usage of 'channeltypesv2'.

* chore: fix post-merge test failure.

* ICS24: Change Provable keys (#7517)

* refactor packet keys

* provable keys

* chore: fix packet commitments prefix function.

---------

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

* chore: amend event emitted for create channel. (#7557)

* chore: add event for register counterparty (#7556)

* chore: add next sequence send query. (#7550)

* chore: make AliasV1Channel a private function.

* nit: consistent import name for 24-host/v2

* Simplify Acknowledgement structure (#7555)

* simplify ack to array of byte arrays

* simplify test

* lint

* support client identifiers as channels in ics20 denom hops (#7551)

* chore: add unreceived acks rpc (#7562)

* chore: add unreceived acks rpc

* nit: init path in setup function.

* make packet commitments fixed length (#7564)

* make packet commitments fixed length

* updated docs for packet commits

* feat: add custom querier to wasm image (#7559)

* add custom querier to wasmd + build for arm64

* Use build-push-action for multi-platform build

* fix build-args

* fix bad bash

* lint

* add build-essential for building arm64 arch

* add g++-aarch64-linux-gnu for arm64

* add some more info to custom query error msg

* chore: add unreceived packets rpc (#7561)

* add UnreceivedPackets query

* lint

* minor

* use HasChannel and correct flag

* add unit test

* lint

* fix expErr

* Update modules/core/04-channel/v2/keeper/grpc_query.go

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

* using HasPacketReceipt

---------

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

* Ibcmodulev2 transfer application spike (#7524)

* chore: adding ibc module v2 and on recv implementation with hard coded sequence

* chore: adding ack callback

* chore: adding send packet

* chore: adding transfer v2 module to app wiring

* chore: adding happy path and basic failure for send and recv for transfer module

* chore: adding ack test for transfer

* chore: fix some linter errors

* chore: adding timeout test for transfer v2

* chore: adding test case which ensures tokens can be transfered over both v1 and v2

* chore: full transfer flow from A - B - C - B - A

* chore: separated test out into subtests

* chore: add sequence as argument to OnRecvPacket

* chore: adding TODOs for next steps

* chore: adding transferv2 module to wasm simapp

* chore: refactor OnTimeout to accept sequence

* chore: refactor OnAck to accept sequence

* chore: switch argument order

* wip: mid merge with feature branch, build will be broken

* Fix timeoutTimestamp for tests

* linter

* chore: removing duplicate imports in wasm simapp

* chore: adding channelkeeperv2 query server

* register grpc gateway routes

* fix ack structure for v2 transfer tests

* lint

* make signature consistent

---------

Co-authored-by: chatton <[email protected]>
Co-authored-by: bznein <bznein@debian>
Co-authored-by: Gjermund Garaba <[email protected]>

* chore: use encoding fields for packet data unmarshaling (#7574)

* chore: use encoding fields for packet data unmarshaling

* linter

* clean up function

* more comments

* use MIME type and constants

* use application/x-protobuf as MIME type for proto encoding

* renaming and linter

* feat: add type constructors/validation for genesis types. (#7554)

* chore: add events for send packet (#7577)

* chore: add events for recv packet. (#7582)

* chore: add events for send packet

* chore: add events for recv packet.

* chore: lint-fixes

* testing: add merkle path to endpoint struct. (#7576)

* chore: add packet acknowledgements rpc (#7558)

* chore: add packet acknowledgements rpc

* Update modules/core/04-channel/v2/keeper/grpc_query_test.go

Co-authored-by: Gjermund Garaba <[email protected]>

---------

Co-authored-by: Gjermund Garaba <[email protected]>

* imp: added simpler events (#7613)

* feat: add solidity ABI support in ICS20Transfer ics20-1 (#7592)

* add support for abi encoding in ICS20Transfer

* fix abi encoding order

* add tests for unmarshaling packet data with encoding

* change from x-abi to x-solidity-abi

* use solidity abigen for encoding of abi ics20 payloads

* lint

* fix arm64 test build

* install compiler before first build step

* bump ethereum-go

* bump prysm for wasm simapp

* tidy

* add comment to abi encoding function

* code review cleanups

---------

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

* chore: add channel client state rpc (#7616)

* chore: add channel client state rpc

* chore: drop func to provide proof

* rename v2 event attribute key for encoded data (#7635)

* bug: fix packet commitment path used for timeout (#7646)

* fix: correct error message for payload validation in packet ValidateBasic (#7649)

* chore: add validation for Ack and plug it in. (#7647)

* fix typeos (#7654)

* chore: document packet commitment keys + move prefixes to 24-host (#7633)

* move timestamp checks in SendPacket earlier (#7637)

* rename v2 router api to use portID (#7639)

* chore: fix merge mess

* chore: remove stale connection test cases brought in by merge

* use unordered check (#7689)

* chore: add telemetry reporting for packet methods (#7673)

* chore: remove redundant calls to emit events in cached context. (#7648)

* chore: add channel consensus state rpc (#7619)

* test: add tests for v2 transfer vesting account (#7688)

* test vesting accounts in v2 transfer module

* add changelog + fix godoc

* chore: use separate store paths for channels/creators (#7696)

* proto swager gen (#7722)

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

* lint

* update abigen

* chore: add permissions to wasm image job

* fix: wasm docker file + wasm simapp gas limit (#7830)

* fix: dockerfile layer name

* update wasm simapp image with higher max gas

* lint

* updated max gas to same as cosmos hub

* Move channel back to counterparty (#7842)

* add back client registerCounterparty

* change channel to id in packet

* fix tests

* split messaging key to prefix and clientId

* change eureka packet handlers to no longer rely on channel

* naming suggestions

* fix test file

* start to fix tests

* fix v2/keeper tests

* fix tests

* DELETE channel from v2

* rm commented code

* move nextSeqSend to a better place

* remove resolveV2Identifiers for now

* lint

* lint

* review suggestions

* Update cli.go

* Compare Timeout timestamps in seconds instead of nanoseconds (#7857)

* compare seconds instead of nanoseconds

* remove unnecessary helper func

* improve naming

* imp: simplified `BuildMerklePath` (#7863)

* imp: simplified BuildMerklePath

* imp: review item

* test: improved test structure

* refactor: make transfer module v2 use same core paths as v1 (#7754)

* reuse transfer keeper in v2

* remove keeper from transfer module v2

* moved some comments around and disabled forwarding

* code review fixes

* Update modules/apps/transfer/keeper/relay_test.go

---------

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

* Simplify WriteAck API for async acks (#7869)

* simplify writeack api

* fix tests

* fix: send entire balance not working as expected (#7871)

* imp: updated events to remove channels (#7874)

* imp: updated channel v2 events

* fix: removed event

* fix: build wasm image on native architecture (#7884)

* distribute build on native OS for wasm builds

* fix build-wasm-simd-image-from-tag.yml

* add buildx

* Add install go for macos runner

* setup docker before login

* use linux arm instead of macos

* fix image name

* reference issue in TODO

* test: add initial eureka transfer tests (#7901)

* fix: enable noop error in v2 timeout (#7903)

* imp: harden ICS20 Eureka Module (#7908)

* enforce strict portID check in eureka module

* make base denom check

* fix comments

* lint

* lint moar

* one last time

---------

Co-authored-by: Gjermund Garaba <[email protected]>

* imp: drop solidity-ibc-eureka dependency (#7909)

* imp: abi decoding

* imp: removed abigen

---------

Co-authored-by: Gjermund Garaba <[email protected]>

* imp: use constant error acknowledgement

* test: create tests for constant error acknowledgement (#7925)

* fix msg server

* add tests

* harden transfer ack

* chore: transfer telemetry and events in eureka (#7918)

* chore: transfer telemetry and events in eureka

* lint

* chore: lint after merge

* imp: allow 8 character client-ids (#7931)

---------

Co-authored-by: sangier <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Aditya Sripal <[email protected]>
Co-authored-by: Stefano Angieri <[email protected]>
Co-authored-by: colin axnér <[email protected]>
Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: chandiniv1 <[email protected]>
Co-authored-by: Vishal Potpelliwar <[email protected]>
Co-authored-by: Aditya <[email protected]>
Co-authored-by: Cian Hatton <[email protected]>
Co-authored-by: Nikolas De Giorgis <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
Co-authored-by: Gjermund Garaba <[email protected]>
Co-authored-by: lacsomot <[email protected]>
Co-authored-by: bznein <bznein@debian>
Co-authored-by: srdtrk <[email protected]>
Co-authored-by: Sruthi2357 <[email protected]>
Co-authored-by: bmo <[email protected]>
Co-authored-by: Alyak <[email protected]>
Co-authored-by: iIvaki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants