Skip to content

Commit

Permalink
Removing checks from Query because of the latency requirements for th…
Browse files Browse the repository at this point in the history
…at OCR phase (#595)

`Query` has not been used so far, so its timeout is set to very low
values - usually 100 millis. That makes querying blockchain not doable
in that OCR2 phase
  • Loading branch information
mateusz-sekara authored Mar 8, 2024
1 parent 342281e commit 34f74d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions core/services/ocr2/plugins/ccip/ccipcommit/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ type CommitReportingPlugin struct {
}

// Query is not used by the CCIP Commit plugin.
func (r *CommitReportingPlugin) Query(ctx context.Context, _ types.ReportTimestamp) (types.Query, error) {
if healthy, err := r.chainHealthcheck.IsHealthy(ctx, false); err != nil {
return nil, err
} else if !healthy {
return nil, ccip.ErrChainIsNotHealthy
}
func (r *CommitReportingPlugin) Query(context.Context, types.ReportTimestamp) (types.Query, error) {
return types.Query{}, nil
}

Expand Down
7 changes: 1 addition & 6 deletions core/services/ocr2/plugins/ccip/ccipexec/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,7 @@ type ExecutionReportingPlugin struct {
chainHealthcheck cache.ChainHealthcheck
}

func (r *ExecutionReportingPlugin) Query(ctx context.Context, _ types.ReportTimestamp) (types.Query, error) {
if healthy, err := r.chainHealthcheck.IsHealthy(ctx, false); err != nil {
return nil, err
} else if !healthy {
return nil, ccip.ErrChainIsNotHealthy
}
func (r *ExecutionReportingPlugin) Query(context.Context, types.ReportTimestamp) (types.Query, error) {
return types.Query{}, nil
}

Expand Down

0 comments on commit 34f74d3

Please sign in to comment.