Geth StateDB that works ontop of ipld-eth-db, leveraging its unique indexes
Go to file
i-norden 592b30c194
Some checks failed
Run tests / Run unit tests (pull_request) Failing after 6m9s
additional StateDB and stateObject methods required for tracing
2023-11-01 14:20:25 -05:00
.github/workflows Refactor to use plugeth-statediff (#1) 2023-09-20 06:16:44 +00:00
direct_by_leaf additional StateDB and stateObject methods required for tracing 2023-11-01 14:20:25 -05:00
internal Redo trie_by_cid package to be read-write 2023-05-19 01:08:07 +08:00
sql Reorganize packages 2023-04-24 18:34:49 +08:00
test Refactor to use plugeth-statediff (#1) 2023-09-20 06:16:44 +00:00
trie_by_cid Update plugeth-statediff to v0.1.4 (#2) 2023-09-30 05:54:44 +00:00
.gitignore init commit 2023-02-22 18:57:42 -06:00
go.mod Update plugeth-statediff to v0.1.4 (#2) 2023-09-30 05:54:44 +00:00
go.sum Update plugeth-statediff to v0.1.4 (#2) 2023-09-30 05:54:44 +00:00
README.md Update README 2023-05-19 01:08:07 +08:00

ipld-eth-statedb

This contains multiple implementations of the geth vm.StateDB and supporting types for different use cases.

Package direct_by_leaf

A read-only implementation which uses the schema defined in ipld-eth-db, to allow direct querying by state and storage node leaf key, bypassing the trie-traversal access pattern normally used by the EVM. This operates at one abstraction level higher than ipfs-ethdb, and is suitable for providing fast state reads.

Package trie_by_cid

A read-write implementation which uses a Postgres IPLD v0 Blockstore as the backing ethdb.Database. Specifically this passes v1 CIDs of Keccak-256 hashes to the database in place of plain hashes, and can be used in combination with a ipfs-ethdb/postgres/v0 Database instance, or an IPLD BlockService providing a v0 Blockstore.

This implementation uses trie traversal to access state, and is capable of computing state root hashes and performing full EVM operations. It's also suitable for scenarios requiring trie traversal and access to intermediate state nodes (e.g. eth_getProof and eth_getSlice on ipld-eth-server).