mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 04:15:54 +00:00
6677f57ea9
* Remove `chunkedMpt` from `persistent()`/`stow()` function why: Proof-mode code was removed with PR #2445 and needs to be re-designed. * Remove unused `beStateRoot` argument from `deltaMerge()` * Update/drastically simplify `txStow()` why: Got rid of many boundary conditions details: Many pre-conditions have changed. In particular, previous versions used the account state (hash) which was conveniently available and checked it against the backend in order to find out whether there was something to do, at all. Currently, only an empty set of all tables in the delta layer has the balancer update ignored. Notable changes are: * no check against account state (see above) * balancer filters have no hash signature (some legacy stuff left over from journals) * no (shap sync) proof data which made the generation of the a top layer more complex * Cosmetics, cruft removal * Update unit test file & function name why: Was legacy module
190 lines
4.2 KiB
Nim
190 lines
4.2 KiB
Nim
# nimbus-eth1
|
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
|
|
# http://www.apache.org/licenses/LICENSE-2.0)
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT) or
|
|
# http://opensource.org/licenses/MIT)
|
|
# at your option. This file may not be copied, modified, or distributed
|
|
# except according to those terms.
|
|
|
|
type
|
|
AristoError* = enum
|
|
NothingSerious = 0
|
|
|
|
# Miscelaneous/unclassified handy helpers
|
|
GenericError
|
|
|
|
|
|
# Data record transcoders, `blobify()` from `blobify.nim`
|
|
BlobifyBranchMissingRefs
|
|
BlobifyExtMissingRefs
|
|
BlobifyExtPathOverflow
|
|
BlobifyLeafPathOverflow
|
|
BlobifyNilVertex
|
|
|
|
|
|
# Cache checker `checkCache()`
|
|
CheckAnyVidDeadStorageRoot
|
|
CheckAnyVidSharedStorageRoot
|
|
CheckAnyVtxEmptyKeyMissing
|
|
CheckAnyVtxEmptyKeyExpected
|
|
CheckAnyVtxEmptyKeyMismatch
|
|
CheckAnyVtxBranchLinksMissing
|
|
CheckAnyVtxLockWithoutKey
|
|
CheckAnyVTopUnset
|
|
|
|
CheckBeCacheGarbledVTop
|
|
CheckBeCacheKeyDangling
|
|
CheckBeCacheKeyNonEmpty
|
|
CheckBeGarbledVTop
|
|
CheckBeVtxBranchLinksMissing
|
|
CheckBeVtxInvalid
|
|
CheckBeVtxMissing
|
|
|
|
CheckStkKeyStrayZeroEntry
|
|
CheckStkVtxKeyMismatch
|
|
|
|
CheckRlxVtxIncomplete
|
|
CheckRlxVtxKeyMissing
|
|
CheckRlxVtxKeyMismatch
|
|
|
|
|
|
# De-serialiser from `blobify.nim`
|
|
Deblob256LenUnsupported
|
|
Deblob64LenUnsupported
|
|
DeblobBranchGotLeafPrefix
|
|
DeblobBranchTooShort
|
|
DeblobCodeLenUnsupported
|
|
DeblobExtSizeGarbled
|
|
DeblobLeafGotExtPrefix
|
|
DeblobLeafSizeGarbled
|
|
DeblobRVidLenUnsupported
|
|
DeblobUnknown
|
|
DeblobVtxTooShort
|
|
DeblobWrongSize
|
|
DeblobWrongType
|
|
|
|
|
|
# Deletion of vertex paths, `deleteXxx()`
|
|
DelAccRootNotAccepted
|
|
DelBranchExpexted
|
|
DelBranchWithoutRefs
|
|
DelDanglingStoTrie
|
|
DelLeafExpexted
|
|
DelPathNotFound
|
|
DelRootVidMissing
|
|
DelStoAccMissing
|
|
DelStoRootMissing
|
|
DelStoRootNotAccepted
|
|
DelVidStaleVtx
|
|
|
|
# Functions from `aristo_desc.nim`
|
|
DescMustBeOnCentre
|
|
DescNotAllowedOnCentre
|
|
DescStaleDescriptor
|
|
|
|
|
|
# Functions from `aristo_delta.nim`
|
|
FilBackendMissing
|
|
FilBackendRoMode
|
|
FilSiblingsCommitUnfinshed
|
|
|
|
|
|
# Fetch functions from `aristo_fetch.nim`
|
|
FetchAccInaccessible
|
|
FetchAccPathWithoutLeaf
|
|
FetchAccRootNotAccepted
|
|
FetchLeafKeyInvalid
|
|
FetchPathInvalid
|
|
FetchPathNotFound
|
|
FetchRootVidMissing
|
|
FetchStoRootNotAccepted
|
|
|
|
|
|
# Get functions from `aristo_get.nim`
|
|
GetFilNotFound
|
|
GetFqsNotFound
|
|
GetKeyNotFound
|
|
GetKeyUpdateNeeded
|
|
GetLstNotFound
|
|
GetTuvNotFound
|
|
GetVtxNotFound
|
|
|
|
|
|
# Path function `hikeUp()`
|
|
HikeBranchMissingEdge
|
|
HikeBranchTailEmpty
|
|
HikeDanglingEdge
|
|
HikeEmptyPath
|
|
HikeLeafUnexpected
|
|
HikeNoLegs
|
|
HikeRootMissing
|
|
|
|
|
|
# Merge leaf `merge()`
|
|
MergeHikeFailed # Ooops, internal error
|
|
MergeAccRootNotAccepted
|
|
MergeStoRootNotAccepted
|
|
MergeLeafPathCachedAlready
|
|
MergeLeafPathOnBackendAlready
|
|
MergeRootVidMissing
|
|
MergeStoAccMissing
|
|
|
|
|
|
# Neighbour vertex, tree traversal `nearbyRight()` and `nearbyLeft()`
|
|
NearbyBeyondRange
|
|
NearbyBranchError
|
|
NearbyDanglingLink
|
|
NearbyEmptyHike
|
|
NearbyFailed
|
|
NearbyLeafExpected
|
|
NearbyNestingTooDeep
|
|
NearbyPathTailUnexpected
|
|
NearbyUnexpectedVtx
|
|
NearbyVidInvalid
|
|
|
|
|
|
# Path/nibble/key conversions in `aisto_path.nim`
|
|
PathExpected64Nibbles
|
|
PathAtMost64Nibbles
|
|
PathExpectedLeaf
|
|
|
|
|
|
# RocksDB backend
|
|
RdbBeCantCreateDataDir
|
|
RdbBeCantCreateTmpDir
|
|
RdbBeDriverDelAdmError
|
|
RdbBeDriverDelKeyError
|
|
RdbBeDriverDelVtxError
|
|
RdbBeDriverGetAdmError
|
|
RdbBeDriverGetKeyError
|
|
RdbBeDriverGetVtxError
|
|
RdbBeDriverGuestError
|
|
RdbBeDriverPutAdmError
|
|
RdbBeDriverPutKeyError
|
|
RdbBeDriverPutVtxError
|
|
RdbBeDriverWriteError
|
|
RdbBeTypeUnsupported
|
|
RdbBeWrSessionUnfinished
|
|
RdbBeWrTriggerActiveAlready
|
|
RdbBeWrTriggerNilFn
|
|
RdbGuestInstanceAborted
|
|
RdbHashKeyExpected
|
|
|
|
|
|
# Transaction wrappers
|
|
TxAccRootMissing
|
|
TxArgStaleTx
|
|
TxArgsUseless
|
|
TxBackendNotWritable
|
|
TxLevelTooDeep
|
|
TxLevelUseless
|
|
TxNoPendingTx
|
|
TxNotFound
|
|
TxNotTopTx
|
|
TxPendingTx
|
|
TxStackGarbled
|
|
|
|
# End
|