v0.3.14-pre.005
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/hardening.rs
|
||||
// version: 28
|
||||
// version: 29
|
||||
|
||||
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.004`.
|
||||
//! External public, security, redaction and release-boundary hardening canaries through `v0.3.14-pre.005`.
|
||||
|
||||
fn network(value: &'static str) -> std::option::Option<ksp_store_lib::RawNetworkId> {
|
||||
let result = ksp_store_lib::RawNetworkId::new(value);
|
||||
@@ -1054,3 +1054,39 @@ fn v0_3_14_pre_004_yellowstone_replay_evidence_is_transport_owned_and_fail_close
|
||||
assert!(!transport.contains("replay_coverage_proven_count"));
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_14_pre_005_redundant_coverage_requires_exact_or_superset_proof_over_full_range() {
|
||||
let continuity = include_str!("../src/continuity.rs");
|
||||
let root = include_str!("../src/lib.rs");
|
||||
for required in [
|
||||
"RawTransactionIngestCoverageRelation",
|
||||
"RawTransactionIngestCoverageEpoch",
|
||||
"RawTransactionIngestCoverageEpochLedger",
|
||||
"MAX_RAW_TRANSACTION_INGEST_COVERAGE_EPOCHS",
|
||||
"self.source_key == target_source_key",
|
||||
"self.commitment != requirement.commitment",
|
||||
"!self.range.contains_gap(gap)",
|
||||
"family_code == required_family_code && fingerprint == required_fingerprint",
|
||||
"RawTransactionIngestCoverageRelation::Superset",
|
||||
] {
|
||||
assert!(continuity.contains(required), "required pre.005 conservative coverage guard missing: {required}");
|
||||
}
|
||||
for forbidden in [
|
||||
"standard_logs\", \"helius_transaction",
|
||||
"helius_transaction\", \"standard_logs",
|
||||
"commitment >= requirement.commitment",
|
||||
"commitment <= requirement.commitment",
|
||||
"source_key == target_source_key &&",
|
||||
] {
|
||||
assert!(!continuity.contains(forbidden), "pre.005 introduced opportunistic coverage equivalence: {forbidden}");
|
||||
}
|
||||
for forbidden_public in [
|
||||
"pub use self::continuity::RawTransactionIngestCoverageRelation",
|
||||
"pub use self::continuity::RawTransactionIngestCoverageEpoch",
|
||||
"pub use self::continuity::RawTransactionIngestTargetCoverage",
|
||||
] {
|
||||
assert!(!root.contains(forbidden_public), "pre.005 leaked private continuity proof type: {forbidden_public}");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user