Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Remove unoccupied bit check #3999

Merged
3 commits merged into from
Oct 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions runtime/parachains/src/inclusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ pub mod pallet {
NewCodeTooLarge,
/// Candidate not in parent context.
CandidateNotInParentContext,
/// The bitfield contains a bit relating to an unassigned availability core.
UnoccupiedBitInBitfield,
/// Invalid group index in core assignment.
InvalidGroupIndex,
/// Insufficient (non-majority) backing.
Expand Down Expand Up @@ -265,14 +263,6 @@ impl<T: Config> Pallet<T> {
// 3. each bitfield has exactly `expected_bits`
// 4. signature is valid.
let signed_bitfields = {
let occupied_bitmask: BitVec<BitOrderLsb0, u8> = assigned_paras_record
.iter()
.map(|p| {
p.as_ref()
.map_or(false, |(_id, pending_availability)| pending_availability.is_some())
})
.collect();

let mut last_index = None;

let signing_context = SigningContext {
Expand All @@ -299,12 +289,6 @@ impl<T: Config> Pallet<T> {
Error::<T>::ValidatorIndexOutOfBounds,
);

ensure!(
occupied_bitmask.clone() & unchecked_bitfield.unchecked_payload().0.clone() ==
unchecked_bitfield.unchecked_payload().0,
Error::<T>::UnoccupiedBitInBitfield,
);

let validator_public =
&validators[unchecked_bitfield.unchecked_validator_index().0 as usize];

Expand Down
2 changes: 1 addition & 1 deletion runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("rococo"),
impl_name: create_runtime_str!("parity-rococo-v1.8"),
authoring_version: 0,
spec_version: 9105,
spec_version: 9106,
impl_version: 0,
#[cfg(not(feature = "disable-runtime-api"))]
apis: RUNTIME_API_VERSIONS,
Expand Down