Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
853a9df
Extend submission result types
AndreiEres Nov 25, 2025
c6d8e87
Remove NetworkPriority (which was never used)
AndreiEres Nov 28, 2025
1cc5ae9
Add Invalid result
AndreiEres Nov 28, 2025
550d9fa
Handle encoding_too_large
AndreiEres Nov 28, 2025
b153d0f
Add rejected variant
AndreiEres Nov 28, 2025
32b198b
Update from github-actions[bot] running command 'prdoc --audience nod…
github-actions[bot] Nov 28, 2025
31a606b
Update
AndreiEres Nov 28, 2025
bc77940
Update
AndreiEres Nov 28, 2025
67d915f
Update PR doc
AndreiEres Nov 28, 2025
068364a
Fix PR doc
AndreiEres Nov 28, 2025
4b6cc03
Update substrate/client/rpc-api/src/statement/mod.rs
AndreiEres Dec 1, 2025
89c3c37
Fix assertion
AndreiEres Dec 1, 2025
a3a0a90
Don't copy types
AndreiEres Dec 2, 2025
534ec44
statement-store: api changes
alexggh Dec 2, 2025
b3d1b36
Merge remote-tracking branch 'origin/AndreiEres/sss-rpc-types' into o…
alexggh Dec 2, 2025
6ef12d3
Merge remote-tracking branch 'origin/master' into alexggh/api-consoli…
alexggh Dec 3, 2025
af1be1d
remove replacement_preference_mask
alexggh Dec 3, 2025
c394914
remove unused
alexggh Dec 3, 2025
3ad1478
remove unused
alexggh Dec 3, 2025
31d3f53
remove unused
alexggh Dec 3, 2025
03fcc46
Merge remote-tracking branch 'origin/master' into alexggh/api-consoli…
alexggh Dec 9, 2025
acf0103
address feedback
alexggh Dec 9, 2025
65cd2ec
fixup documentation
alexggh Dec 9, 2025
e97cb8f
fix documentation
alexggh Dec 9, 2025
eca03c7
remove non-api changes for now
alexggh Dec 9, 2025
f43fc81
fix typos
alexggh Dec 9, 2025
849c17f
remove original api
alexggh Dec 9, 2025
dad2bd3
statement-store: implement new api
alexggh Dec 9, 2025
ec178a0
update and use statement_store_bench
alexggh Jan 7, 2026
dbd1860
Use validation without runtime (mocked)
AndreiEres Jan 8, 2026
af3d636
send existing statements
alexggh Jan 8, 2026
1ddc597
added more tests
alexggh Jan 8, 2026
4138d92
bench configure connections properly
alexggh Jan 8, 2026
fa73bd7
add periodical expiration of statements
alexggh Jan 8, 2026
54be894
Merge remote-tracking branch 'origin/master' into alexggh/api-consoli…
alexggh Jan 8, 2026
c157a26
make clippy happy
alexggh Jan 9, 2026
55b7c28
fix build
alexggh Jan 9, 2026
cf81c8a
Merge remote-tracking branch 'origin/master' into pr-10690
alexggh Jan 9, 2026
a7e65cd
make clippy happy
alexggh Jan 12, 2026
004f80b
remove unused function
alexggh Jan 12, 2026
cdf3c2d
Remove dead code and deprecate runtime calls
AndreiEres Jan 13, 2026
0f3ef91
Write global statement allowance in runtime
AndreiEres Jan 13, 2026
c2ee2e3
Read allowance
AndreiEres Jan 13, 2026
f20791a
Remove unused traits
AndreiEres Jan 13, 2026
2eb72d6
Merge branch 'master' into ae-sss-wo-runtime-final
AndreiEres Jan 16, 2026
b10c447
Fix errors
AndreiEres Jan 16, 2026
5cd4f4e
Remove validate_statement from runtime
AndreiEres Jan 16, 2026
4ec4df4
review feedback
alexggh Jan 16, 2026
e3b135c
Update
AndreiEres Jan 16, 2026
88cd8f1
Merge branch 'master' into ae-sss-wo-runtime-final
AndreiEres Jan 19, 2026
f648147
Update tests
AndreiEres Jan 19, 2026
a712c47
Merge branch 'master' into ae-sss-wo-runtime-final
AndreiEres Jan 19, 2026
bb47ba4
Remove unused code
AndreiEres Jan 19, 2026
588ed63
Update from github-actions[bot] running command 'prdoc --audience nod…
github-actions[bot] Jan 19, 2026
3e07573
Address clippy
AndreiEres Jan 19, 2026
7710872
Update prdoc
AndreiEres Jan 19, 2026
4b73fcc
Fix
AndreiEres Jan 19, 2026
1f0bc62
Merge remote-tracking branch 'origin/master' into alexggh/statement-s…
alexggh Jan 21, 2026
7ea43d7
Use injected allowances in benchmarks
AndreiEres Jan 21, 2026
2123a5d
Revert runtime changes
AndreiEres Jan 21, 2026
f66355a
Fix import
AndreiEres Jan 21, 2026
9d9bad5
fix benchmark
alexggh Jan 21, 2026
a1abb39
fix CheckedTopicFilter
alexggh Jan 21, 2026
7d4c7a9
Return runtime to omninode
AndreiEres Jan 21, 2026
b65b595
Fix PR doc
AndreiEres Jan 21, 2026
3111fad
Use correct chain state for onchain statements
AndreiEres Jan 21, 2026
e0c9bf5
review feedback
alexggh Jan 21, 2026
4cd1693
Address clippy
AndreiEres Jan 21, 2026
cf4184a
fix test
alexggh Jan 21, 2026
6149fa4
Update cumulus/polkadot-omni-node/lib/src/cli.rs
AndreiEres Jan 21, 2026
ba753fe
Address review comments
AndreiEres Jan 22, 2026
d3fe617
Fix fmt
AndreiEres Jan 22, 2026
2f64f9e
Address clippy
AndreiEres Jan 22, 2026
8b5fe0e
Fix semver
AndreiEres Jan 22, 2026
24f974d
review feedback
alexggh Jan 27, 2026
840640e
Merge branch 'master' into ae-sss-wo-runtime-final
AndreiEres Jan 27, 2026
6da688b
Remove runtime validation
AndreiEres Jan 28, 2026
cfba83b
Fix unused
AndreiEres Jan 28, 2026
302bda2
Fix semver
AndreiEres Jan 28, 2026
030eed3
Fix tests
AndreiEres Jan 28, 2026
6460de8
fix prdoc
AndreiEres Jan 28, 2026
20e2bcc
Merge remote-tracking branch 'origin/master' into alexggh/statement-s…
alexggh Jan 29, 2026
65680e9
add prdoc
alexggh Jan 29, 2026
846a5ac
Change bump level for sc-statement-store and sc-utils
alexggh Jan 29, 2026
e94e005
use bounded vec
alexggh Jan 29, 2026
5ba38bc
make cargo fmt happy
alexggh Jan 29, 2026
b15ba0b
fix statement_store_memory_stress_bench test
alexggh Jan 29, 2026
c40ce28
fix expiration
alexggh Jan 30, 2026
4ab3a0a
Merge branch 'master' into ae-sss-wo-runtime-final
AndreiEres Jan 30, 2026
21fc924
Merge branch 'alexggh/statement-store-not-api' into ae-sss-wo-runtime…
AndreiEres Jan 30, 2026
04f972e
Fix types
AndreiEres Jan 30, 2026
3cb7dad
Mock statement allowance reading
AndreiEres Jan 30, 2026
1aac8bc
quick fix checks
AndreiEres Jan 30, 2026
1b69ae1
Update from github-actions[bot] running command 'fmt'
github-actions[bot] Jan 30, 2026
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
12 changes: 10 additions & 2 deletions Cargo.lock

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

