-
Notifications
You must be signed in to change notification settings - Fork 94
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
Move MaxEncodedLen
from Substrate
#268
Conversation
are we ready to move it? I wanted to actually have it live in substrate a bit longer while we migrate pallets to use Then if everything looks good, we can move it to SCALE. Otherwise, we may have to sync and bump substrate multiple times with SCALE to make it work. |
I think we're ready, on the basis that the trait itself hasn't changed pretty much since we wrote the tracking issue, and I don't anticipate it changing much in the future. Still, if you like, we can put this on hold for a while. |
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.
As @shawntabrizi said, we should wait until benchmarks etc are done in Substrate. Then we can move this. Otherwise we may need to release a new major version to break the trait definition.
Co-authored-by: Bastian Köcher <[email protected]>
Is this done and/or is this blocked on anything else? We're looking at major releases in paritytech/substrate#9140 anyway but it'd be good if we can make it without releasing an additional crate if this will be moved into |
I took the liberty to resolve the conflict via web UI, I hope you don't mind. |
Of course, no problem, thanks! If we're going to move forward on this, I'll
take a look in depth to ensure that nothing substantial needs updating.
However, I want to ensure that there are no further reservations about
moving the crates into this repo before putting further work into this PR.
…On Mon, Jun 21, 2021 at 11:29 AM Igor Matuszewski ***@***.***> wrote:
I took the liberty to resolve the conflict via web UI, I hope you don't
mind.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#268 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3V4TVDI5EBYVENA34PBBTTT4A7HANCNFSM44RJYQHQ>
.
--
Wichtige Mitteilung
Diese Mitteilung wurde von Parity Technologies
Deutschland GmbH kommuniziert, eine im Handelsregister des Amtsgerichtes
Charlottenburg unter HRB 190583 B registrierte Gesellschaft mit
beschränkter Haftung (GmbH). Die Geschäftsführerin der GmbH ist Frau Dr.
Jutta Steiner. Der registrierte Geschäftssitz ist Glogauer Straße 6 in
10999 Berlin, Deutschland.
Diese Mitteilung enthält Informationen welche
vertraulich sind und welche eventuell die Vertraulichkeit der
Rechtsberatung ("Anwaltsgeheimnis") berühren. Sie ist ausschließlich für
den/die vorgesehenen Empfänger bestimmt. Wenn Sie nicht der/die
beabsichtigte(n) Empfänger sind, benachrichtigen Sie bitte ***@***.***
***@***.***> und löschen Sie diese Nachricht sofort.
Unsere
Datenschutzrichtlinie, einschließlich die Art und den Umfang von
personenbezogenen Daten, die wir erfassen, wie wir diese Daten erfassen und
verarbeiten, an wen wir sie in Bezug auf die von uns angebotenen Dienste
weitergeben dürfen, sowie bestimmte Rechte und Optionen, die Sie in dieser
Hinsicht haben, finden Sie unter: https://www.parity.io/privacy/
<https://www.parity.io/privacy/>
|
Is this a whitespace/line ending issue? I'm re-running the test suite on Linux locally and it seems to pass but CI is grumpy for whatever reason.
|
Huh, weird. I'm not sure. I'm increasingly of the opinion that the macro ui tests are just flaky and should not be required in order to merge. |
Oh, I just noticed the dot reordering... that's annoying. Updated to latest stable locally and reproduced it, ran with |
Co-authored-by: Andronik Ordian <[email protected]>
Still misses the version bumps |
This is a pre-release rather than a full release in order to help shape the new `MaxEncodedLen` trait used in Substrate in case some more involved changes are found out to be required. The API did not change since its introduction until now so chances are slim but it's good to leave some leeway.
Wanted to do a version bump in a separate PR I can do that here as well if you want me to. I'd be inclined to publish that as a pre-release in order to progress with the release and prune |
Yeah fine |
Great! I'll ensure that this has all the updates from Substrate, then merge. |
Note: doesn't include the MaxEncodedLen impl for H160, H256, H512. A substrate companion will be necessary to re-add those.
Brought in the changes from the substrate version in 9f24e9d. Note: the substrate implementation added |
@ordian yes, that's the substrate companion. |
@bkchr 395dbaa rewrites the code which fetches the max_encoded_len crate entirely. It moves the code which gets the crate into |
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.
Ty. Much simpler and way more easier to read,
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Co-authored-by: Bastian Köcher <[email protected]>
Released appropriate |
After further discussion, it turns out that we want the
MaxEncodedLen
trait and derive macro in this crate after all instead of in Substrate. This PR forms part 1 of a three-step process:MaxEncodedLen
toparity-scale-codec
parity-scale-codec
parity-scale-codec
dependencyframe_support::MaxEncodedLen
tocodec::MaxEncodedLen
frame_support::traits::MaxEncodedLen
andframe_support_procedural::MaxEncodedLen
Part of paritytech/substrate#8719.