From d226d767502c719291da2eed6cd22852e4fc169c Mon Sep 17 00:00:00 2001 From: Cedric Cordenier Date: Mon, 17 Jun 2024 14:24:31 +0100 Subject: [PATCH 1/3] Allow flat interpolation --- .changeset/tall-wombats-deliver.md | 5 + .../capabilities/remote/target/client_test.go | 8 +- .../remote/target/endtoend_test.go | 14 ++- .../target/request/client_request_test.go | 11 ++- .../target/request/server_request_test.go | 6 +- .../remote/trigger_subscriber_test.go | 15 +-- core/capabilities/remote/utils_test.go | 4 +- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 +- core/services/workflows/engine.go | 17 +++- core/services/workflows/engine_test.go | 99 ++++++++++++++++++- core/services/workflows/models_test.go | 4 +- go.mod | 2 +- go.sum | 4 +- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 +- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 +- 18 files changed, 162 insertions(+), 45 deletions(-) create mode 100644 .changeset/tall-wombats-deliver.md diff --git a/.changeset/tall-wombats-deliver.md b/.changeset/tall-wombats-deliver.md new file mode 100644 index 00000000000..cb165b999a9 --- /dev/null +++ b/.changeset/tall-wombats-deliver.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#internal Allow outputs to be passed directly to the inputs diff --git a/core/capabilities/remote/target/client_test.go b/core/capabilities/remote/target/client_test.go index 64b824d74d4..aa4a645df92 100644 --- a/core/capabilities/remote/target/client_test.go +++ b/core/capabilities/remote/target/client_test.go @@ -33,9 +33,9 @@ func Test_Client_DonTopologies(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } capability := &TestCapability{} @@ -64,9 +64,9 @@ func Test_Client_TransmissionSchedules(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } capability := &TestCapability{} diff --git a/core/capabilities/remote/target/endtoend_test.go b/core/capabilities/remote/target/endtoend_test.go index d5305afeb32..f7cc9e04bf2 100644 --- a/core/capabilities/remote/target/endtoend_test.go +++ b/core/capabilities/remote/target/endtoend_test.go @@ -74,9 +74,9 @@ func Test_RemoteTargetCapability_TransmissionSchedules(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } transmissionSchedule, err := values.NewMap(map[string]any{ @@ -106,9 +106,9 @@ func Test_RemoteTargetCapability_DonTopologies(t *testing.T) { responseTest := func(t *testing.T, responseCh <-chan commoncap.CapabilityResponse, responseError error) { require.NoError(t, responseError) response := <-responseCh - responseValue, err := response.Value.Unwrap() + mp, err := response.Value.Unwrap() require.NoError(t, err) - assert.Equal(t, "aValue1", responseValue.(string)) + assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string)) } transmissionSchedule, err := values.NewMap(map[string]any{ @@ -409,8 +409,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit value := request.Inputs.Underlying["executeValue1"] + response, err := values.NewMap(map[string]any{"response": value}) + if err != nil { + return nil, err + } ch <- commoncap.CapabilityResponse{ - Value: value, + Value: response, } return ch, nil diff --git a/core/capabilities/remote/target/request/client_request_test.go b/core/capabilities/remote/target/request/client_request_test.go index a053623cd2c..52e324a654c 100644 --- a/core/capabilities/remote/target/request/client_request_test.go +++ b/core/capabilities/remote/target/request/client_request_test.go @@ -75,8 +75,10 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { Config: transmissionSchedule, } + m, err := values.NewMap(map[string]any{"response": "response1"}) + require.NoError(t, err) capabilityResponse := commoncap.CapabilityResponse{ - Value: values.NewString("response1"), + Value: m, Err: nil, } @@ -106,8 +108,10 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { require.NoError(t, err) + nm, err := values.NewMap(map[string]any{"response": "response2"}) + require.NoError(t, err) capabilityResponse2 := commoncap.CapabilityResponse{ - Value: values.NewString("response2"), + Value: nm, Err: nil, } @@ -297,8 +301,9 @@ func Test_ClientRequest_MessageValidation(t *testing.T) { require.NoError(t, err) response := <-request.ResponseChan() + resp := response.Value.Underlying["response"] - assert.Equal(t, response.Value, values.NewString("response1")) + assert.Equal(t, resp, values.NewString("response1")) }) } diff --git a/core/capabilities/remote/target/request/server_request_test.go b/core/capabilities/remote/target/request/server_request_test.go index fe3fdd713b5..d5ed471c957 100644 --- a/core/capabilities/remote/target/request/server_request_test.go +++ b/core/capabilities/remote/target/request/server_request_test.go @@ -225,8 +225,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit value := request.Inputs.Underlying["executeValue1"] + response, err := values.NewMap(map[string]any{"response": value}) + if err != nil { + return nil, err + } ch <- commoncap.CapabilityResponse{ - Value: value, + Value: response, } return ch, nil diff --git a/core/capabilities/remote/trigger_subscriber_test.go b/core/capabilities/remote/trigger_subscriber_test.go index 3b819f9f3cc..47504309512 100644 --- a/core/capabilities/remote/trigger_subscriber_test.go +++ b/core/capabilities/remote/trigger_subscriber_test.go @@ -18,11 +18,14 @@ import ( ) const ( - peerID1 = "12D3KooWF3dVeJ6YoT5HFnYhmwQWWMoEwVFzJQ5kKCMX3ZityxMC" - peerID2 = "12D3KooWQsmok6aD8PZqt3RnJhQRrNzKHLficq7zYFRp7kZ1hHP8" - workflowID1 = "workflowID1" - triggerEvent1 = "triggerEvent1" - triggerEvent2 = "triggerEvent2" + peerID1 = "12D3KooWF3dVeJ6YoT5HFnYhmwQWWMoEwVFzJQ5kKCMX3ZityxMC" + peerID2 = "12D3KooWQsmok6aD8PZqt3RnJhQRrNzKHLficq7zYFRp7kZ1hHP8" + workflowID1 = "workflowID1" +) + +var ( + triggerEvent1 = map[string]any{"event": "triggerEvent1"} + triggerEvent2 = map[string]any{"event": "triggerEvent2"} ) func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { @@ -77,7 +80,7 @@ func TestTriggerSubscriber_RegisterAndReceive(t *testing.T) { <-awaitRegistrationMessageCh // receive trigger event - triggerEventValue, err := values.Wrap(triggerEvent1) + triggerEventValue, err := values.NewMap(triggerEvent1) require.NoError(t, err) capResponse := commoncap.CapabilityResponse{ Value: triggerEventValue, diff --git a/core/capabilities/remote/utils_test.go b/core/capabilities/remote/utils_test.go index b5f97af99ed..0dd91696fb6 100644 --- a/core/capabilities/remote/utils_test.go +++ b/core/capabilities/remote/utils_test.go @@ -89,7 +89,7 @@ func TestToPeerID(t *testing.T) { } func TestDefaultModeAggregator_Aggregate(t *testing.T) { - val, err := values.Wrap(triggerEvent1) + val, err := values.NewMap(triggerEvent1) require.NoError(t, err) capResponse1 := commoncap.CapabilityResponse{ Value: val, @@ -98,7 +98,7 @@ func TestDefaultModeAggregator_Aggregate(t *testing.T) { marshaled1, err := pb.MarshalCapabilityResponse(capResponse1) require.NoError(t, err) - val2, err := values.Wrap(triggerEvent2) + val2, err := values.NewMap(triggerEvent2) require.NoError(t, err) capResponse2 := commoncap.CapabilityResponse{ Value: val2, diff --git a/core/scripts/go.mod b/core/scripts/go.mod index aa069443b10..b472a21bac1 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -24,7 +24,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f 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 e657854684a..bad115861b6 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1212,8 +1212,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 h1:+0ElI3A3mKxYbw//a34d1GmLXyfWsw3IuDHv07dImWQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/core/services/workflows/engine.go b/core/services/workflows/engine.go index 28f37cd7c43..b81e50dc422 100644 --- a/core/services/workflows/engine.go +++ b/core/services/workflows/engine.go @@ -624,18 +624,25 @@ func (e *Engine) executeStep(ctx context.Context, l logger.Logger, msg stepReque return nil, nil, err } - i, err := findAndInterpolateAllKeys(step.Inputs, msg.state) + var inputs any + if step.Inputs.OutputRef != "" { + inputs = step.Inputs.OutputRef + } else { + inputs = step.Inputs.Mapping + } + + i, err := findAndInterpolateAllKeys(inputs, msg.state) if err != nil { return nil, nil, err } - inputs, err := values.NewMap(i.(map[string]any)) + inputsMap, err := values.NewMap(i.(map[string]any)) if err != nil { return nil, nil, err } tr := capabilities.CapabilityRequest{ - Inputs: inputs, + Inputs: inputsMap, Config: step.config, Metadata: capabilities.RequestMetadata{ WorkflowID: msg.state.WorkflowID, @@ -648,10 +655,10 @@ func (e *Engine) executeStep(ctx context.Context, l logger.Logger, msg stepReque output, err := executeSyncAndUnwrapSingleValue(ctx, step.capability, tr) if err != nil { - return inputs, nil, err + return inputsMap, nil, err } - return inputs, output, err + return inputsMap, output, err } func (e *Engine) deregisterTrigger(ctx context.Context, t *triggerCapability, triggerIdx int) error { diff --git a/core/services/workflows/engine_test.go b/core/services/workflows/engine_test.go index 09af6d63580..d8c7189504d 100644 --- a/core/services/workflows/engine_test.go +++ b/core/services/workflows/engine_test.go @@ -483,8 +483,9 @@ targets: ` ) -func mockAction() (*mockCapability, values.Value) { - outputs := values.NewString("output") +func mockAction(t *testing.T) (*mockCapability, values.Value) { + outputs, err := values.NewMap(map[string]any{"output": "foo"}) + require.NoError(t, err) return newMockCapability( capabilities.MustNewCapabilityInfo( "read_chain_action@1.0.0", @@ -510,7 +511,7 @@ func TestEngine_MultiStepDependencies(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, out := mockAction() + action, out := mockAction(t) require.NoError(t, reg.Add(ctx, action)) eng, hooks := newTestEngine(t, reg, multiStepWorkflow) @@ -557,7 +558,7 @@ func TestEngine_ResumesPendingExecutions(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, _ := mockAction() + action, _ := mockAction(t) require.NoError(t, reg.Add(ctx, action)) dbstore := store.NewDBStore(pgtest.NewSqlxDB(t), clockwork.NewFakeClock()) @@ -610,7 +611,7 @@ func TestEngine_TimesOutOldExecutions(t *testing.T) { require.NoError(t, reg.Add(ctx, mockConsensus())) require.NoError(t, reg.Add(ctx, mockTarget())) - action, _ := mockAction() + action, _ := mockAction(t) require.NoError(t, reg.Add(ctx, action)) clock := clockwork.NewFakeClock() @@ -791,3 +792,91 @@ func TestEngine_GetsNodeInfoDuringInitialization(t *testing.T) { assert.Equal(t, node, eng.localNode) } + +const passthroughInterpolationWorkflow = ` +triggers: + - id: "mercury-trigger@1.0.0" + config: + feedIds: + - "0x1111111111111111111100000000000000000000000000000000000000000000" + - "0x2222222222222222222200000000000000000000000000000000000000000000" + - "0x3333333333333333333300000000000000000000000000000000000000000000" + +consensus: + - id: "offchain_reporting@1.0.0" + ref: "evm_median" + inputs: + observations: + - "$(trigger.outputs)" + config: + aggregation_method: "data_feeds_2_0" + aggregation_config: + "0x1111111111111111111100000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + "0x2222222222222222222200000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + "0x3333333333333333333300000000000000000000000000000000000000000000": + deviation: "0.001" + heartbeat: 3600 + encoder: "EVM" + encoder_config: + abi: "mercury_reports bytes[]" + +targets: + - id: "write_ethereum-testnet-sepolia@1.0.0" + inputs: "$(evm_median.outputs)" + config: + address: "0x54e220867af6683aE6DcBF535B4f952cB5116510" + params: ["$(report)"] + abi: "receive(report bytes)" +` + +func TestEngine_PassthroughInterpolation(t *testing.T) { + ctx := testutils.Context(t) + reg := coreCap.NewRegistry(logger.TestLogger(t)) + + trigger, _ := mockTrigger(t) + + require.NoError(t, reg.Add(ctx, trigger)) + require.NoError(t, reg.Add(ctx, mockConsensus())) + writeID := "write_ethereum-testnet-sepolia@1.0.0" + target := newMockCapability( + capabilities.MustNewCapabilityInfo( + writeID, + capabilities.CapabilityTypeTarget, + "a write capability targeting ethereum sepolia testnet", + ), + func(req capabilities.CapabilityRequest) (capabilities.CapabilityResponse, error) { + return capabilities.CapabilityResponse{ + Value: req.Inputs, + }, nil + }, + ) + require.NoError(t, reg.Add(ctx, target)) + + eng, testHooks := newTestEngine( + t, + reg, + passthroughInterpolationWorkflow, + ) + + servicetest.Run(t, eng) + + eid := getExecutionId(t, eng, testHooks) + + state, err := eng.executionStates.Get(ctx, eid) + require.NoError(t, err) + + assert.Equal(t, state.Status, store.StatusCompleted) + + // There is passthrough interpolation between the consensus and target steps, + // so the input of one should be the output of the other, exactly. + gotInputs, err := values.Unwrap(state.Steps[writeID].Inputs) + require.NoError(t, err) + + gotOutputs, err := values.Unwrap(state.Steps["evm_median"].Outputs.Value) + require.NoError(t, err) + assert.Equal(t, gotInputs, gotOutputs) +} diff --git a/core/services/workflows/models_test.go b/core/services/workflows/models_test.go index 4b4747c486f..a28aeb9df01 100644 --- a/core/services/workflows/models_test.go +++ b/core/services/workflows/models_test.go @@ -214,7 +214,7 @@ targets: }, }, { - name: "non-trigger step with no dependent refs", + name: "invalid refs", yaml: ` triggers: - id: "a-trigger@1.0.0" @@ -241,7 +241,7 @@ targets: inputs: consensus_output: $(a-consensus.outputs) `, - errMsg: "all non-trigger steps must have a dependent ref", + errMsg: "invalid refs", }, { name: "duplicate edge declarations", diff --git a/go.mod b/go.mod index c9c060c5af0..ee9cd12a388 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.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 diff --git a/go.sum b/go.sum index 1a87410802a..6493525acdd 100644 --- a/go.sum +++ b/go.sum @@ -1171,8 +1171,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 h1:+0ElI3A3mKxYbw//a34d1GmLXyfWsw3IuDHv07dImWQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= 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 c622c6bf9d3..26af69d3b7b 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -27,7 +27,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f github.com/smartcontractkit/chainlink-testing-framework v1.30.9 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 8a67373725e..5783f361d87 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1512,8 +1512,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 h1:+0ElI3A3mKxYbw//a34d1GmLXyfWsw3IuDHv07dImWQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= 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 1d89efcb01c..3766e9494b1 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.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f github.com/smartcontractkit/chainlink-testing-framework v1.30.9 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 1b339816dea..660414f3a31 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1502,8 +1502,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16 h1:+0ElI3A3mKxYbw//a34d1GmLXyfWsw3IuDHv07dImWQ= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240618210005-a88f179ffc16/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= From 31a8e133ed518bad159e3b0745357c84e6eb96a3 Mon Sep 17 00:00:00 2001 From: Cedric Cordenier Date: Mon, 24 Jun 2024 11:21:29 +0100 Subject: [PATCH 2/3] Update common --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index b472a21bac1..6503da0f03e 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -24,7 +24,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 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 bad115861b6..6e2b5d9c839 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1212,8 +1212,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 h1:rhsUMdSrCerrUzzsOWaHkcb+qlB7knEAXYv/P29YUn8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= diff --git a/go.mod b/go.mod index ee9cd12a388..85f1e89278f 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.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 github.com/smartcontractkit/chainlink-feeds v0.0.0-20240522213638-159fb2d99917 diff --git a/go.sum b/go.sum index 6493525acdd..94108f391ed 100644 --- a/go.sum +++ b/go.sum @@ -1171,8 +1171,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 h1:rhsUMdSrCerrUzzsOWaHkcb+qlB7knEAXYv/P29YUn8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= 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 26af69d3b7b..48c9dde178a 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -27,7 +27,7 @@ require ( github.com/shopspring/decimal v1.3.1 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 github.com/smartcontractkit/chainlink-testing-framework v1.30.9 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 5783f361d87..d6b04471282 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1512,8 +1512,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 h1:rhsUMdSrCerrUzzsOWaHkcb+qlB7knEAXYv/P29YUn8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= 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 3766e9494b1..7d36736d966 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.4 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 github.com/smartcontractkit/chainlink-testing-framework v1.30.9 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 660414f3a31..152da71c308 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1502,8 +1502,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.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8= github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f h1:oMWyaKD36Q8YEuf6U6N9Y/+dhoVrDA2Kc+p1v62nb3U= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240619131342-fcdcef990c3f/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468 h1:rhsUMdSrCerrUzzsOWaHkcb+qlB7knEAXYv/P29YUn8= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240625145034-72dab520f468/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d h1:5tgMC5Gi2UAOKZ+m28W8ubjLeR0pQCAcrz6eQ0rW510= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240524214833-c362c2ebbd2d/go.mod h1:0UNuO3nDt9MFsZPaHJBEUolxVkN0iC69j1ccDp95e8k= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240220203239-09be0ea34540 h1:xFSv8561jsLtF6gYZr/zW2z5qUUAkcFkApin2mnbYTo= From 74416992fb8bef930cad8cbcdea5f1512e25c023 Mon Sep 17 00:00:00 2001 From: Cedric Cordenier Date: Thu, 27 Jun 2024 08:30:02 +0100 Subject: [PATCH 3/3] Fix tests after rebase --- core/capabilities/streams/trigger_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/capabilities/streams/trigger_test.go b/core/capabilities/streams/trigger_test.go index b8106e9212e..8f9450d2c9b 100644 --- a/core/capabilities/streams/trigger_test.go +++ b/core/capabilities/streams/trigger_test.go @@ -194,7 +194,10 @@ func newTriggerEvent(t *testing.T, reportList []datastreams.FeedReport, triggerE eventVal, err := values.Wrap(triggerEvent) require.NoError(t, err) - marshaled, err := pb.MarshalCapabilityResponse(capabilities.CapabilityResponse{Value: eventVal}) + marshaled, err := pb.MarshalCapabilityResponse( + capabilities.CapabilityResponse{ + Value: eventVal.(*values.Map), + }) require.NoError(t, err) msg := &remotetypes.MessageBody{ Sender: sender[:],