gballet / go-ethereum

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
23 stars 13 forks source link

[wip] FILL_COST take 2 #462

Open gballet opened 4 months ago

gballet commented 4 months ago

Directly bypass the StateDB layer into the disk DB, in order to find out if a value exists. This will avoid a lot of caching bugs.

The obvious problem with this approach, is that reading a slot will require hashing. One workaround for this problem would be to have a DB with (key, values). All the insertions/tree updates are moved to the prefetcher/background threads. This would mean that the tree and values are stored at different locations - and that we need to rewrite the disk access layer in geth :| Let's see how bad the performance hit is, before we go for that one.

One thing to note is that there are really two things that cause this read: