v0.3.14-pre.007

This commit is contained in:
2026-09-12 07:47:16 +02:00
parent ae712eae64
commit 887664f3c0
9 changed files with 619 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/continuity.rs
// version: 6
// version: 7
/// Maximum number of slots admitted by one private continuity HTTP discovery window outside this module.
pub(crate) const MAX_RAW_TRANSACTION_INGEST_CONTINUITY_DISCOVERY_WINDOW_SLOTS: u64 = MAX_RAW_TRANSACTION_INGEST_REPAIR_DISCOVERY_WINDOW_SLOTS;
@@ -174,6 +174,43 @@ impl RawTransactionIngestGapRange {
}
}
/// Private run-local obligation for one transaction reference already observed by a live source.
#[derive(Clone, Debug, Eq, PartialEq)]
pub(crate) struct RawTransactionIngestKnownReferenceObligation {
commitment: ksp_onchain_transport_lib::SolanaCommitment,
reference: ksp_store_lib::RawTransactionReference,
slot: u64,
}
impl crate::RawTransactionIngestKnownReferenceObligation {
/// Creates one known-reference obligation without inventing any absence or coverage proof.
pub(crate) fn new(
reference: ksp_store_lib::RawTransactionReference,
slot: u64,
commitment: ksp_onchain_transport_lib::SolanaCommitment,
) -> ksp_core_lib::Result<Self> {
if commitment == ksp_onchain_transport_lib::SolanaCommitment::Processed {
return std::result::Result::Err(crate::runtime_error("continuity.known_reference_processed_unsupported"));
}
return std::result::Result::Ok(Self { commitment, reference, slot });
}
/// Returns the exact commitment under which this reference must be resolved.
pub(crate) const fn commitment(&self) -> ksp_onchain_transport_lib::SolanaCommitment {
return self.commitment;
}
/// Returns the already-known canonical transaction reference.
pub(crate) const fn reference(&self) -> &ksp_store_lib::RawTransactionReference {
return &self.reference;
}
/// Returns the already-observed slot associated with the reference.
pub(crate) const fn slot(&self) -> u64 {
return self.slot;
}
}
/// Private run-local anchor for one WebSocket continuity incident.
///
/// The anchor never derives slots from wall-clock time. Its inclusive start is the latest slot actually observed by that source before Transport reported a