pub struct EcsDecodeProof {Show 21 fields
pub schema_version: u16,
pub policy_id: u32,
pub object_id: ObjectId,
pub changeset_id: Option<[u8; 16]>,
pub k_source: u32,
pub repair_count: u32,
pub symbol_size: u32,
pub oti: Option<u64>,
pub symbols_received: Vec<u32>,
pub source_esis: Vec<u32>,
pub repair_esis: Vec<u32>,
pub rejected_symbols: Vec<RejectedSymbol>,
pub symbol_digests: Vec<SymbolDigest>,
pub decode_success: bool,
pub failure_reason: Option<DecodeFailureReason>,
pub intermediate_rank: Option<u32>,
pub timing_ns: u64,
pub seed: u64,
pub payload_mode: DecodeProofPayloadMode,
pub debug_symbol_payloads: Option<Vec<Vec<u8>>>,
pub input_hashes: ProofInputHashes,
}Expand description
A decode proof recording the outcome and metadata of an ECS decode operation (§3.5.8).
This is the FrankenSQLite-side proof artifact. It captures the fields
specified by the spec (object_id, k_source, received ESIs, source
vs repair partitions, success/failure, intermediate rank, timing, seed).
Fields§
§schema_version: u16Stable schema version (load-bearing for replay tooling).
policy_id: u32Policy identifier used when this proof was emitted.
object_id: ObjectIdThe object being decoded.
changeset_id: Option<[u8; 16]>Optional changeset identifier (replication path).
k_source: u32Number of source symbols (K).
repair_count: u32Number of repair symbols configured for the decode budget (R).
symbol_size: u32Symbol size (T) in bytes (0 when unavailable in this layer).
oti: Option<u64>RaptorQ OTI/codec metadata hash (if available).
symbols_received: Vec<u32>ESIs of all symbols fed to the decoder.
source_esis: Vec<u32>Subset of received ESIs that were source symbols.
repair_esis: Vec<u32>Subset of received ESIs that were repair symbols.
rejected_symbols: Vec<RejectedSymbol>Rejected symbols and reasons (integrity/auth/format/dup).
symbol_digests: Vec<SymbolDigest>Hashes of accepted symbols for replay verification.
decode_success: boolWhether the decode succeeded.
failure_reason: Option<DecodeFailureReason>Failure reason when decode did not succeed.
intermediate_rank: Option<u32>Decoder matrix rank at success/failure (if available).
timing_ns: u64Timing: wall-clock nanoseconds or virtual time under LabRuntime.
seed: u64RaptorQ seed used for encoding.
payload_mode: DecodeProofPayloadModeRedaction mode for payload material in this proof.
debug_symbol_payloads: Option<Vec<Vec<u8>>>Optional symbol payload bytes (lab/debug only).
input_hashes: ProofInputHashesDeterministic digest summary for replay verification.
Implementations§
Source§impl EcsDecodeProof
impl EcsDecodeProof
Sourcepub fn success(
object_id: ObjectId,
k_source: u32,
symbols_received: Vec<u32>,
source_esis: Vec<u32>,
repair_esis: Vec<u32>,
intermediate_rank: Option<u32>,
timing_ns: u64,
seed: u64,
) -> Self
pub fn success( object_id: ObjectId, k_source: u32, symbols_received: Vec<u32>, source_esis: Vec<u32>, repair_esis: Vec<u32>, intermediate_rank: Option<u32>, timing_ns: u64, seed: u64, ) -> Self
Create a proof for a successful decode operation.
Sourcepub fn failure(
object_id: ObjectId,
k_source: u32,
symbols_received: Vec<u32>,
source_esis: Vec<u32>,
repair_esis: Vec<u32>,
intermediate_rank: Option<u32>,
timing_ns: u64,
seed: u64,
) -> Self
pub fn failure( object_id: ObjectId, k_source: u32, symbols_received: Vec<u32>, source_esis: Vec<u32>, repair_esis: Vec<u32>, intermediate_rank: Option<u32>, timing_ns: u64, seed: u64, ) -> Self
Create a proof for a failed decode operation.
Sourcepub fn from_esis(
object_id: ObjectId,
k_source: u32,
all_esis: &[u32],
decode_success: bool,
intermediate_rank: Option<u32>,
timing_ns: u64,
seed: u64,
) -> Self
pub fn from_esis( object_id: ObjectId, k_source: u32, all_esis: &[u32], decode_success: bool, intermediate_rank: Option<u32>, timing_ns: u64, seed: u64, ) -> Self
Build an EcsDecodeProof from raw received-symbol ESIs.
Partitions received ESIs into source (< k_source) and repair (>= k_source).
Sourcepub fn is_repair(&self) -> bool
pub fn is_repair(&self) -> bool
Whether this proof records a repair operation (i.e., repair symbols used).
Sourcepub fn is_minimum_decode(&self) -> bool
pub fn is_minimum_decode(&self) -> bool
Whether the decode used the minimum possible symbols (fragile recovery).
Sourcepub fn is_consistent(&self) -> bool
pub fn is_consistent(&self) -> bool
Verify that this proof is internally consistent.
Returns true if source_esis + repair_esis == symbols_received and
all ESI partitions are correct.
Sourcepub fn with_changeset_id(self, changeset_id: [u8; 16]) -> Self
pub fn with_changeset_id(self, changeset_id: [u8; 16]) -> Self
Attach changeset identity metadata and recompute integrity hashes.
Sourcepub fn with_rejected_symbols(
self,
rejected_symbols: Vec<RejectedSymbol>,
) -> Self
pub fn with_rejected_symbols( self, rejected_symbols: Vec<RejectedSymbol>, ) -> Self
Attach rejected-symbol evidence and recompute integrity hashes.
Sourcepub fn with_symbol_digests(self, symbol_digests: Vec<SymbolDigest>) -> Self
pub fn with_symbol_digests(self, symbol_digests: Vec<SymbolDigest>) -> Self
Attach accepted-symbol digests and recompute integrity hashes.
Sourcepub fn with_debug_symbol_payloads(self, payloads: Vec<Vec<u8>>) -> Self
pub fn with_debug_symbol_payloads(self, payloads: Vec<Vec<u8>>) -> Self
Switch proof to debug payload mode and embed symbol payload bytes.
Sourcepub fn replay_verifies(
&self,
symbol_digests: &[SymbolDigest],
rejected_symbols: &[RejectedSymbol],
) -> bool
pub fn replay_verifies( &self, symbol_digests: &[SymbolDigest], rejected_symbols: &[RejectedSymbol], ) -> bool
Replay verification: ensure digest evidence matches this proof.
Sourcepub fn verification_report(
&self,
config: DecodeProofVerificationConfig,
symbol_digests: &[SymbolDigest],
rejected_symbols: &[RejectedSymbol],
) -> DecodeProofVerificationReport
pub fn verification_report( &self, config: DecodeProofVerificationConfig, symbol_digests: &[SymbolDigest], rejected_symbols: &[RejectedSymbol], ) -> DecodeProofVerificationReport
Verify proof integrity and emit a deterministic structured report.
Trait Implementations§
Source§impl Clone for EcsDecodeProof
impl Clone for EcsDecodeProof
Source§fn clone(&self) -> EcsDecodeProof
fn clone(&self) -> EcsDecodeProof
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EcsDecodeProof
impl Debug for EcsDecodeProof
Source§impl<'de> Deserialize<'de> for EcsDecodeProof
impl<'de> Deserialize<'de> for EcsDecodeProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EcsDecodeProof
impl PartialEq for EcsDecodeProof
Source§impl Serialize for EcsDecodeProof
impl Serialize for EcsDecodeProof
impl Eq for EcsDecodeProof
impl StructuralPartialEq for EcsDecodeProof
Auto Trait Implementations§
impl Freeze for EcsDecodeProof
impl RefUnwindSafe for EcsDecodeProof
impl Send for EcsDecodeProof
impl Sync for EcsDecodeProof
impl Unpin for EcsDecodeProof
impl UnsafeUnpin for EcsDecodeProof
impl UnwindSafe for EcsDecodeProof
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.