ethereum / trin

An Ethereum portal client: a json-rpc server with nearly instant sync, and low CPU & storage usage
365 stars 113 forks source link

Historyc Bridge: Improve the mechanism to switch to fallback provider when EL node is out of sync #1308

Open ogenev opened 4 months ago

ogenev commented 4 months ago

Currently, in History Bridge, we are switching to a fallback provider if the request to the EL node fails.

However, there are cases where the requests don't fail but the EL node is out of sync and doesn't update the latest block number. This prevents us from pushing the latest headers into the network.

To prevent such issues, we want to switch to a fallback provider if we are unable to follow the chain and if we keep getting the same latest block from the EL node.