mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
18 lines
695 B
Go
18 lines
695 B
Go
package kv
|
|
|
|
// The schema will define how to store and retrieve data from the db.
|
|
// we can prefix or suffix certain values such as `block` with attributes
|
|
// for prefix-wide scans across the underlying BoltDB buckets when filtering data.
|
|
// For example, we might store attestations as shard + attestation_root -> attestation, making
|
|
// it easy to scan for keys that have a certain shard number as a prefix and return those
|
|
// corresponding attestations.
|
|
var (
|
|
attestationsBucket = []byte("attestations")
|
|
blocksBucket = []byte("blocks")
|
|
validatorsBucket = []byte("validators")
|
|
stateBucket = []byte("state")
|
|
|
|
// Bucket specific keys.
|
|
headBlockRootKey = []byte("head-root")
|
|
)
|