Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0d13d7b
Fix issue #11272
eskimor Mar 5, 2026
72c7365
Create pr_11290.prdoc
eskimor Mar 5, 2026
6eb1aad
Add V3 transition support for PVF validation
eskimor Mar 7, 2026
3de0a61
Fixes towards the final design.
eskimor Mar 9, 2026
ca9e0db
Use finalized blocks for node feature detection
eskimor Mar 9, 2026
a6be54f
Handle first leaf properly in dispute coordinator
eskimor Mar 10, 2026
7c28da2
Add test for subsequent leaves too.
eskimor Mar 10, 2026
27e441a
candidate validation tests.
eskimor Mar 10, 2026
1574e03
Good chunk of relay parent cleanup in disputes
eskimor Mar 10, 2026
316a25f
Basic test for v3 backing gating.
eskimor Mar 10, 2026
e4751a2
More dispute scheduling parent fixes
eskimor Mar 10, 2026
3efd625
Improve backing test
eskimor Mar 10, 2026
52c6374
Doc fix
eskimor Mar 10, 2026
12361cc
Fmt
eskimor Mar 10, 2026
96f02f3
Naming & prdocs update
eskimor Mar 10, 2026
bd0ed02
More relay_parent -> scheduling_parent
eskimor Mar 10, 2026
220b3c1
WIP: more relay_parent -> scheduling_parent
eskimor Mar 10, 2026
699edae
More relay_parent -> scheduling_parent
eskimor Mar 10, 2026
4e52c0c
Use a recent block for executor params fetch
eskimor Mar 11, 2026
7d93ea7
Properly fix executor params fetch in approval voting
eskimor Mar 11, 2026
dfcb539
Fix CI
eskimor Mar 11, 2026
88433d1
Update prdoc
eskimor Mar 11, 2026
aa60a2e
More relay_parent -> scheduling_parent
eskimor Mar 11, 2026
b1d7295
Cleanup + fix dispute distribution
eskimor Mar 11, 2026
12bd8ed
Fix test
eskimor Mar 11, 2026
66d8384
Fmt fixes
eskimor Mar 11, 2026
80aa104
Fix prdoc version bump
eskimor Mar 11, 2026
94d545d
Merge branch 'master' into rk-better-node-feature-handling
eskimor Mar 11, 2026
7da2f51
Fix fmt
eskimor Mar 11, 2026
52d54bc
Remove now unused v3_enabled.
eskimor Mar 11, 2026
5894cc7
Merge branch 'master' into rk-better-node-feature-handling
eskimor Mar 12, 2026
55135a7
Fmt
eskimor Mar 12, 2026
e66a664
Review remarks
eskimor Mar 18, 2026
55862a2
Check relay parent session.
eskimor Mar 18, 2026
ef6247c
Use for_candidate_validation() methods also on the backing path for
eskimor Mar 19, 2026
2613f75
Basic tests.
eskimor Mar 19, 2026
1b343f7
More test coverage
eskimor Mar 19, 2026
91a2d27
Test UMP signal enforcement better
eskimor Mar 19, 2026
80a61ec
Review remarks - clarifications.
eskimor Mar 19, 2026
e675d84
Bring back manual Display instance
eskimor Mar 19, 2026
3f4242e
Typo + relay parent for pvd.
eskimor Mar 19, 2026
0d8d9b1
Fix tests accordingly
eskimor Mar 19, 2026
831a060
Fix tests for using relay parent in pvd.
eskimor Mar 19, 2026
eb254fa
Scheduling session needs to be the current session not the relay parent
eskimor Mar 19, 2026
71bb2e8
Moaaar tests!
eskimor Mar 19, 2026
841b8f5
Remove dead code + fmt
eskimor Mar 19, 2026
d1714bc
more fmt
eskimor Mar 19, 2026
0dc5e50
Fix prdoc
eskimor Mar 19, 2026
62a031c
Fix relay parent session check.
eskimor Mar 20, 2026
1f7bcb2
Better name + more tests
eskimor Mar 20, 2026
74462d1
Doc fix + prdoc fix.
eskimor Mar 20, 2026
4378ad4
Finish renaming
eskimor Mar 20, 2026
d20747e
More doc fixes
eskimor Mar 20, 2026
0f39265
Add missing mock API
eskimor Mar 20, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
Ok(self.rpc_client.parachain_host_max_relay_parent_session_age(at).await?)
}

