Module grin_chain::types

source ·
Expand description

Base types that the block chain pipeline requires.

Structs§

  • Minimal struct representing a known MMR position and associated block height.
  • Do-nothing implementation of TxHashsetWriteStatus
  • Dummy adapter used as a placeholder for real implementations
  • Options for block validation
  • A helper for the various output roots.
  • Container for entry in requested PIBD segments
  • Current sync state. Encapsulates the current SyncStatus.
  • The tip of a fork. A handle to the fork ancestry from its leaf in the blockchain tree. References the max height and the latest and previous blocks for convenience and the total difficulty.
  • A helper for the various txhashset MMR roots.
  • Stats for TxHashsetDownload stage

Enums§

  • Status of an accepted block.
  • Various status sync can be in, whether it’s fast sync or archival.

Traits§

  • Bridge between the chain pipeline and the rest of the system. Handles downstream processing of valid blocks by the rest of the system, most importantly the broadcasting of blocks to our peers.
  • Inform the caller of the current status of a txhashset write operation, as it can take quite a while to process. Each function is called in the order defined below and can be used to provide some feedback to the caller. Functions taking arguments can be called repeatedly to update those values as the processing progresses.