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

Validate ShieldingTransfer in IBC VP #3431

Closed
wants to merge 3 commits into from

Conversation

yito88
Copy link
Member

@yito88 yito88 commented Jun 20, 2024

Describe your changes

ShieldingTransfer is set by IBC relayer(Hermes). IBC VP has to validate it for the IBC message.

Indicate on which release or other PRs this topic is based on

v0.39.0

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@yito88 yito88 requested review from sug0 and grarco June 20, 2024 19:47
Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 113 lines in your changes missing coverage. Please review.

Project coverage is 53.87%. Comparing base (879a326) to head (0f5895d).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/ibc/src/lib.rs 0.00% 113 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3431      +/-   ##
==========================================
- Coverage   53.92%   53.87%   -0.06%     
==========================================
  Files         317      317              
  Lines      107575   107670      +95     
==========================================
- Hits        58011    58005       -6     
- Misses      49564    49665     +101     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

left a comment. btw, run_ledger_ibc_with_hermes is failing.

Comment on lines +382 to +385
} else {
let packet_data = serde_json::from_slice::<NftPacketData>(
&packet.data,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

we're always falling back to nft transfers in case the port id is not for ics fungible token transfers. in case we receive a bogus port id, we strill try to validate the packet as an nft transfer. should we instead go case by case? even if here there are only 2 cases (transfer and nft transfer)

Copy link
Contributor

@grarco grarco left a comment

Choose a reason for hiding this comment

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

Putting a placeholder to prevent this pr from being merged while we understand and discuss some things offline

@yito88
Copy link
Member Author

yito88 commented Jun 24, 2024

Thank you, Marco. The validation in this PR was duplicated and we need to check the MASP Transaction built by the relayer on the destination chain.

@yito88 yito88 closed this Jun 24, 2024
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.

3 participants