-
Notifications
You must be signed in to change notification settings - Fork 625
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
feat(core/eureka): add writeack, ack handler. #7049
Conversation
d8a7adc
to
7c982ec
Compare
9296097
to
859161b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK. minor request
// NOTE: IBC app modules might have written the acknowledgement synchronously on | ||
// the OnRecvPacket callback so we need to check if the acknowledgement is already | ||
// set on the store and return an error if so. | ||
if k.ChannelKeeper.HasPacketAcknowledgement(ctx, packet.GetDestPort(), packet.GetDestChannel(), packet.GetSequence()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be also checking that a receipt does exist. Otherwise, you can write an acknowledgement for a packet you never received
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can see utility of check but can't see steps to get there? Is the idea that something other than the msg server handler will invoke this basically?
Also, this was not present previously unless I'm feeling a bit blind this day
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I see in docs for WriteAck that it assumes a packet receipt has been written
guess we can stop assuming hah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was not previously present. Remains to be seen with how it gets called with port-router-refactor, but generally i would expect this to be called by an app. Perhaps not directly but through the msg server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ec02c8d
to
24356d0
Compare
998ff78
to
a3e70ed
Compare
packetI exported.PacketI, | ||
ack exported.Acknowledgement, | ||
) error { | ||
packet, ok := packetI.(channeltypes.Packet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preemptively before #5774 lands, didn't want to need to add to the interface func for PacketI
just to get the ProtocolVersion. (Plus, I do not like having to use getters everywhere)
(can rename to chanPacket
if we want)
|
||
// TODO: Clean up code when msg server handler routes correctly. | ||
|
||
// need to update chainA's client representing chainB to prove missing ack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally replaced soon with a err = path.EndpointB.RecvPacket(packet)
call
a3e70ed
to
203f0a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a couple ignorable nits
_, err := suite.chainA.App.GetPacketServer().SendPacket(suite.chainA.GetContext(), nil, packet.SourceChannel, packet.SourcePort, packet.DestinationPort, packet.TimeoutHeight, packet.TimeoutTimestamp, packet.AppVersion, packet.Data) | ||
suite.Require().NoError(err) | ||
|
||
// TODO: Clean up code when msg server handler routes correctly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create an issue to track?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes! will do
Quality Gate passed for 'ibc-go'Issues Measures |
Description
closes: #6969
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.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.