streamingfast / go-ethereum

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

do not advertise firehose finalized block when syncing behind beacon finalized block #2

Closed sduchesneau closed 2 years ago

sduchesneau commented 2 years ago

When local DB is synced up to block 1000 but beacon chain sends us a request to set our head block to 20,000 with a last FinalizedBlock hash that is not yet in our local DB, the firehose plugin will output the previously found FinalizedBlock until we actually get to that block 20,000. When reprocessing a chain to produce firehose blocks, this is an issue, the FinalizedBlockNum (LIB, from LastIrreversibleBlock ...) must progress ! By NOT outputing any FinalizedBlock in the firehose output, we allow the Reader component of the firehose to take other business decision (ex: LIBnum = blockNum - 200)

sduchesneau commented 2 years ago

This should address https://github.com/streamingfast/go-ethereum/issues/1