2019-12-18 02:07:49 +00:00
|
|
|
package db
|
|
|
|
|
|
|
|
import "github.com/prysmaticlabs/prysm/beacon-chain/db/iface"
|
|
|
|
|
2021-06-26 19:00:33 +00:00
|
|
|
// ReadOnlyDatabase exposes Prysm's Ethereum data backend for read access only, no information about
|
2020-01-13 17:02:20 +00:00
|
|
|
// head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
|
|
|
|
type ReadOnlyDatabase = iface.ReadOnlyDatabase
|
|
|
|
|
2021-06-26 19:00:33 +00:00
|
|
|
// NoHeadAccessDatabase exposes Prysm's Ethereum data backend for read/write access, no information
|
2020-01-13 17:02:20 +00:00
|
|
|
// about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
|
|
|
|
type NoHeadAccessDatabase = iface.NoHeadAccessDatabase
|
|
|
|
|
2021-06-26 19:00:33 +00:00
|
|
|
// HeadAccessDatabase exposes Prysm's Ethereum backend for read/write access with information about
|
2020-01-13 17:02:20 +00:00
|
|
|
// chain head information. This interface should be used sparingly as the HeadFetcher is the source
|
|
|
|
// of truth around chain head information while this interface serves as persistent storage for the
|
|
|
|
// head fetcher.
|
|
|
|
//
|
|
|
|
// See github.com/prysmaticlabs/prysm/blockchain.HeadFetcher
|
|
|
|
type HeadAccessDatabase = iface.HeadAccessDatabase
|
|
|
|
|
2021-06-26 19:00:33 +00:00
|
|
|
// Database defines the necessary methods for Prysm's Ethereum backend which may be implemented by any
|
2020-01-13 17:02:20 +00:00
|
|
|
// key-value or relational database in practice. This is the full database interface which should
|
|
|
|
// not be used often. Prefer a more restrictive interface in this package.
|
2019-12-18 02:07:49 +00:00
|
|
|
type Database = iface.Database
|
2021-03-18 21:00:00 +00:00
|
|
|
|
2021-04-23 17:06:13 +00:00
|
|
|
// SlasherDatabase defines necessary methods for Prysm's slasher implementation.
|
|
|
|
type SlasherDatabase = iface.SlasherDatabase
|
|
|
|
|
2021-03-18 21:00:00 +00:00
|
|
|
// ErrExistingGenesisState is an error when the user attempts to save a different genesis state
|
|
|
|
// when one already exists in a database.
|
|
|
|
var ErrExistingGenesisState = iface.ErrExistingGenesisState
|