Skip to main content

OpEntry

Struct OpEntry 

Source
pub struct OpEntry {
    pub format_version: u16,
    pub parent: Option<ContentHash>,
    pub seq: u64,
    pub channel: String,
    pub payload: Vec<u8>,
    pub witnesses: Vec<Witness>,
    pub author_sig: Option<Witness>,
}
Expand description

One operation in the log. Payload semantics live above this layer.

Fields§

§format_version: u16

Wire-format version this entry was written with; see FORMAT_VERSION.

§parent: Option<ContentHash>

Hash of the previous entry; None only for the genesis entry.

§seq: u64

Sequence number assigned by the single-writer sequencer.

§channel: String

Signature-covered attribution channel that submitted the op.

Serialized as workspace because that field name is frozen into format v1 and therefore into every entry hash. The Rust name is deliberately accurate: workspace ids live in ViewOp, while this value identifies the collaboration channel an actor spoke on.

§payload: Vec<u8>

Opaque operation body; interpreted by the layers above L1.

§witnesses: Vec<Witness>

Witness cosignatures. Always empty, and now permanently so (D67).

This field is inside the bytes OpEntry::content_hash covers, so a cosignature added after the entry was hashed would rewrite the entry and orphan every descendant. Filling it is therefore possible only before the append — signatures gathered on the sequencer’s critical path, which is what D16’s latency tripwire exists to avoid. D67 takes the alternative that row names: a witness cosigns the D25 ref-state attestation as its own op. The field stays for format stability, not as a placeholder for something still coming.

§author_sig: Option<Witness>

Author signature over OpEntry::signing_hash (L8). Additive field (serde(default)): entries written before L8 decode with None, keeping FORMAT_VERSION at 1.

Implementations§

Source§

impl OpEntry

Source

pub fn content_hash(&self) -> ContentHash

Content address of this entry (its canonical serialization, hashed).

Source

pub fn signing_hash(&self) -> ContentHash

What the author signs: a hash over (channel, payload) only.

The author asserts what they submitted, not where it landed — seq/parent are assigned by the sequencer after signing. Position is covered instead by the D25 attestation, whose at_seq a D67 witness cosigns. Replaying a signed op at a different position is rejected by the CAS prev carried inside the payload, not by the signature.

Trait Implementations§

Source§

impl Clone for OpEntry

Source§

fn clone(&self) -> OpEntry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for OpEntry

Source§

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

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

impl<'de> Deserialize<'de> for OpEntry

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 OpEntry

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 OpEntry

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 OpEntry

Source§

impl StructuralPartialEq for OpEntry

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,