mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-11 19:47:21 +00:00
* Add state root to node steps path register `RPath` or `XPath` why: Typically, the first node in the path register is the state root. There are occasions, when the path register is empty (i.e. there are no node references) which typically applies to a zero node key. In order to find the next node key greater than zero, the state root is is needed which is now part of the `RPath` or `XPath` data types. * Extracted hexary tree debugging functions into separate files * Update empty path fringe case for left/right node neighbour why: When starting at zero, the node steps path register would be empty. So will any path that is before the fist non-zero link of a state root (if it is a `Branch` node.) The `hexaryNearbyRight()` or `hexaryNearbyLeft()` function required a non-zero node steps path register. Now the first node is to be advanced starting at the first state root link if necessary. * Simplify/reorg neighbour node finder why: There was too mach code repetition for the cases * persistent or in-memory database * left or right move details: Most algorithms apply for persistent and in-memory alike. Using templates/generic functions most of these algorithms can be stated in a unified way * Update storage slots snap/1 handler details: Minor changes to be more debugging friendly. * Fix detection of full database for snap sync * Docu: Snap sync test & debugging scenario
87 lines
1.8 KiB
Nim
87 lines
1.8 KiB
Nim
# nimbus-eth1
|
|
# Copyright (c) 2021 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
|
|
HexaryError* = enum
|
|
NothingSerious = 0
|
|
|
|
AccountNotFound
|
|
AccountsNotSrictlyIncreasing
|
|
AccountRangesOverlap
|
|
LowerBoundAfterFirstEntry
|
|
LowerBoundProofError
|
|
NodeNotFound
|
|
RlpEncoding
|
|
SlotsNotFound
|
|
SlotsNotSrictlyIncreasing
|
|
TrieLoopAlert
|
|
TrieIsEmpty
|
|
TrieIsLockedForPerusal
|
|
TooManyProcessedChunks
|
|
TooManySlotAccounts
|
|
NoAccountsYet
|
|
|
|
# debug
|
|
LeafMaxExceeded
|
|
GarbledNextLeaf
|
|
|
|
# snap handler
|
|
DataSizeError
|
|
|
|
# range
|
|
LeafNodeExpected
|
|
FailedNextNode
|
|
|
|
# nearby/boundary proofs
|
|
NearbyExtensionError
|
|
NearbyBranchError
|
|
NearbyGarbledNode
|
|
NearbyNestingTooDeep
|
|
NearbyUnexpectedNode
|
|
NearbyFailed
|
|
NearbyEmptyPath
|
|
NearbyLeafExpected
|
|
NearbyDanglingLink
|
|
NearbyPathTail
|
|
|
|
# envelope
|
|
DecomposeDegenerated
|
|
DecomposeDisjunct
|
|
|
|
# import
|
|
DifferentNodeValueExists
|
|
ExpectedNodeKeyDiffers
|
|
Rlp2Or17ListEntries
|
|
RlpBlobExpected
|
|
RlpBranchLinkExpected
|
|
RlpExtPathEncoding
|
|
RlpNonEmptyBlobExpected
|
|
|
|
# interpolate
|
|
AccountRepairBlocked
|
|
InternalDbInconsistency
|
|
RightBoundaryProofFailed
|
|
RootNodeMismatch
|
|
RootNodeMissing
|
|
|
|
# bulk storage
|
|
AddBulkItemFailed
|
|
CannotOpenRocksDbBulkSession
|
|
CommitBulkItemsFailed
|
|
NoRocksDbBackend
|
|
UnresolvedRepairNode
|
|
OSErrorException
|
|
IOErrorException
|
|
ExceptionError
|
|
StateRootNotFound
|
|
|
|
# End
|
|
|