-
Notifications
You must be signed in to change notification settings - Fork 994
move released primitives and APIs out of staging #9443
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
base: master
Are you sure you want to change the base?
Conversation
…lity preparing for vstaging graduation
… vstaging graduation
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. Merge conflicts are going to be annoying 😄
Forgot to rename |
polkadot/primitives/src/v9/mod.rs
Outdated
@@ -763,7 +772,7 @@ pub type UncheckedSignedAvailabilityBitfields = Vec<UncheckedSignedAvailabilityB | |||
|
|||
/// A backed (or backable, depending on context) candidate. | |||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] | |||
pub struct BackedCandidate<H = Hash> { | |||
pub struct LegacyBackedCandidate<H = Hash> { |
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.
CandidateDescriptorV2 is binary compatible with V1, why do we need these legacy structures ? Am I missing something ?
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! I remove as many types as possible. It was just a strategy to do zero logic change and resolve name conflicts
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.
Can we also remove old CandidateDescriptor
and other types using it ?
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.
Old CandidateDescriptor
is used by old CommittedCandidateReceipt
which in turn is referenced 210 times in 57 files.
Do you want me to try to go through these 210 places and see if I can upgrade to CommittedCandidateReceiptV2
(which uses CandidateDescriptorV2
)?
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.
@sandreim you mean totally replace CandidateDescriptor
with CandidateDescriptorV2
? They're not necessarily binary compatible (although I see an effort has been put into making that happen). struct
s not attributed with #[repr(C)]
do not have guaranteed memory layout. So we'll have to either make sure the current version of Rust lays them out in a compatible way, or migrate storages. Let me know wdyt.
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.
Ah I see what you mean. We're insured to be binary compatible by the SCALE codec, and as long as we don't mix them up unencoded in-memory, we're good. I'll try to sort that out in a single commit, so we can easily revert it if any problems arise
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.
Okay, here we go: 8c5a93a
I didn't have a strong feeling whether I was doing the right thing or not when I was removing V1 entirely from the collation generation subsys, but you won't allow me to merge anything that will cause everything to explode, right? You won't? Right?..
…ints`. Delete `LegacyConstraints`
polkadot/primitives/src/v9/mod.rs
Outdated
@@ -763,7 +772,7 @@ pub type UncheckedSignedAvailabilityBitfields = Vec<UncheckedSignedAvailabilityB | |||
|
|||
/// A backed (or backable, depending on context) candidate. | |||
#[derive(Encode, Decode, Clone, PartialEq, Eq, RuntimeDebug, TypeInfo)] | |||
pub struct BackedCandidate<H = Hash> { | |||
pub struct LegacyBackedCandidate<H = Hash> { |
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.
Can we also remove old CandidateDescriptor
and other types using it ?
All GitHub workflows were cancelled due to failure one of the required jobs. |
All GitHub workflows were cancelled due to failure one of the required jobs. |
Solves #9400
No logic change, only moves types from
polkadot/primitives/src/vstaging
intopolkadot/primitives/src/v9
(renamed fromv8
tov9
).