chainlink
chainlink copied to clipboard
Handle reorgs in the automation log buffer
https://smartcontract-it.atlassian.net/browse/AUTO-10013
In this PR, we're:
- Restructuring the log queues so that rather than a map of upkeep ID -> log list, we store a map of upkeep ID -> blockNumber -> log list
- Passing the block subscriber to the log buffer so that the buffer can cross reference the latest block seen in an enqueue, with the latest block reported by the block subscriber
- In the event that the latest block from the subscriber and the latest block seen in an enqueue do not match, we assume a reorg has happened and evict logs for all blocks whose hashes do not match those provided in the block history provided by the block subscriber
Quality Gate passed
Issues
0 New issues
0 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code