Skip to content

Commit

Permalink
Merge branch 'develop' into TT-1381-Remove-toml-annotation-for-secret…
Browse files Browse the repository at this point in the history
…s-in-TestConfig-and-load-them-from-env-vars
  • Loading branch information
lukaszcl committed Jul 8, 2024
2 parents 3e49c12 + 858ae91 commit 4b80a04
Show file tree
Hide file tree
Showing 82 changed files with 1,651 additions and 1,536 deletions.
14 changes: 14 additions & 0 deletions .changeset/cuddly-toys-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"chainlink": patch
---

Add "VerboseLogging" option to mercury

Off by default, can be enabled like so:

```toml
[Mercury]
VerboseLogging = true
```

#updated
5 changes: 5 additions & 0 deletions .changeset/fluffy-ghosts-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Dequeue minimum guaranteed upkeeps as a priority #changed
5 changes: 5 additions & 0 deletions .changeset/tricky-seas-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Fix TestHeadTracker_CallsHeadTrackableCallbacks flaky test #internal
4 changes: 4 additions & 0 deletions core/capabilities/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ type Registry struct {
mu sync.RWMutex
}

func (r *Registry) GetLocalNode(_ context.Context) (capabilities.Node, error) {
return capabilities.Node{}, nil
}

// Get gets a capability from the registry.
func (r *Registry) Get(_ context.Context, id string) (capabilities.BaseCapability, error) {
r.mu.RLock()
Expand Down
2 changes: 1 addition & 1 deletion core/capabilities/remote/dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/mocks"
commonMocks "github.com/smartcontractkit/chainlink-common/pkg/types/core/mocks"
"github.com/smartcontractkit/chainlink/v2/core/capabilities/remote"
remotetypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/remote/types"
"github.com/smartcontractkit/chainlink/v2/core/internal/testutils"
Expand Down
2 changes: 1 addition & 1 deletion core/capabilities/remote/types/messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions core/chains/evm/headtracker/head_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ func TestHeadTracker_Start(t *testing.T) {

func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) {
t.Parallel()
g := gomega.NewWithT(t)

db := pgtest.NewSqlxDB(t)
config := testutils.NewTestChainScopedConfig(t, nil)
Expand Down Expand Up @@ -360,7 +359,7 @@ func TestHeadTracker_CallsHeadTrackableCallbacks(t *testing.T) {

headers := <-chchHeaders
headers.TrySend(&evmtypes.Head{Number: 1, Hash: utils.NewHash(), EVMChainID: ubig.New(testutils.FixtureChainID)})
g.Eventually(checker.OnNewLongestChainCount).Should(gomega.Equal(int32(1)))
tests.AssertEventually(t, func() bool { return checker.OnNewLongestChainCount() == 1 })

ht.Stop(t)
assert.Equal(t, int32(1), checker.OnNewLongestChainCount())
Expand Down
5 changes: 5 additions & 0 deletions core/config/docs/core.toml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,11 @@ env = 'test' # Example

[Mercury]

# VerboseLogging enables detailed logging of mercury/LLO operations. These logs
# can be expensive since they may serialize large structs, so they are disabled
# by default.
VerboseLogging = false # Default

# Mercury.Cache controls settings for the price retrieval cache querying a mercury server
[Mercury.Cache]
# LatestReportTTL controls how "stale" we will allow a price to be e.g. if
Expand Down
1 change: 1 addition & 0 deletions core/config/mercury_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ type Mercury interface {
Cache() MercuryCache
TLS() MercuryTLS
Transmitter() MercuryTransmitter
VerboseLogging() bool
}
10 changes: 7 additions & 3 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1324,15 +1324,19 @@ func (m *MercuryTransmitter) setFrom(f *MercuryTransmitter) {
}

type Mercury struct {
Cache MercuryCache `toml:",omitempty"`
TLS MercuryTLS `toml:",omitempty"`
Transmitter MercuryTransmitter `toml:",omitempty"`
Cache MercuryCache `toml:",omitempty"`
TLS MercuryTLS `toml:",omitempty"`
Transmitter MercuryTransmitter `toml:",omitempty"`
VerboseLogging *bool `toml:",omitempty"`
}

func (m *Mercury) setFrom(f *Mercury) {
m.Cache.setFrom(&f.Cache)
m.TLS.setFrom(&f.TLS)
m.Transmitter.setFrom(&f.Transmitter)
if v := f.VerboseLogging; v != nil {
m.VerboseLogging = v
}
}

func (m *Mercury) ValidateConfig() (err error) {
Expand Down
2 changes: 2 additions & 0 deletions core/internal/testutils/configtest/general_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ func overrides(c *chainlink.Config, s *chainlink.Secrets) {
c.JobPipeline.ReaperInterval = commonconfig.MustNewDuration(0)
c.JobPipeline.VerboseLogging = ptr(true)

c.Mercury.VerboseLogging = ptr(true)

c.P2P.V2.Enabled = ptr(false)

c.WebServer.SessionTimeout = commonconfig.MustNewDuration(2 * time.Minute)
Expand Down
65 changes: 32 additions & 33 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ require (
github.com/gkampitakis/go-snaps v0.5.4
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/jmoiron/sqlx v1.3.5
github.com/jmoiron/sqlx v1.4.0
github.com/joho/godotenv v1.4.0
github.com/jonboulle/clockwork v0.4.0
github.com/manyminds/api2go v0.0.0-20171030193247-e7b693844a6f
github.com/montanaflynn/stats v0.7.1
github.com/olekukonko/tablewriter v0.0.5
github.com/pelletier/go-toml/v2 v2.1.1
github.com/pelletier/go-toml/v2 v2.2.0
github.com/prometheus/client_golang v1.17.0
github.com/shopspring/decimal v1.3.1
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240702120320-563bf07487fe
github.com/smartcontractkit/chainlink-common v0.1.7-0.20240703234618-dc1fbe45acc0
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e
github.com/spf13/cobra v1.8.0
Expand All @@ -33,7 +33,7 @@ require (
github.com/umbracle/ethgo v0.1.3
github.com/umbracle/fastrlp v0.0.0-20220527094140-59d5dd30e722
github.com/urfave/cli v1.22.14
google.golang.org/protobuf v1.33.0
google.golang.org/protobuf v1.34.1
k8s.io/api v0.30.0
k8s.io/apimachinery v0.30.0
k8s.io/client-go v0.30.0
Expand All @@ -46,7 +46,7 @@ require (
cosmossdk.io/depinject v1.0.0-alpha.3 // indirect
cosmossdk.io/errors v1.0.0 // indirect
cosmossdk.io/math v1.0.1 // indirect
filippo.io/edwards25519 v1.0.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
Expand Down Expand Up @@ -74,7 +74,7 @@ require (
github.com/buger/jsonparser v1.1.1 // indirect
github.com/bytedance/sonic v1.10.1 // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
Expand Down Expand Up @@ -159,7 +159,7 @@ require (
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang-jwt/jwt/v5 v5.2.0 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/glog v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
Expand All @@ -177,10 +177,10 @@ require (
github.com/graph-gophers/dataloader v5.0.0+incompatible // indirect
github.com/graph-gophers/graphql-go v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect
Expand Down Expand Up @@ -272,9 +272,9 @@ require (
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.10 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240621143432-85370a54b141 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240702144807-761f63e7b527 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240702145022-37a2c3a742d1 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240703132526-6362ffb96401 // indirect
github.com/smartcontractkit/chainlink-solana v1.0.3-0.20240708130426-294b81e4afe7 // indirect
github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20240625074951-06ab5e670dba // indirect
github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20230906073235-9e478e5e19f1 // indirect
github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20230906073235-9e478e5e19f1 // indirect
Expand Down Expand Up @@ -317,35 +317,34 @@ require (
go.mongodb.org/mongo-driver v1.15.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/sdk v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.3.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/term v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
gonum.org/v1/gonum v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect
google.golang.org/grpc v1.64.0 // indirect
gopkg.in/guregu/null.v4 v4.0.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 4b80a04

Please sign in to comment.