Skip to content

Commit 2fd5cc1

Browse files
authored
bump common for capability re-init fix (#20089) & bump common for cap reg updates (#20091) [cherry-pick] (#20150)
* bump common for capability re-init fix (#20089) (cherry picked from commit 252a073) * bump common for cap reg updates (#20091) (cherry picked from commit f88b930) * core/services/relay/evm: add unimplemented Relayer.GetLatestLPBlock
1 parent 4790431 commit 2fd5cc1

19 files changed

Lines changed: 91 additions & 55 deletions

File tree

core/capabilities/compute/compute_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ func TestComputeStartAddsToRegistry(t *testing.T) {
9898

9999
cp, err := th.registry.Get(t.Context(), CapabilityIDCompute)
100100
require.NoError(t, err)
101-
assert.Equal(t, th.compute, cp)
101+
loader, ok := cp.(interface {
102+
Load() *cappkg.ExecutableCapability
103+
})
104+
require.True(t, ok, "expected atomic executable but got: %T", cp)
105+
assert.Equal(t, th.compute, *loader.Load())
102106
}
103107

104108
func TestComputeExecuteMissingConfig(t *testing.T) {

core/capabilities/launcher_test.go

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
ragetypes "github.com/smartcontractkit/libocr/ragep2p/types"
1616

1717
"github.com/smartcontractkit/chainlink-common/pkg/capabilities"
18+
"github.com/smartcontractkit/chainlink-common/pkg/services/servicetest"
1819

1920
capabilitiespb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb"
2021
"github.com/smartcontractkit/chainlink-protos/cre/go/values"
@@ -345,7 +346,13 @@ func TestLauncher_RemoteTriggerModeAggregatorShim(t *testing.T) {
345346
baseCapability, err := registry.Get(ctx, fullTriggerCapID)
346347
require.NoError(t, err)
347348

348-
remoteTriggerSubscriber, ok := baseCapability.(remote.TriggerSubscriber)
349+
loader, ok := baseCapability.(interface {
350+
Load() *capabilities.TriggerCapability
351+
})
352+
require.True(t, ok)
353+
loaded := loader.Load()
354+
require.NotNil(t, loaded)
355+
remoteTriggerSubscriber, ok := (*loaded).(remote.TriggerSubscriber)
349356
require.True(t, ok, "remote trigger capability")
350357

351358
// Register trigger
@@ -887,8 +894,7 @@ func TestLauncher_V2CapabilitiesAddViaCombinedClient(t *testing.T) {
887894
&mockDonNotifier{},
888895
)
889896
require.NoError(t, err)
890-
require.NoError(t, launcher.Start(t.Context()))
891-
defer launcher.Close()
897+
servicetest.Run(t, launcher)
892898

893899
dispatcher.On("SetReceiverForMethod", fullTriggerCapID, capDonID, "StreamsTrigger", mock.AnythingOfType("*remote.triggerSubscriber")).Return(nil)
894900
dispatcher.On("SetReceiverForMethod", fullExecutableCapID, capDonID, "Write", mock.AnythingOfType("*executable.client")).Return(nil)
@@ -899,8 +905,14 @@ func TestLauncher_V2CapabilitiesAddViaCombinedClient(t *testing.T) {
899905

900906
trigCap, err := registry.Get(t.Context(), fullTriggerCapID)
901907
require.NoError(t, err)
902-
trigCC, ok := trigCap.(remote.CombinedClient)
903-
assert.True(t, ok, "expected CombinedClient object")
908+
atomCC, ok := trigCap.(interface {
909+
Load() *capabilities.ExecutableAndTriggerCapability
910+
})
911+
require.True(t, ok, "expected CombinedClient object but got: %T", atomCC)
912+
loaded := atomCC.Load()
913+
require.NotNil(t, loaded)
914+
trigCC, ok := (*loaded).(remote.CombinedClient)
915+
require.True(t, ok, "expected CombinedClient object")
904916
subscriber := trigCC.GetTriggerSubscriber("StreamsTrigger")
905917
capInfo, err := subscriber.Info(t.Context())
906918
require.NoError(t, err)
@@ -909,8 +921,14 @@ func TestLauncher_V2CapabilitiesAddViaCombinedClient(t *testing.T) {
909921

910922
execCap, err := registry.Get(t.Context(), fullExecutableCapID)
911923
require.NoError(t, err)
912-
execCC, ok := execCap.(remote.CombinedClient)
913-
assert.True(t, ok, "expected CombinedClient object")
924+
atomCC, ok = execCap.(interface {
925+
Load() *capabilities.ExecutableAndTriggerCapability
926+
})
927+
require.True(t, ok, "expected CombinedClient object but got: %T", atomCC)
928+
loaded = atomCC.Load()
929+
require.NotNil(t, loaded)
930+
execCC, ok := (*loaded).(remote.CombinedClient)
931+
require.True(t, ok, "expected CombinedClient object")
914932
require.NotNil(t, execCC.GetExecutableClient("Write"))
915933

916934
// Now update config for one capability and verify it's propagated correctly (DON size)

core/capabilities/vault/capability_test.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,15 +1067,23 @@ func TestCapability_Lifecycle(t *testing.T) {
10671067
reg := coreCapabilities.NewRegistry(lggr)
10681068
capability := NewCapability(lggr, clock, expiry, handler, requestAuthorizer, reg, nil)
10691069

1070+
_, err := reg.GetExecutable(t.Context(), vault.CapabilityID)
1071+
require.ErrorContains(t, err, "no compatible capability found for id vault@1.0.0")
1072+
10701073
require.NoError(t, capability.Start(t.Context()))
10711074

1072-
_, err := reg.GetExecutable(t.Context(), vault.CapabilityID)
1075+
_, err = reg.GetExecutable(t.Context(), vault.CapabilityID)
10731076
require.NoError(t, err)
10741077

10751078
require.NoError(t, capability.Close())
10761079

1077-
_, err = reg.GetExecutable(t.Context(), vault.CapabilityID)
1078-
require.ErrorContains(t, err, "no compatible capability found for id vault@1.0.0")
1080+
got, err := reg.GetExecutable(t.Context(), vault.CapabilityID)
1081+
require.NoError(t, err)
1082+
loader, ok := got.(interface {
1083+
Load() *capabilities.ExecutableCapability
1084+
})
1085+
require.True(t, ok)
1086+
require.Nil(t, loader.Load())
10791087
}
10801088

10811089
func TestCapability_PublicKeyGet(t *testing.T) {

core/scripts/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ require (
4747
github.com/shopspring/decimal v1.4.0
4848
github.com/smartcontractkit/chainlink-automation v0.8.1
4949
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251009203201-900123a5c46a
50-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613
50+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49
5151
github.com/smartcontractkit/chainlink-data-streams v0.1.6
5252
github.com/smartcontractkit/chainlink-deployments-framework v0.56.0
5353
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251020152820-5fb041bf92b7
@@ -481,7 +481,7 @@ require (
481481
github.com/smartcontractkit/chainlink-aptos v0.0.0-20251013133428-62ab1091a563 // indirect
482482
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5 // indirect
483483
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 // indirect
484-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14 // indirect
484+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
485485
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
486486
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect
487487
github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250717121125-2350c82883e2 // indirect

core/scripts/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,10 +1603,10 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-f
16031603
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
16041604
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 h1:Z4t2ZY+ZyGWxtcXvPr11y4o3CGqhg3frJB5jXkCSvWA=
16051605
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1606-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613 h1:6tAjh/pJgzNVFcAEV9utp6xQZrlC3NSUCO8SGZtHaws=
1607-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613/go.mod h1:WqzfMO8jimnPU8BLGetBTy12NBHO5M0UdR47giNsmbU=
1608-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14 h1:5K4U9ZYDr11i530QZxbmVboxaOKSID7gr4bT2miQR8E=
1609-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY=
1606+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49 h1:LQLNcOmgba8PfUjfSTqh3e+gm+vYfAb+NwhoJYMfPPI=
1607+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49/go.mod h1:al5VNrscTtWnxJaYJN6E3jixY17CvazC4VA6rOpLEHI=
1608+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg=
1609+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY=
16101610
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=
16111611
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0=
16121612
github.com/smartcontractkit/chainlink-data-streams v0.1.6 h1:B3cwmJrVYoJVAjPOyQWTNaGD+V30HI1vFHhC2dQpWDo=

core/services/relay/evm/evm.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import (
3535
"github.com/smartcontractkit/chainlink-common/pkg/sqlutil"
3636
commontypes "github.com/smartcontractkit/chainlink-common/pkg/types"
3737
cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"
38+
"github.com/smartcontractkit/chainlink-common/pkg/types/chains/evm"
3839
coretypes "github.com/smartcontractkit/chainlink-common/pkg/types/core"
3940
"github.com/smartcontractkit/chainlink-evm/pkg/chains/legacyevm"
4041
"github.com/smartcontractkit/chainlink-evm/pkg/codec"
@@ -161,6 +162,10 @@ type Relayer struct {
161162
registerer prometheus.Registerer
162163
}
163164

165+
func (r *Relayer) GetLatestLPBlock(ctx context.Context) (*evm.LPBlock, error) {
166+
return nil, errors.New("GetLatestLPBlock not implemented")
167+
}
168+
164169
type MercuryConfig interface {
165170
Transmitter() coreconfig.MercuryTransmitter
166171
VerboseLogging() bool

deployment/cre/jobs/propose_job_spec_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"testing"
88

99
"github.com/Masterminds/semver/v3"
10-
chainsel "github.com/smartcontractkit/chain-selectors"
11-
"github.com/smartcontractkit/quarantine"
1210
"github.com/stretchr/testify/assert"
1311
"github.com/stretchr/testify/require"
1412

13+
chainsel "github.com/smartcontractkit/chain-selectors"
14+
"github.com/smartcontractkit/quarantine"
15+
1516
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
1617
cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
1718
"github.com/smartcontractkit/chainlink/deployment/cre/jobs"

deployment/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ require (
4141
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251009203201-900123a5c46a
4242
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5
4343
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5
44-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613
44+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49
4545
github.com/smartcontractkit/chainlink-deployments-framework v0.56.0
4646
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251020152820-5fb041bf92b7
4747
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251015115541-729ba0b2b1c1
@@ -404,7 +404,7 @@ require (
404404
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect
405405
github.com/sirupsen/logrus v1.9.3 // indirect
406406
github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect
407-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14 // indirect
407+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
408408
github.com/smartcontractkit/chainlink-data-streams v0.1.6 // indirect
409409
github.com/smartcontractkit/chainlink-feeds v0.1.2-0.20250227211209-7cd000095135 // indirect
410410
github.com/smartcontractkit/chainlink-framework/capabilities v0.0.0-20250818175541-3389ac08a563 // indirect

deployment/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,10 +1336,10 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-f
13361336
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
13371337
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5 h1:Z4t2ZY+ZyGWxtcXvPr11y4o3CGqhg3frJB5jXkCSvWA=
13381338
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1339-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613 h1:6tAjh/pJgzNVFcAEV9utp6xQZrlC3NSUCO8SGZtHaws=
1340-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613/go.mod h1:WqzfMO8jimnPU8BLGetBTy12NBHO5M0UdR47giNsmbU=
1341-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14 h1:5K4U9ZYDr11i530QZxbmVboxaOKSID7gr4bT2miQR8E=
1342-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY=
1339+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49 h1:LQLNcOmgba8PfUjfSTqh3e+gm+vYfAb+NwhoJYMfPPI=
1340+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49/go.mod h1:al5VNrscTtWnxJaYJN6E3jixY17CvazC4VA6rOpLEHI=
1341+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9oqASnkS03RE1HQwYQQxrO4l46O5JSzxqLgg=
1342+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY=
13431343
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=
13441344
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7/go.mod h1:yaDOAZF6MNB+NGYpxGCUc+owIdKrjvFW0JODdTcQ3V0=
13451345
github.com/smartcontractkit/chainlink-data-streams v0.1.6 h1:B3cwmJrVYoJVAjPOyQWTNaGD+V30HI1vFHhC2dQpWDo=

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ require (
8484
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20251009203201-900123a5c46a
8585
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250912190424-fd2e35d7deb5
8686
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250912190424-fd2e35d7deb5
87-
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251028003641-8d09e93e8613
87+
github.com/smartcontractkit/chainlink-common v0.9.6-0.20251029135506-45658d23dc49
8888
github.com/smartcontractkit/chainlink-data-streams v0.1.6
8989
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20251020152820-5fb041bf92b7
9090
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20251015115541-729ba0b2b1c1
@@ -345,7 +345,7 @@ require (
345345
github.com/sasha-s/go-deadlock v0.3.5 // indirect
346346
github.com/sethvargo/go-retry v0.2.4 // indirect
347347
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
348-
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.9-0.20251020192327-c433c5906b14 // indirect
348+
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
349349
github.com/smartcontractkit/chainlink-framework/metrics v0.0.0-20251020150604-8ab84f7bad1a // indirect
350350
github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect
351351
github.com/smartcontractkit/chainlink-protos/svr v1.1.0 // indirect

0 commit comments

Comments
 (0)