From 65eb2f4d38379bcb876f02dca0e69c9e6b7f8251 Mon Sep 17 00:00:00 2001 From: Fergal Gribben Date: Thu, 20 Jun 2024 16:05:37 +0100 Subject: [PATCH] WIP --- .../plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go | 1 + .../plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go index c5cc6d2d6eb..086bb0d1f48 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/buffer_v1.go @@ -96,6 +96,7 @@ func NewLogBuffer(lggr logger.Logger, lookback, blockRate, logLimit uint32, dequ // All logs for an upkeep on a particular block will be enqueued in a single Enqueue call. // Returns the number of logs that were added and number of logs that were dropped. func (b *logBuffer) Enqueue(uid *big.Int, logs ...logpoller.Log) (int, int) { + // TODO: lock the whole enqueue so that we don't evict good logs buf, ok := b.getUpkeepQueue(uid) if !ok || buf == nil { buf = newUpkeepLogQueue(b.lggr, uid, b.opts) diff --git a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go index 64833f9269b..ad33c0b226a 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go +++ b/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider/factory.go @@ -95,7 +95,7 @@ func (o *LogTriggersOptions) defaultBlockRate() uint32 { func (o *LogTriggersOptions) defaultLogLimit() uint32 { switch o.chainID.Int64() { case 42161, 421613, 421614: // Arbitrum - return 1 + return 1 // TODO should this be 2 case 1, 4, 5, 42, 11155111: // Eth return 20 case 10, 420, 56, 97, 137, 80001, 43113, 43114, 8453, 84531: // Optimism, BSC, Polygon, Avax, Base