Geth StateDB that works ontop of ipld-eth-db, leveraging its unique indexes
Go to file
Ian Norden 9f53f99fc6
Merge pull request #10 from cerc-io/ian/v5_dev
add `SetStorage` methods to StateDB and StateObject
2023-03-13 11:08:29 -05:00
internal add unit tests 2023-03-05 16:45:18 +08:00
.gitignore init commit 2023-02-22 18:57:42 -06:00
access_list.go port over required internal geth packages 2023-02-23 16:10:34 -06:00
config.go fix pgx dep; go.mod 2023-03-01 14:06:40 -06:00
database.go update to use get_storage_at functions 2023-03-07 20:41:53 -06:00
go.mod add unit tests 2023-03-05 16:45:18 +08:00
go.sum add unit tests 2023-03-05 16:45:18 +08:00
journal.go remove snapshot usage and unused internal methods; note this is different than the journaling used to simulate state transitions 2023-02-28 12:08:06 -06:00
README.md update readme 2023-03-01 22:36:17 -06:00
sql.go update to use get_storage_at functions 2023-03-07 20:41:53 -06:00
state_object.go add SetStorage methods to StateDB and StateObject 2023-03-13 10:41:45 -05:00
statedb_test.go review fixes 2023-03-09 09:03:47 -06:00
statedb.go add SetStorage methods to StateDB and StateObject 2023-03-13 10:41:45 -05:00

ipld-eth-statedb

Implementation of the geth vm.StateDB on top of ipld-eth-db, to allow us to plug into existing EVM functionality. Analogous to ipfs-ethdb but at one database abstraction level higher. This allows us to bypass the trie-traversal access pattern normally used by the EVM (and which ipfs-ethdb allows us to replicate ontop of our Postgres IPLD blockstore in the "public.blocks" table) and access state and storage directly in the "state_cids" and "storage_cids" tables.

Note: "IPFS" is chosen in the name of "ipfs-ethdb" as it can function through an IPFS BlockService abstraction or directly ontop of an IPLD blockstore, whereas this repository is very tightly coupled to the schema in ipld-eth-db.