async fn allowed_relay_parent_info(
async fn ancestor_relay_parent_info(
&self,
at: Hash,
session_index: polkadot_primitives::SessionIndex,
Expand All @@ -498,7 +498,7 @@ impl RuntimeApiSubsystemClient for BlockChainRpcClient {
> {
Ok(self
.rpc_client
.parachain_host_allowed_relay_parent_info(at, session_index, relay_parent)
.parachain_host_ancestor_relay_parent_info(at, session_index, relay_parent)
.await?)
}
}
Expand Down
4 changes: 2 additions & 2 deletions cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -799,14 +799,14 @@ impl RelayChainRpcClient {
.await
}

pub async fn parachain_host_allowed_relay_parent_info(
pub async fn parachain_host_ancestor_relay_parent_info(
&self,
at: RelayHash,
session_index: SessionIndex,
relay_parent: RelayHash,
) -> Result<Option<RelayParentInfo<RelayHash, BlockNumber>>, RelayChainError> {
self.call_remote_runtime_function(
"ParachainHost_allowed_relay_parent_info",
"ParachainHost_ancestor_relay_parent_info",
at,
Some((session_index, relay_parent)),
)
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/collation-generation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ async fn construct_and_distribute_receipt(

let ccr = CommittedCandidateReceiptV2 { descriptor, commitments: commitments.clone() };

ccr.parse_ump_signals(&transposed_claim_queue, scheduling_parent.is_some())
ccr.parse_ump_signals(&transposed_claim_queue)
.map_err(Error::CandidateReceiptCheck)?;

ccr.to_plain()
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/collation-generation/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ fn approved_peer_signal() {
assert_eq!(descriptor.persisted_validation_data_hash(), expected_pvd.hash());
assert_eq!(descriptor.para_head(), dummy_head_data().hash());
assert_eq!(descriptor.validation_code_hash(), validation_code_hash);
assert_eq!(descriptor.version(true), CandidateDescriptorVersion::V3);
assert_eq!(descriptor.version(), CandidateDescriptorVersion::V3);
}
);

Expand Down
81 changes: 37 additions & 44 deletions polkadot/node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,46 +847,22 @@ impl CurrentlyCheckingSet {
}
}

async fn get_extended_session_info<'a, Sender>(
runtime_info: &'a mut RuntimeInfo,
sender: &mut Sender,
relay_parent: Hash,
) -> Option<&'a ExtendedSessionInfo>
where
Sender: SubsystemSender<RuntimeApiMessage>,
{
match runtime_info.get_session_info(sender, relay_parent).await {
Ok(extended_info) => Some(&extended_info),
Err(_) => {
gum::debug!(
target: LOG_TARGET,
?relay_parent,
"Can't obtain SessionInfo or ExecutorParams"
);
None
},
}
}

async fn get_extended_session_info_by_index<'a, Sender>(
runtime_info: &'a mut RuntimeInfo,
sender: &mut Sender,
relay_parent: Hash,
block_hash: Hash,
session_index: SessionIndex,
) -> Option<&'a ExtendedSessionInfo>
where
Sender: SubsystemSender<RuntimeApiMessage>,
{
match runtime_info
.get_session_info_by_index(sender, relay_parent, session_index)
.await
{
match runtime_info.get_session_info_by_index(sender, block_hash, session_index).await {
Ok(extended_info) => Some(&extended_info),
Err(_) => {
gum::debug!(
target: LOG_TARGET,
session = session_index,
?relay_parent,
?block_hash,
"Can't obtain SessionInfo or ExecutorParams"
);
None
Expand All @@ -897,13 +873,13 @@ where
async fn get_session_info_by_index<'a, Sender>(
runtime_info: &'a mut RuntimeInfo,
sender: &mut Sender,
relay_parent: Hash,
block_hash: Hash,
session_index: SessionIndex,
) -> Option<&'a SessionInfo>
where
Sender: SubsystemSender<RuntimeApiMessage>,
{
get_extended_session_info_by_index(runtime_info, sender, relay_parent, session_index)
get_extended_session_info_by_index(runtime_info, sender, block_hash, session_index)
.await
.map(|extended_info| &extended_info.session_info)
}
Expand Down Expand Up @@ -1923,14 +1899,24 @@ async fn distribution_messages_for_activation<Sender: SubsystemSender<RuntimeApi

if !block_entry.candidate_is_pending_signature(*candidate_hash)
{
// Executor params are session-buffered, so we use
// block_hash (the including relay block) for the runtime
// API query — its state is guaranteed available. The
// session index comes from the candidate descriptor
// (relay_parent's session), falling back to the including
// block's session for V1 descriptors where relay_parent
// == scheduling_parent.
let session = candidate_entry
.candidate_receipt()
.descriptor()
.session_index()
.unwrap_or(block_entry.session());
let ExtendedSessionInfo { ref executor_params, .. } =
match get_extended_session_info(
match get_extended_session_info_by_index(
session_info_provider,
sender,
candidate_entry
.candidate_receipt()
.descriptor()
.relay_parent(),
block_hash,
session,
)
.await
{
Expand Down Expand Up @@ -3388,16 +3374,23 @@ async fn process_wakeup<Sender: SubsystemSender<RuntimeApiMessage>>(
};

if let Some((cert, val_index, tranche)) = maybe_cert {
let ExtendedSessionInfo { ref executor_params, .. } = match get_extended_session_info(
session_info_provider,
sender,
candidate_entry.candidate_receipt().descriptor().relay_parent(),
)
.await
{
Some(i) => i,
None => return Ok(actions),
};
// Executor params are session-buffered, so we use relay_block (the including relay
// block) for the runtime API query — its state is guaranteed available. The session
// index comes from the candidate descriptor (relay_parent's session), falling back
// to the including block's session for V1 descriptors.
let session = candidate_receipt.descriptor.session_index().unwrap_or(block_entry.session());
let ExtendedSessionInfo { ref executor_params, .. } =
match get_extended_session_info_by_index(
session_info_provider,
sender,
relay_block,
session,
)
.await
{
Some(i) => i,
None => return Ok(actions),
};
let indirect_cert =
IndirectAssignmentCertV2 { block_hash: relay_block, validator: val_index, cert };

Expand Down
41 changes: 0 additions & 41 deletions polkadot/node/core/approval-voting/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2963,13 +2963,6 @@ fn subsystem_validate_approvals_cache() {
assert!(clock.inner.lock().current_wakeup_is(slot_to_tick(slot)));
clock.inner.lock().wakeup_all(slot_to_tick(slot));

assert_matches!(
overseer_recv(&mut virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);

futures_timer::Delay::new(Duration::from_millis(200)).await;

clock.inner.lock().wakeup_all(slot_to_tick(slot + 2));
Expand Down Expand Up @@ -4090,13 +4083,6 @@ fn test_approval_is_sent_on_max_approval_coalesce_count() {
assert!(clock.inner.lock().current_wakeup_is(slot_to_tick(slot)));
clock.inner.lock().wakeup_all(slot_to_tick(slot));

assert_matches!(
overseer_recv(&mut virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);

futures_timer::Delay::new(Duration::from_millis(200)).await;

clock.inner.lock().wakeup_all(slot_to_tick(slot + 2));
Expand Down Expand Up @@ -4398,13 +4384,6 @@ fn test_approval_is_sent_on_max_approval_coalesce_wait() {
assert!(clock.inner.lock().current_wakeup_is(slot_to_tick(slot)));
clock.inner.lock().wakeup_all(slot_to_tick(slot));

assert_matches!(
overseer_recv(&mut virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);

futures_timer::Delay::new(Duration::from_millis(200)).await;

clock.inner.lock().wakeup_all(slot_to_tick(slot + 2));
Expand Down Expand Up @@ -4519,13 +4498,6 @@ async fn setup_overseer_with_two_blocks_each_with_one_assignment_triggered(
assert!(clock.inner.lock().current_wakeup_is(slot_to_tick(slot)));
clock.inner.lock().wakeup_all(slot_to_tick(slot));

assert_matches!(
overseer_recv(virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);

futures_timer::Delay::new(Duration::from_millis(200)).await;

clock.inner.lock().wakeup_all(slot_to_tick(slot + 2));
Expand Down Expand Up @@ -4629,13 +4601,6 @@ async fn setup_overseer_with_blocks_with_two_assignments_triggered(
assert!(clock.inner.lock().current_wakeup_is(slot_to_tick(slot)));
clock.inner.lock().wakeup_all(slot_to_tick(slot));

assert_matches!(
overseer_recv(virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);

futures_timer::Delay::new(Duration::from_millis(200)).await;

clock.inner.lock().wakeup_all(slot_to_tick(slot + 2));
Expand Down Expand Up @@ -5621,12 +5586,6 @@ fn subsystem_launches_missed_assignments_on_restart() {
}
);

assert_matches!(
overseer_recv(&mut virtual_overseer).await,
AllMessages::RuntimeApi(RuntimeApiMessage::Request(_, RuntimeApiRequest::SessionIndexForChild(rx), )) => {
rx.send(Ok(1u32.into())).unwrap();
}
);
assert_matches!(
overseer_recv(&mut virtual_overseer).await,
AllMessages::ApprovalDistribution(ApprovalDistributionMessage::DistributeAssignment(
Expand Down
Loading
Loading