Swaps newHead subscriptions to ETH based chains with periodic (every 30s) RPC queries for the chain's latest height.
Removes overkill flushing. Previously the flushing mechanism would partially overlap the same range of blocks multiple times, increasing our request count and monthly bill simultaneously. This PR removes the overlap entirely. If the TX isn't picked up the first time naturally, nor the second time via a flush, something else has to be wrong.
Example of previous flushing overlap on Optimism:
Optimism: 900 block lookback period
Flush started from 118,630,819 to 118,632,023
Flush started from 118,631,123 to 118,632,327
Flush started from 118,631,427 to 118,632,632
Flush started from 118,631,732 to 118,632,936
As seen, the 2nd, 3rd, and 4th flush are all overlapping blocks covered by the first flush.
Closes #78
Changes:
newHead
subscriptions to ETH based chains with periodic (every 30s) RPC queries for the chain's latest height.Example of previous flushing overlap on Optimism:
As seen, the 2nd, 3rd, and 4th flush are all overlapping blocks covered by the first flush.