Skip to content
Draft
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 cumulus/polkadot-omni-node/lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ impl<Config: CliConfig> Cli<Config> {
purge_after_sec: self.statement_store_purge_after_sec,
network_workers: self.statement_network_workers,
rate_limit: self.statement_rate_limit,
..Default::default()
},
),
storage_monitor: self.storage_monitor.clone(),
Expand Down
30 changes: 30 additions & 0 deletions prdoc/pr_0000.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
title: 'statement-store: configurable per-category limits'
doc:
- audience: Node Dev
description: |-
The statement store now partitions its capacity into per-category buckets with
individually configurable limits, based on the reason a statement is stored
(`StatementCategory`): explicit affinity, DHT affinity, or pending gossip. This
prevents traffic stored for one reason from crowding out traffic stored for another.

Statements are submitted with a category mask via the new
`StatementStore::submit_with_category_mask` trait method (plain `submit` uses the
full mask). The store picks the highest-priority bucket in the mask
(`ExplicitAffinity > DhtAffine > PendingGossip`) with free capacity, falling through
the mask as buckets fill up. When every bucket in the mask is full, the statement
may borrow free space from a higher-priority bucket; borrowed space is reclaimed
first when native statements need the bucket.

Per-category limits are configured with the new `sc_statement_store::Config` fields
(`explicit_affinity_limits`, `dht_affinity_limits`, `pending_gossip_limits`). A
bucket without dedicated limits is only bounded by the global store limits, which
keeps the default behavior unchanged.
crates:
- name: sp-statement-store
bump: minor
- name: sc-statement-store
bump: major
- name: polkadot-omni-node-lib
bump: patch
- name: staging-node-cli
bump: patch
1 change: 1 addition & 0 deletions substrate/bin/node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ pub fn new_full(config: Configuration, cli: Cli) -> Result<TaskManager, ServiceE
purge_after_sec: cli.statement_store_purge_after_sec,
network_workers: cli.statement_network_workers,
rate_limit: cli.statement_rate_limit,
..Default::default()
};

let task_manager = match config.network.network_backend {
Expand Down
Loading