mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-12 21:34:33 +00:00
c47f021596
* Disable `TransactionID` related functions from `state_db.nim` why: Functions `getCommittedStorage()` and `updateOriginalRoot()` from the `state_db` module are nowhere used. The emulation of a legacy `TransactionID` type functionality is administratively expensive to provide by `Aristo` (the legacy DB version is only partially implemented, anyway). As there is no other place where `TransactionID`s are used, they will not be provided by the `Aristo` variant of the `CoreDb`. For the legacy DB API, nothing will change. * Fix copyright headers in source code * Get rid of compiler warning * Update Aristo code, remove unused `merge()` variant, export `hashify()` why: Adapt to upcoming `CoreDb` wrapper * Remove synced tx feature from `Aristo` why: + This feature allowed to synchronise transaction methods like begin, commit, and rollback for a group of descriptors. + The feature is over engineered and not needed for `CoreDb`, neither is it complete (some convergence features missing.) * Add debugging helpers to `Kvt` also: Update database iterator, add count variable yield argument similar to `Aristo`. * Provide optional destructors for `CoreDb` API why; For the upcoming Aristo wrapper, this allows to control when certain smart destruction and update can take place. The auto destructor works fine in general when the storage/cache strategy is known and acceptable when creating descriptors. * Add update option for `CoreDb` API function `hash()` why; The hash function is typically used to get the state root of the MPT. Due to lazy hashing, this might be not available on the `Aristo` DB. So the `update` function asks for re-hashing the gurrent state changes if needed. * Update API tracking log mode: `info` => `debug * Use shared `Kvt` descriptor in new Ledger API why: No need to create a new descriptor all the time
125 lines
3.3 KiB
Nim
125 lines
3.3 KiB
Nim
# Nimbus
|
|
# Copyright (c) 2022-2023 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
|
|
std/os,
|
|
./test_types
|
|
|
|
const
|
|
snapStorage0* = AccountsSample(
|
|
name: "Storage0",
|
|
file: "storage" / "storages0___0___1_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage1* = AccountsSample(
|
|
name: "Storage1",
|
|
file: "storage" / "storages1___2___9_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage2* = AccountsSample(
|
|
name: "Storage2",
|
|
file: "storage" / "storages2__10__17_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage3* = AccountsSample(
|
|
name: "Storage3",
|
|
file: "storage" / "storages3__18__25_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage4* = AccountsSample(
|
|
name: "Storage4",
|
|
file: "storage" / "storages4__26__33_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage5* = AccountsSample(
|
|
name: "Storage5",
|
|
file: "storage" / "storages5__34__41_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage6* = AccountsSample(
|
|
name: "Storage6",
|
|
file: "storage" / "storages6__42__50_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage7* = AccountsSample(
|
|
name: "Storage7",
|
|
file: "storage" / "storages7__51__59_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage8* = AccountsSample(
|
|
name: "Storage8",
|
|
file: "storage" / "storages8__60__67_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorage9* = AccountsSample(
|
|
name: "Storage9",
|
|
file: "storage" / "storages9__68__75_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageA* = AccountsSample(
|
|
name: "StorageA",
|
|
file: "storage" / "storagesA__76__83_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageB* = AccountsSample(
|
|
name: "StorageB",
|
|
file: "storage" / "storagesB__84__92_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageC* = AccountsSample(
|
|
name: "StorageC",
|
|
file: "storage" / "storagesC__93_101_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageD* = AccountsSample(
|
|
name: "StorageD",
|
|
file: "storage" / "storagesD_102_109_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageE* = AccountsSample(
|
|
name: "StorageE",
|
|
file: "storage" / "storagesE_110_118_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageF* = AccountsSample(
|
|
name: "StorageF",
|
|
file: "storage" / "storagesF_119_126_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageG* = AccountsSample(
|
|
name: "StorageG",
|
|
file: "storage" / "storagesG_127_129_dump.txt.gz",
|
|
firstItem: 0,
|
|
lastItem: high(int))
|
|
|
|
snapStorageList* = [
|
|
snapStorage0, snapStorage1, snapStorage2, snapStorage3, snapStorage4,
|
|
snapStorage5, snapStorage6, snapStorage7, snapStorage8, snapStorage9,
|
|
snapStorageA, snapStorageB, snapStorageC, snapStorageD, snapStorageE,
|
|
snapStorageF, snapStorageG]
|
|
|
|
# End
|