Skip to content

Conversation

AndreiEres
Copy link
Contributor

@AndreiEres AndreiEres commented Oct 2, 2025

Description

Fixes gossiping and scalability issues in the statement-store networking.

  1. Reduced gossiping traffic by propagating only recent statements instead of all.
  2. Added early check for statements that the node already has to skip duplicate processing.
  3. Added splitting of large statement batches to stay under MAX_STATEMENT_NOTIFICATION_SIZE; oversized individual statements are skipped.

Integration

Internal optimizations to the gossip protocol. No downstream changes required.

@AndreiEres AndreiEres force-pushed the AndreiEres/fix-statement-store-gossiping branch from 860f41c to 7b8aeb1 Compare October 2, 2025 11:10
@AndreiEres AndreiEres added the T0-node This PR/Issue is related to the topic “node”. label Oct 2, 2025
@AndreiEres
Copy link
Contributor Author

/cmd prdoc --audience node_dev --bump patch

@AndreiEres AndreiEres changed the title [WIP] Fix statement-store gossiping Fix statement-store gossiping Oct 2, 2025
@AndreiEres AndreiEres requested a review from bkchr October 3, 2025 08:03
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/18217580616
Failed job name: test-linux-stable

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

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

Some tests would be nice for the new send logic.


// Size exceeded - split the chunk
let split_factor =
(encoded.len() / MAX_STATEMENT_NOTIFICATION_SIZE as usize) + 1;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(encoded.len() / MAX_STATEMENT_NOTIFICATION_SIZE as usize) + 1;
(encode_size / MAX_STATEMENT_NOTIFICATION_SIZE as usize) + 1;

if new_chunk_size == 0 {
log::warn!(
target: LOG_TARGET,
"Statement too large ({} KB), skipping",
Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to exactly skip the one statement that is problematic and not maybe more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants