Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f06dab8
Gossip only recent statements
AndreiEres Oct 2, 2025
eca57b4
Check if the store already has a statement before processing
AndreiEres Oct 2, 2025
7b8aeb1
Reduce notification size if too large
AndreiEres Oct 2, 2025
3e69999
Update metrics
AndreiEres Oct 2, 2025
9a5decc
Update from github-actions[bot] running command 'prdoc --audience nod…
github-actions[bot] Oct 2, 2025
baeba9f
Update PRDOC
AndreiEres Oct 2, 2025
b0607bc
Update semver
AndreiEres Oct 2, 2025
52fb0aa
Address review comments
AndreiEres Oct 3, 2025
f08c2a8
Fix types
AndreiEres Oct 3, 2025
1e3e83b
Fix up
AndreiEres Oct 3, 2025
8cdb31a
Fix up
AndreiEres Oct 6, 2025
a317299
Fix typo
AndreiEres Oct 7, 2025
50ecef4
Remove unused var
AndreiEres Oct 7, 2025
6b89e1c
Update validation queue size
AndreiEres Oct 7, 2025
a705c00
Add mocked handler for tests
AndreiEres Oct 7, 2025
8703601
Add dirty test
AndreiEres Oct 7, 2025
90c0799
Add more tests
AndreiEres Oct 7, 2025
bd3645e
Fix duplicate processing
AndreiEres Oct 7, 2025
310e05b
Add more tests
AndreiEres Oct 7, 2025
ed55be3
Add metrics for ignored statements
AndreiEres Oct 7, 2025
514ad77
Remove unused tokio
AndreiEres Oct 7, 2025
0adf169
Fix tests
AndreiEres Oct 7, 2025
6daaee0
Fix style
AndreiEres Oct 8, 2025
0012b9e
Fix skipping very large statements
AndreiEres Oct 8, 2025
6cf91c4
Update logging and metrics
AndreiEres Oct 8, 2025
6891b17
Increase notification size
AndreiEres Oct 9, 2025
f52598f
Send async notifications
AndreiEres Oct 9, 2025
5945066
Fix tests
AndreiEres Oct 9, 2025
b5b96eb
Add more logs
AndreiEres Oct 14, 2025
971fe1e
Modify metrics setting
AndreiEres Oct 14, 2025
f47af22
Handle very slow or disconnected peers
AndreiEres Oct 14, 2025
dec3b53
Merge branch 'master' into AndreiEres/fix-statement-store-gossiping
AndreiEres Oct 15, 2025
894d00e
Update substrate/client/network/statement/src/lib.rs
AndreiEres Oct 15, 2025
10a1fff
Update
AndreiEres Oct 15, 2025
b8a1c2f
Merge branch 'master' into AndreiEres/fix-statement-store-gossiping
AndreiEres Oct 16, 2025
a3d15d2
Fix flaky test
AndreiEres Oct 16, 2025
3e17ffb
Merge branch 'master' into AndreiEres/fix-statement-store-gossiping
AndreiEres Oct 16, 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.

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
4 changes: 4 additions & 0 deletions substrate/client/network/statement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ 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 }
tokio = { workspace = 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 = 1024 * 1024;

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