v0.3.13-pre.009
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
||||
// version: 18
|
||||
// version: 19
|
||||
|
||||
//! External public, security, redaction and release-boundary hardening canaries for `pre.010`.
|
||||
|
||||
@@ -786,3 +786,42 @@ fn v0_3_13_pre_008_cross_source_convergence_is_bounded_conflict_checked_and_priv
|
||||
assert!(!resources.contains("unbounded_channel"));
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_009_duplicate_storm_disagreement_and_starvation_guards_are_explicit() {
|
||||
let admission = include_str!("../src/admission.rs");
|
||||
let persistence = include_str!("../src/persistence.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in [
|
||||
"runtime_resources.hydration_pending_capacity_insufficient",
|
||||
"runtime_resources.hydration_concurrency_insufficient",
|
||||
"base + usize::from(hydration_entry_index < remainder)",
|
||||
"hydration_in_flight_limit",
|
||||
"tokio::sync::Semaphore::new(max_in_flight)",
|
||||
"RawTransactionIngestHydrationLeaderGuard",
|
||||
"source.global_hydration_pending_saturated",
|
||||
"block_time: transaction.block_time()",
|
||||
"slot: transaction.slot()",
|
||||
"content_hash: transaction.payload().content_hash()",
|
||||
] {
|
||||
assert!(
|
||||
admission.contains(required) || persistence.contains(required) || resources.contains(required),
|
||||
"required pre.009 adversarial guard missing: {required}"
|
||||
);
|
||||
}
|
||||
for forbidden in [
|
||||
"VecDeque::new()",
|
||||
"unbounded_channel",
|
||||
"first_provider_wins",
|
||||
"provider_priority",
|
||||
"majority_vote",
|
||||
"preferred_provider",
|
||||
"overwrite_conflict",
|
||||
] {
|
||||
assert!(
|
||||
!admission.contains(forbidden) && !persistence.contains(forbidden) && !resources.contains(forbidden),
|
||||
"pre.009 introduced forbidden unbounded/provider-preference behavior: {forbidden}"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user