nimbus-eth1/nimbus/db
Jordan Hrycaj 4feaa2cfab
Aristo db update for short nodes key edge cases (#1887)
* Aristo: Provide key-value list signature calculator

detail:
  Simple wrappers around `Aristo` core functionality

* Update new API for `CoreDb`

details:
+ Renamed new API functions `contains()` => `hasKey()` or `hasPath()`
  which disables the `in` operator on non-boolean 	`contains()` functions
+ The functions `get()` and `fetch()` always return a not-found error if
  there is no item, available. The new functions `getOrEmpty()` and
  `mergeOrEmpty()` return an an empty `Blob` if there is no such key
  found.

* Rewrite `core_apps.nim` using new API from `CoreDb`

* Use `Aristo` functionality for calculating Merkle signatures

details:
  For debugging, the `VerifyAristoForMerkleRootCalc` can be set so
  that `Aristo` results will be verified against the legacy versions.

* Provide general interface for Merkle signing key-value tables

details:
  Export `Aristo` wrappers

* Activate `CoreDb` tests

why:
  Now, API seems to be stable enough for general tests.

* Update `toHex()` usage

why:
  Byteutils' `toHex()` is superior to `toSeq.mapIt(it.toHex(2)).join`

* Split `aristo_transcode` => `aristo_serialise` + `aristo_blobify`

why:
+ Different modules for different purposes
+ `aristo_serialise`: RLP encoding/decoding
+ `aristo_blobify`: Aristo database encoding/decoding

* Compacted representation of small nodes' links instead of Keccak hashes

why:
  Ethereum MPTs use Keccak hashes as node links if the size of an RLP
  encoded node is at least 32 bytes. Otherwise, the RLP encoded node
  value is used as a pseudo node link (rather than a hash.) Such a node
  is nor stored on key-value database. Rather the RLP encoded node value
  is stored instead of a lode link in a parent node instead. Only for
  the root hash, the top level node is always referred to by the hash.

  This feature needed an abstraction of the `HashKey` object which is now
  either a hash or a blob of length at most 31 bytes. This leaves two
  ways of representing an empty/void `HashKey` type, either as an empty
  blob of zero length, or the hash of an empty blob.

* Update `CoreDb` interface (mainly reducing logger noise)

* Fix copyright years (to make `Lint` happy)
2023-11-08 12:18:32 +00:00
..
aristo Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
core_db Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
kvt Aristo db allow shorter than 64 nibbles path keys (#1864) 2023-10-27 22:36:51 +01:00
ledger Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
notused Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
access_list.nim implement EIP-1153: Transient storage 2023-06-23 14:04:36 +07:00
accounts_cache.nim processBeaconBlockRoot in TxPool(EIP-4788) 2023-10-19 07:50:07 +07:00
aristo.nim Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
core_db.nim Aristo db refactor tx paradim (#1674) 2023-08-07 18:45:23 +01:00
distinct_tries.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
geth_db.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
incomplete_db.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
kvstore_rocksdb.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
kvt.nim Core db aristo and kvt updates preparing for integration (#1760) 2023-09-18 21:20:28 +01:00
ledger.nim Fix default pruning for ledger and update core db and ledger logging (#1861) 2023-10-25 15:03:09 +01:00
select_backend.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
state_db.nim Fix default pruning for ledger and update core db and ledger logging (#1861) 2023-10-25 15:03:09 +01:00
storage_types.nim Refactor beacon skeleton (#1761) 2023-09-19 11:52:28 +07:00
transient_storage.nim implement EIP-1153: Transient storage 2023-06-23 14:04:36 +07:00
values_from_bytes.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00