Skip to main content

CheckpointSummary

type CheckpointSummary

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.

`CheckpointSummary`s 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. `CheckpointSummary`s 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:

```text checkpoint-summary = u64 ; epoch u64 ; sequence_number u64 ; network_total_transactions digest ; contents_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_data ```

type CheckpointSummary struct {
// contains filtered or unexported fields
}

func CheckpointSummaryFromBcs

func CheckpointSummaryFromBcs(bcs []byte) (*CheckpointSummary, error)

Create this type from BCS encoded bytes.

func CheckpointSummaryFromJson

func CheckpointSummaryFromJson(json string) (*CheckpointSummary, error)

Create this type from JSON encoded string.

func LiftFromExternalCheckpointSummary

func LiftFromExternalCheckpointSummary(handle uint64) *CheckpointSummary

func NewCheckpointSummary

func NewCheckpointSummary(epoch uint64, sequenceNumber uint64, networkTotalTransactions uint64, contentsDigest *CheckpointContentsDigest, previousDigest **CheckpointDigest, epochRollingGasCostSummary GasCostSummary, timestampMs uint64, checkpointCommitments []*CheckpointCommitment, endOfEpochData *EndOfEpochData, versionSpecificData []byte) *CheckpointSummary

func (*CheckpointSummary) CheckpointCommitments

func (_self *CheckpointSummary) CheckpointCommitments() []*CheckpointCommitment

Commitments to checkpoint-specific state.

func (*CheckpointSummary) ContentsDigest

func (_self *CheckpointSummary) ContentsDigest() *CheckpointContentsDigest

The hash of the `CheckpointContents` for this checkpoint.

func (*CheckpointSummary) Destroy

func (object *CheckpointSummary) Destroy()

func (*CheckpointSummary) Digest

func (_self *CheckpointSummary) Digest() *CheckpointDigest

func (*CheckpointSummary) EndOfEpochData

func (_self *CheckpointSummary) EndOfEpochData() *EndOfEpochData

Extra data only present in the final checkpoint of an epoch.

func (*CheckpointSummary) Epoch

func (_self *CheckpointSummary) Epoch() uint64

Epoch that this checkpoint belongs to.

func (*CheckpointSummary) EpochRollingGasCostSummary

func (_self *CheckpointSummary) EpochRollingGasCostSummary() GasCostSummary

The running total gas costs of all transactions included in the current epoch so far until this checkpoint.

func (*CheckpointSummary) NetworkTotalTransactions

func (_self *CheckpointSummary) NetworkTotalTransactions() uint64

Total number of transactions committed since genesis, including those in this checkpoint.

func (*CheckpointSummary) PreviousDigest

func (_self *CheckpointSummary) PreviousDigest() **CheckpointDigest

The hash of the previous `CheckpointSummary`.

This will be only be `None` for the first, or genesis checkpoint.

func (*CheckpointSummary) SequenceNumber

func (_self *CheckpointSummary) SequenceNumber() uint64

The height of this checkpoint.

func (*CheckpointSummary) SigningMessage

func (_self *CheckpointSummary) SigningMessage() []byte

func (*CheckpointSummary) SigningMessageHex

func (_self *CheckpointSummary) SigningMessageHex() string

func (*CheckpointSummary) TimestampMs

func (_self *CheckpointSummary) TimestampMs() uint64

Timestamp 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

func (*CheckpointSummary) VersionSpecificData

func (_self *CheckpointSummary) VersionSpecificData() []byte

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.