This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
signed wrapper #1283
Merged
Merged
signed wrapper #1283
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
525ff77
add signed wrapper, typedef SignedStatement
coriolinus fbec801
typedef SignedAvailabilityBitfield
coriolinus 22eb23a
implement Signed wrapper
coriolinus f974e48
inline getters, remove review comment
coriolinus dde56cc
move EncodeAs, Signed from node::primitives to primitives::parachain
coriolinus cffbc3e
Refactor SignedAvailabilityBitfield to use Signed
coriolinus 234eca5
don't double-encode real payload
coriolinus 59b3389
Merge remote-tracking branch 'origin/master' into prgn-signed-wrapper
coriolinus d886979
fix build errors
coriolinus 8791b2c
cause the runtime to build properly with the new changes
coriolinus 75ce529
fix runtime tests and separate SignedStatement from SignedFullStatement
rphmeier 25f0102
Merge branch 'master' into prgn-signed-wrapper
rphmeier 46ebb8a
better explain why CompactStatement exists
coriolinus f802d9b
Merge branch 'master' into prgn-signed-wrapper
rphmeier 631b568
Merge branch 'prgn-signed-wrapper' of github.com:paritytech/polkadot …
rphmeier 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
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
It seems like the
EncodeAsmachinery could be replaced with a simpleFrombound, but actually not, because you'd have to do some cloning internally for types likeAvailabilityBitfield.Playground to avoid this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f734b13e93d6a7baa8b19dab78df345f
But it gets a bit messy
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.
You have to use the trait because you would need HKT to do this with pure closures.
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.
Exactly right on the reason we're using
EncodeAsinstead ofFrom/Into.I think we may have been overthinking the solution, though; my new attempt is in 234eca5.