nimbus-eth1/nimbus
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
..
beacon Engine API: Fix latestValidHash value when invalid timestamp detected 2023-11-05 10:52:27 +07:00
common Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
core Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
db Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
evm Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
graphql Fix TxPool when handling EIP-4844 blob tx (#1831) 2023-10-20 15:30:05 +07:00
rpc Add blobGasPrice and blobGasUsed to ReceiptObject of RPC 2023-11-02 11:38:07 +07:00
sync Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
transaction More meaningful error message of processBlockBeaconRoot 2023-10-31 12:54:57 +07:00
utils Aristo db update for short nodes key edge cases (#1887) 2023-11-08 12:18:32 +00:00
common.nim implement better hardfork management 2022-12-02 13:51:42 +07:00
config.nim Fix --static-peers-file description 2023-10-31 17:53:06 +07:00
constants.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
errors.nim Core db update providing additional results code interface (#1776) 2023-09-26 10:21:13 +01:00
launcher.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
lightchain_shell.nim Some renames 2018-05-28 13:22:28 +03:00
makefile Snap sync fix trie interpolation fringe condition (#1457) 2023-02-01 18:56:06 +00:00
nim.cfg
nimbus.nim Increase rpc server request limit to 2MB 2023-10-22 10:25:33 +07:00
rpc.nim Increase rpc server request limit to 2MB 2023-10-22 10:25:33 +07:00
stateless_runner.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
tracer.nim Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
transaction.nim TxPool will not pack tx with invalid chainId 2023-11-01 08:56:57 +07:00
version.nim dist: precompiled binaries and Docker images (#1015) 2022-03-27 13:21:15 +02:00
vm_compile_info.nim Prepare snap server client test scenario (#1483) 2023-03-02 09:57:58 +00:00
vm_computation.nim EVM cleanup 2023-08-29 07:12:31 +07:00
vm_gas_costs.nim implement better hardfork management 2022-12-02 13:51:42 +07:00
vm_internals.nim EVM cleanup 2023-08-29 07:12:31 +07:00
vm_precompiles.nim implement better hardfork management 2022-12-02 13:51:42 +07:00
vm_state.nim EIP-4844: Fix excessBlobGas handling (#1771) 2023-09-24 22:25:41 +07:00
vm_state_transactions.nim EIP-4788: Make it clear what is an EVM system call 2023-09-22 17:21:09 +07:00
vm_types.nim Implement EIP-7516: BLOBBASEFEE opcode (#1791) 2023-10-01 14:24:15 +07:00