class eosio::blockvault::block_vault_interface

Class List > eosio :: blockvault :: block_vault_interface

Public Functions

Type Name
virtual ~block_vault_interface ()
virtual void async_propose_constructed_block (uint32_t lib, eosio::chain::signed_block_ptr block, std::function< void(bool)> handler) = 0
The primary method for adding constructed blocks to the Block Vault. If a proposed constructed block is accepted, the Block Vault cluster will guarantee that no future proposed blocks will be accepted which is in conflict with this block due to double production or finality violations. If the Block Vault cannot make that guarantee for any reason, it must reject the proposal.
virtual void async_append_external_block (uint32_t lib, eosio::chain::signed_block_ptr block, std::function< void(bool)> handler) = 0
The primary method for adding externally discovered blocks to the Block Vault. If an external block is accepted, the Block Vault cluster will guarantee that all future nodeos nodes will know about this block OR about an accepted snapshot state that exceeds this block's block height before proposing a constructed block. If the implied LIB of this block conflicts with the Block Vault state, then it will be rejected. If the block is older than the currently available snapshot, it is still accepted but will not affect the Block Vault cluster state.
virtual bool propose_snapshot (watermark_t watermark, const char * snapshot_filename) = 0
The primary method for a nodeos node to offer snapshot data to Block Vault that facilitates log pruning. If a snapshot's height is greater than the current snapshot AND less than or equal to the current implied LIB height, it will be accepted, and Block Vault will be able to prune its state internally. Otherwise, it should reject the proposed snapshot.
virtual void sync (const eosio::chain::block_id_type * block_id, sync_callback & callback) = 0
The primary method for bringing a new nodeos node into sync with the Block Vault. This is the primary method for bringing a new nodeos node into sync with the Block Vault. Syncing is semi-session based, a syncing nodeos will establish a session with a single Block Vault node, stored on that node for the duration of the syncing process. This session is used to guarantee that the Block Vault node does not prune any data that will be needed to complete this sync process until it is completed OR the session is timed-out. This session is not replicated amongst other Block Vault nodes. As a result, if the syncing process is interrupted due to inability to communicate with the chosen Block Vault node, it must restart from the beginning with a new node.

Public Functions Documentation

function ~block_vault_interface

virtual virtual eosio::blockvault::block_vault_interface::~block_vault_interface()

function async_propose_constructed_block

virtual virtual void eosio::blockvault::block_vault_interface::async_propose_constructed_block(
    uint32_t lib,
    eosio::chain::signed_block_ptr block,
    std::function< void(bool)> handler
) = 0

The primary method for adding constructed blocks to the Block Vault. If a proposed constructed block is accepted, the Block Vault cluster will guarantee that no future proposed blocks will be accepted which is in conflict with this block due to double production or finality violations. If the Block Vault cannot make that guarantee for any reason, it must reject the proposal.

Notice that handler would be called from a thread different from the invoker of this member function.

Parameters:

  • lib The LIB implied by accepting this block.
  • block A signed constructed block.
  • handler The callback function to inform caller whether the block has accepted the Block Vault or not.

function async_append_external_block

virtual virtual void eosio::blockvault::block_vault_interface::async_append_external_block(
    uint32_t lib,
    eosio::chain::signed_block_ptr block,
    std::function< void(bool)> handler
) = 0

The primary method for adding externally discovered blocks to the Block Vault. If an external block is accepted, the Block Vault cluster will guarantee that all future nodeos nodes will know about this block OR about an accepted snapshot state that exceeds this block's block height before proposing a constructed block. If the implied LIB of this block conflicts with the Block Vault state, then it will be rejected. If the block is older than the currently available snapshot, it is still accepted but will not affect the Block Vault cluster state.

Notice that handler would be called from a thread different from the invoker of this member function.

Parameters:

  • lib The LIB implied by accepting this block.
  • block A signed externally discovered block.
  • handler The callback function to inform caller whether the block has accepted the Block Vault or not.

function propose_snapshot

virtual virtual bool eosio::blockvault::block_vault_interface::propose_snapshot(
    watermark_t watermark,
    const char * snapshot_filename
) = 0

The primary method for a nodeos node to offer snapshot data to Block Vault that facilitates log pruning. If a snapshot's height is greater than the current snapshot AND less than or equal to the current implied LIB height, it will be accepted, and Block Vault will be able to prune its state internally. Otherwise, it should reject the proposed snapshot.

Parameters:

  • snapshot_filename the filename of snapshot.
  • watermark The producer watermark at the block height of this snapshot.

function sync

virtual virtual void eosio::blockvault::block_vault_interface::sync(
    const eosio::chain::block_id_type * block_id,
    sync_callback & callback
) = 0

The primary method for bringing a new nodeos node into sync with the Block Vault. This is the primary method for bringing a new nodeos node into sync with the Block Vault. Syncing is semi-session based, a syncing nodeos will establish a session with a single Block Vault node, stored on that node for the duration of the syncing process. This session is used to guarantee that the Block Vault node does not prune any data that will be needed to complete this sync process until it is completed OR the session is timed-out. This session is not replicated amongst other Block Vault nodes. As a result, if the syncing process is interrupted due to inability to communicate with the chosen Block Vault node, it must restart from the beginning with a new node.

Parameters:

  • block_id The BlockID of the best known final block on the client
  • callback The callback object to receive the snapshot and blocks

The documentation for this class was generated from the following file: plugins/blockvault\_client\_plugin/include/eosio/blockvault\_client\_plugin/blockvault.hpp