mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-06 09:13:46 +00:00
f40a066cc6
* Extract RocksDB timing tests from snap unit tests as separate module why: Declutter, make space for more snap related unit tests. * Renamed `undumpNextGroup()` => `undumpBlocks()` why: Source file name is called `undump_blocks.nim` which should be sort of in sync with the method name(s). * Implement snap/1 server method `getByteCodes()` * Implement snap/1 client method `getByteCodes()` * Implement faculty for handling contract code fetching via snap/1 * Provide persistent storage for contract code records * Implement contract code snap sync fetch & store * Code massage, cosmetics * Unit tests for verifying snap sync snapshot dump details: Use `undump_kvp.dumpAllDb()` to dump any database.
53 lines
1.4 KiB
Nim
53 lines
1.4 KiB
Nim
# Nimbus - Types, data structures and shared utilities used in network sync
|
|
#
|
|
# Copyright (c) 2018-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.
|
|
|
|
import
|
|
../../nimbus/core/chain,
|
|
./test_types
|
|
|
|
const
|
|
snapSyncdb0* = SnapSyncSpecs(
|
|
name: "main-snap",
|
|
network: MainNet,
|
|
snapDump: "mainnet=128.txt.gz",
|
|
tailBlocks: "mainnet332160.txt.gz",
|
|
pivotBlock: 128u64,
|
|
nItems: 500)
|
|
|
|
snapSyncdb1* = SnapSyncSpecs(
|
|
name: "main-snap",
|
|
network: MainNet,
|
|
snapDump: "mainnet=500.txt.gz",
|
|
tailBlocks: "mainnet332160.txt.gz",
|
|
pivotBlock: 500u64,
|
|
nItems: 500)
|
|
|
|
snapSyncdb2* = SnapSyncSpecs(
|
|
name: "main-snap",
|
|
network: MainNet,
|
|
snapDump: "mainnet=1000.txt.gz",
|
|
tailBlocks: "mainnet332160.txt.gz",
|
|
pivotBlock: 1000u64,
|
|
nItems: 500)
|
|
|
|
snapSyncdb3* = SnapSyncSpecs(
|
|
name: "main-snap",
|
|
network: MainNet,
|
|
snapDump: "mainnet=300000.txt.gz",
|
|
tailBlocks: "mainnet299905-332160.txt.gz",
|
|
pivotBlock: 300000u64,
|
|
nItems: 500)
|
|
|
|
snapSyncdbList* = [
|
|
snapSyncdb0, snapSyncdb1, snapSyncdb2, snapSyncdb3]
|
|
|
|
# End
|