#[repr(C)]pub struct DagNode {
pub parent_hash: [u8; 32],
pub quins_merkle: [u8; 32],
pub author_did: u64,
pub timestamp: u64,
pub message_hash: u32,
pub flags: u32,
}Expand description
88-byte Merkle-DAG commit node.
Layout (32+32+8+8+4+4 = 88 bytes, all fields little-endian):
[0..32) parent_hash — SHA-256 of parent DagNode bytes; all-zero = genesis
[32..64) quins_merkle — SHA-256 of the NQuin slice committed here
[64..72) author_did — q_hash of the author's DID string (u64)
[72..80) timestamp — ms since Unix epoch (u64)
[80..84) message_hash — low 32 bits of q_hash of the commit message
[84..88) flags — GENESIS | FORK_DISPUTED | ...Fields§
§parent_hash: [u8; 32]SHA-256 of the parent node’s bytes; [0u8; 32] for genesis.
quins_merkle: [u8; 32]SHA-256 of the quins slice this commit adds/removes.
q_hash of the author’s DID string.
timestamp: u64Milliseconds since Unix epoch.
message_hash: u32Low 32 bits of q_hash(message) — enough for dedup/indexing.
flags: u32Node flags (GENESIS, FORK_DISPUTED, …).
Implementations§
Trait Implementations§
impl Copy for DagNode
impl Eq for DagNode
impl StructuralPartialEq for DagNode
Auto Trait Implementations§
impl Freeze for DagNode
impl RefUnwindSafe for DagNode
impl Send for DagNode
impl Sync for DagNode
impl Unpin for DagNode
impl UnsafeUnpin for DagNode
impl UnwindSafe for DagNode
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more