0xPolygonZero / erigon

Ethereum implementation on the efficiency frontier
GNU Lesser General Public License v3.0
0 stars 4 forks source link

Process witnesses on the go while syncing #8

Closed Nashtare closed 3 months ago

Nashtare commented 4 months ago

Jerigon witness processing for blocks not so close from the tip takes a prohibitive amount of time. Ideally, we'd like it to process and store witnesses on the fly while syncing, so that it can load and pass them directly upon request instead of having to rollback and reprocess a past block.

cc @cffls, I believe we had discussed this on slack a long time ago? This is not a high-priority item, but would definitely be coming in handy, especially when benchmarking against a set of old blocks from which we may not have witnesses anymore for instance, or when picking up a very specific block from mainnet with the characteristics we want.

cffls commented 4 months ago

Yes we have this feature WIP here: https://github.com/0xPolygonZero/erigon/pull/2 @manav2401 was testing a few things. The main issue was that when using an erigon db that doesn't have a witness stage the node will panic. @manav2401 let's revisit the PR and see if we can fix pending issues.

Nashtare commented 3 months ago

Done in #2.