-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add ConstEncodedLen
#428
Merged
Merged
Add ConstEncodedLen
#428
Conversation
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
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Seems all to come from the 'proptest'. But the the 'quickcheck' is unmaintained, so rather not using it. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
mrcnski
suggested changes
Apr 30, 2023
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 get some compile errors when I run cargo test --features "max-encoded-len"
. Looks like CI doesn't catch this.
Apart from that looks good to me!
bkchr
approved these changes
Apr 30, 2023
Co-authored-by: Bastian Köcher <git@kchr.de>
Merged
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Just to ensure that there is no accidential update of the lock. Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
mrcnski
approved these changes
May 4, 2023
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #427
Adds a
ConstEncodedLen
trait that marks types that can be used for in-place memory operations.I put it under the
max-encoded-len
feature. Another feature seems overkill, since it already relies onMEL
.Derive macro makes no sense here, or? I did not add one.
As context: in the MQ we are abusing the
MEL
bound asCEL
in multiple spots under the assumption that they are equal, eg here. This is bound to break if someone configures compact integers in the pallet config.TODO: