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: u16Wire-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: u64Sequence number assigned by the single-writer sequencer.
channel: StringSignature-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 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
impl OpEntry
Sourcepub fn content_hash(&self) -> ContentHash
pub fn content_hash(&self) -> ContentHash
Content address of this entry (its canonical serialization, hashed).
Sourcepub fn signing_hash(&self) -> ContentHash
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.