16 changes: 0 additions & 16 deletions cumulus/parachains/runtimes/people/people-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ use sp_runtime::{
ApplyExtrinsicResult,
};
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use sp_statement_store::{
runtime_api::{InvalidStatement, StatementSource, ValidStatement},
SignatureVerificationResult, Statement,
};
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
Expand Down Expand Up @@ -1146,18 +1142,6 @@ impl_runtime_apis! {
1
}
}

impl sp_statement_store::runtime_api::ValidateStatement<Block> for Runtime {
fn validate_statement(
_source: StatementSource,
statement: Statement,
) -> Result<ValidStatement, InvalidStatement> {
match statement.verify_signature() {
SignatureVerificationResult::Invalid => Err(InvalidStatement::BadProof),
_ => Ok(ValidStatement { max_count: 100_000, max_size: 1_000_000 }),
}
}
}
}

cumulus_pallet_parachain_system::register_validate_block! {
Expand Down
4 changes: 2 additions & 2 deletions cumulus/polkadot-omni-node/lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ pub struct Cli<Config: CliConfig> {

/// Enable the statement store.
///
/// The statement store is a store for statements validated using the runtime API
/// `validate_statement`. It should be enabled for chains that provide this runtime API.
/// The statement store reads the storage of the chain to determine if users are allowed to
/// store statements or not.
#[arg(long)]
pub enable_statement_store: bool,

Expand Down
3 changes: 0 additions & 3 deletions cumulus/polkadot-omni-node/lib/src/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ use sp_runtime::{
OpaqueExtrinsic,
};
use sp_session::SessionKeys;
use sp_statement_store::runtime_api::ValidateStatement;
use sp_transaction_pool::runtime_api::TaggedTransactionQueue;
use sp_transaction_storage_proof::runtime_api::TransactionStorageApi;
use std::{fmt::Debug, path::PathBuf, str::FromStr};
Expand Down Expand Up @@ -73,7 +72,6 @@ pub trait NodeRuntimeApi<Block: BlockT>:
+ TaggedTransactionQueue<Block>
+ OffchainWorkerApi<Block>
+ CollectCollationInfo<Block>
+ ValidateStatement<Block>
+ GetParachainInfo<Block>
+ TransactionStorageApi<Block>
+ RelayParentOffsetApi<Block>
Expand All @@ -90,7 +88,6 @@ impl<T, Block: BlockT> NodeRuntimeApi<Block> for T where
+ OffchainWorkerApi<Block>
+ RelayParentOffsetApi<Block>
+ CollectCollationInfo<Block>
+ ValidateStatement<Block>
+ GetParachainInfo<Block>
+ TransactionStorageApi<Block>
{
Expand Down
4 changes: 3 additions & 1 deletion cumulus/polkadot-omni-node/lib/src/common/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pub(crate) trait BuildRpcExtensions<Client, Backend, Pool, StatementStore> {
backend: Arc<Backend>,
pool: Arc<Pool>,
statement_store: Option<Arc<StatementStore>>,
spawn_handle: Arc<dyn sp_core::traits::SpawnNamed>,
) -> sc_service::error::Result<RpcExtension>;
}

Expand All @@ -66,6 +67,7 @@ where
sc_transaction_pool::TransactionPoolHandle<Block, ParachainClient<Block, RuntimeApi>>,
>,
statement_store: Option<Arc<sc_statement_store::Store>>,
spawn_handle: Arc<dyn sp_core::traits::SpawnNamed>,
) -> sc_service::error::Result<RpcExtension> {
let build = || -> Result<RpcExtension, Box<dyn std::error::Error + Send + Sync>> {
let mut module = RpcExtension::new(());
Expand All @@ -74,7 +76,7 @@ where
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
module.merge(StateMigration::new(client.clone(), backend).into_rpc())?;
if let Some(statement_store) = statement_store {
module.merge(StatementStore::new(statement_store).into_rpc())?;
module.merge(StatementStore::new(statement_store, spawn_handle).into_rpc())?;
}
module.merge(Dev::new(client).into_rpc())?;

Expand Down
4 changes: 3 additions & 1 deletion cumulus/polkadot-omni-node/lib/src/common/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,20 @@ pub(crate) trait NodeSpec: BaseNodeSpec {
);
}

let spawn_handle = Arc::new(task_manager.spawn_handle());

let rpc_builder = {
let client = client.clone();
let transaction_pool = transaction_pool.clone();
let backend_for_rpc = backend.clone();
let statement_store = statement_store.clone();

Box::new(move |_| {
Self::BuildRpcExtensions::build_rpc_extensions(
client.clone(),
backend_for_rpc.clone(),
transaction_pool.clone(),
statement_store.clone(),
spawn_handle.clone(),
)
})
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub(crate) fn build_statement_store<
client,
local_keystore,
parachain_config.prometheus_registry(),
&task_manager.spawn_handle(),
Box::new(task_manager.spawn_handle()),
)
.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
let statement_protocol_executor = {
Expand Down
9 changes: 0 additions & 9 deletions cumulus/polkadot-omni-node/lib/src/fake_runtime_api/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ macro_rules! impl_node_runtime_apis {
}
}

impl sp_statement_store::runtime_api::ValidateStatement<$block> for $runtime {
fn validate_statement(
_source: sp_statement_store::runtime_api::StatementSource,
_statement: sp_statement_store::Statement,
) -> Result<sp_statement_store::runtime_api::ValidStatement, sp_statement_store::runtime_api::InvalidStatement> {
unimplemented!()
}
}

impl cumulus_primitives_core::TargetBlockRate<$block> for $runtime {
fn target_block_rate() -> u32 {
unimplemented!()
Expand Down
3 changes: 2 additions & 1 deletion cumulus/polkadot-omni-node/lib/src/nodes/aura.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ where
);
},
}

let spawn_handle = Arc::new(task_manager.spawn_handle());
let rpc_extensions_builder = {
let client = client.clone();
let transaction_pool = transaction_pool.clone();
Expand All @@ -364,6 +364,7 @@ where
backend_for_rpc.clone(),
transaction_pool.clone(),
None,
spawn_handle.clone(),
)?;
Ok(module)
})
Expand Down

