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

Delete packet commitment instead of acknowledgement in acknowledgePacket #1609

Merged
merged 2 commits into from
Nov 26, 2021

Conversation

hu55a1n1
Copy link
Member

@hu55a1n1 hu55a1n1 commented Nov 24, 2021

Closes: cosmos/ibc-rs#66

Description

See processing-acknowledgements ->

function acknowledgePacket(
  packet: OpaquePacket,
  acknowledgement: bytes,
  proof: CommitmentProof,
  proofHeight: Height,
  relayer: string): Packet {

    // ...
    
    // delete our commitment so we can't "acknowledge" again
    provableStore.delete(packetCommitmentPath(packet.sourcePort, packet.sourceChannel, packet.sequence))  // <---- here

    // return transparent packet
    return packet
}

For contributor use:

  • Added a changelog entry, using unclog.
  • If applicable: Unit tests written, added test to CI.
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments.
  • Re-reviewed Files changed in the Github PR explorer.

@romac romac marked this pull request as ready for review November 25, 2021 10:07
@romac romac marked this pull request as draft November 25, 2021 10:07
@hu55a1n1
Copy link
Member Author

Hi @livelybug! I'm unable to test this with your 'Steps to Reproduce' as I haven't worked with substrate chains before. Can you please confirm if this fixes cosmos/ibc-rs#66?

@livelybug
Copy link

Hi @livelybug! I'm unable to test this with your 'Steps to Reproduce' as I haven't worked with substrate chains before. Can you please confirm if this fixes cosmos/ibc-rs#66?

Yes, I can confirm.
The same fix was applied here and tested.

@romac romac marked this pull request as ready for review November 26, 2021 09:35
Copy link
Member

@romac romac left a comment

Choose a reason for hiding this comment

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

🌻

@romac romac merged commit 055019e into master Nov 26, 2021
@romac romac deleted the hu55a1n1/1573-delete-commitment-in-acknowledgePacket branch November 26, 2021 09:35
hu55a1n1 added a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
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.

Call delete_packet_commitment instead of delete_packet_acknowledgement after receiving acknowledgement packets
3 participants