onflow / flow-evm-gateway

FlowEVM Gateway implements an Ethereum-equivalent JSON-RPC API for EVM clients to use
https://developers.flow.com/evm/about
Apache License 2.0
11 stars 9 forks source link

Implement circuit-breaker for querying state #587

Open sideninja opened 5 days ago

sideninja commented 5 days ago

We shouldn't panic if the state mismatch occurs on a mainnet deployment, instead we should have a circuit-breaker pattern implemented which upon state mismatch would switch from the queries made on a local state to the queries made on a remote state. This can be done in the client handler deciding where it would execute the query.

At the same time the mismatch should be reported and an alarm should be triggered so we can debug the issue and fix it asap. After we can update and reset the circuit-breaker, this would achieve no downtime and faster path to mainnet.