Skip to main content

EcsDecodeProof

Struct EcsDecodeProof 

Source
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: u16

Stable schema version (load-bearing for replay tooling).

§policy_id: u32

Policy identifier used when this proof was emitted.

§object_id: ObjectId

The object being decoded.

§changeset_id: Option<[u8; 16]>

Optional changeset identifier (replication path).

§k_source: u32

Number of source symbols (K).

§repair_count: u32

Number of repair symbols configured for the decode budget (R).

§symbol_size: u32

Symbol 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: bool

Whether 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: u64

Timing: wall-clock nanoseconds or virtual time under LabRuntime.

§seed: u64

RaptorQ seed used for encoding.

§payload_mode: DecodeProofPayloadMode

Redaction mode for payload material in this proof.

§debug_symbol_payloads: Option<Vec<Vec<u8>>>

Optional symbol payload bytes (lab/debug only).

§input_hashes: ProofInputHashes

Deterministic digest summary for replay verification.

Implementations§

Source§

impl EcsDecodeProof

Source

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.

Source

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.

Source

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).

Source

pub fn is_repair(&self) -> bool

Whether this proof records a repair operation (i.e., repair symbols used).

Source

pub fn is_minimum_decode(&self) -> bool

Whether the decode used the minimum possible symbols (fragile recovery).

Source

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.

Source

pub fn with_changeset_id(self, changeset_id: [u8; 16]) -> Self

Attach changeset identity metadata and recompute integrity hashes.

Source

pub fn with_rejected_symbols( self, rejected_symbols: Vec<RejectedSymbol>, ) -> Self

Attach rejected-symbol evidence and recompute integrity hashes.

Source

pub fn with_symbol_digests(self, symbol_digests: Vec<SymbolDigest>) -> Self

Attach accepted-symbol digests and recompute integrity hashes.

Source

pub fn with_debug_symbol_payloads(self, payloads: Vec<Vec<u8>>) -> Self

Switch proof to debug payload mode and embed symbol payload bytes.

Source

pub fn replay_verifies( &self, symbol_digests: &[SymbolDigest], rejected_symbols: &[RejectedSymbol], ) -> bool

Replay verification: ensure digest evidence matches this proof.

Source

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

Source§

fn clone(&self) -> EcsDecodeProof

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EcsDecodeProof

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EcsDecodeProof

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for EcsDecodeProof

Source§

fn eq(&self, other: &EcsDecodeProof) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for EcsDecodeProof

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for EcsDecodeProof

Source§

impl StructuralPartialEq for EcsDecodeProof

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, _span: NoopSpan) -> Self

Instruments this future with a span (no-op when disabled).
Source§

fn in_current_span(self) -> Self

Instruments this future with the current span (no-op when disabled).
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,