Large diffs are not rendered by default.

61 changes: 34 additions & 27 deletions cumulus/zombienet/zombienet-sdk/tests/zombie_ci/statement_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
// Test that people-westend enables the statement store in the node and that statements are
// propagated to peers.

use std::time::Duration;

use anyhow::anyhow;
use sp_core::{Bytes, Encode};
use sp_statement_store::{SubmitResult, TopicFilter};
use zombienet_sdk::{subxt::ext::subxt_rpcs::rpc_params, NetworkConfigBuilder};

#[tokio::test(flavor = "multi_thread")]
Expand Down Expand Up @@ -36,7 +39,7 @@ async fn statement_store() -> Result<(), anyhow::Error> {
.with_chain("people-westend-local")
.with_default_args(vec![
"--force-authoring".into(),
"-lparachain=debug".into(),
"-linfo,statement-gossip=debug,statement-store=debug".into(),
"--enable-statement-store".into(),
])
.with_collator(|n| n.with_name("charlie"))
Expand Down Expand Up @@ -64,40 +67,44 @@ async fn statement_store() -> Result<(), anyhow::Error> {

// Create the statement "1,2,3" signed by dave.
let mut statement = sp_statement_store::Statement::new();
let topic = [0u8; 32]; // just a dummy topic
statement.set_plain_data(vec![1, 2, 3]);
statement.set_topic(0, topic);
statement.set_expiry_from_parts(u32::MAX, 0);
let dave = sp_keyring::Sr25519Keyring::Dave;
statement.sign_sr25519_private(&dave.pair());
let statement: Bytes = statement.encode().into();
// Subscribe to statements with topic "topic" to dave.
let stop_after_secs = 20;
let mut subscription = dave_rpc
.subscribe::<Bytes>(
"statement_subscribeStatement",
rpc_params![TopicFilter::MatchAll(
vec![topic.to_vec().into()].try_into().expect("Single topic")
)],
"statement_unsubscribeStatement",
)
.await?;

// Submit the statement to charlie.
let _: () = charlie_rpc.request("statement_submit", rpc_params![statement.clone()]).await?;

// Ensure that charlie stored the statement.
let charlie_dump: Vec<Bytes> = charlie_rpc.request("statement_dump", rpc_params![]).await?;
if charlie_dump != vec![statement.clone()] {
return Err(anyhow!("Charlie did not store the statement"));
}

// Query dave until it receives the statement, stop if 20 seconds passed.
let query_start_time = std::time::SystemTime::now();
let stop_after_secs = 20;
loop {
let dave_dump: Vec<Bytes> = dave_rpc.request("statement_dump", rpc_params![]).await?;
if !dave_dump.is_empty() {
if dave_dump != vec![statement.clone()] {
return Err(anyhow!("Dave statement store is not the expected one"));
}
break;
}
let _: SubmitResult =
charlie_rpc.request("statement_submit", rpc_params![statement.clone()]).await?;

let elapsed =
query_start_time.elapsed().map_err(|_| anyhow!("Failed to get elapsed time"))?;
if elapsed.as_secs() > stop_after_secs {
return Err(anyhow!("Dave did not receive the statement in time"));
}
let statement_bytes =
tokio::time::timeout(Duration::from_secs(stop_after_secs), subscription.next())
.await
.expect("Should not timeout")
.expect("Should receive")
.expect("Should not error");

tokio::time::sleep(core::time::Duration::from_secs(1)).await;
}
assert_eq!(statement_bytes, statement);
// Now make sure no more statements are received.
assert!(tokio::time::timeout(Duration::from_secs(stop_after_secs), subscription.next())
.await
.is_err());
log::info!("Statement store test passed");
log::info!("Keeping network alive");

tokio::time::sleep(Duration::from_secs(24 * 60 * 60)).await;
Ok(())
}
Loading
Loading