Documentation ¶
Overview ¶
Package db defines the ability to create a new database for an eth2 beacon node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DatabaseCommands = &cli.Command{ Name: "db", Category: "db", Usage: "defines commands for interacting with eth2 beacon node database", Subcommands: []*cli.Command{ { Name: "restore", Description: `restores a database from a backup file`, Flags: cmd.WrapFlags([]cli.Flag{ cmd.RestoreSourceFileFlag, cmd.RestoreTargetDirFlag, }), Before: tos.VerifyTosAcceptedOrPrompt, Action: func(cliCtx *cli.Context) error { if err := restore(cliCtx); err != nil { logrus.Fatalf("Could not restore database: %v", err) } return nil }, }, }, }
DatabaseCommands for Prysm beacon node.
Functions ¶
This section is empty.
Types ¶
type Database ¶
Database defines the necessary methods for Prysm's eth2 backend which may be implemented by any 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.
type HeadAccessDatabase ¶ added in v0.3.2
type HeadAccessDatabase = iface.HeadAccessDatabase
HeadAccessDatabase exposes Prysm's eth2 backend for read/write access with information about 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 NoHeadAccessDatabase ¶ added in v0.3.2
type NoHeadAccessDatabase = iface.NoHeadAccessDatabase
NoHeadAccessDatabase exposes Prysm's eth2 data backend for read/write access, no information about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
type ReadOnlyDatabase ¶ added in v0.3.2
type ReadOnlyDatabase = iface.ReadOnlyDatabase
ReadOnlyDatabase exposes Prysm's eth2 data backend for read access only, no information about head info. For head info, use github.com/prysmaticlabs/prysm/blockchain.HeadFetcher.
Directories ¶
Path | Synopsis |
---|---|
Package filters specifies utilities for building a set of data attribute filters to be used when filtering data through database queries in practice.
|
Package filters specifies utilities for building a set of data attribute filters to be used when filtering data through database queries in practice. |
Package iface defines the actual database interface used by a Prysm beacon node, also containing useful, scoped interfaces such as a ReadOnlyDatabase.
|
Package iface defines the actual database interface used by a Prysm beacon node, also containing useful, scoped interfaces such as a ReadOnlyDatabase. |
Package kafka defines an implementation of Database interface which exports streaming data using Kafka for data analysis.
|
Package kafka defines an implementation of Database interface which exports streaming data using Kafka for data analysis. |
Package kv defines a bolt-db, key-value store implementation of the Database interface defined by a Prysm beacon node.
|
Package kv defines a bolt-db, key-value store implementation of the Database interface defined by a Prysm beacon node. |
Package testing allows for spinning up a real bolt-db instance for unit tests throughout the Prysm repo.
|
Package testing allows for spinning up a real bolt-db instance for unit tests throughout the Prysm repo. |