Skip to content

Commit 8e6ee44

Browse files
committed
bump cl-common import
1 parent 4eb791f commit 8e6ee44

17 files changed

Lines changed: 44 additions & 53 deletions

File tree

core/capabilities/ccip/common/extradatacodecregistry.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ var _ cciptypes.ExtraDataCodecBundle = (*ExtraDataCodecRegistry)(nil)
1212
// ExtraDataCodecRegistry is a singleton registry that manages SourceChainExtraDataCodec instances
1313
// for different chain families. It implements the ExtraDataCodecBundle interface from chainlink-common
1414
// by delegating to the existing ExtraDataCodec implementation.
15+
//
16+
// Terminology:
17+
// - "ExtraDataCodecRegistry": refers to the entire singleton registry instance. It both maintains the map of
18+
// chain family to codec and provides thread-safe access to it.
19+
// - "ExtraDataCodecBundle": is the interface defined in chainlink-common that the registry implements and that
20+
// can be called over gRPC.
1521
type ExtraDataCodecRegistry struct {
1622
extraDataCodec cciptypes.ExtraDataCodecMap
1723
mu sync.RWMutex
@@ -62,6 +68,8 @@ func (r *ExtraDataCodecRegistry) RegisterCodec(chainFamily string, codec SourceC
6268
r.extraDataCodec[chainFamily] = codec
6369
}
6470

71+
// ============ gRPC-compatible implementation of ExtraDataCodecBundle interface ============
72+
6573
// DecodeExtraArgs can be called either over gRPC or not. It is used to decode extra args for a specific
6674
// source chain family
6775
func (r *ExtraDataCodecRegistry) DecodeExtraArgs(

core/capabilities/ccip/common/pluginconfig.go

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ import (
44
"fmt"
55
"maps"
66

7-
cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
87
"github.com/smartcontractkit/chainlink-common/pkg/logger"
98
"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"
109
cctypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
1110
)
1211

1312
// PluginConfig holds the configuration for a plugin.
1413
type PluginConfig struct {
15-
CommitPluginCodec cciptypes.CommitPluginCodec
16-
ExecutePluginCodec cciptypes.ExecutePluginCodec
17-
MessageHasher cciptypes.MessageHasher
18-
TokenDataEncoder cciptypes.TokenDataEncoder
19-
GasEstimateProvider cciptypes.EstimateProvider
20-
RMNCrypto cciptypes.RMNCrypto
14+
CommitPluginCodec ccipocr3.CommitPluginCodec
15+
ExecutePluginCodec ccipocr3.ExecutePluginCodec
16+
MessageHasher ccipocr3.MessageHasher
17+
TokenDataEncoder ccipocr3.TokenDataEncoder
18+
GasEstimateProvider ccipocr3.EstimateProvider
19+
RMNCrypto ccipocr3.RMNCrypto
2120
ContractTransmitterFactory cctypes.ContractTransmitterFactory
2221
// PriceOnlyCommitFn optional method override for price only commit reports.
2322
PriceOnlyCommitFn string
@@ -29,9 +28,8 @@ type PluginConfig struct {
2928

3029
// PluginServices aggregates services for a specific chain family.
3130
type PluginServices struct {
32-
PluginConfig PluginConfig
33-
AddrCodec AddressCodec
34-
//ExtraDataCodec ccipocr3.ExtraDataCodec
31+
PluginConfig PluginConfig
32+
AddrCodec AddressCodec
3533
ChainRW MultiChainRW
3634
CCIPProviderSupported map[string]bool
3735
}
@@ -53,25 +51,24 @@ func GetPluginServices(lggr logger.Logger, chainFamily string) (PluginServices,
5351
return PluginServices{}, fmt.Errorf("unsupported chain family: %s (available: %v)", chainFamily, maps.Keys(registeredFactories))
5452
}
5553

56-
pluginServices := PluginServices{
57-
//ExtraDataCodec: make(ccipocr3.ExtraDataCodec), // lazy initialize it after factory init call
58-
}
59-
54+
pluginServices := PluginServices{}
6055
extraDataCodecRegistry := GetExtraDataCodecRegistry()
6156
addressCodecMap := make(map[string]ChainSpecificAddressCodec)
6257
chainRWProviderMap := make(map[string]ChainRWProvider)
6358
CCIPProviderSupported := make(map[string]bool)
6459

6560
for family, initFunc := range registeredFactories {
66-
//config := initFunc(lggr, pluginServices.ExtraDataCodec)
6761
config := initFunc(lggr, GetExtraDataCodecRegistry())
6862
CCIPProviderSupported[family] = config.CCIPProviderSupported
6963
if config.AddressCodec != nil {
7064
addressCodecMap[family] = config.AddressCodec
7165
}
66+
67+
// Register all known families, this includes families whose SourceChainExtraDataCodec is provided
68+
// by the CCIPProvider
7269
extraDataCodecRegistry.RegisterFamily(family)
7370
if config.ExtraDataCodec != nil {
74-
//pluginServices.ExtraDataCodec[family] = config.ExtraDataCodec // initialize and update it with the map
71+
// Register the actual codec for this family if we have it defined in core already
7572
extraDataCodecRegistry.RegisterCodec(family, config.ExtraDataCodec)
7673
}
7774
if config.ChainRW != nil {
@@ -85,14 +82,5 @@ func GetPluginServices(lggr logger.Logger, chainFamily string) (PluginServices,
8582
pluginServices.AddrCodec = NewAddressCodec(addressCodecMap)
8683
pluginServices.ChainRW = NewCRCW(chainRWProviderMap)
8784
pluginServices.CCIPProviderSupported = CCIPProviderSupported
88-
//pluginServices.ExtraDataCodecBundle = registry // Provide registry-based bundle interface
8985
return pluginServices, nil
9086
}
91-
92-
// GetGlobalExtraDataCodecRegistry returns the singleton ExtraDataCodecRegistry
93-
// that can be used to access codec functionality across all registered chain families.
94-
// This function provides a way to access the registry without needing to initialize
95-
// the full plugin services, which is useful for gRPC services and other external components.
96-
func GetGlobalExtraDataCodecRegistry() ccipocr3.ExtraDataCodecBundle {
97-
return GetExtraDataCodecRegistry()
98-
}

core/capabilities/ccip/oraclecreator/plugin.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c
143143
return nil, fmt.Errorf("failed to get public config from OCR config: %w", err)
144144
}
145145

146-
//extraDataCodecRegistry := ccipcommon.GetExtraDataCodecRegistry()
147146
pluginServices, err := ccipcommon.GetPluginServices(i.lggr, destChainFamily)
148147
if err != nil {
149148
return nil, fmt.Errorf("failed to initialize plugin config: %w", err)
@@ -464,8 +463,6 @@ func (i *pluginOracleCreator) createCCIPProviders(
464463
pluginType cctypes.PluginType,
465464
) (map[cciptypes.ChainSelector]types.CCIPProvider, error) {
466465
ccipProviders := make(map[cciptypes.ChainSelector]types.CCIPProvider)
467-
edcr := ccipcommon.GetExtraDataCodecRegistry()
468-
469466
for relayID, relayer := range i.relayers {
470467
chainDetails, err := chainsel.GetChainDetailsByChainIDAndFamily(relayID.ChainID, relayID.Network)
471468
if err != nil {
@@ -477,8 +474,8 @@ func (i *pluginOracleCreator) createCCIPProviders(
477474
ccipProviderSupported, ok := pluginServices.CCIPProviderSupported[relayID.Network]
478475
if ccipProviderSupported && ok {
479476
ccipProvider, err := relayer.NewCCIPProvider(ctx, types.CCIPProviderArgs{
480-
PluginType: uint32(pluginType),
481-
ExtraDataCodecRegistryID: // TODO: how to get the LOOP ID here?
477+
PluginType: uint32(pluginType),
478+
ExtraDataCodecBundle: ccipcommon.GetExtraDataCodecRegistry(),
482479
})
483480
if err != nil {
484481
return nil, fmt.Errorf("failed to create CCIP provider for relay ID %s: %w", relayID, err)

core/scripts/go.mod

Lines changed: 1 addition & 1 deletion
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.20250911201806-5a095deaeb52
50-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e
50+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac
5151
github.com/smartcontractkit/chainlink-data-streams v0.1.2
5252
github.com/smartcontractkit/chainlink-deployments-framework v0.44.0
5353
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401

core/scripts/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,8 +1590,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8
15901590
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
15911591
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU=
15921592
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1593-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e h1:fIc8pC/cBrxIvGkx9OhoObpwA70df72YRZx7MCDAgNE=
1594-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
1593+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac h1:S3CXvV5dP/PQ0Xq+N3rgW0F0NTOPEz3rsqiD1LdHqBI=
1594+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
15951595
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
15961596
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
15971597
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=

deployment/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ require (
3838
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52
3939
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5
4040
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5
41-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e
41+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac
4242
github.com/smartcontractkit/chainlink-deployments-framework v0.44.0
4343
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401
4444
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be

deployment/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,8 +1325,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8
13251325
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
13261326
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU=
13271327
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1328-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e h1:fIc8pC/cBrxIvGkx9OhoObpwA70df72YRZx7MCDAgNE=
1329-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
1328+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac h1:S3CXvV5dP/PQ0Xq+N3rgW0F0NTOPEz3rsqiD1LdHqBI=
1329+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
13301330
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
13311331
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
13321332
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=

go.mod

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ module github.com/smartcontractkit/chainlink/v2
22

33
go 1.24.5
44

5-
replace github.com/smartcontractkit/chainlink-common => ../chainlink-common
6-
75
require (
86
github.com/Depado/ginprom v1.8.0
97
github.com/Masterminds/semver/v3 v3.4.0
@@ -86,7 +84,7 @@ require (
8684
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52
8785
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5
8886
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5
89-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e
87+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac
9088
github.com/smartcontractkit/chainlink-data-streams v0.1.2
9189
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401
9290
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8
11071107
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5/go.mod h1:Ve1xD71bl193YIZQEoJMmBqLGQJdNs29bwbuObwvbhQ=
11081108
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5 h1:QhcYGEhRLInr1/qh/3RJiVdvJ0nxBHKhPe65WLbSBnU=
11091109
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5/go.mod h1:xtZNi6pOKdC3sLvokDvXOhgHzT+cyBqH/gWwvxTxqrg=
1110-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e h1:fIc8pC/cBrxIvGkx9OhoObpwA70df72YRZx7MCDAgNE=
1111-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
1110+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac h1:S3CXvV5dP/PQ0Xq+N3rgW0F0NTOPEz3rsqiD1LdHqBI=
1111+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac/go.mod h1:Sjn789M++//bIH4vC5LYdo+0zvdkGvt0xz1LCxrYx1M=
11121112
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1 h1:ca2z5OXgnbBPQRxpwXwBLJsUA1+cAp5ncfW4Ssvd6eY=
11131113
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.1/go.mod h1:NZv/qKYGFRnkjOYBouajnDfFoZ+WDa6H2KNmSf1dnKc=
11141114
github.com/smartcontractkit/chainlink-common/pkg/monitoring v0.0.0-20250415235644-8703639403c7 h1:9wh1G+WbXwPVqf0cfSRSgwIcaXTQgvYezylEAfwmrbw=

integration-tests/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ require (
5050
github.com/smartcontractkit/chainlink-ccip v0.1.1-solana.0.20250911201806-5a095deaeb52
5151
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250908144012-8184001834b5
5252
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20250908144012-8184001834b5
53-
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250912150129-4e42c90b532e
53+
github.com/smartcontractkit/chainlink-common v0.9.5-0.20250915201240-7e822af8e1ac
5454
github.com/smartcontractkit/chainlink-deployments-framework v0.44.0
5555
github.com/smartcontractkit/chainlink-evm v0.3.4-0.20250915101441-709f87f7d401
5656
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20250827130336-5922343458be

0 commit comments

Comments
 (0)