diff --git a/CONFIG.md b/CONFIG.md new file mode 100644 index 00000000..68ddaa2f --- /dev/null +++ b/CONFIG.md @@ -0,0 +1,272 @@ +[//]: # (Documentation generated from docs.toml - DO NOT EDIT.) + +This document describes the TOML format for configuration. +## Example + +```toml +ChainID = "4" + +[[Aptos.Nodes]] +Name = 'primary' +URL = "http://chainlink-aptos.devnet:8080/v1" +``` + +## Global +```toml +Enabled = true # Default +ChainID = 'TODO' # Example +NetworkName = 'TODO' # Example +NetworkNameFull = 'TODO' # Example +``` + + +### Enabled +```toml +Enabled = true # Default +``` +Enabled TODO + +### ChainID +```toml +ChainID = 'TODO' # Example +``` +ChainID TODO + +### NetworkName +```toml +NetworkName = 'TODO' # Example +``` +NetworkName TODO + +### NetworkNameFull +```toml +NetworkNameFull = 'TODO' # Example +``` +NetworkNameFull TODO + +## TransactionManager +```toml +[TransactionManager] +BroadcastChanSize = 100 # Default +ConfirmPoll = '2s' # Default +ConfirmPollSecs = 1 # Example +DefaultMaxGasAmount = 200000 # Default +MaxSimulateAttempts = 5 # Default +MaxSubmitRetryAttempts = 10 # Default +SubmitDelayDuration = '3s' # Default +TxExpiration = '10s' # Default +TxExpirationSecs = 360 # Example +MaxTxRetryAttempts = 5 # Default +PruneInterval = '4h' # Default +PruneIntervalSecs = 1 # Example +PruneTxExpiration = '2h' # Default +PruneTxExpirationSecs = 42 # Example +``` + + +### BroadcastChanSize +```toml +BroadcastChanSize = 100 # Default +``` +BroadcastChanSize TODO + +### ConfirmPoll +```toml +ConfirmPoll = '2s' # Default +``` +ConfirmPoll TODO + +### ConfirmPollSecs +```toml +ConfirmPollSecs = 1 # Example +``` +ConfirmPollSecs is deprecated. Use ConfirmPoll instead. + +### DefaultMaxGasAmount +```toml +DefaultMaxGasAmount = 200000 # Default +``` +DefaultMaxGasAmount TODO +https://github.com/aptos-labs/aptos-ts-sdk/blob/32d4360740392782c1368647f89ba62e1b6a2cb3/src/utils/const.ts#L21 + +### MaxSimulateAttempts +```toml +MaxSimulateAttempts = 5 # Default +``` +MaxSimulateAttempts TODO + +### MaxSubmitRetryAttempts +```toml +MaxSubmitRetryAttempts = 10 # Default +``` +MaxSubmitRetryAttempts TODO + +### SubmitDelayDuration +```toml +SubmitDelayDuration = '3s' # Default +``` +SubmitDelayDuration TODO + +### TxExpiration +```toml +TxExpiration = '10s' # Default +``` +TxExpiration TODO + +### TxExpirationSecs +```toml +TxExpirationSecs = 360 # Example +``` +TxExpirationSecs is deprecated. Use TxExpiration instead. + +### MaxTxRetryAttempts +```toml +MaxTxRetryAttempts = 5 # Default +``` +MaxTxRetryAttempts TODO + +### PruneInterval +```toml +PruneInterval = '4h' # Default +``` +PruneInterval TODO + +### PruneIntervalSecs +```toml +PruneIntervalSecs = 1 # Example +``` +PruneIntervalSecs is deprecated. Use PruneInterval instead. + +### PruneTxExpiration +```toml +PruneTxExpiration = '2h' # Default +``` +PruneTxExpiration TODO + +### PruneTxExpirationSecs +```toml +PruneTxExpirationSecs = 42 # Example +``` +PruneTxExpirationSecs is deprecated. Use PruneTxExpiration instead. + +## LogPoller +```toml +[LogPoller] +EventPollingInterval = '12s' # Default +TxPollingInterval = '12s' # Default +PollTimeout = '10s' # Default +EventBatchSize = 100 # Default +TxBatchSize = 100 # Default +TXPollerDisabled = false # Default +``` + + +### EventPollingInterval +```toml +EventPollingInterval = '12s' # Default +``` +EventPollingInterval TODO + +### TxPollingInterval +```toml +TxPollingInterval = '12s' # Default +``` +TxPollingInterval TODO + +### PollTimeout +```toml +PollTimeout = '10s' # Default +``` +PollTimeout TODO + +### EventBatchSize +```toml +EventBatchSize = 100 # Default +``` +EventBatchSize TODO + +### TxBatchSize +```toml +TxBatchSize = 100 # Default +``` +TxBatchSize TODO + +### TXPollerDisabled +```toml +TXPollerDisabled = false # Default +``` +TXPollerDisabled TODO + +## BalanceMonitor +```toml +[BalanceMonitor] +BalancePollPeriod = '10s' # Default +``` + + +### BalancePollPeriod +```toml +BalancePollPeriod = '10s' # Default +``` +BalancePollPeriod TODO + +## WriteTargetCap +```toml +[WriteTargetCap] +ConfirmerPollPeriod = '1s' # Default +ConfirmerTimeout = '10s' # Default +``` + + +### ConfirmerPollPeriod +```toml +ConfirmerPollPeriod = '1s' # Default +``` +ConfirmerPollPeriod TODO + +### ConfirmerTimeout +```toml +ConfirmerTimeout = '10s' # Default +``` +ConfirmerTimeout TODO + +## Workflow +```toml +[Workflow] +ForwarderAddress = 'TODO' # Example +PublicKey = 'TODO' # Example +``` + + +### ForwarderAddress +```toml +ForwarderAddress = 'TODO' # Example +``` +ForwarderAddress TODO + +### PublicKey +```toml +PublicKey = 'TODO' # Example +``` +PublicKey TODO + +## Nodes +```toml +[[Nodes]] +Name = 'TODO' # Example +URL = '' # Example +``` + + +### Name +```toml +Name = 'TODO' # Example +``` +Name TODO + +### URL +```toml +URL = '' # Example +``` +URL TODO + diff --git a/cmd/chainlink-aptos/main.go b/cmd/chainlink-aptos/main.go index b6d635b4..62f088b2 100644 --- a/cmd/chainlink-aptos/main.go +++ b/cmd/chainlink-aptos/main.go @@ -56,7 +56,7 @@ type pluginRelayer struct { // [github.com/smartcontractkit/chainlink-common/pkg/loop.PluginRelayer] // loopKs must be an implementation that can construct a aptos keystore adapter // [github.com/smartcontractkit/chainlink-aptos/relayer/txm.NewKeystoreAdapter] -func (p *pluginRelayer) NewRelayer(ctx context.Context, rawConfig string, loopKs loop.Keystore, capRegistry core.CapabilitiesRegistry) (loop.Relayer, error) { +func (p *pluginRelayer) NewRelayer(ctx context.Context, rawConfig string, loopKS, csaKS core.Keystore, capRegistry core.CapabilitiesRegistry) (loop.Relayer, error) { // Initialize the chain service cfg, err := config.NewDecodedTOMLConfig(rawConfig) if err != nil { @@ -64,7 +64,7 @@ func (p *pluginRelayer) NewRelayer(ctx context.Context, rawConfig string, loopKs } opts := chain.ChainOpts{ Logger: p.Logger, - KeyStore: loopKs, + KeyStore: loopKS, DS: p.ds, } chain, err := chain.NewChain(cfg, opts) diff --git a/cmd/config-docs/main.go b/cmd/config-docs/main.go new file mode 100644 index 00000000..270ba093 --- /dev/null +++ b/cmd/config-docs/main.go @@ -0,0 +1,24 @@ +package main + +import ( + "flag" + "fmt" + "log" + "os" + "path/filepath" + + "github.com/smartcontractkit/chainlink-aptos/relayer/config" +) + +var outDir = flag.String("o", "", "output directory") + +func main() { + s, err := config.GenerateDocs() + if err != nil { + log.Fatalln("Failed to generate docs:", err) + } + if err = os.WriteFile(filepath.Join(*outDir, "CONFIG.md"), []byte(s), 0600); err != nil { + fmt.Fprintf(os.Stderr, "failed to write config docs: %v\n", err) + os.Exit(1) + } +} diff --git a/config_test.go b/config_test.go new file mode 100644 index 00000000..7d9d98cd --- /dev/null +++ b/config_test.go @@ -0,0 +1,19 @@ +package aptos + +import ( + _ "embed" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/smartcontractkit/chainlink-aptos/relayer/config" +) + +//go:embed CONFIG.md +var configMD string + +func TestConfigDocs(t *testing.T) { + cfg, err := config.GenerateDocs() + assert.NoError(t, err, "invalid config docs") + assert.Equal(t, configMD, cfg, "CONFIG.md is out of date. Run 'go generate .' to regenerate.") +} diff --git a/go.mod b/go.mod index 3d48b874..8ae8f2b0 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/smartcontractkit/chainlink-aptos -go 1.24.1 +go 1.24.5 + +toolchain go1.24.7 require ( github.com/aptos-labs/aptos-go-sdk v1.7.1-0.20250602153733-bb1facae1d43 @@ -12,34 +14,35 @@ require ( github.com/jmoiron/sqlx v1.4.0 github.com/jpillora/backoff v1.0.0 github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/pelletier/go-toml/v2 v2.2.3 + github.com/pelletier/go-toml/v2 v2.2.4 github.com/shopspring/decimal v1.4.0 github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 - github.com/smartcontractkit/chainlink-common v0.7.1-0.20250519161208-80bc8b13c0e7 + github.com/smartcontractkit/chainlink-common v0.9.4 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d github.com/stretchr/testify v1.10.0 github.com/valyala/fastjson v1.6.4 - go.opentelemetry.io/otel v1.35.0 - go.opentelemetry.io/otel/metric v1.35.0 - go.opentelemetry.io/otel/trace v1.35.0 + go.opentelemetry.io/otel v1.37.0 + go.opentelemetry.io/otel/metric v1.37.0 + go.opentelemetry.io/otel/trace v1.37.0 go.uber.org/zap v1.27.0 - golang.org/x/crypto v0.37.0 - golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 - golang.org/x/sync v0.13.0 - google.golang.org/protobuf v1.36.6 + golang.org/x/crypto v0.40.0 + golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc + golang.org/x/sync v0.16.0 + google.golang.org/protobuf v1.36.7 ) require ( filippo.io/edwards25519 v1.1.0 // indirect github.com/Masterminds/semver/v3 v3.3.1 // indirect github.com/XSAM/otelsql v0.29.0 // indirect - github.com/apache/arrow-go/v18 v18.0.0 // indirect + github.com/apache/arrow-go/v18 v18.3.0 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.15.2 // indirect - github.com/cloudevents/sdk-go/v2 v2.16.0 // indirect + github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1 // indirect + github.com/cloudevents/sdk-go/v2 v2.16.1 // indirect github.com/coder/websocket v1.8.12 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect @@ -47,7 +50,7 @@ require ( github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.8 // indirect github.com/go-json-experiment/json v0.0.0-20250213060926-925ba3f173fa // indirect - github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect @@ -55,7 +58,7 @@ require ( github.com/goccy/go-json v0.10.5 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/golang/protobuf v1.5.4 // indirect - github.com/google/flatbuffers v24.3.25+incompatible // indirect + github.com/google/flatbuffers v25.2.10+incompatible // indirect github.com/google/go-cmp v0.7.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 // indirect @@ -77,39 +80,42 @@ require ( github.com/jackc/pgx/v4 v4.18.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.18.0 // indirect - github.com/klauspost/cpuid/v2 v2.2.9 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/lib/pq v1.10.9 // indirect github.com/mailru/easyjson v0.9.0 // indirect - github.com/marcboeker/go-duckdb v1.8.3 // indirect + github.com/marcboeker/go-duckdb v1.8.5 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oklog/run v1.1.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect github.com/pierrec/lz4/v4 v4.1.22 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.21.1 // indirect + github.com/prometheus/client_golang v1.22.0 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.63.0 // indirect github.com/prometheus/procfs v0.16.0 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/scylladb/go-reflectx v1.0.1 // indirect - github.com/smartcontractkit/freeport v0.1.0 // indirect + github.com/smartcontractkit/chain-selectors v1.0.62 // indirect + github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 // indirect + github.com/smartcontractkit/freeport v0.1.1 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect - github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 // indirect + github.com/smartcontractkit/libocr v0.0.0-20250408131511-c90716988ee0 // indirect github.com/spf13/pflag v1.0.6 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/wk8/go-ordered-map/v2 v2.1.8 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.10.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.35.0 // indirect @@ -117,23 +123,24 @@ require ( go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.35.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.10.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 // indirect go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 // indirect - go.opentelemetry.io/otel/log v0.10.0 // indirect - go.opentelemetry.io/otel/sdk v1.35.0 // indirect - go.opentelemetry.io/otel/sdk/log v0.10.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.35.0 // indirect + go.opentelemetry.io/otel/log v0.13.0 // indirect + go.opentelemetry.io/otel/sdk v1.37.0 // indirect + go.opentelemetry.io/otel/sdk/log v0.13.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect go.opentelemetry.io/proto/otlp v1.5.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/mod v0.24.0 // indirect - golang.org/x/net v0.38.0 // indirect - golang.org/x/sys v0.32.0 // indirect - golang.org/x/text v0.24.0 // indirect - golang.org/x/tools v0.31.0 // indirect + golang.org/x/mod v0.26.0 // indirect + golang.org/x/net v0.42.0 // indirect + golang.org/x/sys v0.34.0 // indirect + golang.org/x/text v0.27.0 // indirect + golang.org/x/time v0.12.0 // indirect + golang.org/x/tools v0.35.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250219182151-9fdb1cabc7b2 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect - google.golang.org/grpc v1.71.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 // indirect + google.golang.org/grpc v1.73.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 735c9e5f..bc0c89b2 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,8 @@ 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/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= -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/arrow-go/v18 v18.3.0 h1:Xq4A6dZj9Nu33sqZibzn012LNnewkTUlfKVUFD/RX/I= +github.com/apache/arrow-go/v18 v18.3.0/go.mod h1:eEM1DnUTHhgGAjf/ChvOAQbUQ+EPohtDrArffvUjPg8= 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/aptos-labs/aptos-go-sdk v1.7.1-0.20250602153733-bb1facae1d43 h1:Mn2LI+fa8QzVmXQ/30MT76GYTQIxpSB3lzos0hat4qc= @@ -31,10 +31,10 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.15.2 h1:FIvfKlS2mcuP0qYY6yzdIU9xdrRd/YMP0bNwFjXd0u8= -github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.15.2/go.mod h1:POsdVp/08Mki0WD9QvvgRRpg9CQ6zhjfRrBoEY8JFS8= -github.com/cloudevents/sdk-go/v2 v2.16.0 h1:wnunjgiLQCfYlyo+E4+mFlZtAh7pKn7vT8MMD3lSwCg= -github.com/cloudevents/sdk-go/v2 v2.16.0/go.mod h1:5YWqklyhDSmGzBK/JENKKXdulbPq0JFf3c/KEnMLqgg= +github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1 h1:nLaJZcVAnaqch3K83AyzHfY2DmQM18/L7jvkmKSfkpI= +github.com/cloudevents/sdk-go/binding/format/protobuf/v2 v2.16.1/go.mod h1:6Q+F2puKpJ6zWv+R02BVnizJICf7++oRT5zwpZQAsbk= +github.com/cloudevents/sdk-go/v2 v2.16.1 h1:G91iUdqvl88BZ1GYYr9vScTj5zzXSyEuqbfE63gbu9Q= +github.com/cloudevents/sdk-go/v2 v2.16.1/go.mod h1:v/kVOaWjNfbvc6tkhhlkhvLapj8Aa8kvXiH5GiOHCKI= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= @@ -75,8 +75,8 @@ github.com/go-json-experiment/json v0.0.0-20250213060926-925ba3f173fa/go.mod h1: github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= +github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= @@ -113,10 +113,10 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= -github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= -github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= +github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/flatbuffers v25.2.10+incompatible h1:F3vclr7C3HpB1k9mxCGRMXq6FdUalZ6H/pNX4FP1v0Q= +github.com/google/flatbuffers v25.2.10+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -221,8 +221,8 @@ github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= -github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= -github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= @@ -245,8 +245,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4= github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU= -github.com/marcboeker/go-duckdb v1.8.3 h1:ZkYwiIZhbYsT6MmJsZ3UPTHrTZccDdM4ztoqSlEMXiQ= -github.com/marcboeker/go-duckdb v1.8.3/go.mod h1:C9bYRE1dPYb1hhfu/SSomm78B0FXmNgRvv6YBW/Hooc= +github.com/marcboeker/go-duckdb v1.8.5 h1:tkYp+TANippy0DaIOP5OEfBEwbUINqiFqgwMQ44jME0= +github.com/marcboeker/go-duckdb v1.8.5/go.mod h1:6mK7+WQE4P4u5AFLvVBmhFxY5fvhymFptghgJX6B+/8= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -266,8 +266,6 @@ github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpsp 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/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4 h1:BpfhmLKZf+SjVanKKhCgf3bg+511DmU9eDQTen7LLbY= -github.com/mitchellh/mapstructure v1.5.1-0.20220423185008-bf980b35cac4/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -281,8 +279,10 @@ github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= -github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= -github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -291,8 +291,8 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk= -github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg= +github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q= +github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= @@ -319,14 +319,20 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82 h1:6C8qej6f1bStuePVkLSFxoU22XBS165D3klxlzRg8F4= github.com/smacker/go-tree-sitter v0.0.0-20240827094217-dd81d9e9be82/go.mod h1:xe4pgH49k4SsmkQq5OT8abwhWmnzkhpgnXeekbx2efw= -github.com/smartcontractkit/chainlink-common v0.7.1-0.20250519161208-80bc8b13c0e7 h1:yeDKMQSKJQwe5SdfPmbzjzgyZIeq1QlcR93K3e7tRCU= -github.com/smartcontractkit/chainlink-common v0.7.1-0.20250519161208-80bc8b13c0e7/go.mod h1:uNF6+noody47ZdmRwymDZAnQ7eKTXLzMKvl41LA63lo= -github.com/smartcontractkit/freeport v0.1.0 h1:3MZHeti5m+tSTBCq5R8rhawFHxrnQZYBZVL+xgS1sPo= -github.com/smartcontractkit/freeport v0.1.0/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU= +github.com/smartcontractkit/chain-selectors v1.0.62 h1:KWLEyKQXHxGGHIlUfLrzjYldlB8hBjRZi9GP49WtgYs= +github.com/smartcontractkit/chain-selectors v1.0.62/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= +github.com/smartcontractkit/chainlink-common v0.9.4 h1:ZGP0vN+13CO0HI+9k421wRXhKUFdiRLoYVDIfgPUh34= +github.com/smartcontractkit/chainlink-common v0.9.4/go.mod h1:Kp54d3kbM4eGPEmJW7fcRWYUk6emXy+F5TEu5czFcH8= +github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY= +github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d h1:MJS8HTB1h3w7qV+70ueWnTQlMG8mxDUV/GdQH54Rg6g= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250819150450-95ef563f6e6d/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q= +github.com/smartcontractkit/freeport v0.1.1 h1:B5fhEtmgomdIhw03uPVbVTP6oPv27fBhZsoZZMSIS8I= +github.com/smartcontractkit/freeport v0.1.1/go.mod h1:T4zH9R8R8lVWKfU7tUvYz2o2jMv1OpGCdpY2j2QZXzU= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= -github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298 h1:PKiqnVOTChlH4a4ljJKL3OKGRgYfIpJS4YD1daAIKks= -github.com/smartcontractkit/libocr v0.0.0-20250220133800-f3b940c4f298/go.mod h1:Mb7+/LC4edz7HyHxX4QkE42pSuov4AV68+AxBXAap0o= +github.com/smartcontractkit/libocr v0.0.0-20250408131511-c90716988ee0 h1:yGD0bRNoIQ9vOILzlYg4AiGKMKpJNqi7eIMpW7QIO9Y= +github.com/smartcontractkit/libocr v0.0.0-20250408131511-c90716988ee0/go.mod h1:lzZ0Hq8zK1FfPb7aHuKQKrsWlrsCtBs6gNRNXh59H7Q= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -364,10 +370,10 @@ github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaD github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4= -go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ= -go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0 h1:5dTKu4I5Dn4P2hxyW3l3jTaZx9ACgg0ECos1eAVrheY= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.10.0/go.mod h1:P5HcUI8obLrCCmM3sbVBohZFH34iszk/+CPWuakZWL8= go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.10.0 h1:q/heq5Zh8xV1+7GoMGJpTxM2Lhq5+bFxB29tshuRuw0= @@ -382,24 +388,26 @@ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0u go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0 h1:xJ2qHD0C1BeYVTLLR9sX12+Qb95kfeD/byKj6Ky1pXg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.35.0/go.mod h1:u5BF1xyjstDowA1R5QAO9JHzqK+ublenEW/dyqTjBVk= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.10.0 h1:GKCEAZLEpEf78cUvudQdTg0aET2ObOZRB2HtXA0qPAI= -go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.10.0/go.mod h1:9/zqSWLCmHT/9Jo6fYeUDRRogOLL60ABLsHWS99lF8s= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0 h1:yEX3aC9KDgvYPhuKECHbOlr5GLwH6KTjLJ1sBSkkxkc= +go.opentelemetry.io/otel/exporters/stdout/stdoutlog v0.13.0/go.mod h1:/GXR0tBmmkxDaCUGahvksvp66mx4yh5+cFXgSlhg0vQ= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0 h1:czJDQwFrMbOr9Kk+BPo1y8WZIIFIK58SA1kykuVeiOU= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.34.0/go.mod h1:lT7bmsxOe58Tq+JIOkTQMCGXdu47oA+VJKLZHbaBKbs= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0 h1:jBpDk4HAUsrnVO1FsfCfCOTEc/MkInJmvfCHYLFiT80= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.34.0/go.mod h1:H9LUIM1daaeZaz91vZcfeM0fejXPmgCYE8ZhzqfJuiU= -go.opentelemetry.io/otel/log v0.10.0 h1:1CXmspaRITvFcjA4kyVszuG4HjA61fPDxMb7q3BuyF0= -go.opentelemetry.io/otel/log v0.10.0/go.mod h1:PbVdm9bXKku/gL0oFfUF4wwsQsOPlpo4VEqjvxih+FM= -go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M= -go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE= -go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY= -go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg= -go.opentelemetry.io/otel/sdk/log v0.10.0 h1:lR4teQGWfeDVGoute6l0Ou+RpFqQ9vaPdrNJlST0bvw= -go.opentelemetry.io/otel/sdk/log v0.10.0/go.mod h1:A+V1UTWREhWAittaQEG4bYm4gAZa6xnvVu+xKrIRkzo= -go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o= -go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w= -go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs= -go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc= +go.opentelemetry.io/otel/log v0.13.0 h1:yoxRoIZcohB6Xf0lNv9QIyCzQvrtGZklVbdCoyb7dls= +go.opentelemetry.io/otel/log v0.13.0/go.mod h1:INKfG4k1O9CL25BaM1qLe0zIedOpvlS5Z7XgSbmN83E= +go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE= +go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E= +go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI= +go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg= +go.opentelemetry.io/otel/sdk/log v0.13.0 h1:I3CGUszjM926OphK8ZdzF+kLqFvfRY/IIoFq/TjwfaQ= +go.opentelemetry.io/otel/sdk/log v0.13.0/go.mod h1:lOrQyCCXmpZdN7NchXb6DOZZa1N5G1R2tm5GMMTpDBw= +go.opentelemetry.io/otel/sdk/log/logtest v0.13.0 h1:9yio6AFZ3QD9j9oqshV1Ibm9gPLlHNxurno5BreMtIA= +go.opentelemetry.io/otel/sdk/log/logtest v0.13.0/go.mod h1:QOGiAJHl+fob8Nu85ifXfuQYmJTFAvcrxL6w5/tu168= +go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc= +go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -431,11 +439,11 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= -golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE= -golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc= +golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= +golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc h1:TS73t7x3KarrNd5qAipmspBDS1rkMcgVG/fS1aRb4Rc= +golang.org/x/exp v0.0.0-20250711185948-6ae5c78190dc/go.mod h1:A+z0yzpGtvnG90cToK5n2tu8UJVP2XUATh+r+sfOOOc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -446,8 +454,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= -golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -463,8 +471,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= -golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= -golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -473,8 +481,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.13.0 h1:AauUjRAJ9OSnvULf/ARrrVywoJDy0YS2AwQ98I37610= -golang.org/x/sync v0.13.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -503,8 +511,8 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0 h1:H5Y5sJ2L2JRdyv7ROF1he/lPdvFsd0mJHFw2ThKHxLA= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -521,10 +529,10 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0= -golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE= +golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -541,8 +549,8 @@ golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU= -golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -551,25 +559,25 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhSt0ABwskkZKjD3bXGnZGpNY= golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.15.1 h1:FNy7N6OUZVUaWG9pTiD+jlhdQ3lMP+/LcTpJ6+a8sQ0= -gonum.org/v1/gonum v0.15.1/go.mod h1:eZTZuRFrzu5pcyjN5wJhcIhnUdNijYxX1T2IcrOGY0o= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210401141331-865547bb08e2/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto/googleapis/api v0.0.0-20250219182151-9fdb1cabc7b2 h1:35ZFtrCgaAjF7AFAK0+lRSf+4AyYnWRbH7og13p7rZ4= -google.golang.org/genproto/googleapis/api v0.0.0-20250219182151-9fdb1cabc7b2/go.mod h1:W9ynFDP/shebLB1Hl/ESTOap2jHd6pmLXPNZC7SVDbA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= +google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 h1:hE3bRWtU6uceqlh4fhrSnUyjKHMKB9KrTLLG+bc0ddM= +google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463/go.mod h1:U90ffi8eUL9MwPcrJylN5+Mk2v3vuPDptd5yyNUiRR8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237 h1:cJfm9zPbe1e873mHJzmQ1nwVEeRDU/T1wXDK2kUSU34= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250519155744-55703ea1f237/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= -google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= +google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok= +google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -581,8 +589,8 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY= -google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= +google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A= +google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/relayer/chain/chain.go b/relayer/chain/chain.go index 56aa8a49..ce405c00 100644 --- a/relayer/chain/chain.go +++ b/relayer/chain/chain.go @@ -83,9 +83,13 @@ type chain struct { balanceMonitor services.Service } +func (c *chain) GetChainInfo(ctx context.Context) (types.ChainInfo, error) { + return c.cfg.GetChainInfo(), nil +} + func NewChain(cfg *config.TOMLConfig, opts ChainOpts) (Chain, error) { if !cfg.IsEnabled() { - return nil, fmt.Errorf("cannot create new chain with ID %s: chain is disabled", cfg.ChainID) + return nil, fmt.Errorf("cannot create new chain with ID %v: chain is disabled", cfg.ChainID) } return newChain(cfg, opts.KeyStore, opts.Logger, opts.DS) } @@ -102,9 +106,11 @@ func newChain(cfg *config.TOMLConfig, loopKs loop.Keystore, lggr logger.Logger, return nil, fmt.Errorf("No aptos account available") } - _, err = strconv.ParseUint(cfg.ChainID, 10, 8) + chainInfo := cfg.GetChainInfo() + + _, err = strconv.ParseUint(chainInfo.ChainID, 10, 8) if err != nil { - return nil, fmt.Errorf("invalid chain ID %s: could not parse as an integer: %w", cfg.ChainID, err) + return nil, fmt.Errorf("invalid chain ID %s: could not parse as an integer: %w", chainInfo.ChainID, err) } if cfg.Chain.Workflow != nil { @@ -112,7 +118,7 @@ func newChain(cfg *config.TOMLConfig, loopKs loop.Keystore, lggr logger.Logger, } ch := &chain{ - id: cfg.ChainID, + id: chainInfo.ChainID, cfg: cfg, lggr: logger.Named(lggr, "Chain"), ds: ds, @@ -132,18 +138,14 @@ func newChain(cfg *config.TOMLConfig, loopKs loop.Keystore, lggr logger.Logger, return nil, fmt.Errorf("failed to create log poller: %w", err) } - // Construct the chain information from the config - chainInfo := monitor.ChainInfo{ - ChainFamilyName: config.ChainFamilyName, // static for this plugin - ChainID: cfg.ChainID, - NetworkName: cfg.NetworkName, - NetworkNameFull: cfg.NetworkNameFull, - } - // Setup accounts balance monitor ch.balanceMonitor, err = monitor.NewBalanceMonitor(monitor.BalanceMonitorOpts{ - ChainInfo: chainInfo, - + ChainInfo: monitor.ChainInfo{ + ChainFamilyName: chainInfo.FamilyName, + ChainID: chainInfo.ChainID, + NetworkName: chainInfo.NetworkName, + NetworkNameFull: chainInfo.NetworkNameFull, + }, Config: *cfg.BalanceMonitor, Logger: lggr, Keystore: loopKs, diff --git a/relayer/chainreader/chainreader_local_test.go b/relayer/chainreader/chainreader_local_test.go index c6e44625..2d6173bc 100644 --- a/relayer/chainreader/chainreader_local_test.go +++ b/relayer/chainreader/chainreader_local_test.go @@ -19,6 +19,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" _ "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" "github.com/smartcontractkit/chainlink-common/pkg/sqlutil/sqltest" @@ -127,8 +128,8 @@ func runGetLatestValueTest(t *testing.T, logger logger.Logger, rpcUrl string, ac getClient := func() (aptos.AptosRpcClient, error) { return rateLimitedClient, nil } - txmConfig := txm.DefaultConfigSet - txmgr, err := txm.New(logger, keystore, txmConfig, getClient) + txmConfig := config.Defaults().TransactionManager + txmgr, err := txm.New(logger, keystore, *txmConfig, getClient) require.NoError(t, err) err = txmgr.Start(context.Background()) @@ -549,7 +550,7 @@ func runQueryKeyPersistentTest(t *testing.T, logger logger.Logger, rpcUrl string rateLimitedClient := ratelimit.NewRateLimitedClient(client, 100, 30*time.Second) getClient := func() (aptos.AptosRpcClient, error) { return rateLimitedClient, nil } - txmgr, err := txm.New(logger, keystore, txm.DefaultConfigSet, getClient) + txmgr, err := txm.New(logger, keystore, *config.Defaults().TransactionManager, getClient) require.NoError(t, err) err = txmgr.Start(context.Background()) require.NoError(t, err) @@ -874,7 +875,7 @@ func TestLoopChainReaderPersistent(t *testing.T) { keystore := testutils.NewTestKeystore(t) keystore.AddKey(privKey) getClient := func() (aptos.AptosRpcClient, error) { return rlClient, nil } - txmgr, err := txm.New(lg, keystore, txm.DefaultConfigSet, getClient) + txmgr, err := txm.New(lg, keystore, *config.Defaults().TransactionManager, getClient) require.NoError(t, err) err = txmgr.Start(context.Background()) require.NoError(t, err) @@ -1347,9 +1348,9 @@ func waitForTx(t *testing.T, txmgr *txm.AptosTxm, txId string) { } require.True(t, confirmed) } -func getSampleTxMetadata() *commontypes.TxMeta { +func getSampleTxMetadata() *types.TxMeta { workflowID := "sample-workflow-id" - return &commontypes.TxMeta{ + return &types.TxMeta{ WorkflowExecutionID: &workflowID, GasLimit: big.NewInt(210000), } diff --git a/relayer/chainwriter/chainwriter_local_test.go b/relayer/chainwriter/chainwriter_local_test.go index a233fb4f..a974571f 100644 --- a/relayer/chainwriter/chainwriter_local_test.go +++ b/relayer/chainwriter/chainwriter_local_test.go @@ -17,6 +17,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -67,9 +68,9 @@ func runChainWriterTest(t *testing.T, logger logger.Logger, rpcURL string, accou rlClient := ratelimit.NewRateLimitedClient(client, 100, 30*time.Second) getClient := func() (aptos.AptosRpcClient, error) { return rlClient, nil } - txmConfig := txm.DefaultConfigSet + txmConfig := config.Defaults().TransactionManager - txmgr, err := txm.New(logger, keystore, txmConfig, getClient) + txmgr, err := txm.New(logger, keystore, *txmConfig, getClient) require.NoError(t, err) err = txmgr.Start(context.Background()) require.NoError(t, err) diff --git a/relayer/config/config.go b/relayer/config/config.go index 69483f66..175efacc 100644 --- a/relayer/config/config.go +++ b/relayer/config/config.go @@ -3,37 +3,35 @@ package config import ( "errors" "fmt" + "log" "strings" "time" "github.com/aptos-labs/aptos-go-sdk" "github.com/pelletier/go-toml/v2" - "github.com/smartcontractkit/chainlink-common/pkg/config" - "github.com/smartcontractkit/chainlink-aptos/relayer/logpoller" "github.com/smartcontractkit/chainlink-aptos/relayer/monitor" - "github.com/smartcontractkit/chainlink-aptos/relayer/txm" "github.com/smartcontractkit/chainlink-aptos/relayer/write_target" + "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/config/configtest" + "github.com/smartcontractkit/chainlink-common/pkg/types" ) // Name of the chain family (e.g., "ethereum", "solana", "aptos") const ChainFamilyName = "aptos" -var DefaultConfigSet = ConfigSet{ - TransactionManager: txm.DefaultConfigSet, - LogPoller: logpoller.DefaultConfigSet, - BalanceMonitor: monitor.GenericBalanceConfig{ - BalancePollPeriod: *config.MustNewDuration(10 * time.Second), - }, - WriteTargetCap: write_target.DefaultConfigSet, +var defaults TOMLConfig + +func init() { + if err := configtest.DocDefaultsOnly(strings.NewReader(docsTOML), &defaults, config.DecodeTOML); err != nil { + log.Fatalf("Failed to initialize defaults from docs: %v", err) + } } -type ConfigSet struct { //nolint:revive - TransactionManager txm.Config - LogPoller logpoller.Config - BalanceMonitor monitor.GenericBalanceConfig - WriteTargetCap write_target.Config +func Defaults() (c TOMLConfig) { + c.SetFrom(&defaults) + return } type WorkflowConfig struct { @@ -43,13 +41,72 @@ type WorkflowConfig struct { } type Chain struct { - TransactionManager *txm.Config + TransactionManager *TxmConfig LogPoller *logpoller.Config BalanceMonitor *monitor.GenericBalanceConfig WriteTargetCap *write_target.Config Workflow *WorkflowConfig } +type TxmConfig struct { + BroadcastChanSize uint + ConfirmPollSecs *uint // Deprecated: use ConfirmPoll + ConfirmPoll *config.Duration + + DefaultMaxGasAmount uint64 + MaxSimulateAttempts uint + + MaxSubmitRetryAttempts uint + SubmitDelayDuration *config.Duration + TxExpirationSecs *uint64 // Deprecated: use TxExpiration + TxExpiration *config.Duration + MaxTxRetryAttempts uint64 + PruneIntervalSecs *uint64 // Deprecated: use PruneInterval + PruneInterval *config.Duration + PruneTxExpirationSecs *uint64 // Deprecated: use PruneTxExpiration + PruneTxExpiration *config.Duration +} + +func (c *TxmConfig) ValidateConfig() (err error) { + if c.ConfirmPollSecs != nil && c.ConfirmPoll != nil { + err = errors.Join(err, errors.New("only one of ConfirmPollSecs and Confirm may be set")) + } else if c.ConfirmPollSecs != nil { + d, err2 := config.NewDuration(time.Duration(*c.ConfirmPollSecs) * time.Second) + if err2 != nil { + err = errors.Join(err, fmt.Errorf("ConfirmPollSecs must be a positive number: %w", err2)) + } + c.ConfirmPoll = &d + } + if c.TxExpirationSecs != nil && c.TxExpiration != nil { + err = errors.Join(err, errors.New("only one of TxExpirationSecs and TxExpiration may be set")) + } else if c.TxExpirationSecs != nil { + d, err2 := config.NewDuration(time.Duration(*c.TxExpirationSecs) * time.Second) + if err2 != nil { + err = errors.Join(err, fmt.Errorf("TxExpirationSecs must be a positive number: %w", err2)) + } + c.TxExpiration = &d + } + if c.PruneIntervalSecs != nil && c.PruneInterval != nil { + err = errors.Join(err, errors.New("only one of PruneIntervalSecs and PruneInterval may be set")) + } else if c.PruneIntervalSecs != nil { + d, err2 := config.NewDuration(time.Duration(*c.PruneIntervalSecs) * time.Second) + if err2 != nil { + err = errors.Join(err, fmt.Errorf("PruneIntervalSecs must be a positive number: %w", err2)) + } + c.PruneInterval = &d + } + if c.PruneTxExpirationSecs != nil && c.PruneTxExpiration != nil { + err = errors.Join(err, errors.New("only one of PruneTxExpirationSecs and PruneTxExpiration may be set")) + } else if c.PruneTxExpirationSecs != nil { + d, err2 := config.NewDuration(time.Duration(*c.PruneTxExpirationSecs) * time.Second) + if err2 != nil { + err = errors.Join(err, fmt.Errorf("PruneTxExpirationSecs must be a positive number: %w", err2)) + } + c.PruneTxExpiration = &d + } + return +} + type Node struct { Name *string URL *config.URL @@ -74,9 +131,9 @@ type TOMLConfig struct { Enabled *bool // Chain configuration - ChainID string - NetworkName string - NetworkNameFull string + ChainID *string + NetworkName *string + NetworkNameFull *string // Chain-specific components configuration Chain @@ -111,46 +168,40 @@ func (c *TOMLConfig) IsEnabled() bool { } func (c *TOMLConfig) SetDefaults() { - if c.TransactionManager == nil { - c.TransactionManager = &DefaultConfigSet.TransactionManager - } - if c.LogPoller == nil { - c.LogPoller = &DefaultConfigSet.LogPoller - } - if c.BalanceMonitor == nil { - c.BalanceMonitor = &DefaultConfigSet.BalanceMonitor - } - if c.WriteTargetCap == nil { - c.WriteTargetCap = &DefaultConfigSet.WriteTargetCap - } + cfg := Defaults() + cfg.SetFrom(c) + *c = cfg // Set network name defaults - if c.NetworkName == "" { + if c.NetworkName == nil || *c.NetworkName == "" { // Check if known network by chain ID - network, err := GetNetworkConfig(c.ChainID) + network, err := GetNetworkConfig(*c.ChainID) + name := "unknown" if err == nil { - c.NetworkName = network.Name - } else { - c.NetworkName = "unknown" + name = network.Name } + c.NetworkName = &name } // Set network name full defaults - if c.NetworkNameFull == "" { - c.NetworkNameFull = fmt.Sprintf("%s-%s", ChainFamilyName, c.NetworkName) + if c.NetworkNameFull == nil || *c.NetworkNameFull == "" { + full := ChainFamilyName + "-" + *c.NetworkName + c.NetworkNameFull = &full } } func (c *TOMLConfig) ValidateConfig() (err error) { - if c.ChainID == "" { + if c.ChainID == nil { + err = errors.Join(err, config.ErrMissing{Name: "ChainID", Msg: "required for all chains"}) + } else if *c.ChainID == "" { err = errors.Join(err, config.ErrEmpty{Name: "ChainID", Msg: "required for all chains"}) } // If network name is set, ensure it matches a known network if chain ID is known - if c.NetworkName != "" { + if c.NetworkName != nil && *c.NetworkName != "" { var network aptos.NetworkConfig - network, err = GetNetworkConfig(c.ChainID) - if err == nil && c.NetworkName != network.Name { + network, err = GetNetworkConfig(*c.ChainID) + if err == nil && *c.NetworkName != network.Name { err = errors.Join(err, config.ErrInvalid{Name: "NetworkName", Value: c.NetworkName, Msg: fmt.Sprintf("does not match known network (%s) for chain ID", network.Name)}) } } @@ -174,4 +225,31 @@ func (c *TOMLConfig) TOMLString() (string, error) { return string(b), nil } +func (c *TOMLConfig) SetFrom(f *TOMLConfig) { + if f.Enabled != nil { + c.Enabled = f.Enabled + } + if f.ChainID != nil { + c.ChainID = f.ChainID + } + +} + +func (c *TOMLConfig) GetChainInfo() types.ChainInfo { + // Construct the chain information from the config + chainInfo := types.ChainInfo{ + FamilyName: ChainFamilyName, // static for this plugin + } + if c.ChainID != nil { + chainInfo.ChainID = *c.ChainID + } + if c.NetworkName != nil { + chainInfo.NetworkName = *c.NetworkName + } + if c.NetworkNameFull != nil { + chainInfo.NetworkNameFull = *c.NetworkNameFull + } + return chainInfo +} + type Nodes []*Node diff --git a/relayer/config/config_test.go b/relayer/config/config_test.go index 6684ed85..773d9afd 100644 --- a/relayer/config/config_test.go +++ b/relayer/config/config_test.go @@ -1,14 +1,21 @@ package config import ( + _ "embed" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-aptos/relayer/logpoller" + "github.com/smartcontractkit/chainlink-aptos/relayer/monitor" + "github.com/smartcontractkit/chainlink-aptos/relayer/write_target" + "github.com/smartcontractkit/chainlink-common/pkg/config" + "github.com/smartcontractkit/chainlink-common/pkg/config/configtest" ) -func TestTOMLConfig(t *testing.T) { +func TestTOMLConfig_IsEnabled(t *testing.T) { t.Parallel() raw := ` ChainID = "2" @@ -92,3 +99,66 @@ TxBatchSize = 75 assert.Equal(t, uint64(50), cfg.LogPoller.EventBatchSize) assert.Equal(t, uint64(75), cfg.LogPoller.TxBatchSize) } + +func TestDefaults_fieldsNotNil(t *testing.T) { + configtest.AssertFieldsNotNil(t, Defaults()) +} + +func TestDocsTOMLComplete(t *testing.T) { + configtest.AssertDocsTOMLComplete[TOMLConfig](t, docsTOML) +} + +//go:embed testdata/config-full.toml +var fullTOML string + +func TestTOMLConfig_FullMarshal(t *testing.T) { + full := TOMLConfig{ + Enabled: ptr(true), + ChainID: ptr("fake-chain"), + NetworkName: ptr("net"), + NetworkNameFull: ptr("network"), + Chain: Chain{ + TransactionManager: &TxmConfig{ + BroadcastChanSize: 1, + ConfirmPollSecs: ptr[uint](1), + ConfirmPoll: config.MustNewDuration(time.Second), + DefaultMaxGasAmount: 2, + MaxSimulateAttempts: 3, + MaxSubmitRetryAttempts: 4, + SubmitDelayDuration: config.MustNewDuration(time.Minute), + TxExpirationSecs: ptr[uint64](360), + TxExpiration: config.MustNewDuration(time.Hour), + MaxTxRetryAttempts: 5, + PruneIntervalSecs: ptr[uint64](100), + PruneInterval: config.MustNewDuration(time.Millisecond), + PruneTxExpirationSecs: ptr[uint64](42), + PruneTxExpiration: config.MustNewDuration(time.Microsecond), + }, + LogPoller: &logpoller.Config{ + EventPollingInterval: config.MustNewDuration(12 * time.Second), + TxPollingInterval: config.MustNewDuration(12 * time.Second), + PollTimeout: config.MustNewDuration(10 * time.Second), + EventBatchSize: ptr[uint64](100), + TxBatchSize: ptr[uint64](100), + TXPollerDisabled: ptr(true), + }, + BalanceMonitor: &monitor.GenericBalanceConfig{ + BalancePollPeriod: config.MustNewDuration(time.Nanosecond), + }, + WriteTargetCap: &write_target.Config{ + ConfirmerPollPeriod: config.MustNewDuration(2 * time.Hour), + ConfirmerTimeout: config.MustNewDuration(2 * time.Minute), + }, + Workflow: &WorkflowConfig{ + ForwarderAddress: "foo", + PublicKey: "bar", + }, + }, + Nodes: Nodes{ + {Name: ptr("baz"), URL: config.MustParseURL("https://example.com")}, + }, + } + configtest.AssertFullMarshal(t, full, fullTOML) +} + +func ptr[T any](v T) *T { return &v } diff --git a/relayer/config/docs.go b/relayer/config/docs.go new file mode 100644 index 00000000..0d0fc474 --- /dev/null +++ b/relayer/config/docs.go @@ -0,0 +1,19 @@ +package config + +import ( + _ "embed" + + "github.com/smartcontractkit/chainlink-common/pkg/config/configdoc" +) + +//go:embed docs.toml +var docsTOML string + +//go:embed example.toml +var exampleConfig string + +func GenerateDocs() (string, error) { + return configdoc.Generate(docsTOML, `[//]: # (Documentation generated from docs.toml - DO NOT EDIT.) + +This document describes the TOML format for configuration.`, exampleConfig, nil) +} diff --git a/relayer/config/docs.toml b/relayer/config/docs.toml new file mode 100644 index 00000000..dcce4436 --- /dev/null +++ b/relayer/config/docs.toml @@ -0,0 +1,75 @@ +# Enabled TODO +Enabled = true # Default +# ChainID TODO +ChainID = 'TODO' # Example +# NetworkName TODO +NetworkName = 'TODO' # Example +# NetworkNameFull TODO +NetworkNameFull = 'TODO' # Example + +[TransactionManager] +# BroadcastChanSize TODO +BroadcastChanSize = 100 # Default +# ConfirmPoll TODO +ConfirmPoll = '2s' # Default +# ConfirmPollSecs is deprecated. Use ConfirmPoll instead. +ConfirmPollSecs = 1 # Example +# DefaultMaxGasAmount TODO +# https://github.com/aptos-labs/aptos-ts-sdk/blob/32d4360740392782c1368647f89ba62e1b6a2cb3/src/utils/const.ts#L21 +DefaultMaxGasAmount = 200000 # Default +# MaxSimulateAttempts TODO +MaxSimulateAttempts = 5 # Default +# MaxSubmitRetryAttempts TODO +MaxSubmitRetryAttempts = 10 # Default +# SubmitDelayDuration TODO +SubmitDelayDuration = '3s' # Default +# TxExpiration TODO +TxExpiration = '10s' # Default +# TxExpirationSecs is deprecated. Use TxExpiration instead. +TxExpirationSecs = 360 # Example +# MaxTxRetryAttempts TODO +MaxTxRetryAttempts = 5 # Default +# PruneInterval TODO +PruneInterval = '4h' # Default +# PruneIntervalSecs is deprecated. Use PruneInterval instead. +PruneIntervalSecs = 1 # Example +# PruneTxExpiration TODO +PruneTxExpiration = '2h' # Default +# PruneTxExpirationSecs is deprecated. Use PruneTxExpiration instead. +PruneTxExpirationSecs = 42 # Example + +[LogPoller] +# EventPollingInterval TODO +EventPollingInterval = '12s' # Default +# TxPollingInterval TODO +TxPollingInterval = '12s' # Default +# PollTimeout TODO +PollTimeout = '10s' # Default +# EventBatchSize TODO +EventBatchSize = 100 # Default +# TxBatchSize TODO +TxBatchSize = 100 # Default +# TXPollerDisabled TODO +TXPollerDisabled = false # Default + +[BalanceMonitor] +# BalancePollPeriod TODO +BalancePollPeriod = '10s' # Default + +[WriteTargetCap] +# ConfirmerPollPeriod TODO +ConfirmerPollPeriod = '1s' # Default +# ConfirmerTimeout TODO +ConfirmerTimeout = '10s' # Default + +[Workflow] +# ForwarderAddress TODO +ForwarderAddress = 'TODO' # Example +# PublicKey TODO +PublicKey = 'TODO' # Example + +[[Nodes]] +# Name TODO +Name = 'TODO' # Example +# URL TODO +URL = '' # Example diff --git a/relayer/config/example.toml b/relayer/config/example.toml new file mode 100644 index 00000000..2ce77377 --- /dev/null +++ b/relayer/config/example.toml @@ -0,0 +1,5 @@ +ChainID = "4" + +[[Aptos.Nodes]] +Name = 'primary' +URL = "http://chainlink-aptos.devnet:8080/v1" \ No newline at end of file diff --git a/relayer/config/testdata/config-full.toml b/relayer/config/testdata/config-full.toml new file mode 100644 index 00000000..bc37ca81 --- /dev/null +++ b/relayer/config/testdata/config-full.toml @@ -0,0 +1,43 @@ +Enabled = true +ChainID = 'fake-chain' +NetworkName = 'net' +NetworkNameFull = 'network' + +[TransactionManager] +BroadcastChanSize = 1 +ConfirmPollSecs = 1 +ConfirmPoll = '1s' +DefaultMaxGasAmount = 2 +MaxSimulateAttempts = 3 +MaxSubmitRetryAttempts = 4 +SubmitDelayDuration = '1m0s' +TxExpirationSecs = 360 +TxExpiration = '1h0m0s' +MaxTxRetryAttempts = 5 +PruneIntervalSecs = 100 +PruneInterval = '1ms' +PruneTxExpirationSecs = 42 +PruneTxExpiration = '1µs' + +[LogPoller] +EventPollingInterval = '10s' +TxPollingInterval = '42s' +PollTimeout = '13s' +EventBatchSize = 99 +TxBatchSize = 10 +TXPollerDisabled = true + +[BalanceMonitor] +BalancePollPeriod = '1ns' + +[WriteTargetCap] +ConfirmerPollPeriod = '2h0m0s' +ConfirmerTimeout = '2m0s' + +[Workflow] +ForwarderAddress = 'foo' +PublicKey = 'bar' + +[[Nodes]] +Name = 'baz' +URL = 'https://example.com' diff --git a/relayer/logpoller/config.go b/relayer/logpoller/config.go index b35baf38..c4692db3 100644 --- a/relayer/logpoller/config.go +++ b/relayer/logpoller/config.go @@ -9,30 +9,33 @@ import ( // Config holds configuration for the LogPoller type Config struct { // EventPollingInterval is the interval at which events are polled - EventPollingInterval config.Duration + EventPollingInterval *config.Duration // TxPollingInterval is the interval at which transactions are polled - TxPollingInterval config.Duration + TxPollingInterval *config.Duration // PollTimeout is the maximum time a single polling operation can take - PollTimeout config.Duration + PollTimeout *config.Duration // EventBatchSize is the maximum number of events to fetch in a single request - EventBatchSize uint64 + EventBatchSize *uint64 // TxBatchSize is the maximum number of transactions to fetch in a single request - TxBatchSize uint64 + TxBatchSize *uint64 // TXPollerDisabled if this is true, the TX poller will not run on log poller start - TXPollerDisabled bool + TXPollerDisabled *bool } +//TODO remove? // DefaultConfigSet is the default configuration for LogPoller var DefaultConfigSet = Config{ - EventPollingInterval: *config.MustNewDuration(12 * time.Second), - TxPollingInterval: *config.MustNewDuration(12 * time.Second), - PollTimeout: *config.MustNewDuration(10 * time.Second), - EventBatchSize: 100, - TxBatchSize: 100, - TXPollerDisabled: false, + EventPollingInterval: config.MustNewDuration(12 * time.Second), + TxPollingInterval: config.MustNewDuration(12 * time.Second), + PollTimeout: config.MustNewDuration(10 * time.Second), + EventBatchSize: ptr[uint64](100), + TxBatchSize: ptr[uint64](100), + TXPollerDisabled: ptr(false), } + +func ptr[T any](v T) *T { return &v } diff --git a/relayer/logpoller/event_poller.go b/relayer/logpoller/event_poller.go index c0c64660..fd3a4455 100644 --- a/relayer/logpoller/event_poller.go +++ b/relayer/logpoller/event_poller.go @@ -6,7 +6,7 @@ import ( "strings" "time" - cache "github.com/patrickmn/go-cache" + "github.com/patrickmn/go-cache" "github.com/aptos-labs/aptos-go-sdk" "github.com/aptos-labs/aptos-go-sdk/api" @@ -200,7 +200,7 @@ eventLoop: case <-ctx.Done(): return ctx.Err() default: - events, err := l.client.EventsByCreationNumber(eventAccountAddress, creationNumber, &latestOffset, &batchSize) + events, err := l.client.EventsByCreationNumber(eventAccountAddress, creationNumber, &latestOffset, batchSize) if err != nil { l.lggr.Errorw("syncEvent: failed to fetch new events", "error", err) return fmt.Errorf("syncEvent: failed to fetch events: %w", err) @@ -253,7 +253,7 @@ eventLoop: latestOffset = events[len(events)-1].SequenceNumber + 1 // If we received fewer events than the batch size, we're caught up - if uint64(len(events)) < batchSize { + if uint64(len(events)) < *batchSize { break eventLoop } } diff --git a/relayer/logpoller/logpoller.go b/relayer/logpoller/logpoller.go index 6e47e30c..c58cd114 100644 --- a/relayer/logpoller/logpoller.go +++ b/relayer/logpoller/logpoller.go @@ -7,7 +7,7 @@ import ( "sync" "time" - cache "github.com/patrickmn/go-cache" + "github.com/patrickmn/go-cache" "github.com/aptos-labs/aptos-go-sdk" @@ -83,7 +83,7 @@ func (l *AptosLogPoller) Start(ctx context.Context) error { syncEventCtx, l.eventCtxCancel = context.WithCancel(context.Background()) go l.startEventPolling(syncEventCtx) - if l.config.TXPollerDisabled == true { + if b := l.config.TXPollerDisabled; b != nil && *b == true { l.lggr.Info("Skipping transaction polling as TXPollerDisabled is set to true") return nil } diff --git a/relayer/logpoller/tx_poller.go b/relayer/logpoller/tx_poller.go index 9c4789e3..4e9ebb9d 100644 --- a/relayer/logpoller/tx_poller.go +++ b/relayer/logpoller/tx_poller.go @@ -114,7 +114,7 @@ func (l *AptosLogPoller) SyncAllTransmitterTxs(ctx context.Context) error { return nil } - batchSize := l.config.TxBatchSize + batchSize := *l.config.TxBatchSize var totalProcessed int for _, transmitter := range transmitters { diff --git a/relayer/monitor/generic_balance.go b/relayer/monitor/generic_balance.go index 2aadf458..fecd7ce7 100644 --- a/relayer/monitor/generic_balance.go +++ b/relayer/monitor/generic_balance.go @@ -23,7 +23,7 @@ type ChainInfo struct { // Config defines the balance monitor configuration. type GenericBalanceConfig struct { - BalancePollPeriod config.Duration + BalancePollPeriod *config.Duration } // GenericBalanceClient defines the interface for getting account balances. diff --git a/relayer/relay.go b/relayer/relay.go index 119b90e1..2be3726f 100644 --- a/relayer/relay.go +++ b/relayer/relay.go @@ -23,6 +23,7 @@ import ( var _ types.Relayer = (*relayer)(nil) //nolint:staticcheck type relayer struct { + types.UnimplementedRelayer chain chain.Chain lggr logger.Logger @@ -162,10 +163,6 @@ func (r *relayer) NewCCIPExecProvider(ctx context.Context, rargs types.RelayArgs return nil, errors.New("ccip.exec is not supported for aptos") } -func (r *relayer) EVM() (types.EVMService, error) { - return nil, errors.New("EVMService is not supported for aptos") -} - func (r *relayer) Replay(ctx context.Context, fromBlock string, args map[string]any) error { return errors.ErrUnsupported } diff --git a/relayer/testutils/keystore.go b/relayer/testutils/keystore.go index be2489a7..ab7706ec 100644 --- a/relayer/testutils/keystore.go +++ b/relayer/testutils/keystore.go @@ -6,15 +6,16 @@ import ( "fmt" "testing" - "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-common/pkg/types/core" ) type TestKeystore struct { + core.UnimplementedKeystore t *testing.T Keys map[string]ed25519.PrivateKey } -var _ loop.Keystore = &TestKeystore{} +var _ core.Keystore = &TestKeystore{} func NewTestKeystore(t *testing.T) *TestKeystore { return &TestKeystore{t: t, Keys: map[string]ed25519.PrivateKey{}} diff --git a/relayer/txm/config.go b/relayer/txm/config.go index ab1b9ba6..1b5dfb0e 100644 --- a/relayer/txm/config.go +++ b/relayer/txm/config.go @@ -1,34 +1,7 @@ package txm -// TODO: these should be duration, not numbers -type Config struct { - BroadcastChanSize uint - ConfirmPollSecs uint +import ( + "github.com/smartcontractkit/chainlink-aptos/relayer/config" +) - DefaultMaxGasAmount uint64 - MaxSimulateAttempts uint - - MaxSubmitRetryAttempts uint - SubmitDelayDuration uint - TxExpirationSecs uint64 - MaxTxRetryAttempts uint64 - PruneIntervalSecs uint64 - PruneTxExpirationSecs uint64 -} - -// DefaultConfigSet is the default configuration for the TransactionManager -var DefaultConfigSet = Config{ - BroadcastChanSize: 100, - ConfirmPollSecs: 2, - - // https://github.com/aptos-labs/aptos-ts-sdk/blob/32d4360740392782c1368647f89ba62e1b6a2cb3/src/utils/const.ts#L21 - DefaultMaxGasAmount: 200000, - MaxSimulateAttempts: 5, - - MaxSubmitRetryAttempts: 10, - SubmitDelayDuration: 3, // seconds - TxExpirationSecs: 10, // seconds - MaxTxRetryAttempts: 5, - PruneIntervalSecs: uint64(60 * 60 * 4), // 4 hours - PruneTxExpirationSecs: uint64(60 * 60 * 2), // 2 hours -} +type Config = config.TxmConfig diff --git a/relayer/txm/txm.go b/relayer/txm/txm.go index 4c26c04c..96c6eb54 100644 --- a/relayer/txm/txm.go +++ b/relayer/txm/txm.go @@ -192,12 +192,12 @@ func (a *AptosTxm) Enqueue(transactionID string, txMetadata *commontypes.TxMeta, } a.transactionsLock.Lock() - if (currentTimestamp - a.transactionsLastPruneTime) > a.config.PruneIntervalSecs { + if time.Duration(currentTimestamp-a.transactionsLastPruneTime)*time.Second > a.config.PruneInterval.Duration() { for txID, tx := range a.transactions { if tx.Status != commontypes.Finalized && tx.Status != commontypes.Failed && tx.Status != commontypes.Fatal { continue } - if (currentTimestamp - tx.Timestamp) < a.config.PruneTxExpirationSecs { + if time.Duration(currentTimestamp-tx.Timestamp)*time.Second < a.config.PruneTxExpiration.Duration() { continue } ctxLogger.Debugw("Pruning transaction", "status", tx.Status) @@ -325,7 +325,7 @@ func (a *AptosTxm) createRawTx(client aptos.AptosRpcClient, tx *AptosTx, nonce u return nil, fmt.Errorf("failed to fetch ledger timestamp: %w", err) } - expirationTimestampSecs := ledgerTimestampSecs + a.config.TxExpirationSecs + expirationTimestampSecs := ledgerTimestampSecs + uint64(a.config.TxExpiration.Duration()/time.Second) payload := aptos.TransactionPayload{ Payload: &aptos.EntryFunction{ @@ -543,7 +543,7 @@ func (a *AptosTxm) signAndBroadcast(tx *AptosTx) { } ctxLogger.Errorw("failed to submit signed tx, retrying..", "error", httpError) - time.Sleep(time.Duration(a.config.SubmitDelayDuration) * time.Second) + time.Sleep(a.config.SubmitDelayDuration.Duration()) httpErrorBody := string(httpError.Body) if strings.Contains(httpErrorBody, "SEQUENCE_NUMBER_TOO_OLD") || strings.Contains(httpErrorBody, "SEQUENCE_NUMBER_TOO_NEW") { @@ -563,7 +563,7 @@ func (a *AptosTxm) confirmLoop() { _, cancel := commonutils.ContextFromChan(a.stop) defer cancel() - pollDuration := time.Duration(a.config.ConfirmPollSecs) * time.Second + pollDuration := a.config.ConfirmPoll.Duration() tick := time.After(pollDuration) a.baseLogger.Debugw("confirmLoop: started") diff --git a/relayer/txm/txm_error_test.go b/relayer/txm/txm_error_test.go index 8acbde13..a945fcd0 100644 --- a/relayer/txm/txm_error_test.go +++ b/relayer/txm/txm_error_test.go @@ -18,6 +18,7 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-aptos/relayer/ratelimit" "github.com/smartcontractkit/chainlink-aptos/relayer/testutils" ) @@ -54,9 +55,9 @@ func TestTxmBroadcastErrors(t *testing.T) { keystore := testutils.NewTestKeystore(t) keystore.AddKey(privateKey) - config := DefaultConfigSet + config := config.Defaults().TransactionManager - runErrorsTest(t, logger, config, rpcUrl, keystore, accountAddress, publicKey) + runErrorsTest(t, logger, *config, rpcUrl, keystore, accountAddress, publicKey) } func runErrorsTest(t *testing.T, logger logger.Logger, config Config, rpcURL string, keystore loop.Keystore, accountAddress aptos.AccountAddress, publicKey ed25519.PublicKey) { @@ -140,7 +141,7 @@ func runErrorsTest(t *testing.T, logger logger.Logger, config Config, rpcURL str // Test with expired transaction rawTx.SequenceNumber = sequenceNumber - rawTx.ExpirationTimestampSeconds = rawTx.ExpirationTimestampSeconds - txm.config.TxExpirationSecs - 3600 // 1 hour ago + rawTx.ExpirationTimestampSeconds = rawTx.ExpirationTimestampSeconds - uint64(txm.config.TxExpiration.Duration()/time.Second) - 3600 // 1 hour ago signedTx, err = txm.createSignedTx(rlClient, rawTx, selectedTx.PublicKey, selectedTx.FromAddress) require.NoError(t, err) diff --git a/relayer/txm/txm_local_test.go b/relayer/txm/txm_local_test.go index 099cd47b..48658b7f 100644 --- a/relayer/txm/txm_local_test.go +++ b/relayer/txm/txm_local_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -55,9 +56,9 @@ func TestTxmLocal(t *testing.T) { keystore := testutils.NewTestKeystore(t) keystore.AddKey(privateKey) - config := DefaultConfigSet + config := config.Defaults().TransactionManager - runTxmTest(t, logger, config, rpcUrl, keystore, accountAddress, publicKey, 5) + runTxmTest(t, logger, *config, rpcUrl, keystore, accountAddress, publicKey, 5) } func runTxmTest(t *testing.T, logger logger.Logger, config Config, rpcURL string, keystore loop.Keystore, accountAddress aptos.AccountAddress, publicKey ed25519.PublicKey, iterations int) { diff --git a/relayer/txm/txm_multisig_deploy_ccip_local_test.go b/relayer/txm/txm_multisig_deploy_ccip_local_test.go index e5e4fb17..fdb6634d 100644 --- a/relayer/txm/txm_multisig_deploy_ccip_local_test.go +++ b/relayer/txm/txm_multisig_deploy_ccip_local_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop" @@ -261,8 +262,8 @@ func runDeployMCMSAndCCIPInChunks(t *testing.T, logger logger.Logger, rpcURL str require.NoError(t, err) deployChainIdBig = new(big.Int).SetUint64(uint64(chainId)) - config := DefaultConfigSet - txm, err := New(logger, keystore, config, getClient) + config := config.Defaults().TransactionManager + txm, err := New(logger, keystore, *config, getClient) require.NoError(t, err) err = txm.Start(context.Background()) require.NoError(t, err) diff --git a/relayer/txm/txm_multisig_local_test.go b/relayer/txm/txm_multisig_local_test.go index 6b5b41de..7d4b2c0b 100644 --- a/relayer/txm/txm_multisig_local_test.go +++ b/relayer/txm/txm_multisig_local_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/crypto/sha3" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/loop" @@ -149,8 +150,8 @@ func runMultisigTest(t *testing.T, logger logger.Logger, rpcURL string, keystore require.NoError(t, err) chainIdBig = new(big.Int).SetUint64(uint64(chainId)) - config := DefaultConfigSet - txm, err := New(logger, keystore, config, getClient) + config := config.Defaults().TransactionManager + txm, err := New(logger, keystore, *config, getClient) require.NoError(t, err) err = txm.Start(context.Background()) require.NoError(t, err) diff --git a/relayer/txm/txm_testnet_test.go b/relayer/txm/txm_testnet_test.go index 37d6d792..b84c8b57 100644 --- a/relayer/txm/txm_testnet_test.go +++ b/relayer/txm/txm_testnet_test.go @@ -5,6 +5,7 @@ package txm import ( "testing" + "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-aptos/relayer/testutils" @@ -29,7 +30,7 @@ func runTestnetTest(t *testing.T, rpcUrl string) { keystore := testutils.NewTestKeystore(t) keystore.AddKey(privateKey) - config := DefaultConfigSet + config := config.Defaults().TransactionManager - runTxmTest(t, logger, config, rpcUrl, keystore, accountAddress, publicKey, 5) + runTxmTest(t, logger, *config, rpcUrl, keystore, accountAddress, publicKey, 5) } diff --git a/relayer/write_target/aptos/write_target.go b/relayer/write_target/aptos/write_target.go index fd75ca30..1f0e33d6 100644 --- a/relayer/write_target/aptos/write_target.go +++ b/relayer/write_target/aptos/write_target.go @@ -13,7 +13,6 @@ import ( "github.com/smartcontractkit/chainlink-aptos/relayer/chainreader" crconfig "github.com/smartcontractkit/chainlink-aptos/relayer/chainreader/config" "github.com/smartcontractkit/chainlink-aptos/relayer/chainwriter" - aptosconfig "github.com/smartcontractkit/chainlink-aptos/relayer/config" "github.com/smartcontractkit/chainlink-aptos/relayer/txm" "github.com/smartcontractkit/chainlink-aptos/relayer/utils" "github.com/smartcontractkit/chainlink-aptos/relayer/write_target" @@ -40,12 +39,17 @@ const version = "1.0.0" func NewAptosWriteTarget(ctx context.Context, chain chain.Chain, lggr logger.Logger) (capabilities.TargetCapability, error) { config := chain.Config() + ci := config.GetChainInfo() // TODO: generate ID based on chain selector (we're currently using Aptos Go SDK to get name for chain ID) // chainName, err := chainselectors.NameFromChainId(chain.ID().Uint64()) + var tag string + if t := config.WriteTargetCap.Tag; t != nil { + tag = *t + } // Construct the ID for the WT (e.g., "write_aptos-localnet@1.0.0") - id, err := write_target.NewWriteTargetID(aptosconfig.ChainFamilyName, config.NetworkName, config.ChainID, config.WriteTargetCap.Tag, version) + id, err := write_target.NewWriteTargetID(ci.FamilyName, ci.NetworkName, ci.ChainID, tag, version) if err != nil { return nil, fmt.Errorf("failed to create write target ID: %+w", err) } @@ -174,12 +178,7 @@ func NewAptosWriteTarget(ctx context.Context, chain chain.Chain, lggr logger.Log } // Construct the chain information from the config - chainInfo := write_target.ChainInfo{ - ChainFamilyName: aptosconfig.ChainFamilyName, // static for this plugin - ChainID: config.ChainID, - NetworkName: config.NetworkName, - NetworkNameFull: config.NetworkNameFull, - } + chainInfo := config.GetChainInfo() // Create the WT capability opts := write_target.WriteTargetOpts{ @@ -187,7 +186,12 @@ func NewAptosWriteTarget(ctx context.Context, chain chain.Chain, lggr logger.Log Logger: lggr, Config: *config.WriteTargetCap, // TODO: simplify by passing via ChainService.GetChainStatus fn - ChainInfo: chainInfo, + ChainInfo: write_target.ChainInfo{ + ChainFamilyName: chainInfo.FamilyName, + ChainID: chainInfo.ChainID, + NetworkName: chainInfo.NetworkName, + NetworkNameFull: chainInfo.NetworkNameFull, + }, Beholder: beholder, ChainService: chain, ContractReader: cr, diff --git a/relayer/write_target/config.go b/relayer/write_target/config.go index 68b99dad..2f0b41d9 100644 --- a/relayer/write_target/config.go +++ b/relayer/write_target/config.go @@ -1,20 +1,13 @@ package write_target import ( - "time" - "github.com/smartcontractkit/chainlink-common/pkg/config" ) // Config defines the write target component configuration. type Config struct { - Tag string // allows modifying WT ID e.g. write_aptos-testnet:{{.Tag}}@1.0.3 - ConfirmerPollPeriod config.Duration - ConfirmerTimeout config.Duration + Tag *string // allows modifying WT ID e.g. write_aptos-testnet:{{.Tag}}@1.0.3 + ConfirmerPollPeriod *config.Duration + ConfirmerTimeout *config.Duration } -// DefaultConfigSet is the default configuration for the write target component. -var DefaultConfigSet = Config{ - ConfirmerPollPeriod: *config.MustNewDuration(1 * time.Second), - ConfirmerTimeout: *config.MustNewDuration(10 * time.Second), -} diff --git a/relayer/write_target/write_target_test.go b/relayer/write_target/write_target_test.go index a08ac08b..37ece46d 100644 --- a/relayer/write_target/write_target_test.go +++ b/relayer/write_target/write_target_test.go @@ -8,6 +8,10 @@ import ( "time" "github.com/shopspring/decimal" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-common/pkg/beholder" "github.com/smartcontractkit/chainlink-common/pkg/capabilities" "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" @@ -16,10 +20,7 @@ import ( commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" "github.com/smartcontractkit/chainlink-common/pkg/utils/tests" - "github.com/smartcontractkit/chainlink-common/pkg/values" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" + "github.com/smartcontractkit/chainlink-protos/cre/go/values" "github.com/smartcontractkit/chainlink-aptos/relayer/monitor" "github.com/smartcontractkit/chainlink-aptos/relayer/report/platform" @@ -159,8 +160,8 @@ func newMockedWriteTarget(t *testing.T, lggr logger.Logger) mockedWriteTarget { wt := newWriteTarget(WriteTargetOpts{ ID: "write_aptos-1@1.0.0", Config: Config{ - ConfirmerPollPeriod: *config.MustNewDuration(100 * time.Millisecond), - ConfirmerTimeout: *config.MustNewDuration(300 * time.Millisecond), + ConfirmerPollPeriod: config.MustNewDuration(100 * time.Millisecond), + ConfirmerTimeout: config.MustNewDuration(300 * time.Millisecond), }, ChainInfo: ChainInfo{}, Logger: lggr,