-
Notifications
You must be signed in to change notification settings - Fork 38
Optimize encoded-size of SignedCommitment
#186
Conversation
@de-sh can you pls sign the contributors agreement (CLA) above? |
Looks like the Bot thinks otherwise |
The cla marker within the PR checks seem to be marked green. |
@tomusdrw seems like the hex literal for compressed version of |
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.
Great, thanks!
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
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.
Looks good, few improvements noted.
Hey, so I wrote a test to ensure that future contributors don't perform updates that remove constraints regarding off-eight signature(len>8 & len%8 != 0). Could add it here if you want, till there, resides in this commit. Do you feel we are ready to merge? |
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.
lgtm! Have you considered using bitvec
crate?
Not really, I was trying to achieve a simple implementation without adding external dependencies. Would that have been the right way to go? |
No, I was asking just out of curiosity. I guess it would simplify bit conversion quite a lot, but since it's already solved I'm happy to avoid the extra dependency. |
looks like this pr needs to go to substrate, you want to handle that @de-sh |
This has not been merged on purpose so far. Merging this will break Snowforks's |
They're big boys, they can handle it 😂 @musnit |
:D yeh once this is finalized and ready we can start working on including it |
Can you lemme know what I can do? |
@de-sh apologies for the delay. Could you please try to apply exactly the same code changes as in this PR, but to the https://github.com/paritytech/substrate/ repository? BEEFY code resides now there. I'm willing to fast-track this change this time to make sure we merge this before any real-world deployment. |
* Include code from paritytech/grandpa-bridge-gadget#186 * Cargo fmt commitment.rs * Make changes suggested by @tomusdrw Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Closing in favor of paritytech/substrate#10409 |
Thank you @de-sh!!! |
* Include code from paritytech/grandpa-bridge-gadget#186 * Cargo fmt commitment.rs * Make changes suggested by @tomusdrw Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
* Include code from paritytech/grandpa-bridge-gadget#186 * Cargo fmt commitment.rs * Make changes suggested by @tomusdrw Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Fixes #128
SignedCommitment
parity_scale_codec::Encode
parity_scale_codec::Decode