Skip to content

Commit

Permalink
Log the reported commitStore sequence number (#975)
Browse files Browse the repository at this point in the history
When a report is not stale log the reported sequence number.
This can help us debug cases where stale reports are actually
transmitted.
  • Loading branch information
dimkouv authored and matYang committed Jun 6, 2024
1 parent 11ae30d commit e888761
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/pretty-clocks-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ccip": patch
---

#added a new info log for inspecting onchain commit store seq num
2 changes: 1 addition & 1 deletion core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/pkg/errors"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/libocr/offchainreporting2plus/types"
Expand Down Expand Up @@ -706,6 +705,7 @@ func (r *CommitReportingPlugin) isStaleMerkleRoot(ctx context.Context, lggr logg
lggr.Infow("Report is stale because of root", "onchain min", nextSeqNum, "report min", reportInterval.Min)
return true
}
lggr.Infow("Report root is not stale", "onchain min", nextSeqNum, "report min", reportInterval.Min)

// If a report has root and valid sequence number, the report should be submitted, regardless of price staleness
return false
Expand Down

0 comments on commit e888761

Please sign in to comment.