Skip to content
Open
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
1 change: 1 addition & 0 deletions Cargo.lock

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

14 changes: 14 additions & 0 deletions prdoc/pr_9912.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
title: '[WIP] Fix statement-store gossiping'
doc:
- audience: Node Dev
description: |-
Fixes gossiping and scalability issues in the statement-store networking:
reduces traffic by propagating only recent statements, skips duplicate processing,
and splits large batches to stay under MAX_STATEMENT_NOTIFICATION_SIZE.
crates:
- name: sc-network-statement
bump: minor
- name: sc-statement-store
bump: minor
- name: sp-statement-store
bump: minor
3 changes: 3 additions & 0 deletions substrate/client/network/statement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ sc-network-types = { workspace = true, default-features = true }
sp-consensus = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
sp-statement-store = { workspace = true, default-features = true }

[dev-dependencies]
async-trait = { workspace = true }
4 changes: 2 additions & 2 deletions substrate/client/network/statement/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ use std::time;
pub(crate) const PROPAGATE_TIMEOUT: time::Duration = time::Duration::from_millis(1000);

/// Maximum number of known statement hashes to keep for a peer.
pub(crate) const MAX_KNOWN_STATEMENTS: usize = 4 * 1024 * 1024;
pub(crate) const MAX_KNOWN_STATEMENTS: usize = 4 * 1024 * 1024; // * 32 bytes for hash = 128 MB per peer

/// Maximum allowed size for a statement notification.
pub(crate) const MAX_STATEMENT_SIZE: u64 = 256 * 1024;
pub(crate) const MAX_STATEMENT_NOTIFICATION_SIZE: u64 = 256 * 1024;

/// Maximum number of statement validation request we keep at any moment.
pub(crate) const MAX_PENDING_STATEMENTS: usize = 2 * 1024 * 1024;
Loading
Loading