mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
* Add entry for sequence number in chain-metadata bucket & Basic getter/setter * Mark p2p-metadata flag as deprecated * Fix metaDataFromConfig: use DB instead to get seqnum * Save sequence number after updating the metadata * Fix beacon-chain/p2p unit tests: add DB in config * Add changelog * Add ReadOnlyDatabaseWithSeqNum * Code suggestion from Manu * Remove seqnum getter at interface --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
29 lines
1.6 KiB
Go
29 lines
1.6 KiB
Go
package kv
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
// ErrDeleteJustifiedAndFinalized is raised when we attempt to delete a finalized block/state
|
|
var ErrDeleteJustifiedAndFinalized = errors.New("cannot delete finalized block or state")
|
|
|
|
// ErrNotFound can be used directly, or as a wrapped DBError, whenever a db method needs to
|
|
// indicate that a value couldn't be found.
|
|
var ErrNotFound = errors.New("not found in db")
|
|
var ErrNotFoundState = errors.Wrap(ErrNotFound, "state not found")
|
|
|
|
// ErrNotFoundOriginBlockRoot is an error specifically for the origin block root getter
|
|
var ErrNotFoundOriginBlockRoot = errors.Wrap(ErrNotFound, "OriginBlockRoot")
|
|
|
|
// ErrNotFoundGenesisBlockRoot means no genesis block root was found, indicating the db was not initialized with genesis
|
|
var ErrNotFoundGenesisBlockRoot = errors.Wrap(ErrNotFound, "OriginGenesisRoot")
|
|
|
|
// ErrNotFoundFeeRecipient is a not found error specifically for the fee recipient getter
|
|
var ErrNotFoundFeeRecipient = errors.Wrap(ErrNotFound, "fee recipient")
|
|
|
|
// ErrNotFoundMetadataSeqNum is a not found error specifically for the metadata sequence number getter
|
|
var ErrNotFoundMetadataSeqNum = errors.Wrap(ErrNotFound, "metadata sequence number")
|
|
|
|
var errEmptyBlockSlice = errors.New("[]blocks.ROBlock is empty")
|
|
var errIncorrectBlockParent = errors.New("unexpected missing or forked blocks in a []ROBlock")
|
|
var errFinalizedChildNotFound = errors.New("unable to find finalized root descending from backfill batch")
|
|
var errNotConnectedToFinalized = errors.New("unable to finalize backfill blocks, finalized parent_root does not match")
|