v0.3.13-pre.004
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/tests/dependency_boundary.rs
|
||||
// version: 19
|
||||
// version: 20
|
||||
|
||||
//! Dependency firewall canaries for the RAW transaction ingest Worker foundation.
|
||||
|
||||
@@ -255,6 +255,51 @@ fn v0_3_13_pre_003_standard_logs_source_reuses_transport_facades_and_common_hydr
|
||||
return;
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_13_pre_004_standard_block_source_is_direct_raw_and_transport_facade_only() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
let resources = include_str!("../src/runtime_resources.rs");
|
||||
for required in [
|
||||
"RawTransactionIngestStandardBlockSource",
|
||||
"SolanaStandardWsSession::connect",
|
||||
".block_subscribe(",
|
||||
"SolanaBlockSubscribeConfig::new",
|
||||
"SolanaTransactionEncoding::Base64",
|
||||
"SolanaTransactionDetails::Full",
|
||||
"std::option::Option::Some(1)",
|
||||
"std::option::Option::Some(false)",
|
||||
"build_standard_block_material",
|
||||
"RawTransactionMaterial::binary_base64_with_embedded_signature",
|
||||
"RawTransactionVersion::Number(1)",
|
||||
"block_subscribe",
|
||||
"source.standard_block_missing",
|
||||
"source.standard_block_remote_error",
|
||||
] {
|
||||
assert!(resources.contains(required), "required pre.004 standard block contract missing: {required}");
|
||||
}
|
||||
for forbidden in [
|
||||
"get_block_observed",
|
||||
"ksp_config_lib::",
|
||||
"ksp_job_backfill_lib::",
|
||||
"ksp_store_postgres_lib::",
|
||||
"reqwest::",
|
||||
"tokio_tungstenite::",
|
||||
"tonic::",
|
||||
"yellowstone_grpc_proto::",
|
||||
"unbounded_channel",
|
||||
] {
|
||||
assert!(
|
||||
!runtime_contains(forbidden) && !resources.contains(forbidden) && !root.contains(forbidden),
|
||||
"pre.004 crossed a forbidden standard-block boundary: {forbidden}",
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
fn runtime_contains(value: &str) -> bool {
|
||||
return include_str!("../src/runtime.rs").contains(value);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn v0_3_12_pre_006_source_surface_hardens_shutdown_and_faults_without_backend_edges() {
|
||||
let root = include_str!("../src/lib.rs");
|
||||
|
||||
Reference in New Issue
Block a user