pub struct ProofAttestation {
pub proof_term_hash: [u8; 32],
pub environment_hash: [u8; 32],
pub verification_timestamp_ns: u64,
pub verifier_version: u32,
pub reduction_steps: u32,
pub cache_hit_rate_bps: u16,
}Expand description
A proof attestation that records verification metadata.
Can be serialized into an RVF WITNESS_SEG entry (82 bytes) for inclusion in proof-carrying containers.
Fields§
§proof_term_hash: [u8; 32]Hash of the serialized proof term (32 bytes).
environment_hash: [u8; 32]Hash of the environment declarations used (32 bytes).
verification_timestamp_ns: u64Nanosecond UNIX timestamp of verification.
verifier_version: u32lean-agentic version: 0x00_01_00_00 = 0.1.0.
reduction_steps: u32Number of type-check reduction steps consumed.
cache_hit_rate_bps: u16Arena cache hit rate (0..10000 = 0.00%..100.00%).
Implementations§
Source§impl ProofAttestation
impl ProofAttestation
Sourcepub fn new(
proof_term_hash: [u8; 32],
environment_hash: [u8; 32],
reduction_steps: u32,
cache_hit_rate_bps: u16,
) -> Self
pub fn new( proof_term_hash: [u8; 32], environment_hash: [u8; 32], reduction_steps: u32, cache_hit_rate_bps: u16, ) -> Self
Create a new attestation with the given parameters.
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self, &'static str>
pub fn from_bytes(data: &[u8]) -> Result<Self, &'static str>
Deserialize from bytes.
Sourcepub fn content_hash(&self) -> u64
pub fn content_hash(&self) -> u64
Compute a simple hash of this attestation for caching.
Trait Implementations§
Source§impl Clone for ProofAttestation
impl Clone for ProofAttestation
Source§fn clone(&self) -> ProofAttestation
fn clone(&self) -> ProofAttestation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProofAttestation
impl RefUnwindSafe for ProofAttestation
impl Send for ProofAttestation
impl Sync for ProofAttestation
impl Unpin for ProofAttestation
impl UnsafeUnpin for ProofAttestation
impl UnwindSafe for ProofAttestation
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
Mutably borrows from an owned value. Read more