Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New log buffer #12357

Merged
merged 63 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
0489ccf
block window utilities
amirylm Mar 7, 2024
fe14f84
new buffer (wip)
amirylm Mar 8, 2024
994a688
integrate log buffer in the provider (wip)
amirylm Mar 8, 2024
c976a89
review fixes:
amirylm Mar 11, 2024
255a53c
test fix
amirylm Mar 11, 2024
b70c09e
clear unused function
amirylm Mar 11, 2024
c6a1ff1
provider integration tests for multiple versions of the buffer
amirylm Mar 11, 2024
856c7d6
rename to v1
amirylm Mar 12, 2024
6e10f71
fix v1 and add logs
amirylm Mar 12, 2024
1e6b852
temp enablement of v1 buffer
amirylm Mar 12, 2024
e8d2266
added unit tests
amirylm Mar 13, 2024
5163a62
fix slice alloc
amirylm Mar 13, 2024
476e3e9
avoid alloc with cap
amirylm Mar 13, 2024
418db92
tweak limit values
amirylm Mar 13, 2024
39f9766
config and handle remaining
amirylm Mar 14, 2024
7dfb7b9
trying different config
amirylm Mar 14, 2024
cd92d92
fix comparator and block window
amirylm Mar 19, 2024
55dd036
fix redundant import
amirylm Mar 19, 2024
1f578db
sort once instead of maintaining sorted sliced
amirylm Mar 19, 2024
867336c
align config
amirylm Mar 19, 2024
f530690
fix tests and set config
amirylm Mar 20, 2024
f72baf0
fixes & logs
amirylm Mar 20, 2024
6791ac7
custom cla with optmized hook
amirylm Mar 20, 2024
61c0109
lint
amirylm Mar 20, 2024
875efb1
use defer in tests
amirylm Mar 21, 2024
02db52d
update cla version
amirylm Mar 22, 2024
4f3bf3e
Go mod tidy
ferglor Mar 22, 2024
7c600dc
alignments
amirylm Mar 26, 2024
1b40e20
tests
amirylm Mar 26, 2024
60e86aa
small fixes in int test
amirylm Mar 26, 2024
0f41991
handle large number of upkeeps (up to max_results)
amirylm Apr 1, 2024
8888752
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
amirylm Apr 1, 2024
e3c58e5
update cla version
amirylm Apr 1, 2024
cc013c7
tests
amirylm Apr 1, 2024
765dedd
fix logs ordering function to treat tx hash if log index is equal
amirylm Apr 1, 2024
8464e3c
Feature flag for new log buffer (#12653)
amirylm Apr 1, 2024
d3a9b59
changesets
amirylm Apr 1, 2024
a902786
Revert "update cla version"
amirylm Apr 1, 2024
1d016a8
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
amirylm Apr 1, 2024
8946762
align buffer config
amirylm Apr 1, 2024
822ded9
align buffer metrics
amirylm Apr 1, 2024
367b5e3
update cla version (temp)
amirylm Apr 1, 2024
e702562
lint
amirylm Apr 1, 2024
7b097e5
set feature flag in load test (temp)
amirylm Apr 2, 2024
09e530d
update cla version
amirylm Apr 2, 2024
8f8d960
types alignment
amirylm Apr 2, 2024
3517e90
Merge branch 'develop' of github.com:smartcontractkit/chainlink into …
amirylm Apr 3, 2024
180ac44
Revert "set feature flag in load test (temp)"
amirylm Apr 3, 2024
28ccabe
comment
amirylm Apr 3, 2024
9fd4f6d
remove wrong assertion
amirylm Apr 3, 2024
fee42b4
alignments:
amirylm Apr 3, 2024
7627eba
lint
amirylm Apr 3, 2024
6922352
review
amirylm Apr 3, 2024
cda0a3f
review:
amirylm Apr 3, 2024
f534b42
normalize compare result
amirylm Apr 3, 2024
ee80dca
linked TODOs
amirylm Apr 4, 2024
7a0aca5
review fix
amirylm Apr 5, 2024
b0233af
lock while SetConfig
amirylm Apr 5, 2024
ca26992
Merge branch 'develop' into AUTO-8231-new-log-buffer
amirylm Apr 5, 2024
f014da6
remove redundant defaulting
amirylm Apr 7, 2024
0362bce
Merge branch 'develop' into AUTO-8231-new-log-buffer
amirylm Apr 7, 2024
3e3bfb0
align trigger states + comments
amirylm Apr 8, 2024
49f1c8a
fix func name
amirylm Apr 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/pretty-experts-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"chainlink": patch
---

Added log buffer v1 with improved performance, stability and control over scaling parameters.

Added a feature flag for using log buffer v1.
9 changes: 9 additions & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import (
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/autotelemetry21"
ocr2keeper21core "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/core"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2keeper/evmregistry/v21/logprovider"
ocr2vrfconfig "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/config"
ocr2coordinator "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/coordinator"
"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ocr2vrf/juelsfeecoin"
Expand Down Expand Up @@ -1313,6 +1314,14 @@ func (d *Delegate) newServicesOCR2Keepers21(
return nil, errors.New("could not coerce PluginProvider to AutomationProvider")
}

// TODO: (AUTO-9355) remove once we remove v0
if useBufferV1 := cfg.UseBufferV1 != nil && *cfg.UseBufferV1; useBufferV1 {
logProviderFeatures, ok := keeperProvider.LogEventProvider().(logprovider.LogEventProviderFeatures)
if ok {
logProviderFeatures.WithBufferVersion("v1")
}
}

services, err := ocr2keeper.EVMDependencies21(kb)
if err != nil {
return nil, errors.Wrap(err, "could not build dependencies for ocr2 keepers")
Expand Down
3 changes: 3 additions & 0 deletions core/services/ocr2/plugins/ocr2keeper/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ type PluginConfig struct {
ContractVersion string `json:"contractVersion"`
// CaptureAutomationCustomTelemetry is a bool flag to toggle Custom Telemetry Service
CaptureAutomationCustomTelemetry *bool `json:"captureAutomationCustomTelemetry,omitempty"`
// UseBufferV1 is a bool flag to toggle the new log buffer implementation
// TODO: (AUTO-9355) remove once we have a single version
UseBufferV1 *bool `json:"useBufferV1,omitempty"`
}

func ValidatePluginConfig(cfg PluginConfig) error {
Expand Down
Loading
Loading