nimbus-eth1/nimbus/sync/protocol.nim
Jordan Hrycaj 5f0e89a41e
Snap accounts bulk import preparer (#1183)
* Provided common scheduler API, applied to `full` sync

* Use hexary trie as storage for proofs_db records

also:
 + Store metadata with account for keeping track of account state
 + add iterator over accounts

* Common scheduler API applied to `snap` sync

* Prepare for accounts bulk import

details:
+ Added some ad-hoc checks for proving accounts data received from the
  snap/1 (will be replaced by proper database version when ready)
+ Added code that dumps some of the received snap/1 data into a file
  (turned of by default, see `worker_desc.nim`)
2022-08-04 09:04:30 +01:00

37 lines
891 B
Nim

# Nimbus
# Copyright (c) 2018-2021 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license (license terms in the root directory or at
# https://opensource.org/licenses/MIT).
# * Apache v2 license (license terms in the root directory or at
# https://www.apache.org/licenses/LICENSE-2.0).
# at your option. This file may not be copied, modified, or distributed
# except according to those terms.
when defined(legacy_eth66_enabled):
import ./protocol/eth66 as proto_eth
type eth* = eth66
else:
import ./protocol/eth67 as proto_eth
type eth* = eth67
import
#./protocol/eth67 as proto_eth
./protocol/snap1 as proto_snap
export
proto_eth,
proto_snap
type
#eth* = eth67
snap* = snap1
SnapAccountRange* = accountRangeObj
## Syntactic sugar, type defined in `snap1`
SnapTrieNodes* = trieNodesObj
## Ditto
# End