Skip to content

Commit

Permalink
Align OCR structs sizes (#1075)
Browse files Browse the repository at this point in the history
## Motivation

The observation/outcome/report sizes defined for LM are pretty small
(`10K` bytes) and are not sufficient to hold multiple bridgeData (`~5k`
bytes each).

## Solution

Increase OCR structs limits to `1M` (was `10K`) bytes
  • Loading branch information
amirylm authored Jun 25, 2024
1 parent a47849b commit 795690d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-hounds-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ccip": patch
---

Increased OCR structs limits to 1M (was 10K) bytes #changed
26 changes: 13 additions & 13 deletions core/services/ocr2/plugins/liquiditymanager/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ import (

const (
PluginName = "LiquidityManager"

// OCR limits

// maxQueryLength should be 0 as no queries are performed
maxQueryLength = 0
// maxObservationLength should be 1M bytes
maxObservationLength = 1_000_000
// maxOutcomeLength should be 1M bytes
maxOutcomeLength = 1_000_000
// maxReportLength should be 1M bytes
maxReportLength = 1_000_000
// maxReportCount should be 100
maxReportCount = 100
)

type PluginFactory struct {
Expand Down Expand Up @@ -98,16 +111,3 @@ func (p PluginFactory) NewReportingPlugin(config ocr3types.ReportingPluginConfig
},
nil
}

const (
// maxQueryLength should be 0 as no queries are performed
maxQueryLength = 0
// maxObservationLength should be 10 kilobytes
maxObservationLength = 10 * 1024
// maxOutcomeLength should be 10 kilobytes
maxOutcomeLength = 10 * 1024
// maxReportLength should be 10 kilobytes
maxReportLength = 10 * 1024
// maxReportCount should be 100
maxReportCount = 100
)

0 comments on commit 795690d

Please sign in to comment.