github.com/prysmaticlabs/prysm@v1.4.4/beacon-chain/db/alias.go (about)

     1  package db
     2  
     3  import "github.com/prysmaticlabs/prysm/beacon-chain/db/iface"
     4  
     5  // ReadOnlyDatabase exposes Prysm's Ethereum data backend for read access only, no information about
     6  // head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
     7  type ReadOnlyDatabase = iface.ReadOnlyDatabase
     8  
     9  // NoHeadAccessDatabase exposes Prysm's Ethereum data backend for read/write access, no information
    10  // about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
    11  type NoHeadAccessDatabase = iface.NoHeadAccessDatabase
    12  
    13  // HeadAccessDatabase exposes Prysm's Ethereum backend for read/write access with information about
    14  // chain head information. This interface should be used sparingly as the HeadFetcher is the source
    15  // of truth around chain head information while this interface serves as persistent storage for the
    16  // head fetcher.
    17  //
    18  // See github.com/prysmaticlabs/prysm/blockchain.HeadFetcher
    19  type HeadAccessDatabase = iface.HeadAccessDatabase
    20  
    21  // Database defines the necessary methods for Prysm's Ethereum backend which may be implemented by any
    22  // key-value or relational database in practice. This is the full database interface which should
    23  // not be used often. Prefer a more restrictive interface in this package.
    24  type Database = iface.Database
    25  
    26  // SlasherDatabase defines necessary methods for Prysm's slasher implementation.
    27  type SlasherDatabase = iface.SlasherDatabase
    28  
    29  // ErrExistingGenesisState is an error when the user attempts to save a different genesis state
    30  // when one already exists in a database.
    31  var ErrExistingGenesisState = iface.ErrExistingGenesisState