Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
97555c7
collator-protocol: cleanup connecting to backing group
alexggh Jul 11, 2025
2fc08e1
fixup connection to validators
alexggh Jul 15, 2025
48ab6d0
fix tests and cleanup unneeded code
alexggh Jul 16, 2025
f6b47ba
Merge remote-tracking branch 'origin/master' into cleanup_connecting_…
alexggh Jul 16, 2025
ac823cc
Merge branch 'master' of github.com:paritytech/polkadot-sdk into alex…
sandreim Sep 24, 2025
76d7cdf
ensure we consider all valid relay parents
sandreim Oct 2, 2025
1ac73b5
Update from github-actions[bot] running command 'prdoc generate --bum…
github-actions[bot] Oct 2, 2025
39fb8e1
Support ConnectToBackingGroups
sandreim Oct 3, 2025
47923b6
fix origin
sandreim Oct 3, 2025
0ede4bb
add disconnect mechanism
sandreim Oct 3, 2025
eb51a3e
move collator_protocol_helper
sandreim Oct 4, 2025
17d1c6c
comment
sandreim Oct 4, 2025
06c444f
remove helper from service
sandreim Oct 4, 2025
8fe9db5
unused
sandreim Oct 4, 2025
3b63265
unused deps in crates
sandreim Oct 4, 2025
bda8c38
Update from github-actions[bot] running command 'prdoc generate --bum…
github-actions[bot] Oct 4, 2025
9cfd857
fix tests
sandreim Oct 4, 2025
e954ea4
Merge branch 'sandreim/collator_protocol_notifications' of github.com…
sandreim Oct 4, 2025
c2dce30
Update from github-actions[bot] running command 'fmt'
github-actions[bot] Oct 4, 2025
2d78334
fmt
sandreim Oct 6, 2025
6bec872
add offset
sandreim Oct 6, 2025
3deacd3
Merge branch 'sandreim/collator_protocol_notifications' of github.com…
sandreim Oct 6, 2025
b977e32
fmt
sandreim Oct 6, 2025
f0a76d5
prdoc
sandreim Oct 6, 2025
0dbdd9c
move log
sandreim Oct 6, 2025
699b00a
impl disconnect
sandreim Oct 6, 2025
597a50c
fix some stuff
sandreim Oct 6, 2025
bf35a8e
add some tests for connect/disconnect
sandreim Oct 6, 2025
334fd92
fix cargo toml
sandreim Oct 6, 2025
9b7b37f
fix prdoc
sandreim Oct 6, 2025
7112e9f
fix prdoc
sandreim Oct 6, 2025
af9421f
Merge branch 'alexggh/cleanup_connecting_to_backing_group' of github.…
sandreim Oct 6, 2025
89fb028
review feedback
sandreim Oct 7, 2025
cae1c25
fix comment
sandreim Oct 7, 2025
471b898
fix test comments
sandreim Oct 7, 2025
b4e6db2
review
sandreim Oct 9, 2025
85c0597
fix validator disconnect
sandreim Oct 9, 2025
dbcd11a
make Basti happy
sandreim Oct 9, 2025
d3afbeb
fix comments
sandreim Oct 9, 2025
d4b17d9
fix cumulus-test-service
sandreim Oct 10, 2025
920a015
fix node tenplate
sandreim Oct 10, 2025
ff8f2c7
Update polkadot/node/network/collator-protocol/Cargo.toml
sandreim Oct 10, 2025
339e80e
to much spawning
sandreim Oct 10, 2025
fb0e463
review
sandreim Oct 10, 2025
3d51b37
Merge branch 'sandreim/collator_protocol_notifications' of github.com…
sandreim Oct 10, 2025
eca9049
Merge branch 'master' of github.com:paritytech/polkadot-sdk into alex…
sandreim Oct 10, 2025
9e4578b
Merge branch 'alexggh/cleanup_connecting_to_backing_group' of github.…
sandreim Oct 10, 2025
5261e54
test comment
sandreim Oct 10, 2025
f106131
remove validator buffer file
sandreim Oct 10, 2025
46c141e
Merge branch 'alexggh/cleanup_connecting_to_backing_group' into sandr…
sandreim Oct 10, 2025
05a4989
Update cumulus/client/consensus/aura/src/collators/mod.rs
sandreim Oct 10, 2025
762e1d5
Update polkadot/node/network/collator-protocol/src/collator_side/mod.rs
sandreim Oct 10, 2025
c661973
review
sandreim Oct 10, 2025
c07e117
Update cumulus/client/consensus/aura/src/collators/mod.rs
sandreim Oct 10, 2025
978f657
Merge branch 'alexggh/cleanup_connecting_to_backing_group' of github.…
sandreim Oct 16, 2025
7435522
review feedback
sandreim Oct 20, 2025
efa7ae7
update CI test
sandreim Oct 20, 2025
43285d6
fix ident
sandreim Oct 20, 2025
64e0065
;
sandreim Oct 20, 2025
386ca15
fix tests
sandreim Oct 20, 2025
ce208e8
Merge branch 'master' of github.com:paritytech/polkadot-sdk into alex…
sandreim Oct 20, 2025
02362a9
remove clone derive
sandreim Oct 20, 2025
0169bd6
update prdoc
sandreim Oct 20, 2025
1296305
Merge branch 'alexggh/cleanup_connecting_to_backing_group' into sandr…
sandreim Oct 20, 2025
afaee88
accurate comments
sandreim Oct 20, 2025
6e40e55
Merge branch 'master' of github.com:paritytech/polkadot-sdk into sand…
sandreim Oct 20, 2025
0f800b7
comment
sandreim Oct 20, 2025
a9c986a
Update from github-actions[bot] running command 'fmt'
github-actions[bot] Oct 22, 2025
15728d8
unused dep
sandreim Oct 22, 2025
340739b
Merge branch 'sandreim/collator_protocol_notifications' of github.com…
sandreim Oct 22, 2025
82a0658
simplify and more coverage in tests
sandreim Oct 22, 2025
cce0b12
change string
sandreim Oct 23, 2025
9093bab
even simpler
sandreim Oct 23, 2025
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
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 29 additions & 12 deletions cumulus/client/consensus/aura/src/collators/lookahead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ use polkadot_node_subsystem::messages::CollationGenerationMessage;
use polkadot_overseer::Handle as OverseerHandle;
use polkadot_primitives::{CollatorPair, Id as ParaId, OccupiedCoreAssumption};

