From b46fd655a688b425411271953a1648e9c9dc3412 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Sun, 3 Oct 2021 17:38:58 +0200 Subject: [PATCH 1/3] remove the check for unoccupied bitfields --- runtime/parachains/src/inclusion.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/runtime/parachains/src/inclusion.rs b/runtime/parachains/src/inclusion.rs index 5240b99bbe3d..9c194212c94d 100644 --- a/runtime/parachains/src/inclusion.rs +++ b/runtime/parachains/src/inclusion.rs @@ -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. @@ -299,12 +297,6 @@ impl Pallet { Error::::ValidatorIndexOutOfBounds, ); - ensure!( - occupied_bitmask.clone() & unchecked_bitfield.unchecked_payload().0.clone() == - unchecked_bitfield.unchecked_payload().0, - Error::::UnoccupiedBitInBitfield, - ); - let validator_public = &validators[unchecked_bitfield.unchecked_validator_index().0 as usize]; From 193937388bf6402a2903c678ae4046abb08f974a Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Sun, 3 Oct 2021 17:39:13 +0200 Subject: [PATCH 2/3] bump rococo version --- runtime/rococo/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index 944455553b66..900d53150ef6 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -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, From 130c72867d002f7d64545b9e9baae29a75a4a808 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Sun, 3 Oct 2021 17:48:39 +0200 Subject: [PATCH 3/3] fix warning about occupied bitmask --- runtime/parachains/src/inclusion.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/runtime/parachains/src/inclusion.rs b/runtime/parachains/src/inclusion.rs index 9c194212c94d..1c37bce3bd27 100644 --- a/runtime/parachains/src/inclusion.rs +++ b/runtime/parachains/src/inclusion.rs @@ -263,14 +263,6 @@ impl Pallet { // 3. each bitfield has exactly `expected_bits` // 4. signature is valid. let signed_bitfields = { - let occupied_bitmask: BitVec = 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 {