diff --git a/core/chains/evm/logpoller/orm_test.go b/core/chains/evm/logpoller/orm_test.go index 727e86f81cb..7ef60e699f4 100644 --- a/core/chains/evm/logpoller/orm_test.go +++ b/core/chains/evm/logpoller/orm_test.go @@ -613,13 +613,14 @@ func TestORM_IndexedLogs(t *testing.T) { } limiter := query.NewLimitAndSort(query.Limit{}, query.NewSortBySequence(query.Asc)) + confidence, _ := query.Confidence(primitives.Lowest) standardFilter := func(topicIdx uint64, topicValues []uint64) query.KeyFilter { return query.KeyFilter{ Expressions: []query.Expression{ logpoller.NewAddressFilter(addr), logpoller.NewEventSigFilter(eventSig), filtersForTopics(topicIdx, topicValues), - query.Confirmation(primitives.Unconfirmed), + confidence, }, } } @@ -705,7 +706,7 @@ func TestORM_IndexedLogs(t *testing.T) { logpoller.NewEventByTopicFilter(1, []primitives.ValueComparator{ {Value: logpoller.EvmWord(2).Hex(), Operator: primitives.Gte}, }), - query.Confirmation(primitives.Unconfirmed), + confidence, }, } @@ -724,7 +725,7 @@ func TestORM_IndexedLogs(t *testing.T) { logpoller.NewEventByTopicFilter(topicIdx, []primitives.ValueComparator{ {Value: logpoller.EvmWord(max).Hex(), Operator: primitives.Lte}, }), - query.Confirmation(primitives.Unconfirmed), + confidence, }, } } @@ -874,6 +875,7 @@ func TestORM_DataWords(t *testing.T) { }, })) + confidence, _ := query.Confidence(primitives.Lowest) wordFilter := func(wordIdx uint8, word1, word2 uint64) query.KeyFilter { return query.KeyFilter{ Expressions: []query.Expression{ @@ -885,7 +887,7 @@ func TestORM_DataWords(t *testing.T) { logpoller.NewEventByWordFilter(eventSig, wordIdx, []primitives.ValueComparator{ {Value: logpoller.EvmWord(word2).Hex(), Operator: primitives.Lte}, }), - query.Confirmation(primitives.Unconfirmed), + confidence, }, } } @@ -952,7 +954,7 @@ func TestORM_DataWords(t *testing.T) { logpoller.NewEventByWordFilter(eventSig, 0, []primitives.ValueComparator{ {Value: logpoller.EvmWord(1).Hex(), Operator: primitives.Gte}, }), - query.Confirmation(primitives.Unconfirmed), + confidence, }, } @@ -1668,18 +1670,6 @@ func TestSelectLogsCreatedAfter(t *testing.T) { } filter := func(timestamp time.Time, confs evmtypes.Confirmations, topicIdx int, topicVals []common.Hash) query.KeyFilter { - var queryConfs primitives.ConfirmationLevel - - switch confs { - case evmtypes.Finalized: - queryConfs = primitives.Finalized - case evmtypes.Unconfirmed: - queryConfs = primitives.Unconfirmed - default: - fmt.Println("default") - queryConfs = primitives.ConfirmationLevel(confs) - } - filters := []query.Expression{ logpoller.NewAddressFilter(address), logpoller.NewEventSigFilter(event), @@ -1703,7 +1693,7 @@ func TestSelectLogsCreatedAfter(t *testing.T) { filters = append(filters, []query.Expression{ query.Timestamp(uint64(timestamp.Unix()), primitives.Gt), - query.Confirmation(queryConfs), + logpoller.NewConfirmationsFilter(int(confs)), }...) return query.KeyFilter{ @@ -1971,6 +1961,7 @@ func TestSelectLogsDataWordBetween(t *testing.T) { }, } + low, _ := query.Confidence(primitives.Lowest) wordFilter := func(word uint64) query.KeyFilter { return query.KeyFilter{ Expressions: []query.Expression{ @@ -1982,7 +1973,7 @@ func TestSelectLogsDataWordBetween(t *testing.T) { logpoller.NewEventByWordFilter(eventSig, 1, []primitives.ValueComparator{ {Value: logpoller.EvmWord(word).Hex(), Operator: primitives.Gte}, }), - query.Confirmation(primitives.Unconfirmed), + low, }, } } diff --git a/core/chains/evm/logpoller/parser.go b/core/chains/evm/logpoller/parser.go index 1a127433265..3623bc9a7fc 100644 --- a/core/chains/evm/logpoller/parser.go +++ b/core/chains/evm/logpoller/parser.go @@ -13,7 +13,6 @@ import ( "github.com/smartcontractkit/chainlink-common/pkg/types/query" "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" - evmtypes "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" ) @@ -60,19 +59,17 @@ func (v *pgDSLParser) Block(p primitives.Block) { ) } -func (v *pgDSLParser) Confirmations(p primitives.Confirmations) { - switch p.ConfirmationLevel { - case primitives.Finalized: +func (v *pgDSLParser) Confidence(p primitives.Confidence) { + switch p.ConfidenceLevel { + case primitives.Highest: + // the highest level of confidence maps to finalized v.expression = v.nestedConfQuery(true, 0) - case primitives.Unconfirmed: - // Unconfirmed in the evm relayer is an alias to the case of 0 confirmations - // set the level to the number 0 and fallthrough to the default case - p.ConfirmationLevel = primitives.ConfirmationLevel(0) - - fallthrough + case primitives.Lowest: + v.expression = v.nestedConfQuery(false, 0) default: - // the default case passes the confirmation level as a number directly to a subquery - v.expression = v.nestedConfQuery(false, uint64(evmtypes.Confirmations(p.ConfirmationLevel))) + v.err = errors.New("unrecognized confidence level; use confidence to confirmations mappings instead") + + return } } @@ -193,6 +190,16 @@ func (v *pgDSLParser) VisitEventTopicsByValueFilter(p *eventByTopicFilter) { } } +func (v *pgDSLParser) VisitConfirmationsFilter(p *confirmationsFilter) { + switch p.Confirmations { + case int(evmtypes.Finalized): + // the highest level of confidence maps to finalized + v.expression = v.nestedConfQuery(true, 0) + default: + v.expression = v.nestedConfQuery(false, uint64(p.Confirmations)) + } +} + func makeComp(comp primitives.ValueComparator, args *queryArgs, field, subfield, pattern string) (string, error) { cmp, err := cmpOpToString(comp.Operator) if err != nil { @@ -502,3 +509,20 @@ func (f *eventByTopicFilter) Accept(visitor primitives.Visitor) { v.VisitEventTopicsByValueFilter(f) } } + +type confirmationsFilter struct { + Confirmations int +} + +func NewConfirmationsFilter(confirmations int) query.Expression { + return query.Expression{Primitive: &confirmationsFilter{ + Confirmations: confirmations, + }} +} + +func (f *confirmationsFilter) Accept(visitor primitives.Visitor) { + switch v := visitor.(type) { + case *pgDSLParser: + v.VisitConfirmationsFilter(f) + } +} diff --git a/core/chains/evm/logpoller/parser_test.go b/core/chains/evm/logpoller/parser_test.go index b742448d0fc..d3d342f43ab 100644 --- a/core/chains/evm/logpoller/parser_test.go +++ b/core/chains/evm/logpoller/parser_test.go @@ -131,14 +131,17 @@ func TestDSLParser(t *testing.T) { t.Run("basic query with default primitives no order by and cursor", func(t *testing.T) { t.Parallel() + high, _ := query.Confidence(primitives.Highest) + low, _ := query.Confidence(primitives.Lowest) + parser := &pgDSLParser{} chainID := big.NewInt(1) expressions := []query.Expression{ query.Timestamp(10, primitives.Eq), query.TxHash(common.HexToHash("0x84").String()), query.Block(99, primitives.Neq), - query.Confirmation(primitives.Finalized), - query.Confirmation(primitives.Unconfirmed), + high, + low, } limiter := query.NewLimitAndSort(query.CursorLimit("10-0x42-20", query.CursorPrevious, 20)) @@ -167,7 +170,9 @@ func TestDSLParser(t *testing.T) { t.Run("finalized", func(t *testing.T) { parser := &pgDSLParser{} chainID := big.NewInt(1) - expressions := []query.Expression{query.Confirmation(primitives.Finalized)} + + high, _ := query.Confidence(primitives.Highest) + expressions := []query.Expression{high} limiter := query.LimitAndSort{} result, args, err := parser.buildQuery(chainID, expressions, limiter) @@ -185,7 +190,28 @@ func TestDSLParser(t *testing.T) { t.Run("unconfirmed", func(t *testing.T) { parser := &pgDSLParser{} chainID := big.NewInt(1) - expressions := []query.Expression{query.Confirmation(primitives.Unconfirmed)} + + low, _ := query.Confidence(primitives.Lowest) + expressions := []query.Expression{low} + limiter := query.LimitAndSort{} + + result, args, err := parser.buildQuery(chainID, expressions, limiter) + expected := "SELECT evm.logs.* " + + "FROM evm.logs " + + "WHERE evm_chain_id = :evm_chain_id " + + "AND block_number <= (SELECT greatest(block_number - :confs_0, 0) FROM evm.log_poller_blocks WHERE evm_chain_id = :evm_chain_id ORDER BY block_number DESC LIMIT 1)" + + require.NoError(t, err) + assert.Equal(t, expected, result) + + assertArgs(t, args, 2) + }) + + t.Run("exact confirmations", func(t *testing.T) { + parser := &pgDSLParser{} + chainID := big.NewInt(1) + + expressions := []query.Expression{NewConfirmationsFilter(25)} limiter := query.LimitAndSort{} result, args, err := parser.buildQuery(chainID, expressions, limiter) @@ -197,6 +223,11 @@ func TestDSLParser(t *testing.T) { require.NoError(t, err) assert.Equal(t, expected, result) + confirmations, ok := args.args["confs_0"] + + require.True(t, ok) + require.Equal(t, uint64(25), confirmations) + assertArgs(t, args, 2) }) }) @@ -256,6 +287,8 @@ func TestDSLParser(t *testing.T) { parser := &pgDSLParser{} chainID := big.NewInt(1) + + low, _ := query.Confidence(primitives.Lowest) expressions := []query.Expression{ {BoolExpression: query.BoolExpression{ Expressions: []query.Expression{ @@ -263,7 +296,7 @@ func TestDSLParser(t *testing.T) { {BoolExpression: query.BoolExpression{ Expressions: []query.Expression{ query.TxHash(common.HexToHash("0x84").Hex()), - query.Confirmation(primitives.Unconfirmed), + low, }, BoolOperator: query.OR, }}, @@ -298,6 +331,8 @@ func TestDSLParser(t *testing.T) { parser := &pgDSLParser{} chainID := big.NewInt(1) + + low, _ := query.Confidence(primitives.Lowest) expressions := []query.Expression{ {BoolExpression: query.BoolExpression{ Expressions: []query.Expression{ @@ -307,7 +342,7 @@ func TestDSLParser(t *testing.T) { query.TxHash(common.HexToHash("0x84").Hex()), {BoolExpression: query.BoolExpression{ Expressions: []query.Expression{ - query.Confirmation(primitives.Unconfirmed), + low, wordFilter, }, BoolOperator: query.AND, diff --git a/core/scripts/go.mod b/core/scripts/go.mod index d025a83d92b..e30c90a4ad2 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -21,7 +21,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 github.com/smartcontractkit/chainlink-vrf v0.0.0-20240222010609-cd67d123c772 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20240419185742-fd3cab206b2c diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 612a99b286f..2bf160448bc 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1185,8 +1185,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 h1:6PP8T5py2K+0Vd+8LP0DlDvPKhyXXhz1i2RwKoFhKPI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 h1:a/c/ge5tIJN2bPQRxgDjUyXvwtfxnTduqLMOSNHKZK8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/core/services/relay/evm/chain_reader.go b/core/services/relay/evm/chain_reader.go index 4a8c3691d1a..24089c55c0e 100644 --- a/core/services/relay/evm/chain_reader.go +++ b/core/services/relay/evm/chain_reader.go @@ -4,14 +4,17 @@ import ( "context" "fmt" "reflect" + "strconv" "strings" "time" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/google/uuid" + "github.com/pkg/errors" "github.com/smartcontractkit/chainlink-common/pkg/codec" "github.com/smartcontractkit/chainlink-common/pkg/types/query" + "github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives" commonservices "github.com/smartcontractkit/chainlink-common/pkg/services" commontypes "github.com/smartcontractkit/chainlink-common/pkg/types" @@ -207,17 +210,23 @@ func (cr *chainReader) addEvent(contractName, eventName string, a abi.ABI, chain return err } + steps, err := stepsFromConfig(chainReaderDefinition.ConfidenceConfirmations) + if err != nil { + return err + } + eb := &eventBinding{ - contractName: contractName, - eventName: eventName, - lp: cr.lp, - hash: event.ID, - inputInfo: inputInfo, - inputModifier: inputModifier, - codecTopicInfo: codecTopicInfo, - topics: make(map[string]topicDetail), - eventDataWords: chainReaderDefinition.GenericDataWordNames, - id: wrapItemType(contractName, eventName, false) + uuid.NewString(), + contractName: contractName, + eventName: eventName, + lp: cr.lp, + hash: event.ID, + inputInfo: inputInfo, + inputModifier: inputModifier, + codecTopicInfo: codecTopicInfo, + topics: make(map[string]topicDetail), + eventDataWords: chainReaderDefinition.GenericDataWordNames, + id: wrapItemType(contractName, eventName, false) + uuid.NewString(), + confidenceSteps: steps, } cr.contractBindings.AddReadBinding(contractName, eventName, eb) @@ -328,3 +337,40 @@ func setupEventInput(event abi.Event, def types.ChainReaderDefinition) ([]abi.Ar return filterArgs, types.NewCodecEntry(inputArgs, nil, nil), indexArgNames } + +func stepsFromConfig(values map[string]int) ([]confidenceStep, error) { + // default steps of 0.0 -> Unconfirmed and 1.0 to Finalized could be set here + // but it seems dangerous in place of an error + if len(values) == 0 { + return nil, errors.New("confidence to confirmations mappings are not defined") + } + + var hasLowestMapping, hasHighestMapping bool + + result := make([]confidenceStep, 0, len(values)) + for key, confirmations := range values { + confidence, err := strconv.ParseFloat(key, 64) + if err != nil { + return nil, err + } + + if confidence == float64(primitives.Lowest) { + hasLowestMapping = true + } + + if confidence == float64(primitives.Highest) { + hasHighestMapping = true + } + + result = append(result, confidenceStep{ + confidence: confidence, + confirmations: confirmations, + }) + } + + if !hasLowestMapping || !hasHighestMapping { + return nil, errors.New("confidence configuration should include highest and lowest mappings; highest can be -1 to indicated finalized") + } + + return result, nil +} diff --git a/core/services/relay/evm/chain_reader_test.go b/core/services/relay/evm/chain_reader_test.go index 72332f38a06..e6f8755e301 100644 --- a/core/services/relay/evm/chain_reader_test.go +++ b/core/services/relay/evm/chain_reader_test.go @@ -200,11 +200,13 @@ func (it *chainReaderInterfaceTester) Setup(t *testing.T) { OutputModifications: codec.ModifiersConfig{ &codec.RenameModifierConfig{Fields: map[string]string{"NestedStruct.Inner.IntVal": "I"}}, }, + ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, EventWithFilterName: { - ChainSpecificName: "Triggered", - ReadType: types.Event, - EventInputFields: []string{"Field"}, + ChainSpecificName: "Triggered", + ReadType: types.Event, + EventInputFields: []string{"Field"}, + ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, triggerWithDynamicTopic: { ChainSpecificName: triggerWithDynamicTopic, @@ -213,11 +215,13 @@ func (it *chainReaderInterfaceTester) Setup(t *testing.T) { InputModifications: codec.ModifiersConfig{ &codec.RenameModifierConfig{Fields: map[string]string{"FieldHash": "Field"}}, }, + ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, triggerWithAllTopics: { - ChainSpecificName: triggerWithAllTopics, - ReadType: types.Event, - EventInputFields: []string{"Field1", "Field2", "Field3"}, + ChainSpecificName: triggerWithAllTopics, + ReadType: types.Event, + EventInputFields: []string{"Field1", "Field2", "Field3"}, + ConfidenceConfirmations: map[string]int{"0.0": 0, "1.0": -1}, }, MethodReturningSeenStruct: { ChainSpecificName: "returnSeen", diff --git a/core/services/relay/evm/event_binding.go b/core/services/relay/evm/event_binding.go index 7e1a5f9f2da..62463047143 100644 --- a/core/services/relay/evm/event_binding.go +++ b/core/services/relay/evm/event_binding.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "reflect" + "sort" "strings" "sync" @@ -39,8 +40,9 @@ type eventBinding struct { // eventDataWords maps a generic name to a word index // key is a predefined generic name for evm log event data word // for eg. first evm data word(32bytes) of USDC log event is value so the key can be called value - eventDataWords map[string]uint8 - id string + eventDataWords map[string]uint8 + id string + confidenceSteps []confidenceStep } type topicDetail struct { @@ -48,6 +50,11 @@ type topicDetail struct { Index uint64 } +type confidenceStep struct { + confidence float64 + confirmations int +} + var _ readBinding = &eventBinding{} func (e *eventBinding) SetCodec(codec commontypes.RemoteCodec) { @@ -396,11 +403,29 @@ func (e *eventBinding) remapPrimitive(key string, expression query.Expression) ( } return logpoller.NewEventByTopicFilter(e.topics[key].Index, primitive.ValueComparators), nil + case *primitives.Confidence: + return logpoller.NewConfirmationsFilter(e.confirmationsFrom(primitive.ConfidenceLevel)), nil default: return expression, nil } } +func (e *eventBinding) confirmationsFrom(confidence primitives.ConfidenceLevel) int { + // sort highest to lowest on confidence + sort.Slice(e.confidenceSteps, func(i, j int) bool { + return e.confidenceSteps[i].confidence > e.confidenceSteps[j].confidence + }) + + for _, step := range e.confidenceSteps { + if float64(confidence) >= step.confidence { + return step.confirmations + } + } + + // return default of 0 if step doesn't exist + return 0 +} + func wrapInternalErr(err error) error { if err == nil { return nil diff --git a/core/services/relay/evm/types/types.go b/core/services/relay/evm/types/types.go index 650a75d6006..6dcc614ce39 100644 --- a/core/services/relay/evm/types/types.go +++ b/core/services/relay/evm/types/types.go @@ -62,6 +62,9 @@ type chainReaderDefinitionFields struct { // key is a predefined generic name for evm log event data word // for eg. first evm data word(32bytes) of USDC log event is value so the key can be called value GenericDataWordNames map[string]uint8 `json:"genericDataWordNames,omitempty"` + // ConfidenceConfirmations is a mapping between a ConfidenceLevel and the confirmations associated. Confidence levels + // should be valid float values. + ConfidenceConfirmations map[string]int `json:"confidenceConfirmations"` } func (d *ChainReaderDefinition) MarshalText() ([]byte, error) { diff --git a/crib/go.mod b/crib/go.mod index 28bcaece757..807a955e865 100644 --- a/crib/go.mod +++ b/crib/go.mod @@ -17,7 +17,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/rs/zerolog v1.32.0 // indirect - golang.org/x/sys v0.15.0 // indirect + golang.org/x/sys v0.16.0 // indirect ) replace ( diff --git a/crib/go.sum b/crib/go.sum index d1680424a7a..37720195192 100644 --- a/crib/go.sum +++ b/crib/go.sum @@ -26,12 +26,12 @@ github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/smartcontractkit/wasp v0.4.6 h1:s6J8HgpxMHORl19nCpZPxc5jaVUQv8EXB6QjTuLXXnw= github.com/smartcontractkit/wasp v0.4.6/go.mod h1:+ViWdUf1ap6powiEiwPskpZfH/Q1sG29YoVav7zGOIo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/dashboard-lib/go.mod b/dashboard-lib/go.mod index eef60129771..ecb33bbae30 100644 --- a/dashboard-lib/go.mod +++ b/dashboard-lib/go.mod @@ -13,10 +13,13 @@ replace github.com/grafana/grafana-foundation-sdk/go => github.com/grafana/grafa require ( github.com/K-Phoen/sdk v0.12.4 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/gosimple/slug v1.13.1 // indirect github.com/gosimple/unidecode v1.0.1 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/common v0.45.0 // indirect - golang.org/x/sys v0.13.0 // indirect + github.com/stretchr/testify v1.9.0 // indirect + golang.org/x/sys v0.16.0 // indirect ) diff --git a/dashboard-lib/go.sum b/dashboard-lib/go.sum index 0af3f10f4fe..7eb74088f13 100644 --- a/dashboard-lib/go.sum +++ b/dashboard-lib/go.sum @@ -3,8 +3,8 @@ github.com/K-Phoen/grabana v0.22.1/go.mod h1:3LTXrTzQzTKTgvKSXdRjlsJbizSOW/V23Q3 github.com/K-Phoen/sdk v0.12.4 h1:j2EYuBJm3zDTD0fGKACVFWxAXtkR0q5QzfVqxmHSeGQ= github.com/K-Phoen/sdk v0.12.4/go.mod h1:qmM0wO23CtoDux528MXPpYvS4XkRWkWX6rvX9Za8EVU= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= @@ -19,19 +19,19 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -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/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.mod b/go.mod index f6156741089..f463ba85f5e 100644 --- a/go.mod +++ b/go.mod @@ -72,7 +72,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chain-selectors v1.0.10 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240422130241-13c17a91b2ab diff --git a/go.sum b/go.sum index ca404242d88..63fd2c5d648 100644 --- a/go.sum +++ b/go.sum @@ -1180,8 +1180,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 h1:6PP8T5py2K+0Vd+8LP0DlDvPKhyXXhz1i2RwKoFhKPI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 h1:a/c/ge5tIJN2bPQRxgDjUyXvwtfxnTduqLMOSNHKZK8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 5fbb659b25d..5c7ab9443ac 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -26,7 +26,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 github.com/smartcontractkit/chainlink-testing-framework v1.28.8 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index d34b605c89f..bc78476806d 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1517,8 +1517,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 h1:6PP8T5py2K+0Vd+8LP0DlDvPKhyXXhz1i2RwKoFhKPI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 h1:a/c/ge5tIJN2bPQRxgDjUyXvwtfxnTduqLMOSNHKZK8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 36e32d9974a..9851e3998a0 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,7 +16,7 @@ require ( github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 github.com/smartcontractkit/chainlink-testing-framework v1.28.8 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20240214231432-4ad5eb95178c github.com/smartcontractkit/chainlink/v2 v2.9.0-beta0.0.20240216210048-da02459ddad8 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index a7c0fa60ad6..3583a7fa073 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1500,8 +1500,8 @@ github.com/smartcontractkit/chain-selectors v1.0.10 h1:t9kJeE6B6G+hKD0GYR4kGJSCq github.com/smartcontractkit/chain-selectors v1.0.10/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4 h1:6PP8T5py2K+0Vd+8LP0DlDvPKhyXXhz1i2RwKoFhKPI= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240507142850-569a909ad3b4/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7 h1:a/c/ge5tIJN2bPQRxgDjUyXvwtfxnTduqLMOSNHKZK8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240508145405-e8e6027d92a7/go.mod h1:sj0pjL+METqeYL9ibp0T8SXquymlaQsofa6bdfLgXX8= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee h1:eFuBKyEbL2b+eyfgV/Eu9+8HuCEev+IcBi+K9l1dG7g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240419213354-ea34a948e2ee/go.mod h1:uATrrJ8IsuBkOBJ46USuf73gz9gZy5k5bzGE5/ji/rc= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo=