-
Notifications
You must be signed in to change notification settings - Fork 660
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
Remove sp_runtime::RuntimeString
and replace with Cow<'static, str>
or String
depending on use case
#5693
Open
nazar-pc
wants to merge
3
commits into
paritytech:master
Choose a base branch
from
nazar-pc:remove-RuntimeString
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
2 tasks
nazar-pc
force-pushed
the
remove-RuntimeString
branch
2 times, most recently
from
September 12, 2024 16:02
f0df22e
to
308d2a9
Compare
I do not understand why formatter in CI wants those trailing whitespaces, I'm unable to commit them for some reason in IDE. UPD: |
nazar-pc
force-pushed
the
remove-RuntimeString
branch
2 times, most recently
from
September 12, 2024 16:30
096e2d6
to
f3778c1
Compare
…>` or `String` depending on use case
nazar-pc
force-pushed
the
remove-RuntimeString
branch
from
September 12, 2024 18:55
f3778c1
to
d9de518
Compare
bkchr
reviewed
Sep 15, 2024
nazar-pc
added a commit
to autonomys/polkadot-sdk
that referenced
this pull request
Sep 27, 2024
…>` or `String` depending on use case (paritytech#5693)
# Conflicts: # cumulus/parachains/runtimes/assets/asset-hub-rococo/src/genesis_config_presets.rs # polkadot/runtime/rococo/src/genesis_config_presets.rs # templates/parachain/runtime/src/genesis_config_presets.rs
Fixed merge conflicts and restored |
1 task
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.
Description
As described in #4001
RuntimeVersion
was not encoded consistently using serde. Turned out it was a remnant of old times and no longer actually needed. As such I removed it completely in this PR and replaced withCow<'static, str>
for spec/impl names andString
for error cases.Fixes #4001.
Integration
For downstream projects the upgrade will primarily consist of following two changes:
SCALE encoding/decoding remains the same as before, but serde encoding in runtime has changed from bytes to string (it was like this in
std
environment already), which most projects shouldn't have issues with. I consider the impact of serde encoding here low due to the type only being used in runtime version struct and mostly limited to runtime internals, where serde encoding/decoding of this data structure is quite unlikely (though we did hit exactly this edge-case ourselves 😅).Review Notes
Most of the changes are trivial and mechanical, the only non-trivial change is in
substrate/primitives/version/proc-macro/src/decl_runtime_version.rs
where macro call expectation insp_version::runtime_version
implementation was replaced with function call expectation.Checklist
T
required)