From 9f9615a7dcb5f5dc4bf189208ded771faa97faa1 Mon Sep 17 00:00:00 2001 From: Makram Kamaleddine Date: Mon, 24 Jun 2024 14:38:42 +0300 Subject: [PATCH] revert chainlink-common change --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 +- .../oraclecreator/oraclecreator.go | 59 +++++++------------ go.mod | 3 +- 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 +- 9 files changed, 32 insertions(+), 52 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index ac466b383d..4a389c3867 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -26,7 +26,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce 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 dcfc6e2ecb..ce7fc704ae 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1208,8 +1208,8 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb h1:R4OkRLPz6mZm8k7JFfLpQ9Ib/e1n1qcxg+hVxc0pKOk= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce h1:/CjY8L4lVJh9E8NKg3bdAgsxj+zKg9XYtXR71ZWWMXo= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce/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/ccipcapability/oraclecreator/oraclecreator.go b/core/services/ccipcapability/oraclecreator/oraclecreator.go index d0764a6b59..7a54d3ccc2 100644 --- a/core/services/ccipcapability/oraclecreator/oraclecreator.go +++ b/core/services/ccipcapability/oraclecreator/oraclecreator.go @@ -14,8 +14,6 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3types" ocrtypes "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - ccipocr3commit "github.com/smartcontractkit/ccipocr3/commit" - ccipocr3exec "github.com/smartcontractkit/ccipocr3/execute" "github.com/smartcontractkit/chainlink-common/pkg/loop" "github.com/smartcontractkit/chainlink-common/pkg/types" cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" @@ -84,7 +82,7 @@ func (o *oracleCreator) CreateCommitOracle(config cctypes.OCRConfig) (cctypes.CC // this is so that we can use the msg hasher and report encoder from that dest chain relayer's provider. providers := make(map[types.RelayID]types.CCIPOCR3CommitProvider) contractReaders := make(map[cciptypes.ChainSelector]types.ContractReader) - contractWriters := make(map[cciptypes.ChainSelector]types.ChainWriter) + // contractWriters := make(map[cciptypes.ChainSelector]types.ChainWriter) for relayID, relayer := range o.relayers { provider, err := relayer.NewPluginProvider(context.Background(), types.RelayArgs{ ExternalJobID: o.externalJobID, @@ -152,15 +150,15 @@ func (o *oracleCreator) CreateCommitOracle(config cctypes.OCRConfig) (cctypes.CC } onchainKeyring := ocrcommon.NewOCR3OnchainKeyringAdapter(keybundle) - reportCodec, err := destProvider.ReportCodec(context.Background()) - if err != nil { - return nil, fmt.Errorf("failed to get report codec: %w", err) - } + // reportCodec, err := destProvider.ReportCodec(context.Background()) + // if err != nil { + // return nil, fmt.Errorf("failed to get report codec: %w", err) + // } - msgHasher, err := destProvider.MsgHasher(context.Background()) - if err != nil { - return nil, fmt.Errorf("failed to get message hasher: %w", err) - } + // msgHasher, err := destProvider.MsgHasher(context.Background()) + // if err != nil { + // return nil, fmt.Errorf("failed to get message hasher: %w", err) + // } oracleArgs := libocr3.OCR3OracleArgs[[]byte]{ BinaryNetworkEndpointFactory: o.peerWrapper.Peer2, Database: o.db, @@ -198,17 +196,7 @@ func (o *oracleCreator) CreateCommitOracle(config cctypes.OCRConfig) (cctypes.CC OffchainConfigDigester: ocrimpls.NewConfigDigester(config.ConfigDigest()), OffchainKeyring: keybundle, OnchainKeyring: onchainKeyring, - ReportingPluginFactory: ccipocr3commit.NewPluginFactory( - contractReaders, // contract readers - contractWriters, // contract writers - cciptypes.ChainSelector(config.ChainSelector()), // dest chain selector - reportCodec, // dest chain report codec - msgHasher, // dest chain msg hasher - o.lggr. - Named("CCIPCommitPlugin"). - Named(destRelayID.String()). - Named(hexutil.Encode(config.OfframpAddress())), - ), + ReportingPluginFactory: nil, // TODO: set after fixing chainlink-common regression } oracle, err := libocr3.NewOracle(oracleArgs) if err != nil { @@ -223,7 +211,7 @@ func (o *oracleCreator) CreateExecOracle(config cctypes.OCRConfig) (cctypes.CCIP // this is so that we can use the msg hasher and report encoder from that dest chain relayer's provider. providers := make(map[types.RelayID]types.CCIPOCR3ExecuteProvider) contractReaders := make(map[cciptypes.ChainSelector]types.ContractReader) - contractWriters := make(map[cciptypes.ChainSelector]types.ChainWriter) + // contractWriters := make(map[cciptypes.ChainSelector]types.ChainWriter) for relayID, relayer := range o.relayers { provider, err := relayer.NewPluginProvider(context.Background(), types.RelayArgs{ ExternalJobID: o.externalJobID, @@ -291,15 +279,15 @@ func (o *oracleCreator) CreateExecOracle(config cctypes.OCRConfig) (cctypes.CCIP } onchainKeyring := ocrcommon.NewOCR3OnchainKeyringAdapter(keybundle) - reportCodec, err := destProvider.ReportCodec(context.Background()) - if err != nil { - return nil, fmt.Errorf("failed to get report codec: %w", err) - } + // reportCodec, err := destProvider.ReportCodec(context.Background()) + // if err != nil { + // return nil, fmt.Errorf("failed to get report codec: %w", err) + // } - msgHasher, err := destProvider.MsgHasher(context.Background()) - if err != nil { - return nil, fmt.Errorf("failed to get message hasher: %w", err) - } + // msgHasher, err := destProvider.MsgHasher(context.Background()) + // if err != nil { + // return nil, fmt.Errorf("failed to get message hasher: %w", err) + // } oracleArgs := libocr3.OCR3OracleArgs[[]byte]{ BinaryNetworkEndpointFactory: o.peerWrapper.Peer2, Database: o.db, @@ -337,14 +325,7 @@ func (o *oracleCreator) CreateExecOracle(config cctypes.OCRConfig) (cctypes.CCIP OffchainConfigDigester: ocrimpls.NewConfigDigester(config.ConfigDigest()), OffchainKeyring: keybundle, OnchainKeyring: onchainKeyring, - ReportingPluginFactory: ccipocr3exec.NewPluginFactory( - contractReaders, - contractWriters, - cciptypes.ChainSelector(config.ChainSelector()), - reportCodec, - msgHasher, - o.lggr.Named("CCIPExecPlugin").Named(destRelayID.String()).Named(hexutil.Encode(config.OfframpAddress())), - ), + ReportingPluginFactory: nil, // TODO set after fixing chainlink-common regression } oracle, err := libocr3.NewOracle(oracleArgs) if err != nil { diff --git a/go.mod b/go.mod index dc2d589144..0bd2ba1ee2 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce 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 @@ -290,7 +290,6 @@ require ( github.com/sethvargo/go-retry v0.2.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect github.com/sirupsen/logrus v1.9.3 // indirect - github.com/smartcontractkit/ccipocr3 v0.0.0-00010101000000-000000000000 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect diff --git a/go.sum b/go.sum index 4a960e7550..eb544bb84c 100644 --- a/go.sum +++ b/go.sum @@ -1170,8 +1170,8 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb h1:R4OkRLPz6mZm8k7JFfLpQ9Ib/e1n1qcxg+hVxc0pKOk= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce h1:/CjY8L4lVJh9E8NKg3bdAgsxj+zKg9XYtXR71ZWWMXo= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce/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 038671514d..e0e71dc0d8 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -32,7 +32,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chain-selectors v1.0.17 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce github.com/smartcontractkit/chainlink-testing-framework v1.31.0 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-00010101000000-000000000000 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 21a0b24444..4a57bbce76 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1508,8 +1508,8 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb h1:R4OkRLPz6mZm8k7JFfLpQ9Ib/e1n1qcxg+hVxc0pKOk= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce h1:/CjY8L4lVJh9E8NKg3bdAgsxj+zKg9XYtXR71ZWWMXo= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce/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 9c46d89472..5bf4ff371b 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,7 +16,7 @@ require ( github.com/rs/zerolog v1.30.0 github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.3 - github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb + github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce github.com/smartcontractkit/chainlink-testing-framework v1.31.0 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 9cf53dcd06..99796114a8 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1498,8 +1498,8 @@ github.com/smartcontractkit/chain-selectors v1.0.17 h1:otOlYUnutS8oQBEAi9RLQICqZ github.com/smartcontractkit/chain-selectors v1.0.17/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v1.0.3 h1:h/ijT0NiyV06VxYVgcNfsE3+8OEzT3Q0Z9au0z1BPWs= github.com/smartcontractkit/chainlink-automation v1.0.3/go.mod h1:RjboV0Qd7YP+To+OrzHGXaxUxoSONveCoAK2TQ1INLU= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb h1:R4OkRLPz6mZm8k7JFfLpQ9Ib/e1n1qcxg+hVxc0pKOk= -github.com/smartcontractkit/chainlink-common v0.1.7-0.20240613201342-a855825f87bb/go.mod h1:L32xvCpk84Nglit64OhySPMP1tM3TTBK7Tw0qZl7Sd4= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce h1:/CjY8L4lVJh9E8NKg3bdAgsxj+zKg9XYtXR71ZWWMXo= +github.com/smartcontractkit/chainlink-common v0.1.7-0.20240607135320-c9bc0a2ac0ce/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=