pub struct ProvenanceRoot {
pub step_count: u32,
pub merkle_root: [u8; 32],
pub trace_id: [u8; 16],
pub started_at_unix: u64,
pub finalized_at_unix: u64,
pub chain_binding: [u8; 32],
}Expand description
A compact cryptographic commitment to a complete reasoning trace.
ProvenanceRoot is the value stored in a ProvableReceipt. It binds the
receipt to the specific sequence of reasoning steps that led to the
authorized action, without storing the steps themselves.
§Selective Disclosure
An auditor can request disclosure of individual steps. The agent provides
the original step content plus a ProvenanceStepProof, which the auditor
verifies against the merkle_root stored in the archived receipt.
§Reconstruction
Given the archived ProvableReceipt (containing ProvenanceRoot) and the
original step contents, any party can independently verify the complete
reasoning trace. No secrets are required.
Fields§
§step_count: u32Total number of recorded reasoning steps.
merkle_root: [u8; 32]Merkle root over all reasoning step leaf hashes.
trace_id: [u8; 16]Random nonce identifying this trace instance.
Prevents two traces with identical step sequences from producing the
same ProvenanceRoot, protecting against trace substitution.
started_at_unix: u64Unix timestamp when the trace was started.
finalized_at_unix: u64Unix timestamp when the trace was finalized.
chain_binding: [u8; 32]Blake3 commitment over the ProvenanceRoot fields themselves, bound
to the issuing chain fingerprint. Prevents a root from being detached
from its receipt and reattached to a different authorization event.
Implementations§
Source§impl ProvenanceRoot
impl ProvenanceRoot
Sourcepub fn verify_chain_binding(&self, chain_fingerprint: &[u8; 32]) -> bool
pub fn verify_chain_binding(&self, chain_fingerprint: &[u8; 32]) -> bool
Recompute the chain_binding from the archived root and a chain fingerprint.
Returns true if the root has not been tampered with and was issued
against the provided chain fingerprint.
Sourcepub fn merkle_root_hex(&self) -> String
pub fn merkle_root_hex(&self) -> String
Hex-encoded Merkle root for logging and display.
Sourcepub fn trace_id_hex(&self) -> String
pub fn trace_id_hex(&self) -> String
Hex-encoded trace ID.
Trait Implementations§
Source§impl Clone for ProvenanceRoot
impl Clone for ProvenanceRoot
Source§fn clone(&self) -> ProvenanceRoot
fn clone(&self) -> ProvenanceRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProvenanceRoot
impl Debug for ProvenanceRoot
Source§impl<'de> Deserialize<'de> for ProvenanceRoot
impl<'de> Deserialize<'de> for ProvenanceRoot
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 ProvenanceRoot
impl PartialEq for ProvenanceRoot
Source§fn eq(&self, other: &ProvenanceRoot) -> bool
fn eq(&self, other: &ProvenanceRoot) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ProvenanceRoot
impl Serialize for ProvenanceRoot
impl Eq for ProvenanceRoot
impl StructuralPartialEq for ProvenanceRoot
Auto Trait Implementations§
impl Freeze for ProvenanceRoot
impl RefUnwindSafe for ProvenanceRoot
impl Send for ProvenanceRoot
impl Sync for ProvenanceRoot
impl Unpin for ProvenanceRoot
impl UnsafeUnpin for ProvenanceRoot
impl UnwindSafe for ProvenanceRoot
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.