pub struct SimplexBlock {
pub parent: Digest,
pub height: u64,
pub timestamp: u64,
pub state_root: [u8; 32],
pub tx_count: u32,
pub tx_root: [u8; 32],
/* private fields */
}Expand description
A block in the Simplex consensus chain.
This block type is designed for the Guts decentralized code collaboration platform and follows the Simplex BFT consensus protocol.
Fields§
§parent: DigestThe parent block’s digest.
height: u64The height of the block in the blockchain.
timestamp: u64The timestamp of the block (in milliseconds since the Unix epoch).
state_root: [u8; 32]State root after applying transactions in this block.
tx_count: u32Number of transactions in this block.
tx_root: [u8; 32]Serialized transaction data (for lightweight blocks, actual data synced separately).
Implementations§
Trait Implementations§
Source§impl Block for SimplexBlock
impl Block for SimplexBlock
Source§impl Clone for SimplexBlock
impl Clone for SimplexBlock
Source§fn clone(&self) -> SimplexBlock
fn clone(&self) -> SimplexBlock
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 moreSource§impl Committable for SimplexBlock
impl Committable for SimplexBlock
Source§type Commitment = Digest
type Commitment = Digest
The type of commitment produced by this object.
Source§impl Debug for SimplexBlock
impl Debug for SimplexBlock
Source§impl Digestible for SimplexBlock
impl Digestible for SimplexBlock
Source§impl EncodeSize for SimplexBlock
impl EncodeSize for SimplexBlock
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Returns the encoded size of this value (in bytes).
Source§impl PartialEq for SimplexBlock
impl PartialEq for SimplexBlock
Source§impl Read for SimplexBlock
impl Read for SimplexBlock
Source§impl Write for SimplexBlock
impl Write for SimplexBlock
impl Eq for SimplexBlock
impl StructuralPartialEq for SimplexBlock
Auto Trait Implementations§
impl Freeze for SimplexBlock
impl RefUnwindSafe for SimplexBlock
impl Send for SimplexBlock
impl Sync for SimplexBlock
impl Unpin for SimplexBlock
impl UnwindSafe for SimplexBlock
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
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
Compare self to
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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