Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ccip-2496] The explicit check of onchain sequential number validity … (
#1083) ## Motivation We had an issue where commits with the incorrect minimum interval value were continuously transmitted by the commit DON (and thus constantly reverting) in [calculateMinMaxSequenceNumbers](https://github.com/smartcontractkit/ccip/blob/8394f24cc336892ac84fd06f1c3c62f8f9d2423c/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go#L143-L155) we fetch the onchain next seq num and do a log poller query from (onchain next seq num, onchain next seq num + 256) we have a [check](https://github.com/smartcontractkit/ccip/blob/8394f24cc336892ac84fd06f1c3c62f8f9d2423c/core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go#L164-L170) that checks that the minimum sequence number retrieved from the log poller query is not equal to onchain sequence number. if this is the case the log poller query sequence number must be > onchain min sequence number cuz less than onchain sequence number is outside of the range ([query](https://github.com/smartcontractkit/ccip/blob/8394f24cc336892ac84fd06f1c3c62f8f9d2423c/core/services/ocr2/plugins/ccip/internal/ccipdata/v1_2_0/onramp.go#L147-L158)) therefore the interval that was built by a quorum must have been [min=onchain seq nr + 1, max=...] ## Solution The fix for this is an explicit check in the isMerkleRootStale func that `reportInterval.Min == nextSeqNum`
- Loading branch information