nimbus-eth1/nimbus/db/ledger
web3-developer 54644fa3cb
Witness Generation Bug Fixes (#1981)
* Return slots when verifying witness regardless of code length.

* Prevent AccountCache WitnessData codeTouched from being reset.

* Default to using {wfNoFlag} for witness flags in tests to allow running with data from before EIP170.

* Add additional json files to experimental JSON RPC test.

* Use HTTP RPC server in tests.

* Add test to check that block witness contains bytecode.
2024-01-25 01:18:45 +08:00
..
backend Optional accounts cache module for creating genesis (#1897) 2023-11-20 11:51:43 +00:00
base Core db update storage root management for sub tries (#1964) 2024-01-11 19:11:38 +00:00
.gitignore Add check copyright year linter to CI 2023-11-01 10:41:20 +07:00
README.md Ledger abstraction for accounts cache (#1824) 2023-10-18 20:27:22 +01:00
accounts_cache.nim Witness Generation Bug Fixes (#1981) 2024-01-25 01:18:45 +08:00
accounts_ledger.nim Witness Generation Bug Fixes (#1981) 2024-01-25 01:18:45 +08:00
base.nim Core db aristo hasher profiling and timing improvement (#1938) 2023-12-12 17:47:41 +00:00
base_iterators.nim Core db aristo hasher profiling and timing improvement (#1938) 2023-12-12 17:47:41 +00:00
distinct_ledgers.nim Core db update storage root management for sub tries (#1964) 2024-01-11 19:11:38 +00:00

README.md

The file accounts_cache.nim has been relocated

Background

The new LedgerRef module unifies different implementations of the accounts_cache. It is intended to be used as new base method for all of the AccountsCache implementations. Only constructors differ, depending on the implementation.

This was needed to accomodate for different CoreDb API paradigms. While the overloaded legacy AccountsCache implementation is just a closure based wrapper around the accounts_cache module, the overloaded AccountsLedgerRef is a closure based wrapper around the accounts_ledger module with the new CoreDb API returning Result[] values and saparating the meaning of trie root hash and trie root reference.

This allows to use the legacy hexary database (with the new CoreDb API) as well as the Aristo database (only supported on new API.)

Instructions

Legacy notation LedgerRef replacement Comment
import accounts_cache import ledger preferred method,
AccountsCache.init(..) AccountsCache.init(..) wraps AccountsCache
methods
or
import ledger/accounts_cache stay with legacy
AccountsCache.init(..) version of
AccountsCache
--
fn(ac: AccountsCache) fn(ac: LedgerRef) function example for
preferred wrapper
or method
fn(ac: AccountsCache) with legacy version,
no change here

The constructor decides which CoreDb API is to be used

Legacy API constructor new API Constructor
import ledger import ledger
let w = AccountsCache.init(..) let w = AccountsLedgerRef.init(..)