v0.3.12-pre.007
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 13
|
||||
// version: 14
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -8,19 +8,7 @@ fn pre_002_manifest_dependency_surface_is_exact() {
|
||||
let manifest = include_str!("../Cargo.toml");
|
||||
let dependencies = dependency_section(manifest);
|
||||
let names = manifest_dependency_names(dependencies);
|
||||
assert_eq!(
|
||||
names,
|
||||
vec![
|
||||
"ksp-core-lib",
|
||||
"ksp-logging-lib",
|
||||
"ksp-onchain-transport-lib",
|
||||
"ksp-raw-transaction-lib",
|
||||
"ksp-store-lib",
|
||||
"ksp-worker-api",
|
||||
"sha2",
|
||||
"tokio",
|
||||
],
|
||||
);
|
||||
assert_eq!(names, vec!["ksp-core-lib", "ksp-logging-lib", "ksp-onchain-transport-lib", "ksp-raw-transaction-lib", "ksp-store-lib", "ksp-worker-api", "sha2", "tokio",],);
|
||||
for required in [
|
||||
"ksp-core-lib = { path = \"../ksp-core-lib\" }",
|
||||
"ksp-logging-lib = { path = \"../ksp-logging-lib\" }",
|
||||
@@ -93,14 +81,15 @@ fn v0_3_12_pre_003_transaction_and_status_adapters_are_private_and_transport_fac
|
||||
] {
|
||||
assert!(!resources.contains(forbidden) && !root.contains(forbidden), "pre.003 crossed a private/offline boundary: {forbidden}");
|
||||
}
|
||||
let status_impl =
|
||||
match resources.split_once("impl RawTransactionIngestYellowstoneSignalView for ksp_onchain_transport_lib::YellowstoneTransactionStatusUpdate") {
|
||||
std::option::Option::Some((_, tail)) => match tail.split_once("impl std::convert::From<") {
|
||||
std::option::Option::Some((value, _)) => value,
|
||||
std::option::Option::None => tail,
|
||||
},
|
||||
std::option::Option::None => "",
|
||||
};
|
||||
let status_impl = match resources
|
||||
.split_once("impl RawTransactionIngestYellowstoneSignalView for ksp_onchain_transport_lib::YellowstoneTransactionStatusUpdate")
|
||||
{
|
||||
std::option::Option::Some((_, tail)) => match tail.split_once("impl std::convert::From<") {
|
||||
std::option::Option::Some((value, _)) => value,
|
||||
std::option::Option::None => tail,
|
||||
},
|
||||
std::option::Option::None => "",
|
||||
};
|
||||
assert!(!status_impl.contains("::error(self)"), "TransactionStatus remote error material must not enter the private signal");
|
||||
return;
|
||||
}
|
||||
@@ -175,7 +164,11 @@ fn v0_3_12_pre_005_block_and_continuity_adapters_remain_private_and_transport_fa
|
||||
fn v0_3_12_pre_006_productive_source_uses_transport_session_bounded_coalescence_and_existing_admission() {
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in ["runtime_resources.into_yellowstone_source()", "children.spawn", "source.run(source_settings, stop_receiver, admission_sender)"] {
|
||||
for required in [
|
||||
"runtime_resources.into_yellowstone_source()",
|
||||
"children.spawn",
|
||||
"source.run(source_settings, stop_receiver, admission_sender, processing_frontier_sender)",
|
||||
] {
|
||||
assert!(runtime.contains(required), "required pre.006 supervisor wiring missing: {required}");
|
||||
}
|
||||
for required in [
|
||||
@@ -306,3 +299,43 @@ fn manifest_dependency_names(section: &str) -> std::vec::Vec<&str> {
|
||||
names.sort_unstable();
|
||||
return names;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_12_pre_007_processing_frontier_is_run_local_latest_value_and_has_no_replay_or_backend_edge() {
|
||||
let runtime = include_str!("../src/runtime.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
let snapshot = include_str!("../src/snapshot.rs");
|
||||
for required in [
|
||||
"RawTransactionIngestProcessingFrontierProjection",
|
||||
"processing_frontier_sender",
|
||||
"wait_processing_frontier",
|
||||
"record_processing_frontier",
|
||||
"hydration_pending",
|
||||
"processing_frontier_slot",
|
||||
"oldest_pending_slot",
|
||||
"RawTransactionIngestProcessingFrontier",
|
||||
"settle_pending",
|
||||
"observe_settled",
|
||||
] {
|
||||
assert!(
|
||||
runtime.contains(required) || resources.contains(required) || snapshot.contains(required),
|
||||
"required pre.007 frontier contract missing: {required}"
|
||||
);
|
||||
}
|
||||
for forbidden in [
|
||||
"SubscribeReplayInfo",
|
||||
"last_requested_from_slot",
|
||||
"continuity_gap_count",
|
||||
"ksp_job_backfill_lib::",
|
||||
"ksp_store_postgres_lib::",
|
||||
"reqwest::",
|
||||
"tonic::",
|
||||
"yellowstone_grpc_proto::",
|
||||
] {
|
||||
assert!(
|
||||
!runtime.contains(forbidden) && !resources.contains(forbidden) && !snapshot.contains(forbidden),
|
||||
"pre.007 crossed replay/backend boundary: {forbidden}"
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user