mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-21 00:08:28 +00:00
* Fix kvt headers * Provide differential layers for KVT transaction stack why: Significant performance improvement * Provide abstraction layer for database top cache layer why: This will eventually implemented as a differential database layers or transaction layers. The latter is needed to improve performance. behavioural changes: Zero vertex and keys (i.e. delete requests) are not optimised out until the last layer is written to the database. * Provide differential layers for Aristo transaction stack why: Significant performance improvement
34 lines
1.1 KiB
Nim
34 lines
1.1 KiB
Nim
# nimbus-eth1
|
|
# Copyright (c) 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.
|
|
|
|
## Kvt DB -- structural data types
|
|
## ===============================
|
|
##
|
|
{.push raises: [].}
|
|
|
|
import
|
|
std/tables,
|
|
eth/common
|
|
|
|
type
|
|
LayerDelta* = object
|
|
## Delta tables relative to previous layer
|
|
sTab*: Table[Blob,Blob] ## Structural data table
|
|
|
|
LayerRef* = ref object
|
|
## Kvt database layer structures. Any layer holds the full
|
|
## change relative to the backend.
|
|
delta*: LayerDelta ## Structural tables held as deltas
|
|
txUid*: uint ## Transaction identifier if positive
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# End
|
|
# ------------------------------------------------------------------------------
|