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

lp-forwarder: Always use Centrifuge domain when wrapping outbound mes… #1980

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cdamian
Copy link
Contributor

@cdamian cdamian commented Aug 19, 2024

Description

The current implementation is using the stored domain when wrapping forward messages, however, this is incorrect since we should always use Domain::Centrifuge.

Checklist

  • I have added Rust doc comments to structs, enums, traits and functions
  • I have made corresponding changes to the documentation
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works

@cdamian cdamian force-pushed the fix/lp-forwarder-use-centrifuge-domain-for-outbound branch 3 times, most recently from 63b41a0 to 365fcb3 Compare August 19, 2024 15:23
@cdamian cdamian force-pushed the fix/lp-forwarder-use-centrifuge-domain-for-outbound branch from 365fcb3 to 173c44f Compare August 19, 2024 15:24
@cdamian cdamian marked this pull request as ready for review August 19, 2024 15:25
@cdamian cdamian requested a review from lemunozm August 19, 2024 15:26
Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

Super simple solution, thanks @cdamian. Just one minor thing

pallets/liquidity-pools/src/message.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.00%. Comparing base (c55e74f) to head (fa6c253).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1980      +/-   ##
==========================================
+ Coverage   48.98%   49.00%   +0.01%     
==========================================
  Files         183      183              
  Lines       13202    13202              
==========================================
+ Hits         6467     6469       +2     
+ Misses       6735     6733       -2     

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

Copy link
Contributor

@lemunozm lemunozm left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @cdamian.

A question, the check of line: https://github.com/centrifuge/centrifuge-chain/pull/1980/files#diff-d763817d4b90117d6295fc32e8fd8a66d2ee4093bfb40d90941a3368e72aa099R244-R247 makes sense? I mean, should we treat the forward info domain as a whitelist for domains?

@cdamian
Copy link
Contributor Author

cdamian commented Aug 20, 2024

LGTM! Thanks @cdamian.

A question, the check of line: https://github.com/centrifuge/centrifuge-chain/pull/1980/files#diff-d763817d4b90117d6295fc32e8fd8a66d2ee4093bfb40d90941a3368e72aa099R244-R247 makes sense? I mean, should we treat the forward info domain as a whitelist for domains?

I would leave it like that for now and get back to it after we discuss the rest of the LP concerns. Furthermore, setting forwarding info can only be done by admins so we can trust it for the time being anyway IMO. TBD if we need extra/different validation.

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