Skip to content

Lock down token transfer to AssetHub only#1047

Closed
alistair-singh wants to merge 7 commits into
mainfrom
alistair/lock-down-token-transfer
Closed

Lock down token transfer to AssetHub only#1047
alistair-singh wants to merge 7 commits into
mainfrom
alistair/lock-down-token-transfer

Conversation

@alistair-singh

@alistair-singh alistair-singh commented Dec 11, 2023

Copy link
Copy Markdown
Contributor

Resolves: SNO-771
Polkadot-Sdk: Snowfork/polkadot-sdk#62

@codecov

codecov Bot commented Dec 12, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3b3e9c2) 81.31% compared to head (b6fafe4) 81.34%.
Report is 1 commits behind head on main.

Files Patch % Lines
parachain/primitives/router/src/outbound/mod.rs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1047      +/-   ##
==========================================
+ Coverage   81.31%   81.34%   +0.02%     
==========================================
  Files          54       54              
  Lines        2243     2246       +3     
  Branches       71       71              
==========================================
+ Hits         1824     1827       +3     
  Misses        402      402              
  Partials       17       17              
Flag Coverage Δ
rust 81.49% <88.88%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@yrong yrong Dec 12, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Notice that ExportFilter is declared as EverythingBut<NonAssetHubTokenTransfers> in runtime, so could it be simplified as NonAssetHubTokenTransfers and remove the not operation here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was also a bit unsure on which way to go with this, so I looked at other "Filter" constraints in the Polkadot codebase to see what is the standard way, and it seems that if the filter returns true, the call should be allowed. This allows you to use the traits Everything to allow all, and Nothing to block all.

Examples:

@yrong yrong Dec 12, 2023

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IMHO the filters above are more of a whitelist whereas we're blocking a blacklist item here? So will it make more sense to rename it as ExportInterceptor and make the simplification?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does local_sub mean? Local subscription?

@alistair-singh alistair-singh marked this pull request as ready for review December 12, 2023 07:53

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does local_sub mean? Local subscription?

@alistair-singh alistair-singh force-pushed the alistair/lock-down-token-transfer branch from fa311d4 to 42499fe Compare December 16, 2023 13:50
@alistair-singh alistair-singh force-pushed the alistair/lock-down-token-transfer branch from 0ab70eb to b6fafe4 Compare December 17, 2023 09:57
@alistair-singh alistair-singh deleted the alistair/lock-down-token-transfer branch January 23, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants