jacobkaufmann / evangelion

a prototype ethereum block builder
Apache License 2.0
83 stars 10 forks source link

cache ethereum state in build job #13

Open jacobkaufmann opened 1 year ago

jacobkaufmann commented 1 year ago

currently each payload build task retrieves the state for the given parent block hash (below).

https://github.com/jacobkaufmann/dark-builder/blob/170b23d9ead00eeaa24113affac0ca681014254a/src/builder.rs#L164

we should cache this state when the job is constructed instead.

state_by_block_hash returns a StateProviderBox which is not the most straightforward to work with.

jacobkaufmann commented 1 year ago

another benefit here is that the job will not require a StateProviderFactory, which will make the job easier to test

chirag-bgh commented 1 year ago

Hey @jacobkaufmann, I'm interested to work on this.

jacobkaufmann commented 1 year ago

let's wait until this is merged

chirag-bgh commented 1 year ago

let's wait until this is merged

Sure.