-
Notifications
You must be signed in to change notification settings - Fork 745
Description
Summary
IBC eureka/v2 protocol will introduce a new Packet type and commitment structure design informed by cosmos/ibc#1149
As the current IBCModule interface defined in 05-port/types depends on the current(classic) IBC packet, the proposed changes lends itself to introducing a new IBCModule interface with a more fine-grained and reduced API.
Proposal
This proposal has been informed by proof-of-concept work which experimented with a v2 IBCModule interface including variations of the following methods.
This should be further explored within the context of IBC protocol v2 / eureka and vetted for viability. The IBCModule interface is reduced to 4 concise methods for packet handling, eliminating handshake handlers from the IBC app design.
type IBCModule interface {
OnSendPacket(
ctx context.Context,
sourceID string,
destinationID string,
sequence uint64,
data channeltypesv2.PacketData,
signer sdk.AccAddress,
) error
OnRecvPacket(
ctx context.Context,
sourceID string,
destinationID string,
data channeltypesv2.PacketData,
relayer sdk.AccAddress,
) channeltypes.RecvPacketResult
OnAcknowledgementPacket(
ctx context.Context,
sourceID string,
destinationID string,
data channeltypesv2.PacketData,
acknowldgement []byte,
relayer sdk.AccAddress,
) error
OnTimeoutPacket(
ctx context.Context,
sourceID string,
destinationID string,
data channeltypesv2.PacketData,
relayer sdk.AccAddress,
) error
}The above is a recommended starting point and intended to be tuned as progress is made on the surrounding parts of the implementation, and information is gathered.
A mock stubbed IBC app module can be created to implement the methods and run tests before moving forward with touching existing IBC apps.
- Add OnSendPacket to IBCModule v2 interface #7408
- Add OnRecvPacket to IBCModule v2 interface #7409
- Add OnAcknowledgementPacket to IBCModule v2 interface #7410
- Add OnTimeoutPacket to IBCModule v2 interface #7411
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged/assigned
- Estimate provided