diff --git a/core/capabilities/ccip/ccipevm/extradatadecoder.go b/core/capabilities/ccip/ccipevm/extradatadecoder.go new file mode 100644 index 00000000000..5f26ba9a54c --- /dev/null +++ b/core/capabilities/ccip/ccipevm/extradatadecoder.go @@ -0,0 +1,56 @@ +package ccipevm + +import ( + "fmt" + + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" +) + +func DecodeDestExecDataToMap(DestExecData cciptypes.Bytes) (map[string]interface{}, error) { + destGasAmount, err := abiDecodeUint32(DestExecData) + if err != nil { + return nil, fmt.Errorf("decode dest gas amount: %w", err) + } + + return map[string]interface{}{ + evmDestExecDataKey: destGasAmount, + }, nil +} + +func DecodeExtraArgsToMap(extraArgs []byte) (map[string]any, error) { + if len(extraArgs) < 4 { + return nil, fmt.Errorf("extra args too short: %d, should be at least 4 (i.e the extraArgs tag)", len(extraArgs)) + } + + var method string + var extraByteOffset int + switch string(extraArgs[:4]) { + case string(evmExtraArgsV1Tag): + // for EVMExtraArgs, the first four bytes is the method name + method = evmV1DecodeName + extraByteOffset = 4 + case string(evmExtraArgsV2Tag): + method = evmV2DecodeName + extraByteOffset = 4 + case string(svmExtraArgsV1Tag): + // for SVMExtraArgs there's the four bytes plus another 32 bytes padding for the dynamic array + // TODO this is a temporary solution, the evm on-chain side will fix it, so the offset should just be 4 instead of 36 + // https://smartcontract-it.atlassian.net/browse/BCI-4180 + method = svmV1DecodeName + extraByteOffset = 36 + default: + return nil, fmt.Errorf("unknown extra args tag: %x", extraArgs) + } + + output := make(map[string]any) + args := make(map[string]interface{}) + err := messageHasherABI.Methods[method].Inputs.UnpackIntoMap(args, extraArgs[extraByteOffset:]) + if err != nil { + return nil, fmt.Errorf("abi decode extra args %v: %w", method, err) + } + + for k, val := range args { + output[k] = val + } + return output, nil +} diff --git a/core/capabilities/ccip/ccipevm/extradatadecoder_test.go b/core/capabilities/ccip/ccipevm/extradatadecoder_test.go new file mode 100644 index 00000000000..e0387ed9040 --- /dev/null +++ b/core/capabilities/ccip/ccipevm/extradatadecoder_test.go @@ -0,0 +1,105 @@ +package ccipevm + +import ( + "math/big" + "math/rand" + "testing" + + "github.com/gagliardetto/solana-go" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/ccip/generated/message_hasher" +) + +func Test_decodeExtraData(t *testing.T) { + d := testSetup(t) + gasLimit := big.NewInt(rand.Int63()) + + t.Run("decode extra args into map evm v1", func(t *testing.T) { + encoded, err := d.contract.EncodeEVMExtraArgsV1(nil, message_hasher.ClientEVMExtraArgsV1{ + GasLimit: gasLimit, + }) + require.NoError(t, err) + + m, err := DecodeExtraArgsToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 1) + + gl, exist := m["gasLimit"] + require.True(t, exist) + require.Equal(t, gl, gasLimit) + }) + + t.Run("decode extra args into map evm v2", func(t *testing.T) { + encoded, err := d.contract.EncodeEVMExtraArgsV2(nil, message_hasher.ClientEVMExtraArgsV2{ + GasLimit: gasLimit, + AllowOutOfOrderExecution: true, + }) + require.NoError(t, err) + + m, err := DecodeExtraArgsToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 2) + + gl, exist := m["gasLimit"] + require.True(t, exist) + require.Equal(t, gl, gasLimit) + + ooe, exist := m["allowOutOfOrderExecution"] + require.True(t, exist) + require.Equal(t, true, ooe) + }) + + t.Run("decode extra args into map svm", func(t *testing.T) { + key, err := solana.NewRandomPrivateKey() + require.NoError(t, err) + cu := uint32(10000) + bitmap := uint64(4) + ooe := false + tokenReceiver := [32]byte(key.PublicKey().Bytes()) + accounts := [][32]byte{[32]byte(key.PublicKey().Bytes())} + decoded, err := d.contract.DecodeSVMExtraArgsV1(nil, cu, bitmap, ooe, tokenReceiver, accounts) + if err != nil { + return + } + encoded, err := d.contract.EncodeSVMExtraArgsV1(nil, decoded) + require.NoError(t, err) + + m, err := DecodeExtraArgsToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 5) + + cuDecoded, exist := m["computeUnits"] + require.True(t, exist) + require.Equal(t, cuDecoded, cu) + + bitmapDecoded, exist := m["accountIsWritableBitmap"] + require.True(t, exist) + require.Equal(t, bitmapDecoded, bitmap) + + ooeDecoded, exist := m["allowOutOfOrderExecution"] + require.True(t, exist) + require.Equal(t, ooeDecoded, ooe) + + tokenReceiverDecoded, exist := m["tokenReceiver"] + require.True(t, exist) + require.Equal(t, tokenReceiverDecoded, tokenReceiver) + + accountsDecoded, exist := m["accounts"] + require.True(t, exist) + require.Equal(t, accountsDecoded, accounts) + }) + + t.Run("decode dest exec data into map", func(t *testing.T) { + destGasAmount := uint32(10000) + encoded, err := abiEncodeUint32(destGasAmount) + require.NoError(t, err) + m, err := DecodeDestExecDataToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 1) + + decoded, exist := m[evmDestExecDataKey] + require.True(t, exist) + require.Equal(t, destGasAmount, decoded) + }) +} diff --git a/core/capabilities/ccip/ccipevm/helpers.go b/core/capabilities/ccip/ccipevm/helpers.go index 3406421b915..13e635ecbdf 100644 --- a/core/capabilities/ccip/ccipevm/helpers.go +++ b/core/capabilities/ccip/ccipevm/helpers.go @@ -8,6 +8,13 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" ) +const ( + svmV1DecodeName = "decodeSVMExtraArgsV1" + evmV1DecodeName = "decodeEVMExtraArgsV1" + evmV2DecodeName = "decodeEVMExtraArgsV2" + evmDestExecDataKey = "destGasAmount" +) + var ( abiUint32 = ABITypeOrPanic("uint32") TokenDestGasOverheadABI = abi.Arguments{ @@ -24,9 +31,9 @@ func decodeExtraArgsV1V2(extraArgs []byte) (gasLimit *big.Int, err error) { var method string if bytes.Equal(extraArgs[:4], evmExtraArgsV1Tag) { - method = "decodeEVMExtraArgsV1" + method = evmV1DecodeName } else if bytes.Equal(extraArgs[:4], evmExtraArgsV2Tag) { - method = "decodeEVMExtraArgsV2" + method = evmV2DecodeName } else { return nil, fmt.Errorf("unknown extra args tag: %x", extraArgs) } diff --git a/core/capabilities/ccip/ccipevm/helpers_test.go b/core/capabilities/ccip/ccipevm/helpers_test.go index e0de0572226..89580c4d6f7 100644 --- a/core/capabilities/ccip/ccipevm/helpers_test.go +++ b/core/capabilities/ccip/ccipevm/helpers_test.go @@ -38,4 +38,39 @@ func Test_decodeExtraArgs(t *testing.T) { require.Equal(t, gasLimit, decodedGasLimit) }) + + t.Run("decode extra args into map evm v1", func(t *testing.T) { + encoded, err := d.contract.EncodeEVMExtraArgsV1(nil, message_hasher.ClientEVMExtraArgsV1{ + GasLimit: gasLimit, + }) + require.NoError(t, err) + + m, err := DecodeExtraArgsToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 1) + + gl, exist := m["gasLimit"] + require.True(t, exist) + require.Equal(t, gl, gasLimit) + }) + + t.Run("decode extra args into map evm v2", func(t *testing.T) { + encoded, err := d.contract.EncodeEVMExtraArgsV2(nil, message_hasher.ClientEVMExtraArgsV2{ + GasLimit: gasLimit, + AllowOutOfOrderExecution: true, + }) + require.NoError(t, err) + + m, err := DecodeExtraArgsToMap(encoded) + require.NoError(t, err) + require.Len(t, m, 2) + + gl, exist := m["gasLimit"] + require.True(t, exist) + require.Equal(t, gl, gasLimit) + + ooe, exist := m["allowOutOfOrderExecution"] + require.True(t, exist) + require.Equal(t, true, ooe) + }) } diff --git a/core/capabilities/ccip/ccipevm/msghasher.go b/core/capabilities/ccip/ccipevm/msghasher.go index ce9dc477e8c..5d2930cdd36 100644 --- a/core/capabilities/ccip/ccipevm/msghasher.go +++ b/core/capabilities/ccip/ccipevm/msghasher.go @@ -30,6 +30,9 @@ var ( // bytes4 public constant EVM_EXTRA_ARGS_V2_TAG = 0x181dcf10; evmExtraArgsV2Tag = hexutil.MustDecode("0x181dcf10") + + // bytes4 public constant SVM_EXTRA_EXTRA_ARGS_V1_TAG = 0x1f3b3aba + svmExtraArgsV1Tag = hexutil.MustDecode("0x1f3b3aba") ) // MessageHasherV1 implements the MessageHasher interface. diff --git a/core/capabilities/ccip/ccipsolana/extradatadecoder.go b/core/capabilities/ccip/ccipsolana/extradatadecoder.go new file mode 100644 index 00000000000..4b2e72ef34e --- /dev/null +++ b/core/capabilities/ccip/ccipsolana/extradatadecoder.go @@ -0,0 +1,84 @@ +package ccipsolana + +import ( + "encoding/binary" + "fmt" + "reflect" + + "github.com/ethereum/go-ethereum/common/hexutil" + agbinary "github.com/gagliardetto/binary" + + "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/ccip_router" +) + +const ( + svmDestExecDataKey = "destGasAmount" +) + +var ( + // tag definition https://github.com/smartcontractkit/chainlink-ccip/blob/1b2ee24da54bddef8f3943dc84102686f2890f87/chains/solana/contracts/programs/ccip-router/src/extra_args.rs#L8C21-L11C45 + // this should be moved to msghasher.go once merged + + // bytes4(keccak256("CCIP SVMExtraArgsV1")); + svmExtraArgsV1Tag = hexutil.MustDecode("0x1f3b3aba") + + // bytes4(keccak256("CCIP EVMExtraArgsV2")); + evmExtraArgsV2Tag = hexutil.MustDecode("0x181dcf10") +) + +// DecodeExtraArgsToMap is a helper function for converting Borsh encoded extra args bytes into map[string]any, which will be saved in ocr report.message.ExtraArgsDecoded +func DecodeExtraArgsToMap(extraArgs []byte) (map[string]any, error) { + if len(extraArgs) < 4 { + return nil, fmt.Errorf("extra args too short: %d, should be at least 4 (i.e the extraArgs tag)", len(extraArgs)) + } + + var val reflect.Value + var typ reflect.Type + outputMap := make(map[string]any) + switch string(extraArgs[:4]) { + case string(evmExtraArgsV2Tag): + var args ccip_router.EVMExtraArgsV2 + decoder := agbinary.NewBorshDecoder(extraArgs[4:]) + err := args.UnmarshalWithDecoder(decoder) + if err != nil { + return outputMap, fmt.Errorf("failed to decode extra args: %w", err) + } + val = reflect.ValueOf(args) + typ = reflect.TypeOf(args) + case string(svmExtraArgsV1Tag): + var args ccip_router.SVMExtraArgsV1 + decoder := agbinary.NewBorshDecoder(extraArgs[4:]) + err := args.UnmarshalWithDecoder(decoder) + if err != nil { + return outputMap, fmt.Errorf("failed to decode extra args: %w", err) + } + val = reflect.ValueOf(args) + typ = reflect.TypeOf(args) + default: + return nil, fmt.Errorf("unknown extra args tag: %x", extraArgs) + } + + for i := 0; i < val.NumField(); i++ { + field := typ.Field(i) + fieldValue := val.Field(i).Interface() + outputMap[field.Name] = fieldValue + } + + return outputMap, nil +} + +func DecodeDestExecDataToMap(destExecData []byte) (map[string]any, error) { + return map[string]interface{}{ + svmDestExecDataKey: bytesToUint32LE(destExecData), + }, nil +} + +func bytesToUint32LE(b []byte) uint32 { + if len(b) < 4 { + var padded [4]byte + copy(padded[:len(b)], b) // Pad from the right for little-endian + return binary.LittleEndian.Uint32(padded[:]) + } + + return binary.LittleEndian.Uint32(b) +} diff --git a/core/capabilities/ccip/ccipsolana/extradatadecoder_test.go b/core/capabilities/ccip/ccipsolana/extradatadecoder_test.go new file mode 100644 index 00000000000..8d39bd0cd7a --- /dev/null +++ b/core/capabilities/ccip/ccipsolana/extradatadecoder_test.go @@ -0,0 +1,89 @@ +package ccipsolana + +import ( + "bytes" + "encoding/binary" + "testing" + + agbinary "github.com/gagliardetto/binary" + "github.com/gagliardetto/solana-go" + "github.com/stretchr/testify/require" + + "github.com/smartcontractkit/chainlink-ccip/chains/solana/contracts/tests/config" + + "github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings/ccip_router" +) + +func Test_decodeExtraArgs(t *testing.T) { + t.Run("decode dest exec data into map svm", func(t *testing.T) { + destGasAmount := uint32(10000) + encoded := make([]byte, 4) + binary.LittleEndian.PutUint32(encoded, destGasAmount) + output, err := DecodeDestExecDataToMap(encoded) + require.NoError(t, err) + + decoded, exist := output[svmDestExecDataKey] + require.True(t, exist) + require.Equal(t, destGasAmount, decoded) + }) + + t.Run("decode extra args into map svm", func(t *testing.T) { + destGasAmount := uint32(10000) + bitmap := uint64(0) + extraArgs := ccip_router.SVMExtraArgsV1{ + ComputeUnits: destGasAmount, + AccountIsWritableBitmap: bitmap, + AllowOutOfOrderExecution: false, + TokenReceiver: config.CcipLogicReceiver, + Accounts: [][32]byte{ + [32]byte(config.CcipLogicReceiver.Bytes()), + [32]byte(config.ReceiverTargetAccountPDA.Bytes()), + [32]byte(solana.SystemProgramID.Bytes()), + }, + } + + var buf bytes.Buffer + encoder := agbinary.NewBorshEncoder(&buf) + err := extraArgs.MarshalWithEncoder(encoder) + require.NoError(t, err) + output, err := DecodeExtraArgsToMap(append(svmExtraArgsV1Tag, buf.Bytes()...)) + require.NoError(t, err) + require.Len(t, output, 5) + + gasLimit, exist := output["ComputeUnits"] + require.True(t, exist) + require.Equal(t, destGasAmount, gasLimit) + + writableBitmap, exist := output["AccountIsWritableBitmap"] + require.True(t, exist) + require.Equal(t, bitmap, writableBitmap) + + ooe, exist := output["AllowOutOfOrderExecution"] + require.True(t, exist) + require.Equal(t, false, ooe) + }) + + t.Run("decode extra args into map evm", func(t *testing.T) { + extraArgs := ccip_router.EVMExtraArgsV2{ + GasLimit: agbinary.Uint128{Lo: 5000, Hi: 0}, + AllowOutOfOrderExecution: false, + } + + var buf bytes.Buffer + encoder := agbinary.NewBorshEncoder(&buf) + err := extraArgs.MarshalWithEncoder(encoder) + require.NoError(t, err) + + output, err := DecodeExtraArgsToMap(append(evmExtraArgsV2Tag, buf.Bytes()...)) + require.NoError(t, err) + require.Len(t, output, 2) + + gasLimit, exist := output["GasLimit"] + require.True(t, exist) + require.Equal(t, agbinary.Uint128{Lo: 5000, Hi: 0}, gasLimit) + + ooe, exist := output["AllowOutOfOrderExecution"] + require.True(t, exist) + require.Equal(t, false, ooe) + }) +} diff --git a/core/capabilities/ccip/common/extradatacodec.go b/core/capabilities/ccip/common/extradatacodec.go index e003a91691d..47146ddd5b6 100644 --- a/core/capabilities/ccip/common/extradatacodec.go +++ b/core/capabilities/ccip/common/extradatacodec.go @@ -1,7 +1,13 @@ package common import ( + "fmt" + + chainsel "github.com/smartcontractkit/chain-selectors" + cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipevm" + "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ccipsolana" ) type ExtraDataCodec struct{} @@ -11,11 +17,47 @@ func NewExtraDataCodec() ExtraDataCodec { } func (c ExtraDataCodec) DecodeExtraArgs(extraArgs cciptypes.Bytes, sourceChainSelector cciptypes.ChainSelector) (map[string]any, error) { - // Not implemented and not return error - return nil, nil + if len(extraArgs) == 0 { + // return empty map if extraArgs is empty + return nil, nil + } + + family, err := chainsel.GetSelectorFamily(uint64(sourceChainSelector)) + if err != nil { + return nil, fmt.Errorf("failed to get chain family for selector %d: %w", sourceChainSelector, err) + } + + switch family { + case chainsel.FamilyEVM: + return ccipevm.DecodeExtraArgsToMap(extraArgs) + + case chainsel.FamilySolana: + return ccipsolana.DecodeExtraArgsToMap(extraArgs) + + default: + return nil, fmt.Errorf("unsupported family for extra args type %s", family) + } } func (c ExtraDataCodec) DecodeTokenAmountDestExecData(destExecData cciptypes.Bytes, sourceChainSelector cciptypes.ChainSelector) (map[string]any, error) { - // Not implemented and not return error - return nil, nil + if len(destExecData) == 0 { + // return empty map if destExecData is empty + return nil, nil + } + + family, err := chainsel.GetSelectorFamily(uint64(sourceChainSelector)) + if err != nil { + return nil, fmt.Errorf("failed to get chain family for selector %d: %w", sourceChainSelector, err) + } + + switch family { + case chainsel.FamilyEVM: + return ccipevm.DecodeDestExecDataToMap(destExecData) + + case chainsel.FamilySolana: + return ccipsolana.DecodeDestExecDataToMap(destExecData) + + default: + return nil, fmt.Errorf("unsupported family for extra args type %s", family) + } } diff --git a/core/capabilities/ccip/oraclecreator/plugin.go b/core/capabilities/ccip/oraclecreator/plugin.go index d108504e17f..7226da1372c 100644 --- a/core/capabilities/ccip/oraclecreator/plugin.go +++ b/core/capabilities/ccip/oraclecreator/plugin.go @@ -12,6 +12,7 @@ import ( "github.com/gagliardetto/solana-go" "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" + chainsel "github.com/smartcontractkit/chain-selectors" ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common" "github.com/smartcontractkit/chainlink/v2/core/services/relay" diff --git a/core/scripts/go.mod b/core/scripts/go.mod index c7f24124fa1..6be312a7501 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -316,7 +316,7 @@ require ( github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix // indirect github.com/smartcontractkit/chain-selectors v1.0.36 // indirect github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 // indirect - github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a // indirect + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250121195549-294ec6a40b92 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 0cdb0c8ad06..6a069284e75 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1170,8 +1170,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgB github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 h1:kCcrM/osIQFmHx7ZOxeGIeYAMkSmTxkOXcmqHNlXQXQ= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a h1:BuKTz6TpCQiLRmdT/Vp3OZj4MEVSEpNfY2nL8RYRbg8= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b h1:eNsqumP7VVJudA7gEcTKVFofealwbPJRinUw24uEmII= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 h1:dytZPggag6auyzmbhpIDmkHu7KrflIBEhLLec4/xFIk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 h1:w7w42ml8MOxdoyAZ9+og0342UkiH3deRM1V0Pj5JR5g= diff --git a/deployment/ccip/changeset/cs_deploy_chain.go b/deployment/ccip/changeset/cs_deploy_chain.go index ab67e70caa3..b8de97dbf9c 100644 --- a/deployment/ccip/changeset/cs_deploy_chain.go +++ b/deployment/ccip/changeset/cs_deploy_chain.go @@ -625,14 +625,12 @@ func deployChainContractsSolana( return fmt.Errorf("failed to get solana router program data: %w", err) } - defaultGasLimit := solBinary.Uint128{Lo: 3000, Hi: 0, Endianness: nil} - instruction, err := ccip_router.NewInitializeInstruction( chain.Selector, // chain selector - defaultGasLimit, // default gas limit - true, // allow out of order execution EnableExecutionAfter, // period to wait before allowing manual execution solana.PublicKey{}, + solana.PublicKey{}, + solBinary.Uint128{Lo: 300000000, Hi: 0, Endianness: nil}, GetRouterConfigPDA(ccipRouterProgram), GetRouterStatePDA(ccipRouterProgram), chain.DeployerKey.PublicKey(), diff --git a/deployment/go.mod b/deployment/go.mod index 2611627b9db..f7fdec3e7b2 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix github.com/smartcontractkit/chain-selectors v1.0.36 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 - github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250121205514-f73e2f86c23b github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 diff --git a/deployment/go.sum b/deployment/go.sum index 3526924b36a..102312de24a 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1396,8 +1396,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgB github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 h1:kCcrM/osIQFmHx7ZOxeGIeYAMkSmTxkOXcmqHNlXQXQ= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a h1:BuKTz6TpCQiLRmdT/Vp3OZj4MEVSEpNfY2nL8RYRbg8= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b h1:eNsqumP7VVJudA7gEcTKVFofealwbPJRinUw24uEmII= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 h1:dytZPggag6auyzmbhpIDmkHu7KrflIBEhLLec4/xFIk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 h1:w7w42ml8MOxdoyAZ9+og0342UkiH3deRM1V0Pj5JR5g= diff --git a/go.md b/go.md index 5dbd12c6b04..d361331b328 100644 --- a/go.md +++ b/go.md @@ -28,6 +28,8 @@ flowchart LR chainlink-ccip --> chain-selectors chainlink-ccip --> chainlink-common click chainlink-ccip href "https://github.com/smartcontractkit/chainlink-ccip" + chainlink-ccip/chains/solana --> chainlink-common + click chainlink-ccip/chains/solana href "https://github.com/smartcontractkit/chainlink-ccip" chainlink-common --> grpc-proxy chainlink-common --> libocr click chainlink-common href "https://github.com/smartcontractkit/chainlink-common" @@ -51,6 +53,7 @@ flowchart LR click chainlink-starknet/relayer href "https://github.com/smartcontractkit/chainlink-starknet" chainlink/v2 --> chainlink-automation chainlink/v2 --> chainlink-ccip + chainlink/v2 --> chainlink-ccip/chains/solana chainlink/v2 --> chainlink-cosmos chainlink/v2 --> chainlink-data-streams chainlink/v2 --> chainlink-feeds @@ -73,6 +76,12 @@ flowchart LR wsrpc click wsrpc href "https://github.com/smartcontractkit/wsrpc" + subgraph chainlink-ccip-repo[chainlink-ccip] + chainlink-ccip + chainlink-ccip/chains/solana + end + click chainlink-ccip-repo href "https://github.com/smartcontractkit/chainlink-ccip" + subgraph chainlink-framework-repo[chainlink-framework] chainlink-framework/chains chainlink-framework/multinode @@ -92,7 +101,7 @@ flowchart LR click tdh2-repo href "https://github.com/smartcontractkit/tdh2" classDef outline stroke-dasharray:6,fill:none; - class chainlink-framework-repo,chainlink-protos-repo,tdh2-repo outline + class chainlink-ccip-repo,chainlink-framework-repo,chainlink-protos-repo,tdh2-repo outline ``` ## All modules ```mermaid @@ -166,7 +175,6 @@ flowchart LR chainlink/core/scripts --> chainlink/deployment click chainlink/core/scripts href "https://github.com/smartcontractkit/chainlink" chainlink/deployment --> ccip-owner-contracts - chainlink/deployment --> chainlink-ccip/chains/solana chainlink/deployment --> chainlink-protos/job-distributor chainlink/deployment --> chainlink-testing-framework/framework chainlink/deployment --> chainlink-testing-framework/lib @@ -179,6 +187,7 @@ flowchart LR click chainlink/load-tests href "https://github.com/smartcontractkit/chainlink" chainlink/v2 --> chainlink-automation chainlink/v2 --> chainlink-ccip + chainlink/v2 --> chainlink-ccip/chains/solana chainlink/v2 --> chainlink-cosmos chainlink/v2 --> chainlink-data-streams chainlink/v2 --> chainlink-feeds diff --git a/go.mod b/go.mod index 729aed75d8e..159557eda5b 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( github.com/ethereum/go-ethereum v1.14.11 github.com/fatih/color v1.17.0 github.com/fxamacker/cbor/v2 v2.7.0 + github.com/gagliardetto/binary v0.8.0 github.com/gagliardetto/solana-go v1.12.0 github.com/getsentry/sentry-go v0.27.0 github.com/gin-contrib/cors v1.7.2 @@ -79,6 +80,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.36 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250115135646-ac859d85e7e3 @@ -208,7 +210,6 @@ require ( github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.6 // indirect - github.com/gagliardetto/binary v0.8.0 // indirect github.com/gagliardetto/treeout v0.1.4 // indirect github.com/gagliardetto/utilz v0.1.1 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect diff --git a/go.sum b/go.sum index fd7e69e9206..113ab6eef20 100644 --- a/go.sum +++ b/go.sum @@ -1108,6 +1108,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgB github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 h1:kCcrM/osIQFmHx7ZOxeGIeYAMkSmTxkOXcmqHNlXQXQ= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b h1:eNsqumP7VVJudA7gEcTKVFofealwbPJRinUw24uEmII= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 h1:dytZPggag6auyzmbhpIDmkHu7KrflIBEhLLec4/xFIk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 h1:w7w42ml8MOxdoyAZ9+og0342UkiH3deRM1V0Pj5JR5g= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 816a3f9652d..d16dc6279a6 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -435,7 +435,7 @@ require ( github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix // indirect - github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a // indirect + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250115135646-ac859d85e7e3 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index a225f1e87e1..05dc4c895e4 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1424,8 +1424,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgB github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 h1:kCcrM/osIQFmHx7ZOxeGIeYAMkSmTxkOXcmqHNlXQXQ= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a h1:BuKTz6TpCQiLRmdT/Vp3OZj4MEVSEpNfY2nL8RYRbg8= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b h1:eNsqumP7VVJudA7gEcTKVFofealwbPJRinUw24uEmII= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 h1:dytZPggag6auyzmbhpIDmkHu7KrflIBEhLLec4/xFIk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 h1:w7w42ml8MOxdoyAZ9+og0342UkiH3deRM1V0Pj5JR5g= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 4dfd3825161..4e929297779 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -419,7 +419,7 @@ require ( github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix // indirect github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect - github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a // indirect + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250115135646-ac859d85e7e3 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 56c25f8cb80..e8bef22eab3 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1411,8 +1411,8 @@ github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgB github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847 h1:kCcrM/osIQFmHx7ZOxeGIeYAMkSmTxkOXcmqHNlXQXQ= github.com/smartcontractkit/chainlink-ccip v0.0.0-20250128193522-bdbfcc588847/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a h1:BuKTz6TpCQiLRmdT/Vp3OZj4MEVSEpNfY2nL8RYRbg8= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250114180313-3ba6bac6203a/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b h1:eNsqumP7VVJudA7gEcTKVFofealwbPJRinUw24uEmII= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250130162116-1b2ee24da54b/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36 h1:dytZPggag6auyzmbhpIDmkHu7KrflIBEhLLec4/xFIk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250127125541-a8fa42cc0f36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250121210000-2a9675d7a1b4 h1:w7w42ml8MOxdoyAZ9+og0342UkiH3deRM1V0Pj5JR5g= diff --git a/integration-tests/smoke/ccip/ccip_reader_test.go b/integration-tests/smoke/ccip/ccip_reader_test.go index 9d1219a4a33..1c7803bf443 100644 --- a/integration-tests/smoke/ccip/ccip_reader_test.go +++ b/integration-tests/smoke/ccip/ccip_reader_test.go @@ -20,8 +20,10 @@ import ( ccipcommon "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/common" - "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/ccip/changeset/testhelpers" + "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" + + "github.com/smartcontractkit/chainlink/deployment/ccip/changeset" "github.com/smartcontractkit/chainlink/deployment/environment/memory" "github.com/smartcontractkit/chainlink/integration-tests/utils/pgtest" @@ -45,7 +47,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" - "github.com/smartcontractkit/chainlink/v2/core/utils/testutils/heavyweight" "github.com/smartcontractkit/chainlink/v2/evm/assets" "github.com/smartcontractkit/chainlink/v2/evm/client" evmchaintypes "github.com/smartcontractkit/chainlink/v2/evm/types" @@ -54,10 +55,11 @@ import ( ) const ( - chainS1 = cciptypes.ChainSelector(1) - chainS2 = cciptypes.ChainSelector(2) - chainS3 = cciptypes.ChainSelector(3) - chainD = cciptypes.ChainSelector(4) + chainS1 = cciptypes.ChainSelector(1) + chainS2 = cciptypes.ChainSelector(2) + chainS3 = cciptypes.ChainSelector(3) + chainD = cciptypes.ChainSelector(4) + chainSEVM = cciptypes.ChainSelector(5009297550715157269) ) var ( @@ -114,10 +116,10 @@ func setupExecutedMessageRangesTest(ctx context.Context, t testing.TB, useHeavyD }) } -func setupMsgsBetweenSeqNumsTest(ctx context.Context, t testing.TB, useHeavyDB bool) *testSetupData { +func setupMsgsBetweenSeqNumsTest(ctx context.Context, t testing.TB, useHeavyDB bool, sourceChainSel cciptypes.ChainSelector) *testSetupData { sb, auth := setupSimulatedBackendAndAuth(t) return testSetup(ctx, t, testSetupParams{ - ReaderChain: chainS1, + ReaderChain: sourceChainSel, DestChain: chainD, OnChainSeqNums: nil, Cfg: evmconfig.SourceReaderConfig, @@ -461,11 +463,11 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) { t.Parallel() ctx := tests.Context(t) - s := setupMsgsBetweenSeqNumsTest(ctx, t, false) + s := setupMsgsBetweenSeqNumsTest(ctx, t, false, chainSEVM) _, err := s.contract.EmitCCIPMessageSent(s.auth, uint64(chainD), ccip_reader_tester.InternalEVM2AnyRampMessage{ Header: ccip_reader_tester.InternalRampMessageHeader{ MessageId: [32]byte{1, 0, 0, 0, 0}, - SourceChainSelector: uint64(chainS1), + SourceChainSelector: uint64(chainSEVM), DestChainSelector: uint64(chainD), SequenceNumber: 10, }, @@ -483,7 +485,7 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) { _, err = s.contract.EmitCCIPMessageSent(s.auth, uint64(chainD), ccip_reader_tester.InternalEVM2AnyRampMessage{ Header: ccip_reader_tester.InternalRampMessageHeader{ MessageId: [32]byte{1, 0, 0, 0, 1}, - SourceChainSelector: uint64(chainS1), + SourceChainSelector: uint64(chainSEVM), DestChainSelector: uint64(chainD), SequenceNumber: 15, }, @@ -508,7 +510,7 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) { require.Eventually(t, func() bool { msgs, err = s.reader.MsgsBetweenSeqNums( ctx, - chainS1, + chainSEVM, cciptypes.NewSeqNumRange(5, 20), ) require.NoError(t, err) @@ -533,7 +535,7 @@ func TestCCIPReader_MsgsBetweenSeqNums(t *testing.T) { require.Equal(t, int64(4), msgs[1].TokenAmounts[1].Amount.Int64()) for _, msg := range msgs { - require.Equal(t, chainS1, msg.Header.SourceChainSelector) + require.Equal(t, chainSEVM, msg.Header.SourceChainSelector) require.Equal(t, chainD, msg.Header.DestChainSelector) } } @@ -1167,7 +1169,7 @@ func Benchmark_CCIPReader_MessageSentRanges(b *testing.B) { func benchmarkMessageSentRanges(b *testing.B, logsInserted int, startSeqNum, endSeqNum cciptypes.SeqNum) { // Initialize test setup ctx := tests.Context(b) - s := setupMsgsBetweenSeqNumsTest(ctx, b, true) + s := setupMsgsBetweenSeqNumsTest(ctx, b, true, chainS1) expectedRangeLen := calculateExpectedRangeLen(logsInserted, startSeqNum, endSeqNum) err := s.extendedCR.Bind(ctx, []types.BoundContract{