use crate::{collator as collator_util, collators::claim_queue_at, export_pov_to_path};
use crate::{
collator as collator_util,
collators::{claim_queue_at, BackingGroupConnectionHelper},
export_pov_to_path,
};
use futures::prelude::*;
use sc_client_api::{backend::AuxStore, BlockBackend, BlockOf};
use sc_consensus::BlockImport;
Expand Down Expand Up @@ -122,7 +126,7 @@ where
Proposer: ProposerInterface<Block> + Send + Sync + 'static,
CS: CollatorServiceInterface<Block> + Send + Sync + 'static,
CHP: consensus_common::ValidationCodeHashProvider<Block::Hash> + Send + 'static,
P: Pair,
P: Pair + Send + Sync + 'static,
P::Public: AppPublic + Member + Codec,
P::Signature: TryFrom<Vec<u8>> + Member + Codec,
{
Expand Down Expand Up @@ -174,7 +178,7 @@ where
Proposer: ProposerInterface<Block> + Send + Sync + 'static,
CS: CollatorServiceInterface<Block> + Send + Sync + 'static,
CHP: consensus_common::ValidationCodeHashProvider<Block::Hash> + Send + 'static,
P: Pair,
P: Pair + Send + Sync + 'static,
P::Public: AppPublic + Member + Codec,
P::Signature: TryFrom<Vec<u8>> + Member + Codec,
{
Expand Down Expand Up @@ -215,6 +219,13 @@ where
collator_util::Collator::<Block, P, _, _, _, _, _>::new(params)
};

let mut connection_helper: BackingGroupConnectionHelper<Client> =
BackingGroupConnectionHelper::new(
params.para_client.clone(),
params.keystore.clone(),
params.overseer_handle.clone(),
);

while let Some(relay_parent_header) = import_notifications.next().await {
let relay_parent = relay_parent_header.hash();

Expand Down Expand Up @@ -290,14 +301,17 @@ where
relay_chain_slot_duration = ?params.relay_chain_slot_duration,
"Adjusted relay-chain slot to parachain slot"
);
Some(super::can_build_upon::<_, _, P>(
Some((
slot_now,
relay_slot,
timestamp,
block_hash,
included_block.hash(),
para_client,
&keystore,
super::can_build_upon::<_, _, P>(
slot_now,
relay_slot,
timestamp,
block_hash,
included_block.hash(),
para_client,
&keystore,
),
))
};

Expand All @@ -316,8 +330,11 @@ where
// scheduled chains this ensures that the backlog will grow steadily.
for n_built in 0..2 {
let slot_claim = match can_build_upon(parent_hash) {
Some(fut) => match fut.await {
None => break,
Some((current_slot, fut)) => match fut.await {
None => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this means that even the author of the current slot will call the function below. Because can_build_upon can claim a slot, but the runtime says no.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the call should not have any effect.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure we can avoid this, but as far as I can see is a good tradeoff to keep things simple. Or maybe you can suggest a simple way to avoid it ?

connection_helper.update::<Block, P>(current_slot, parent_hash).await;
break
},
Some(c) => c,
},
None => break,
Expand Down
Loading
Loading