-
Notifications
You must be signed in to change notification settings - Fork 352
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
XCM: Derive remote accounts according to polkadot standards #2315
Merged
Merged
Changes from all commits
Commits
Show all changes
73 commits
Select commit
Hold shift + click to select a range
6d394d0
update to v0.9.40
nbaztec d26b671
update benchmarking weight template
nbaztec 2821987
fix build
nbaztec 1ed2a6d
make test compile
nbaztec fb2df2a
Includes page heap fixes
crystalin c9c9faf
compile runtime-benchmarks
nbaztec 02b81f3
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec 2882824
make warp sync work
nbaztec 7fd8681
merge master
nbaztec a723757
toml sort
nbaztec 471a4d2
fix editorconfig
nbaztec e10550f
use new substrate version
nbaztec 0fb006c
fix warp sync
nbaztec 7d58b9d
merge conflicts
nbaztec d76bc6b
sort
nbaztec a4b0848
fix --dev
nbaztec 0e45f47
remove duplicate SetMembersOrigin
nbaztec 56ae6f8
toml-sort
nbaztec 0ccee4a
remove kitchensink-runtime
nbaztec 7da9ed8
fix builkd
nbaztec a1dead6
Merge branch 'master' into upgrade-v0.9.40
nbaztec eea7baa
use new weights
nbaztec aa5e0cc
Merge branch 'master' into upgrade-v0.9.40
nbaztec 8091cee
set manual weights for xcm fungible
librelois 817adaa
use Weight::from_parts
nbaztec f329f16
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec d41c37a
use 0 pov_size for ref_time weight
nbaztec 6dbca4e
update nimbus
nbaztec d8136c1
exclude generated weight files from editorconfig
nbaztec 5e801c5
fmt
nbaztec 466953f
fmt
nbaztec 57387ca
fix rust tests
nbaztec c3917d3
Merge branch 'master' into upgrade-v0.9.40
nbaztec 2bfe372
fix import
nbaztec 62df5a7
fix tests
nbaztec 1527111
use Weight part pov_size to 0
nbaztec 18aa311
make dalek test work
nbaztec f5f5e76
fix transfer tests
nbaztec 4f94a30
merge master
nbaztec f3ab63d
use BoundedVec for auto compound delegations
nbaztec e42730c
fix modexp test
nbaztec 9927390
fix modexp test
nbaztec fec3ec1
fix tests
nbaztec bcb720c
fix weight tests
nbaztec 648606b
Merge branch 'upgrade-v0.9.40' of github.com:PureStake/moonbeam into …
nbaztec e7dd0a1
fix staking tests via chunking
nbaztec fde72fd
fix modexp test
nbaztec 19b4228
fix lint and test
nbaztec 8dff3c7
fix rust weight tests
nbaztec d243bb5
fix partial ts tests
nbaztec cd87118
Merge branch 'master' into upgrade-v0.9.40
crystalin b3049e7
temp fix for xcm v2
crystalin df27699
Fixes weight until benchmarking is fixed
crystalin 7ef16e7
set manual weight, fix ts tests
nbaztec 6669928
Adds temp hack for xcm tests
crystalin 0d1f026
Use RefundSurplus as the no-op for saturating the queue, which does n…
girazoki 882b85e
Update evm to 0.39
tgmichel 389f757
Revert "Update evm to 0.39"
tgmichel d831644
upgrade polkadot for better support of xcm v2
librelois 63c005a
prettier
librelois ea906b9
prettier
librelois f7d6b37
Revert temp fix for XCM weight
crystalin f54cc1b
upgrade polkadot fork
librelois 6c044fc
Fixing hrmp-mock tests
girazoki 1608234
clean up
girazoki a874fc4
Merge branch 'master' into upgrade-v0.9.40
librelois 66441c3
update polkadot fork to expose ForeignChainAliasAccount
librelois 76ffa64
Generate remote accounts according to polkadot standards
librelois 0ca0b68
prettier
librelois 407703e
Merge branch 'upgrade-v0.9.40' into elois-xcm-account-derivation
librelois 6864f47
Merge branch 'master' into elois-xcm-account-derivation
librelois f815ba3
fix rust test
librelois c1cb146
ts tests first pass
librelois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think this could be misleading to put here because there are many (most) cases where we don't want to create and use an
AccountId20
from an arbitrary 32-byte array.Whenever we use an AccountId20 in a trusted way, it's important that it come from something that a user either doesn't have influence over or is extremely hard to guess (e.g. guessing random private keys). I worry that putting this simple conversion could lead to misuse by using an AccountId20 that was generated from an insecure source of bytes.
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.
Overall you are right, but this conversion is only made because the conversion built by polkadot works with 32 byte accounts, so we need to pass from there to a 20 byte account.
This has no security concerns because the 32 byte account is derived with a hash in the first place.
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.
The particular usage of it isn't what concerns me, it's having it in the first place. Couldn't we create a fn that needs to be explicitly called, something like
unsafe_from_bytes_32
orfrom_known_secure_bytes
or something like that? Doing so would obviously avoid any possible confusion.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.
Or is there a requirement that there be a
From
impl for it to work?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.
@notlesh the
From<[u8; 32]>
impl is a requirement fromForeignChainAliasAccount
, it can't compile without it