pub struct CheckpointSummary {
pub epoch: EpochId,
pub sequence_number: CheckpointSequenceNumber,
pub network_total_transactions: u64,
pub content_digest: Digest,
pub previous_digest: Option<Digest>,
pub epoch_rolling_gas_cost_summary: GasCostSummary,
pub timestamp_ms: CheckpointTimestamp,
pub checkpoint_commitments: Vec<CheckpointCommitment>,
pub end_of_epoch_data: Option<EndOfEpochData>,
pub version_specific_data: Vec<u8>,
}Expand description
A header for a Checkpoint on the IOTA blockchain.
On the IOTA network, checkpoints define the history of the blockchain. They are quite similar to the concept of blocks used by other blockchains like Bitcoin or Ethereum. The IOTA blockchain, however, forms checkpoints after transaction execution has already happened to provide a certified history of the chain, instead of being formed before execution.
Checkpoints commit to a variety of state including but not limited to:
- The hash of the previous checkpoint.
- The set of transaction digests, their corresponding effects digests, as well as the set of user signatures which authorized its execution.
- The object’s produced by a transaction.
- The set of live objects that make up the current state of the chain.
- On epoch transitions, the next validator committee.
CheckpointSummarys themselves don’t directly include all of the above
information but they are the top-level type by which all the above are
committed to transitively via cryptographic hashes included in the summary.
CheckpointSummarys are signed and certified by a quorum of the validator
committee in a given epoch in order to allow verification of the chain’s
state.
§BCS
The BCS serialized form for this type is defined by the following ABNF:
checkpoint-summary = u64 ; epoch
u64 ; sequence_number
u64 ; network_total_transactions
digest ; content_digest
(option digest) ; previous_digest
gas-cost-summary ; epoch_rolling_gas_cost_summary
u64 ; timestamp_ms
(vector checkpoint-commitment) ; checkpoint_commitments
(option end-of-epoch-data) ; end_of_epoch_data
bytes ; version_specific_dataFields§
§epoch: EpochIdEpoch that this checkpoint belongs to.
sequence_number: CheckpointSequenceNumberThe height of this checkpoint.
network_total_transactions: u64Total number of transactions committed since genesis, including those in this checkpoint.
content_digest: DigestThe hash of the CheckpointContents for this checkpoint.
previous_digest: Option<Digest>The hash of the previous CheckpointSummary.
This will be only be None for the first, or genesis checkpoint.
epoch_rolling_gas_cost_summary: GasCostSummaryThe running total gas costs of all transactions included in the current epoch so far until this checkpoint.
timestamp_ms: CheckpointTimestampTimestamp of the checkpoint - number of milliseconds from the Unix epoch Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent checkpoints can have same timestamp if they originate from the same underlining consensus commit
checkpoint_commitments: Vec<CheckpointCommitment>Commitments to checkpoint-specific state.
end_of_epoch_data: Option<EndOfEpochData>Extra data only present in the final checkpoint of an epoch.
version_specific_data: Vec<u8>CheckpointSummary is not an evolvable structure - it must be readable by any version of the code. Therefore, in order to allow extensions to be added to CheckpointSummary, we allow opaque data to be added to checkpoints which can be deserialized based on the current protocol version.
Implementations§
Source§impl CheckpointSummary
impl CheckpointSummary
pub fn signing_message(&self) -> Vec<u8> ⓘ
hash and serde only.pub fn signing_message_hex(&self) -> String
hash and serde only.Trait Implementations§
Source§impl Arbitrary for CheckpointSummary
impl Arbitrary for CheckpointSummary
Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<CheckpointSummary>
type Strategy = BoxedStrategy<CheckpointSummary>
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for CheckpointSummary
impl Clone for CheckpointSummary
Source§fn clone(&self) -> CheckpointSummary
fn clone(&self) -> CheckpointSummary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CheckpointSummary
impl Debug for CheckpointSummary
Source§impl<'de> Deserialize<'de> for CheckpointSummary
Available on crate feature serde only.
impl<'de> Deserialize<'de> for CheckpointSummary
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl JsonSchema for CheckpointSummary
impl JsonSchema for CheckpointSummary
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for CheckpointSummary
impl PartialEq for CheckpointSummary
Source§impl Serialize for CheckpointSummary
Available on crate feature serde only.
impl Serialize for CheckpointSummary
serde only.impl Eq for CheckpointSummary
impl StructuralPartialEq for CheckpointSummary
Auto Trait Implementations§
impl Freeze for CheckpointSummary
impl RefUnwindSafe for CheckpointSummary
impl Send for CheckpointSummary
impl Sync for CheckpointSummary
impl Unpin for CheckpointSummary
impl UnwindSafe for CheckpointSummary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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