Skip to content

Commit

Permalink
plugins/cmd/chainlink-example-relay: add example relay
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Jan 21, 2025
1 parent 566643d commit 852a4a6
Show file tree
Hide file tree
Showing 40 changed files with 226 additions and 459 deletions.
2 changes: 1 addition & 1 deletion core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (n ChainlinkAppFactory) NewApplication(ctx context.Context, cfg chainlink.G

mailMon := mailbox.NewMonitor(cfg.AppID().String(), appLggr.Named("Mailbox"))

loopRegistry := plugins.NewLoopRegistry(appLggr, cfg.Tracing(), cfg.Telemetry(), beholderAuthHeaders, csaPubKeyHex)
loopRegistry := plugins.NewLoopRegistry(appLggr, cfg.Database(), cfg.Tracing(), cfg.Telemetry(), beholderAuthHeaders, csaPubKeyHex)

mercuryPool := wsrpc.NewPool(appLggr, cache.Config{
LatestReportTTL: cfg.Mercury().Cache().LatestReportTTL(),
Expand Down
10 changes: 5 additions & 5 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ func (s *Shell) PrepareTestDatabase(c *cli.Context) error {

// Creating pristine DB copy to speed up FullTestDB
dbUrl := cfg.Database().URL()
db, err := sqlx.Open(string(pgcommon.Postgres), dbUrl.String())
db, err := sqlx.Open(pgcommon.DriverPostgres, dbUrl.String())
if err != nil {
return s.errorOut(err)
}
Expand Down Expand Up @@ -1098,23 +1098,23 @@ type dbConfig interface {
MaxOpenConns() int
MaxIdleConns() int
URL() url.URL
Dialect() pgcommon.DialectName
DriverName() string
}

func newConnection(ctx context.Context, cfg dbConfig) (*sqlx.DB, error) {
parsed := cfg.URL()
if parsed.String() == "" {
return nil, errDBURLMissing
}
return pg.NewConnection(ctx, parsed.String(), cfg.Dialect(), cfg)
return pg.NewConnection(ctx, parsed.String(), cfg.DriverName(), cfg)
}

func dropAndCreateDB(parsed url.URL, force bool) (err error) {
// Cannot drop the database if we are connected to it, so we must connect
// to a different one. template1 should be present on all postgres installations
dbname := parsed.Path[1:]
parsed.Path = "/template1"
db, err := sql.Open(string(pgcommon.Postgres), parsed.String())
db, err := sql.Open(pgcommon.DriverPostgres, parsed.String())
if err != nil {
return fmt.Errorf("unable to open postgres database for creating test db: %+v", err)
}
Expand Down Expand Up @@ -1213,7 +1213,7 @@ func checkSchema(dbURL url.URL, prevSchema string) error {
}

func insertFixtures(dbURL url.URL, pathToFixtures string) (err error) {
db, err := sql.Open(string(pgcommon.Postgres), dbURL.String())
db, err := sql.Open(pgcommon.DriverPostgres, dbURL.String())
if err != nil {
return fmt.Errorf("unable to open postgres database for creating test db: %+v", err)
}
Expand Down
10 changes: 5 additions & 5 deletions core/cmd/shell_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
func genTestEVMRelayers(t *testing.T, opts legacyevm.ChainRelayOpts, ks evmrelayer.CSAETHKeystore) *chainlink.CoreRelayerChainInteroperators {
f := chainlink.RelayerFactory{
Logger: opts.Logger,
LoopRegistry: plugins.NewLoopRegistry(opts.Logger, opts.AppConfig.Tracing(), opts.AppConfig.Telemetry(), nil, ""),
LoopRegistry: plugins.NewLoopRegistry(opts.Logger, opts.AppConfig.Database(), opts.AppConfig.Tracing(), opts.AppConfig.Telemetry(), nil, ""),
CapabilitiesRegistry: capabilities.NewRegistry(opts.Logger),
}

Expand Down Expand Up @@ -283,7 +283,7 @@ func TestShell_RebroadcastTransactions_Txm(t *testing.T) {
// test multiple connections to the database, and changes made within
// the transaction cannot be seen from another connection.
config, sqlxDB := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.Database.Dialect = pgcommon.Postgres
c.Database.DriverName = pgcommon.DriverPostgres
// evm config is used in this test. but if set, it must be pass config validation.
// simplest to make it nil
c.EVM = nil
Expand Down Expand Up @@ -363,7 +363,7 @@ func TestShell_RebroadcastTransactions_OutsideRange_Txm(t *testing.T) {
// test multiple connections to the database, and changes made within
// the transaction cannot be seen from another connection.
config, sqlxDB := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.Database.Dialect = pgcommon.Postgres
c.Database.DriverName = pgcommon.DriverPostgres
// evm config is used in this test. but if set, it must be pass config validation.
// simplest to make it nil
c.EVM = nil
Expand Down Expand Up @@ -441,7 +441,7 @@ func TestShell_RebroadcastTransactions_AddressCheck(t *testing.T) {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
config, sqlxDB := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) {
c.Database.Dialect = pgcommon.Postgres
c.Database.DriverName = pgcommon.DriverPostgres

c.EVM = nil
// seems to be needed for config validate
Expand Down Expand Up @@ -499,7 +499,7 @@ func TestShell_RebroadcastTransactions_AddressCheck(t *testing.T) {
func TestShell_CleanupChainTables(t *testing.T) {
// Just check if it doesn't error, command itself shouldn't be changed unless major schema changes were made.
// It would be really hard to write a test that accounts for schema changes, so this should be enough to alarm us that something broke.
config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Database.Dialect = pgcommon.Postgres })
config, _ := heavyweight.FullTestDBV2(t, func(c *chainlink.Config, s *chainlink.Secrets) { c.Database.DriverName = pgcommon.DriverPostgres })
client := cmd.Shell{
Config: config,
Logger: logger.TestLogger(t),
Expand Down
4 changes: 2 additions & 2 deletions core/cmd/shell_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func TestNewUserCache(t *testing.T) {

func TestSetupSolanaRelayer(t *testing.T) {
lggr := logger.TestLogger(t)
reg := plugins.NewLoopRegistry(lggr, nil, nil, nil, "")
reg := plugins.NewTestLoopRegistry(lggr)
ks := mocks.NewSolana(t)
ds := sqltest.NewNoOpDataSource()

Expand Down Expand Up @@ -483,7 +483,7 @@ func TestSetupSolanaRelayer(t *testing.T) {

func TestSetupStarkNetRelayer(t *testing.T) {
lggr := logger.TestLogger(t)
reg := plugins.NewLoopRegistry(lggr, nil, nil, nil, "")
reg := plugins.NewTestLoopRegistry(lggr)
ks := mocks.NewStarkNet(t)
// config 3 chains but only enable 2 => should only be 2 relayer
nEnabledChains := 2
Expand Down
4 changes: 1 addition & 3 deletions core/config/database_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package config
import (
"net/url"
"time"

pgcommon "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"
)

type Backup interface {
Expand Down Expand Up @@ -35,7 +33,7 @@ type Database interface {
DefaultIdleInTxSessionTimeout() time.Duration
DefaultLockTimeout() time.Duration
DefaultQueryTimeout() time.Duration
Dialect() pgcommon.DialectName
DriverName() string
LogSQL() bool
MaxIdleConns() int
MaxOpenConns() int
Expand Down
2 changes: 1 addition & 1 deletion core/config/docs/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func init() {

func CoreDefaults() (c toml.Core) {
c.SetFrom(&defaults)
c.Database.Dialect = pgcommon.Postgres // not user visible - overridden for tests only
c.Database.DriverName = pgcommon.DriverPostgres // not user visible - overridden for tests only
c.Tracing.Attributes = make(map[string]string)
return
}
4 changes: 1 addition & 3 deletions core/config/toml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
ocrcommontypes "github.com/smartcontractkit/libocr/commontypes"

commonconfig "github.com/smartcontractkit/chainlink-common/pkg/config"
pgcommon "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"

"github.com/smartcontractkit/chainlink/v2/core/build"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/types"
"github.com/smartcontractkit/chainlink/v2/core/config"
Expand Down Expand Up @@ -338,7 +336,7 @@ type Database struct {
DefaultIdleInTxSessionTimeout *commonconfig.Duration
DefaultLockTimeout *commonconfig.Duration
DefaultQueryTimeout *commonconfig.Duration
Dialect pgcommon.DialectName `toml:"-"`
DriverName string `toml:"-"`
LogQueries *bool
MaxIdleConns *int64
MaxOpenConns *int64
Expand Down
6 changes: 3 additions & 3 deletions core/internal/cltest/cltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn
}

url := cfg.Database().URL()
db, err := pg.NewConnection(ctx, url.String(), cfg.Database().Dialect(), cfg.Database())
db, err := pg.NewConnection(ctx, url.String(), cfg.Database().DriverName(), cfg.Database())
require.NoError(t, err)
t.Cleanup(func() { assert.NoError(t, db.Close()) })

Expand Down Expand Up @@ -396,7 +396,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn
keyStore := keystore.NewInMemory(ds, utils.FastScryptParams, lggr)

mailMon := mailbox.NewMonitor(cfg.AppID().String(), lggr.Named("Mailbox"))
loopRegistry := plugins.NewLoopRegistry(lggr, nil, nil, nil, "")
loopRegistry := plugins.NewTestLoopRegistry(lggr)

mercuryPool := wsrpc.NewPool(lggr, cache.Config{
LatestReportTTL: cfg.Mercury().Cache().LatestReportTTL(),
Expand Down Expand Up @@ -498,7 +498,7 @@ func NewApplicationWithConfig(t testing.TB, cfg chainlink.GeneralConfig, flagsAn
RestrictedHTTPClient: c,
UnrestrictedHTTPClient: c,
SecretGenerator: MockSecretGenerator{},
LoopRegistry: plugins.NewLoopRegistry(lggr, nil, nil, nil, ""),
LoopRegistry: plugins.NewTestLoopRegistry(lggr),
MercuryPool: mercuryPool,
CapabilitiesRegistry: capabilitiesRegistry,
CapabilitiesDispatcher: dispatcher,
Expand Down
2 changes: 1 addition & 1 deletion core/internal/testutils/configtest/general_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func overrides(c *chainlink.Config, s *chainlink.Secrets) {
c.InsecureFastScrypt = ptr(true)
c.ShutdownGracePeriod = commonconfig.MustNewDuration(testutils.DefaultWaitTimeout)

c.Database.Dialect = pgcommon.TransactionWrappedPostgres
c.Database.DriverName = pgcommon.DriverTxWrappedPostgres
c.Database.Lock.Enabled = ptr(false)
c.Database.MaxIdleConns = ptr[int64](20)
c.Database.MaxOpenConns = ptr[int64](20)
Expand Down
4 changes: 2 additions & 2 deletions core/internal/testutils/pgtest/pgtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require"

"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil/sqltest"
"github.com/smartcontractkit/chainlink-common/pkg/utils"

"github.com/smartcontractkit/chainlink/v2/core/config/env"
Expand All @@ -21,7 +21,7 @@ func NewSqlxDB(t testing.TB) *sqlx.DB {
t.Errorf("you must provide a CL_DATABASE_URL environment variable")
return nil
}
return pg.NewTestDB(t, dbURL)
return sqltest.NewDB(t, dbURL)
}

func MustExec(t *testing.T, ds sqlutil.DataSource, stmt string, args ...interface{}) {
Expand Down
9 changes: 7 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ require (
github.com/prometheus/client_golang v1.20.5
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chainlink-automation v0.8.1
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250116214855-f49c5c27db51
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250120234027-b107f5b7f03d

Check failure on line 37 in core/scripts/go.mod

View workflow job for this annotation

GitHub Actions / Validate go.mod dependencies

[./core/scripts/go.mod] dependency github.com/smartcontractkit/[email protected] not on default branch (main). Version(commit): b107f5b7f03d Tree: https://github.com/smartcontractkit/chainlink-common/tree/b107f5b7f03d Commit: https://github.com/smartcontractkit/chainlink-common/commit/b107f5b7f03d
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250115135646-ac859d85e7e3
github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.13
github.com/smartcontractkit/libocr v0.0.0-20241223215956-e5b78d8e3919
Expand Down Expand Up @@ -72,8 +72,9 @@ require (
github.com/NethermindEth/juno v0.3.1 // indirect
github.com/NethermindEth/starknet.go v0.7.1-0.20240401080518-34a506f3cfdb // indirect
github.com/VictoriaMetrics/fastcache v1.12.2 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/XSAM/otelsql v0.29.0 // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/apache/arrow-go/v18 v18.0.0 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/atombender/go-jsonschema v0.16.1-0.20240916205339-a74cd4e2851c // indirect
github.com/avast/retry-go/v4 v4.6.0 // indirect
Expand Down Expand Up @@ -188,6 +189,7 @@ require (
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-tpm v0.9.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
Expand Down Expand Up @@ -258,6 +260,7 @@ require (
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/marcboeker/go-duckdb v1.8.3 // indirect
github.com/maruel/natural v1.1.1 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
Expand Down Expand Up @@ -286,6 +289,7 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/pressly/goose/v3 v3.21.1 // indirect
Expand Down Expand Up @@ -355,6 +359,7 @@ require (
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.dedis.ch/fixbuf v1.0.3 // indirect
Expand Down
18 changes: 14 additions & 4 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjC
github.com/VictoriaMetrics/fastcache v1.12.2/go.mod h1:AmC+Nzz1+3G2eCPapF6UcsnkThDcMsQicp4xDukwJYI=
github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/XSAM/otelsql v0.27.0 h1:i9xtxtdcqXV768a5C6SoT/RkG+ue3JTOgkYInzlTOqs=
github.com/XSAM/otelsql v0.27.0/go.mod h1:0mFB3TvLa7NCuhm/2nU7/b2wEtsczkj8Rey8ygO7V+A=
github.com/XSAM/otelsql v0.29.0 h1:pEw9YXXs8ZrGRYfDc0cmArIz9lci5b42gmP5+tA1Huc=
github.com/XSAM/otelsql v0.29.0/go.mod h1:d3/0xGIGC5RVEE+Ld7KotwaLy6zDeaF3fLJHOPpdN2w=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand All @@ -136,6 +136,8 @@ github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOL
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/arrow-go/v18 v18.0.0 h1:1dBDaSbH3LtulTyOVYaBCHO3yVRwjV+TZaqn3g6V7ZM=
github.com/apache/arrow-go/v18 v18.0.0/go.mod h1:t6+cWRSmKgdQ6HsxisQjok+jBpKGhRDiqcf3p0p/F+A=
github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE=
github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw=
github.com/appleboy/gofight/v2 v2.1.2 h1:VOy3jow4vIK8BRQJoC/I9muxyYlJ2yb9ht2hZoS3rf4=
github.com/appleboy/gofight/v2 v2.1.2/go.mod h1:frW+U1QZEdDgixycTj4CygQ48yLTUhplt43+Wczp3rw=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
Expand Down Expand Up @@ -843,6 +845,8 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK4=
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
Expand Down Expand Up @@ -931,6 +935,10 @@ github.com/miekg/dns v1.1.61/go.mod h1:mnAarhS3nWaW+NVP2wTkYVIZyHNJ098SJZUki3eyk
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94=
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g=
github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
Expand Down Expand Up @@ -1164,8 +1172,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250120130359-cc025272bbff h1
github.com/smartcontractkit/chainlink-ccip v0.0.0-20250120130359-cc025272bbff/go.mod h1:JJZMCB75aVSAiPNW032F9WUKTlLztTd8bbQB5MEaZa4=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250103152858-8973fd0c912b h1:UBXi9Yj8YSMHDDaxQLu273x1fWjyEL9xP58nuJsqZfg=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250103152858-8973fd0c912b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60=
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250116214855-f49c5c27db51 h1:YdjQiEu5uHWM1ApwdV+nLyJmu1+tt3IeiwPKNGoXwBI=
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250116214855-f49c5c27db51/go.mod h1:yti7e1+G9hhkYhj+L5sVUULn9Bn3bBL5/AxaNqdJ5YQ=
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250120234027-b107f5b7f03d h1:GVLCIxZDTwrxYoKq4NBZ8pMKlKtY1q/N9s15Qu4Kuio=
github.com/smartcontractkit/chainlink-common v0.4.2-0.20250120234027-b107f5b7f03d/go.mod h1:V3BHfvLnQNBUoZ4bGjD29ZPhyzPE++DkYkhvPb9tcRs=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e h1:PRoeby6ZlTuTkv2f+7tVU4+zboTfRzI+beECynF4JQ0=
github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241202195413-82468150ac1e/go.mod h1:mUh5/woemsVaHgTorA080hrYmO3syBCmPdnWc/5dOqk=
github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250115135646-ac859d85e7e3 h1:GcPYNVFYjB065CNq0h8nK/VeU08nUkHgBX0cJIEpuHY=
Expand Down Expand Up @@ -1327,6 +1335,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0=
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
Expand Down
2 changes: 1 addition & 1 deletion core/services/chainlink/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func NewApplication(opts ApplicationOpts) (Application, error) {
if err != nil {
return nil, fmt.Errorf("could not build Beholder auth: %w", err)
}
loopRegistry = plugins.NewLoopRegistry(globalLogger, opts.Config.Tracing(), opts.Config.Telemetry(), beholderAuthHeaders, csaPubKeyHex)
loopRegistry = plugins.NewLoopRegistry(globalLogger, opts.Config.Database(), opts.Config.Tracing(), opts.Config.Telemetry(), beholderAuthHeaders, csaPubKeyHex)
}

// If the audit logger is enabled
Expand Down
6 changes: 2 additions & 4 deletions core/services/chainlink/config_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"net/url"
"time"

pgcommon "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/pg"

"github.com/smartcontractkit/chainlink/v2/core/config"
"github.com/smartcontractkit/chainlink/v2/core/config/toml"
)
Expand Down Expand Up @@ -113,8 +111,8 @@ func (d *databaseConfig) URL() url.URL {
return *d.s.URL.URL()
}

func (d *databaseConfig) Dialect() pgcommon.DialectName {
return d.c.Dialect
func (d *databaseConfig) DriverName() string {
return d.c.DriverName
}

func (d *databaseConfig) MigrateDatabase() bool {
Expand Down
Loading

0 comments on commit 852a4a6

Please sign in to comment.