From df3a6e86cc6351d963f932bd657c472bb1a1af83 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 5 Feb 2025 22:14:26 -0400 Subject: [PATCH 01/53] Sends extra config + chainlink-common bump --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- .../keystone/changeset/internal/ocr3config.go | 17 +++++++++++++++-- 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, 27 insertions(+), 14 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 32581808eb5..6fba67a8acc 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/libocr v0.0.0-20241223215956-e5b78d8e3919 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 98b9cb90bf2..0780f7d4596 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1239,8 +1239,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 h1:bS51NFGHVjkCy7yu9L2Ss4sBsCW6jpa5GuhRAdWWxzM= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/go.mod b/deployment/go.mod index 145c2173a0d..051804e2bc6 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -33,7 +33,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250130175645-f9ffc7ee5eab github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250203204555-c245a7640475 diff --git a/deployment/go.sum b/deployment/go.sum index e084b1585a3..263418e8963 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1237,8 +1237,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 h1:bS51NFGHVjkCy7yu9L2Ss4sBsCW6jpa5GuhRAdWWxzM= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 8b433189081..554aa891707 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -13,6 +13,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" + types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + "google.golang.org/protobuf/proto" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" @@ -231,6 +233,17 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR }) } + cfgBytes, err := proto.Marshal(&types2.ReportingPluginConfig{ + MaxQueryLengthBytes: cfg.MaxQueryLengthBytes, + MaxObservationLengthBytes: cfg.MaxObservationLengthBytes, + MaxReportLengthBytes: cfg.MaxReportLengthBytes, + MaxRequestBatchSize: cfg.MaxRequestBatchSize, + UniqueReports: cfg.UniqueReports, + }) + if err != nil { + return OCR2OracleConfig{}, fmt.Errorf("failed to marshal ReportingPluginConfig: %w", err) + } + signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig, err := ocr3confighelper.ContractSetConfigArgsDeterministic( secrets.EphemeralSk, secrets.SharedSecret, @@ -244,8 +257,8 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR cfg.MaxRoundsPerEpoch, cfg.TransmissionSchedule, identities, - nil, // reportingPluginConfig - nil, // maxDurationInitialization + cfgBytes, // reportingPluginConfig + nil, // maxDurationInitialization time.Duration(cfg.MaxDurationQueryMillis)*time.Millisecond, time.Duration(cfg.MaxDurationObservationMillis)*time.Millisecond, time.Duration(cfg.MaxDurationAcceptMillis)*time.Millisecond, diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 93492479e3f..367d06c27d0 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index dfc87d67c18..30d7cd5302d 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1434,8 +1434,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 h1:bS51NFGHVjkCy7yu9L2Ss4sBsCW6jpa5GuhRAdWWxzM= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index a58d323d25b..2e84a5450ea 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index f3af73d0581..99c0eefeed3 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1421,8 +1421,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36 h1:bS51NFGHVjkCy7yu9L2Ss4sBsCW6jpa5GuhRAdWWxzM= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250130202959-6f1f48342e36/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= From fe85d552ac79507bcfb22326f4e1554cfadde24e Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 5 Feb 2025 22:21:28 -0400 Subject: [PATCH 02/53] Fixes CI --- deployment/keystone/changeset/internal/ocr3config.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 554aa891707..437c7f7c45f 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -13,16 +13,15 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "google.golang.org/protobuf/proto" + "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" + "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" + types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" - "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" - "github.com/smartcontractkit/chainlink/deployment" kocr3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" From 8b26176c89092a2968ccc14dd572669ae795c91a Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 6 Feb 2025 02:02:12 -0400 Subject: [PATCH 03/53] Bumps chainlink-common --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- .../keystone/changeset/internal/ocr3config.go | 14 ++++++++++---- .../keystone/changeset/internal/ocr3config_test.go | 7 +++++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- 10 files changed, 27 insertions(+), 18 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 6fba67a8acc..87244d34dd0 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/libocr v0.0.0-20241223215956-e5b78d8e3919 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 0780f7d4596..6d0ddb90a73 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1239,8 +1239,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/go.mod b/deployment/go.mod index 051804e2bc6..4c8c9bd4928 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -33,7 +33,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250130175645-f9ffc7ee5eab github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250203204555-c245a7640475 diff --git a/deployment/go.sum b/deployment/go.sum index 263418e8963..eeb9dbd4180 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1237,8 +1237,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 437c7f7c45f..4350e044c20 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -37,7 +37,10 @@ type OracleConfig struct { MaxQueryLengthBytes uint32 MaxObservationLengthBytes uint32 MaxReportLengthBytes uint32 - MaxRequestBatchSize uint32 + MaxOutcomeLengthBytes uint32 + MaxReportCount uint32 + MaxBatchSize uint32 + OutcomePruningThreshold uint64 UniqueReports bool DeltaProgressMillis uint32 @@ -200,7 +203,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR return OCR2OracleConfig{}, fmt.Errorf("wrong num elements copied from ocr2 offchain public key. expected %d but got %d", ed25519.PublicKeySize, nCopied) } - offchainPubKeysBytes = append(offchainPubKeysBytes, types.OffchainPublicKey(pkBytesFixed)) + offchainPubKeysBytes = append(offchainPubKeysBytes, pkBytesFixed) } configPubKeysBytes := []types.ConfigEncryptionPublicKey{} @@ -216,7 +219,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR return OCR2OracleConfig{}, fmt.Errorf("wrong num elements copied from ocr2 config public key. expected %d but got %d", ed25519.PublicKeySize, n) } - configPubKeysBytes = append(configPubKeysBytes, types.ConfigEncryptionPublicKey(pkBytesFixed)) + configPubKeysBytes = append(configPubKeysBytes, pkBytesFixed) } identities := []confighelper.OracleIdentityExtra{} @@ -236,7 +239,10 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR MaxQueryLengthBytes: cfg.MaxQueryLengthBytes, MaxObservationLengthBytes: cfg.MaxObservationLengthBytes, MaxReportLengthBytes: cfg.MaxReportLengthBytes, - MaxRequestBatchSize: cfg.MaxRequestBatchSize, + MaxOutcomeLengthBytes: cfg.MaxOutcomeLengthBytes, + MaxReportCount: cfg.MaxReportCount, + MaxBatchSize: cfg.MaxBatchSize, + OutcomePruningThreshold: cfg.OutcomePruningThreshold, UniqueReports: cfg.UniqueReports, }) if err != nil { diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index d0b12f29c1a..8cdf2c278be 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -49,7 +49,7 @@ var wantOCR3Config = `{ "F": 3, "OnchainConfig": "0x", "OffchainConfigVersion": 30, - "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020098028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" + "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020092021a08c0843d10c0843d18c0843d20c0843d281430e80738901c400198028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" }` var ocr3Cfg = ` @@ -57,7 +57,10 @@ var ocr3Cfg = ` "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxRequestBatchSize": 1000, + "MaxOutcomeLengthBytes": 1000000, + "MaxReportCount": 20, + "MaxBatchSize": 1000, + "OutcomePruningThreshold": 3600, "UniqueReports": true, "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 367d06c27d0..eccecade4c6 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 30d7cd5302d..9614419d448 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1434,8 +1434,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 2e84a5450ea..b2c5dfe7ef3 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 99c0eefeed3..293f1d577f8 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1421,8 +1421,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814 h1:G+qpFqb0j+jWwxYroAuOmxgyl9yI5v3/rJ/EvJY2TRg= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206013043-2085e39d9814/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= From 6493975b2e7cf5babb636ac9a78145bb9fda2742 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 6 Feb 2025 02:20:46 -0400 Subject: [PATCH 04/53] Fixes CI --- deployment/keystone/changeset/internal/ocr3config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 4350e044c20..2176877e72d 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -17,11 +17,12 @@ import ( "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" - types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + "github.com/smartcontractkit/chainlink/deployment" kocr3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/chaintype" From 1fc1d26473feef3c1f44a388d642e5c04f39d4e6 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 6 Feb 2025 02:29:25 -0400 Subject: [PATCH 05/53] Fixes CI --- integration-tests/smoke/capabilities/workflow_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/integration-tests/smoke/capabilities/workflow_test.go b/integration-tests/smoke/capabilities/workflow_test.go index eb54875eafe..440e7dac518 100644 --- a/integration-tests/smoke/capabilities/workflow_test.go +++ b/integration-tests/smoke/capabilities/workflow_test.go @@ -50,12 +50,14 @@ import ( pkgworkflows "github.com/smartcontractkit/chainlink-common/pkg/workflows" jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" + "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/workflow/generated/workflow_registry_wrapper" "github.com/smartcontractkit/chainlink/v2/core/logger" capabilitiespb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" + "github.com/smartcontractkit/chainlink/deployment/environment/devenv" "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" keystone_changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" @@ -1415,7 +1417,10 @@ func configureWorkflowDON(t *testing.T, ctfEnv *deployment.Environment, don *dev MaxQueryLengthBytes: 1000000, MaxObservationLengthBytes: 1000000, MaxReportLengthBytes: 1000000, - MaxRequestBatchSize: 1000, + MaxOutcomeLengthBytes: 1000000, + MaxReportCount: 20, + MaxBatchSize: 1000, + OutcomePruningThreshold: 3600, UniqueReports: true, } From 3b2c089693f593ed4cbd55b0b781d296c7af3fd5 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 6 Feb 2025 15:49:36 -0400 Subject: [PATCH 06/53] Fixes CI --- deployment/environment/nodeclient/chainlink_models_test.go | 3 ++- deployment/go.mod | 2 +- deployment/go.sum | 2 ++ deployment/keystone/changeset/internal/ocr3config.go | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deployment/environment/nodeclient/chainlink_models_test.go b/deployment/environment/nodeclient/chainlink_models_test.go index 64a8551ff0d..4f4c06dcbf2 100644 --- a/deployment/environment/nodeclient/chainlink_models_test.go +++ b/deployment/environment/nodeclient/chainlink_models_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-common/pkg/codec" + "github.com/smartcontractkit/chainlink/v2/core/services/job" evmtypes "github.com/smartcontractkit/chainlink/v2/core/services/relay/evm/types" ) @@ -116,7 +117,7 @@ contractABI = "[\n {\n \"anonymous\": false,\n \"inputs\": [\n {\n [relayConfig.chainReader.contracts.median.configs] LatestRoundRequested = "{\n \"chainSpecificName\": \"RoundRequested\",\n \"readType\": \"event\"\n}\n" -LatestTransmissionDetails = "{\n \"chainSpecificName\": \"latestTransmissionDetails\",\n \"outputModifications\": [\n {\n \"Fields\": [\n \"LatestTimestamp_\"\n ],\n \"Type\": \"epoch to time\"\n },\n {\n \"Fields\": {\n \"LatestAnswer_\": \"LatestAnswer\",\n \"LatestTimestamp_\": \"LatestTimestamp\"\n },\n \"Type\": \"rename\"\n }\n ]\n}\n" +LatestTransmissionDetails = "{\n \"chainSpecificName\": \"latestTransmissionDetails\",\n \"outputModifications\": [\n {\n \"EnablePathTraverse\": false,\n \"Fields\": [\n \"LatestTimestamp_\"\n ],\n \"Type\": \"epoch to time\"\n },\n {\n \"EnablePathTraverse\": false,\n \"Fields\": {\n \"LatestAnswer_\": \"LatestAnswer\",\n \"LatestTimestamp_\": \"LatestTimestamp\"\n },\n \"Type\": \"rename\"\n }\n ]\n}\n" [relayConfig.codec] [relayConfig.codec.configs] diff --git a/deployment/go.mod b/deployment/go.mod index 4c8c9bd4928..599c26f5804 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -33,7 +33,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250130175645-f9ffc7ee5eab github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250203204555-c245a7640475 diff --git a/deployment/go.sum b/deployment/go.sum index eeb9dbd4180..56c30e39744 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1239,6 +1239,8 @@ github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-b github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 2176877e72d..80eb95d012e 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -244,7 +244,6 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR MaxReportCount: cfg.MaxReportCount, MaxBatchSize: cfg.MaxBatchSize, OutcomePruningThreshold: cfg.OutcomePruningThreshold, - UniqueReports: cfg.UniqueReports, }) if err != nil { return OCR2OracleConfig{}, fmt.Errorf("failed to marshal ReportingPluginConfig: %w", err) From f927abc543540cf342d48fcf9fdcf4ab51eeb854 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 6 Feb 2025 15:51:18 -0400 Subject: [PATCH 07/53] gomods tidy --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.sum | 2 -- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 87244d34dd0..206e1558c93 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/libocr v0.0.0-20241223215956-e5b78d8e3919 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 6d0ddb90a73..be8b0aae92e 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1239,8 +1239,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/go.sum b/deployment/go.sum index 56c30e39744..0acb5254c6a 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1237,8 +1237,6 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index eccecade4c6..201f6274138 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 9614419d448..48b9729a0fa 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1434,8 +1434,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index b2c5dfe7ef3..4519d4e3bc6 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 293f1d577f8..da9333abe01 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1421,8 +1421,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538 h1:Jyx931VfYPxCYkXCGouDI12BMqxG93QzYrAXLgFHp10= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206054836-8eaabede5538/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= From 841a687c432c359f4b340cd76bbd59706ccf9197 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 11:51:27 -0400 Subject: [PATCH 08/53] Renames import --- deployment/keystone/changeset/internal/ocr3config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 80eb95d012e..f74c091a61e 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -21,7 +21,7 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - types2 "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "github.com/smartcontractkit/chainlink/deployment" kocr3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" @@ -236,7 +236,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR }) } - cfgBytes, err := proto.Marshal(&types2.ReportingPluginConfig{ + cfgBytes, err := proto.Marshal(&capocr3types.ReportingPluginConfig{ MaxQueryLengthBytes: cfg.MaxQueryLengthBytes, MaxObservationLengthBytes: cfg.MaxObservationLengthBytes, MaxReportLengthBytes: cfg.MaxReportLengthBytes, From 328d25a7b54c263fee1a9383ccdcba8cf0be5890 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 13:10:19 -0400 Subject: [PATCH 09/53] Renames Accept/Transmit fields into ShouldAccept/ShouldTransmit --- core/scripts/keystone/ocr_config.json | 4 ++-- .../keystone/src/generate_local_ocr3_config.go | 4 ++-- core/scripts/keystone/src/testdata/SampleConfig.json | 4 ++-- deployment/keystone/changeset/internal/ocr3config.go | 12 ++++++------ .../keystone/changeset/internal/ocr3config_test.go | 4 ++-- .../smoke/capabilities/workflow_test.go | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/scripts/keystone/ocr_config.json b/core/scripts/keystone/ocr_config.json index 31fe8988056..6e417ca3a67 100644 --- a/core/scripts/keystone/ocr_config.json +++ b/core/scripts/keystone/ocr_config.json @@ -19,8 +19,8 @@ "MaxDurationQueryMillis": 1000, "MaxDurationObservationMillis": 1000, "MaxDurationReportMillis": 1000, - "MaxDurationAcceptMillis": 1000, - "MaxDurationTransmitMillis": 1000, + "MaxDurationShouldAcceptMillis": 1000, + "MaxDurationShouldTransmitMillis": 1000, "MaxFaultyOracles": 1 } diff --git a/core/scripts/keystone/src/generate_local_ocr3_config.go b/core/scripts/keystone/src/generate_local_ocr3_config.go index 68b1cade0c5..9605415946e 100644 --- a/core/scripts/keystone/src/generate_local_ocr3_config.go +++ b/core/scripts/keystone/src/generate_local_ocr3_config.go @@ -90,8 +90,8 @@ func (g *generateLocalOCR3Config) Run(args []string) { "MaxDurationQueryMillis": 1000, "MaxDurationObservationMillis": 1000, "MaxDurationReportMillis": 1000, - "MaxDurationAcceptMillis": 1000, - "MaxDurationTransmitMillis": 1000, + "MaxDurationShouldAcceptMillis": 1000, + "MaxDurationShouldTransmitMillis": 1000, "MaxFaultyOracles": 1}`) var cfg changeset.OracleConfig err = json.Unmarshal(config, &cfg) diff --git a/core/scripts/keystone/src/testdata/SampleConfig.json b/core/scripts/keystone/src/testdata/SampleConfig.json index 6835a4143f4..63fef51fb1c 100644 --- a/core/scripts/keystone/src/testdata/SampleConfig.json +++ b/core/scripts/keystone/src/testdata/SampleConfig.json @@ -19,8 +19,8 @@ "MaxDurationQueryMillis": 1000, "MaxDurationObservationMillis": 1000, "MaxDurationReportMillis": 1000, - "MaxDurationAcceptMillis": 1000, - "MaxDurationTransmitMillis": 1000, + "MaxDurationShouldAcceptMillis": 1000, + "MaxDurationShouldTransmitMillis": 1000, "MaxFaultyOracles": 1 } diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index f74c091a61e..6d13bae8eca 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -54,10 +54,10 @@ type OracleConfig struct { MaxRoundsPerEpoch uint64 TransmissionSchedule []int - MaxDurationQueryMillis uint32 - MaxDurationObservationMillis uint32 - MaxDurationAcceptMillis uint32 - MaxDurationTransmitMillis uint32 + MaxDurationQueryMillis uint32 + MaxDurationObservationMillis uint32 + MaxDurationShouldAcceptMillis uint32 + MaxDurationShouldTransmitMillis uint32 MaxFaultyOracles int } @@ -266,8 +266,8 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR nil, // maxDurationInitialization time.Duration(cfg.MaxDurationQueryMillis)*time.Millisecond, time.Duration(cfg.MaxDurationObservationMillis)*time.Millisecond, - time.Duration(cfg.MaxDurationAcceptMillis)*time.Millisecond, - time.Duration(cfg.MaxDurationTransmitMillis)*time.Millisecond, + time.Duration(cfg.MaxDurationShouldAcceptMillis)*time.Millisecond, + time.Duration(cfg.MaxDurationShouldTransmitMillis)*time.Millisecond, cfg.MaxFaultyOracles, nil, // empty onChain config ) diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index 8cdf2c278be..f8d1d138fb7 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -76,8 +76,8 @@ var ocr3Cfg = ` "MaxDurationQueryMillis": 1000, "MaxDurationObservationMillis": 1000, "MaxDurationReportMillis": 1000, - "MaxDurationAcceptMillis": 1000, - "MaxDurationTransmitMillis": 1000, + "MaxDurationShouldAcceptMillis": 1000, + "MaxDurationShouldTransmitMillis": 1000, "MaxFaultyOracles": 3 }` diff --git a/integration-tests/smoke/capabilities/workflow_test.go b/integration-tests/smoke/capabilities/workflow_test.go index 440e7dac518..debe4e0819e 100644 --- a/integration-tests/smoke/capabilities/workflow_test.go +++ b/integration-tests/smoke/capabilities/workflow_test.go @@ -1411,8 +1411,8 @@ func configureWorkflowDON(t *testing.T, ctfEnv *deployment.Environment, don *dev TransmissionSchedule: transmissionSchedule, MaxDurationQueryMillis: 1000, MaxDurationObservationMillis: 1000, - MaxDurationAcceptMillis: 1000, - MaxDurationTransmitMillis: 1000, + MaxDurationShouldAcceptMillis: 1000, + MaxDurationShouldTransmitMillis: 1000, MaxFaultyOracles: 1, MaxQueryLengthBytes: 1000000, MaxObservationLengthBytes: 1000000, From ae5d5194edabe9d321bfa7483d60399de4ed47ee Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 14:00:46 -0400 Subject: [PATCH 10/53] bumps `chainlink-common` --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- deployment/keystone/changeset/internal/ocr3config.go | 3 +++ deployment/keystone/changeset/internal/ocr3config_test.go | 1 + integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- integration-tests/smoke/capabilities/workflow_test.go | 1 + 11 files changed, 17 insertions(+), 12 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 206e1558c93..a1011f0bb75 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/libocr v0.0.0-20241223215956-e5b78d8e3919 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index be8b0aae92e..e72860ede70 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1239,8 +1239,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/go.mod b/deployment/go.mod index 599c26f5804..b4ba54636c0 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -33,7 +33,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250130175645-f9ffc7ee5eab github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250203204555-c245a7640475 diff --git a/deployment/go.sum b/deployment/go.sum index 0acb5254c6a..85df6ba2d4a 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1237,8 +1237,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 6d13bae8eca..a582f31c9d1 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/durationpb" "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" @@ -43,6 +44,7 @@ type OracleConfig struct { MaxBatchSize uint32 OutcomePruningThreshold uint64 UniqueReports bool + RequestTimeout time.Duration DeltaProgressMillis uint32 DeltaResendMillis uint32 @@ -244,6 +246,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR MaxReportCount: cfg.MaxReportCount, MaxBatchSize: cfg.MaxBatchSize, OutcomePruningThreshold: cfg.OutcomePruningThreshold, + RequestTimeout: durationpb.New(cfg.RequestTimeout), }) if err != nil { return OCR2OracleConfig{}, fmt.Errorf("failed to marshal ReportingPluginConfig: %w", err) diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index f8d1d138fb7..1b1d724354b 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -62,6 +62,7 @@ var ocr3Cfg = ` "MaxBatchSize": 1000, "OutcomePruningThreshold": 3600, "UniqueReports": true, + "RequestTimeout": 30s, "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, "DeltaInitialMillis": 5000, diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 201f6274138..e39ed0fd8e3 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 48b9729a0fa..d4b9af815fc 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1434,8 +1434,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 4519d4e3bc6..fb6ce13e269 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index da9333abe01..05d45a61d83 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1421,8 +1421,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88 h1:2KbVDpWP815zDHT1apPE52WL1yUn0L6HhepSGmMFJF8= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250206193533-f1f30743de88/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= diff --git a/integration-tests/smoke/capabilities/workflow_test.go b/integration-tests/smoke/capabilities/workflow_test.go index debe4e0819e..9ffedb62d6f 100644 --- a/integration-tests/smoke/capabilities/workflow_test.go +++ b/integration-tests/smoke/capabilities/workflow_test.go @@ -1422,6 +1422,7 @@ func configureWorkflowDON(t *testing.T, ctfEnv *deployment.Environment, don *dev MaxBatchSize: 1000, OutcomePruningThreshold: 3600, UniqueReports: true, + RequestTimeout: 30 * time.Second, } cfg := keystone_changeset.InitialContractsCfg{ From ff897a8215ed66becd811dbce8456d11decc5037 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 16:35:11 -0400 Subject: [PATCH 11/53] bumps deps --- deployment/go.mod | 2 +- integration-tests/go.mod | 4 ++-- integration-tests/load/go.mod | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/go.mod b/deployment/go.mod index b4ba54636c0..392fae247d6 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -9,7 +9,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ // Using a separate inline `require` here to avoid surrounding line changes // creating potential merge conflicts. -require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 +require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda require ( github.com/Khan/genqlient v0.7.0 diff --git a/integration-tests/go.mod b/integration-tests/go.mod index e39ed0fd8e3..17b46df723c 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -12,8 +12,8 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250128231431-9279badae2f0 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda ) require ( diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index fb6ce13e269..220d3d2c278 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,9 +14,9 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250128231431-9279badae2f0 - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250128231431-9279badae2f0 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda ) require ( From 51896669347af3e6ff7f738908919a9ce7b1af5a Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 16:59:04 -0400 Subject: [PATCH 12/53] bumps deps --- deployment/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/go.mod b/deployment/go.mod index 392fae247d6..b4ba54636c0 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -9,7 +9,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ // Using a separate inline `require` here to avoid surrounding line changes // creating potential merge conflicts. -require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda +require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 require ( github.com/Khan/genqlient v0.7.0 From 736b6ff30a35bf25d409b074a9eefe08c5dc332a Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 17:03:13 -0400 Subject: [PATCH 13/53] bumps deps --- core/scripts/go.mod | 2 +- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index a1011f0bb75..5abe109df21 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -12,7 +12,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250128231431-9279badae2f0 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250129223716-34cbaaab2d04 ) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 17b46df723c..af1703637bd 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -12,7 +12,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda ) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 220d3d2c278..2618c2704b8 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,7 +14,7 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211180046-ae5d5194eda github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda ) From 01e25d191a9874db65c5555ee292049cd52135ed Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 17:03:56 -0400 Subject: [PATCH 14/53] bumps deps --- integration-tests/load/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 2618c2704b8..2530e517306 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -15,7 +15,7 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210313-736b6ff30a35 github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda ) From c98bb1ee1bd85ff07e64c1e28de5e0a5fbb98c2f Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 17:05:16 -0400 Subject: [PATCH 15/53] bumps deps --- integration-tests/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index af1703637bd..faf36431fd7 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -13,7 +13,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 ) require ( From f08b8d7607f0ba84ec03cfe963d065808ae34017 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 17:06:18 -0400 Subject: [PATCH 16/53] bumps deps --- integration-tests/load/go.mod | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 2530e517306..d7fe437fbd7 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -15,8 +15,8 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210313-736b6ff30a35 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250211180046-ae5d5194eda + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 ) require ( From d75ea657e8fb0a315ba979a031b9e9016b81e692 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 11 Feb 2025 17:22:08 -0400 Subject: [PATCH 17/53] bumps deps --- core/scripts/go.sum | 10 ++++------ deployment/go.mod | 7 ++++--- deployment/go.sum | 10 ++++------ integration-tests/go.mod | 3 ++- integration-tests/go.sum | 10 ++++------ integration-tests/load/go.mod | 5 +++-- integration-tests/load/go.sum | 10 ++++------ 7 files changed, 25 insertions(+), 30 deletions(-) diff --git a/core/scripts/go.sum b/core/scripts/go.sum index e47144dce9d..3dc6fba6b97 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1113,14 +1113,12 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1:wrGwGVs3qE4XA5icrN/O8GdHx/0PXP0gWFFVDHIQ520= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 h1:IR0K3EBoJPkfGEWaNLFdeGKSJcGpvXJsZfgzdsJl5cI= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f h1:43zbfJBsJz6vyiNN0m3QLLWJQ7V8gUdR0ypoC0J3xKc= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 807928a8323..27d9ad76411 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -31,10 +31,11 @@ require ( github.com/sethvargo/go-retry v0.2.4 github.com/smartcontractkit/ccip-owner-contracts v0.0.0-salt-fix github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e - github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 + github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250210201649-d9b9b053905e github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b - github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250130175645-f9ffc7ee5eab + github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250205171936-649f95193678 + github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250211093128-285968896406 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250207060333-005a15b407b0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 diff --git a/deployment/go.sum b/deployment/go.sum index 50b928f4897..69f0b63503a 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1110,14 +1110,12 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1:wrGwGVs3qE4XA5icrN/O8GdHx/0PXP0gWFFVDHIQ520= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 h1:IR0K3EBoJPkfGEWaNLFdeGKSJcGpvXJsZfgzdsJl5cI= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250210201649-d9b9b053905e h1:ivjjw4j0psSIRfEdGa5WSqXlV6KJ1CPb61Entm7fdVA= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250210201649-d9b9b053905e/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 4bd93139513..fff3b86e580 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,8 +49,9 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b + github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250211093128-285968896406 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.4.7 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 70f8d99742d..4a328eebf3c 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1360,14 +1360,12 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1:wrGwGVs3qE4XA5icrN/O8GdHx/0PXP0gWFFVDHIQ520= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 h1:IR0K3EBoJPkfGEWaNLFdeGKSJcGpvXJsZfgzdsJl5cI= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f h1:43zbfJBsJz6vyiNN0m3QLLWJQ7V8gUdR0ypoC0J3xKc= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index b0b8c7bd1a8..a411aedc700 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -28,9 +28,10 @@ require ( github.com/rs/zerolog v1.33.0 github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b - github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 + github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250211093128-285968896406 + github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.2 github.com/smartcontractkit/tdh2/go/tdh2 v0.0.0-20241009055228-33d0c0bf38de diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index ceb99683c29..c460babff2a 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1343,14 +1343,12 @@ github.com/smartcontractkit/chain-selectors v1.0.40 h1:iLvvoZeehVq6/7F+zzolQLF0D github.com/smartcontractkit/chain-selectors v1.0.40/go.mod h1:xsKM0aN3YGcQKTPRPDDtPx2l4mlTN1Djmg0VVXV40b8= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e h1:wrGwGVs3qE4XA5icrN/O8GdHx/0PXP0gWFFVDHIQ520= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20250205112004-de941c0fb84e/go.mod h1:UEnHaxkUsfreeA7rR45LMmua1Uen95tOFUR8/AI9BAo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847 h1:dw2d6UyvnCGFym2cRYsJfGdHNPa/iGKkrC+ppB3mKWo= -github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250128193522-bdbfcc588847/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086 h1:IR0K3EBoJPkfGEWaNLFdeGKSJcGpvXJsZfgzdsJl5cI= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20250211150519-b2a6a3dfe086/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f h1:43zbfJBsJz6vyiNN0m3QLLWJQ7V8gUdR0ypoC0J3xKc= +github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211080425-26dc02d5359f/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc h1:WZERXv2hTYRA0NpWg79ci/ZZSxucmvkty39iUOV8d7I= -github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20250130125138-3df261e09ddc/go.mod h1:2iGmU7fkVsy21Sw8D+OhtYekHLUlJKHzwePKcxIx3Ac= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From 3f5fc4eae2e81518b6acdc0a28b35906185bb968 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 12 Feb 2025 22:21:22 -0400 Subject: [PATCH 18/53] Fixes test --- .../keystone/changeset/internal/ocr3config.go | 20 +++++++++++++++++++ .../changeset/internal/ocr3config_test.go | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 46255a8c41a..1e86fd9829d 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -64,6 +64,26 @@ type OracleConfig struct { MaxFaultyOracles int } +func (oc *OracleConfig) UnmarshalJSON(data []byte) error { + type aliasT OracleConfig + temp := &struct { + RequestTimeout string `json:"RequestTimeout"` + *aliasT + }{ + aliasT: (*aliasT)(oc), + } + if err := json.Unmarshal(data, temp); err != nil { + return fmt.Errorf("failed to unmarshal OracleConfig: %w", err) + } + + requestTimeout, err := time.ParseDuration(temp.RequestTimeout) + if err != nil { + return fmt.Errorf("failed to parse RequestTimeout: %w", err) + } + oc.RequestTimeout = requestTimeout + return nil +} + type NodeKeys struct { EthAddress string `json:"EthAddress"` AptosAccount string `json:"AptosAccount"` diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index bd55d074d05..582be5dea2a 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -49,7 +49,7 @@ var wantOCR3Config = `{ "F": 3, "OnchainConfig": "0x", "OffchainConfigVersion": 30, - "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020092021a08c0843d10c0843d18c0843d20c0843d281430e80738901c400198028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" + "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020092021c08c0843d10c0843d18c0843d20c0843d281430e80738901c4202081e98028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" }` var ocr3Cfg = ` @@ -62,7 +62,7 @@ var ocr3Cfg = ` "MaxBatchSize": 1000, "OutcomePruningThreshold": 3600, "UniqueReports": true, - "RequestTimeout": 30s, + "RequestTimeout": "30s", "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, "DeltaInitialMillis": 5000, From 8ab24937d2071ff7517b33cdbd71b573baf544ee Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 12 Feb 2025 22:22:25 -0400 Subject: [PATCH 19/53] gomods tidy --- core/scripts/go.mod | 2 +- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index c5e5046f202..616a22f773a 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -12,7 +12,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250129223716-34cbaaab2d04 ) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index fff3b86e580..77c22dd1129 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -12,7 +12,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 ) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index a411aedc700..87a3027a3d5 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,7 +14,7 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250211205904-51896669347a + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 ) From 374f6a310a8c5b4b39da30847986e83dfa84f4b1 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 12 Feb 2025 22:42:21 -0400 Subject: [PATCH 20/53] Fixes test --- core/scripts/keystone/src/testdata/SampleConfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/core/scripts/keystone/src/testdata/SampleConfig.json b/core/scripts/keystone/src/testdata/SampleConfig.json index 18a500974b8..f45d7d4a9cd 100644 --- a/core/scripts/keystone/src/testdata/SampleConfig.json +++ b/core/scripts/keystone/src/testdata/SampleConfig.json @@ -5,6 +5,7 @@ "MaxReportLengthBytes": 1000000, "MaxRequestBatchSize": 1000, "UniqueReports": true, + "RequestTimeout": "30s", "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, "DeltaInitialMillis": 5000, From c9d91286044e1f389b79835a39530ae1fb473e4e Mon Sep 17 00:00:00 2001 From: Vyzaldy Sanchez Date: Fri, 14 Feb 2025 15:03:18 -0400 Subject: [PATCH 21/53] Generates OCR3 config view (#16395) * Generates OCR3 config view * WIP - parses the OCR3 config event into readable values * CRE-226: mv ContractSet; cleanup used compatibility * implement continue-on-error view * Loads readable `OracleConfig` into view * Fixes lint * Fixes view implementation * Adds test validating the `OracleConfig` view generation * Tests cleanup * Lint cleanup --------- Co-authored-by: krehermann <16602512+krehermann@users.noreply.github.com> --- .../keystone/changeset/accept_ownership.go | 4 +- .../changeset/append_node_capabilities.go | 2 +- deployment/keystone/changeset/compatiblity.go | 17 -- .../keystone/changeset/deploy_forwarder.go | 2 +- deployment/keystone/changeset/deploy_ocr3.go | 2 +- .../keystone/changeset/deploy_ocr3_test.go | 1 + .../keystone/changeset/internal/deploy.go | 12 +- .../changeset/internal/forwarder_deployer.go | 2 +- .../keystone/changeset/internal/ocr3config.go | 11 + .../keystone/changeset/internal/state.go | 55 ++--- .../keystone/changeset/internal/types.go | 2 +- deployment/keystone/changeset/state.go | 203 ++++++++++++++++++ deployment/keystone/changeset/test/helpers.go | 29 +-- deployment/keystone/changeset/types.go | 13 ++ deployment/keystone/changeset/update_don.go | 2 +- .../changeset/update_node_capabilities.go | 2 +- deployment/keystone/changeset/update_nodes.go | 2 +- deployment/keystone/changeset/view.go | 37 ++-- .../keystone/changeset/view_contracts.go | 161 ++++++++++++++ deployment/keystone/changeset/view_test.go | 149 ++++++++++--- deployment/keystone/view/view.go | 30 --- 21 files changed, 581 insertions(+), 157 deletions(-) create mode 100644 deployment/keystone/changeset/state.go create mode 100644 deployment/keystone/changeset/types.go create mode 100644 deployment/keystone/changeset/view_contracts.go delete mode 100644 deployment/keystone/view/view.go diff --git a/deployment/keystone/changeset/accept_ownership.go b/deployment/keystone/changeset/accept_ownership.go index dd709523bc2..684df720164 100644 --- a/deployment/keystone/changeset/accept_ownership.go +++ b/deployment/keystone/changeset/accept_ownership.go @@ -5,8 +5,6 @@ import ( "github.com/ethereum/go-ethereum/common" - kslib "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" - "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/changeset" ) @@ -25,7 +23,7 @@ func AcceptAllOwnershipsProposal(e deployment.Environment, req *AcceptAllOwnersh chain := e.Chains[chainSelector] addrBook := e.ExistingAddresses - r, err := kslib.GetContractSets(e.Logger, &kslib.GetContractSetsRequest{ + r, err := GetContractSets(e.Logger, &GetContractSetsRequest{ Chains: map[uint64]deployment.Chain{ req.ChainSelector: chain, }, diff --git a/deployment/keystone/changeset/append_node_capabilities.go b/deployment/keystone/changeset/append_node_capabilities.go index 826ba4601f7..24a43ef22e5 100644 --- a/deployment/keystone/changeset/append_node_capabilities.go +++ b/deployment/keystone/changeset/append_node_capabilities.go @@ -61,7 +61,7 @@ func (req *AppendNodeCapabilitiesRequest) convert(e deployment.Environment) (*in return nil, nil, fmt.Errorf("failed to validate UpdateNodeCapabilitiesRequest: %w", err) } registryChain := e.Chains[req.RegistryChainSel] // exists because of the validation above - resp, err := internal.GetContractSets(e.Logger, &internal.GetContractSetsRequest{ + resp, err := GetContractSets(e.Logger, &GetContractSetsRequest{ Chains: map[uint64]deployment.Chain{req.RegistryChainSel: registryChain}, AddressBook: e.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/compatiblity.go b/deployment/keystone/changeset/compatiblity.go index b7a6e1b7c95..96e665f2525 100644 --- a/deployment/keystone/changeset/compatiblity.go +++ b/deployment/keystone/changeset/compatiblity.go @@ -19,21 +19,6 @@ type TopLevelConfigSource = internal.TopLevelConfigSource // GenerateOCR3Config generates an OCR3 config var GenerateOCR3Config = internal.GenerateOCR3Config -// FeedConsumer is a feed consumer contract type -var FeedConsumer = internal.FeedConsumer - -// KeystoneForwarder is a keystone forwarder contract type -var KeystoneForwarder = internal.KeystoneForwarder - -// GetContractSetsRequest is a request to get contract sets -type GetContractSetsRequest = internal.GetContractSetsRequest - -// GetContractSetsResponse is a response to get contract sets -type GetContractSetsResponse = internal.GetContractSetsResponse - -// GetContractSets gets contract sets -var GetContractSets = internal.GetContractSets - // RegisterNOPSRequest is a request to register NOPS type RegisterNOPSRequest = internal.RegisterNOPSRequest @@ -87,5 +72,3 @@ type DONCapabilityWithConfig = internal.DONCapabilityWithConfig type DeployRequest = internal.DeployRequest type DeployResponse = internal.DeployResponse - -type ContractSet = internal.ContractSet diff --git a/deployment/keystone/changeset/deploy_forwarder.go b/deployment/keystone/changeset/deploy_forwarder.go index 8a9cdf4d681..feccc14b6ce 100644 --- a/deployment/keystone/changeset/deploy_forwarder.go +++ b/deployment/keystone/changeset/deploy_forwarder.go @@ -87,7 +87,7 @@ func ConfigureForwardContracts(env deployment.Environment, req ConfigureForwardC return deployment.ChangesetOutput{}, fmt.Errorf("failed to configure forward contracts: %w", err) } - cresp, err := internal.GetContractSets(env.Logger, &internal.GetContractSetsRequest{ + cresp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/deploy_ocr3.go b/deployment/keystone/changeset/deploy_ocr3.go index 75f9b75ecd1..f4b8cfa29b7 100644 --- a/deployment/keystone/changeset/deploy_ocr3.go +++ b/deployment/keystone/changeset/deploy_ocr3.go @@ -84,7 +84,7 @@ func ConfigureOCR3Contract(env deployment.Environment, cfg ConfigureOCR3Config) if resp.Ops == nil { return out, errors.New("expected MCMS operation to be non-nil") } - r, err := kslib.GetContractSets(env.Logger, &kslib.GetContractSetsRequest{ + r, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/deploy_ocr3_test.go b/deployment/keystone/changeset/deploy_ocr3_test.go index e5e0c05aa1a..35ced1285d2 100644 --- a/deployment/keystone/changeset/deploy_ocr3_test.go +++ b/deployment/keystone/changeset/deploy_ocr3_test.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap/zapcore" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" diff --git a/deployment/keystone/changeset/internal/deploy.go b/deployment/keystone/changeset/internal/deploy.go index 5abb33dc3a4..e16cc281449 100644 --- a/deployment/keystone/changeset/internal/deploy.go +++ b/deployment/keystone/changeset/internal/deploy.go @@ -68,7 +68,7 @@ func ConfigureContracts(ctx context.Context, lggr logger.Logger, req ConfigureCo return nil, fmt.Errorf("invalid request: %w", err) } - contractSetsResp, err := GetContractSets(lggr, &GetContractSetsRequest{ + contractSetsResp, err := getContractSets(lggr, &getContractSetsRequest{ Chains: req.Env.Chains, AddressBook: req.Env.ExistingAddresses, }) @@ -148,7 +148,7 @@ func GetRegistryContract(e *deployment.Environment, registryChainSel uint64) (*c return nil, deployment.Chain{}, fmt.Errorf("chain %d not found in environment", registryChainSel) } - contractSetsResp, err := GetContractSets(e.Logger, &GetContractSetsRequest{ + contractSetsResp, err := getContractSets(e.Logger, &getContractSetsRequest{ Chains: e.Chains, AddressBook: e.ExistingAddresses, }) @@ -297,7 +297,7 @@ func ConfigureOCR3Contract(env *deployment.Environment, chainSel uint64, dons [] return fmt.Errorf("chain %d not found in environment", chainSel) } - contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) @@ -315,7 +315,7 @@ func ConfigureOCR3Contract(env *deployment.Environment, chainSel uint64, dons [] return fmt.Errorf("failed to get contract set for chain %d", chainSel) } - contract, err := contracts.GetOCR3Contract(nil) + contract, err := contracts.getOCR3Contract(nil) if err != nil { env.Logger.Errorf("failed to get OCR3 contract: %s", err) return fmt.Errorf("failed to get OCR3 contract: %w", err) @@ -361,7 +361,7 @@ func ConfigureOCR3ContractFromJD(env *deployment.Environment, cfg ConfigureOCR3C if !ok { return nil, fmt.Errorf("chain %d not found in environment", cfg.ChainSel) } - contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) @@ -373,7 +373,7 @@ func ConfigureOCR3ContractFromJD(env *deployment.Environment, cfg ConfigureOCR3C return nil, fmt.Errorf("failed to get contract set for chain %d", cfg.ChainSel) } - contract, err := contracts.GetOCR3Contract(cfg.Address) + contract, err := contracts.getOCR3Contract(cfg.Address) if err != nil { env.Logger.Errorf("%sfailed to get OCR3 contract at %s : %s", prefix, cfg.Address, err) return nil, fmt.Errorf("failed to get OCR3 contract: %w", err) diff --git a/deployment/keystone/changeset/internal/forwarder_deployer.go b/deployment/keystone/changeset/internal/forwarder_deployer.go index 90a3e8cfb1d..f2b070d35aa 100644 --- a/deployment/keystone/changeset/internal/forwarder_deployer.go +++ b/deployment/keystone/changeset/internal/forwarder_deployer.go @@ -72,7 +72,7 @@ type ConfigureForwarderContractsResponse struct { // ConfigureForwardContracts configures the forwarder contracts on all chains for the given DONS // the address book is required to contain the an address of the deployed forwarder contract for every chain in the environment func ConfigureForwardContracts(env *deployment.Environment, req ConfigureForwarderContractsRequest) (*ConfigureForwarderContractsResponse, error) { - contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 1e86fd9829d..82000490514 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -84,6 +84,17 @@ func (oc *OracleConfig) UnmarshalJSON(data []byte) error { return nil } +func (oc OracleConfig) MarshalJSON() ([]byte, error) { + type aliasT OracleConfig + return json.Marshal(&struct { + RequestTimeout string `json:"RequestTimeout"` + *aliasT + }{ + RequestTimeout: oc.RequestTimeout.String(), + aliasT: (*aliasT)(&oc), + }) +} + type NodeKeys struct { EthAddress string `json:"EthAddress"` AptosAccount string `json:"AptosAccount"` diff --git a/deployment/keystone/changeset/internal/state.go b/deployment/keystone/changeset/internal/state.go index ad81d912d0d..57db48ec3cf 100644 --- a/deployment/keystone/changeset/internal/state.go +++ b/deployment/keystone/changeset/internal/state.go @@ -10,24 +10,17 @@ import ( "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" - common_v1_0 "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" - "github.com/smartcontractkit/chainlink/deployment/keystone/view" + capabilities_registry "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry_1_1_0" forwarder "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder_1_0_0" ocr3_capability "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" workflow_registry "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/workflow/generated/workflow_registry_wrapper" ) -type GetContractSetsRequest struct { - Chains map[uint64]deployment.Chain - AddressBook deployment.AddressBook -} - -type GetContractSetsResponse struct { - ContractSets map[uint64]ContractSet -} - -// TODO move this out of internal +// ContractSet is a set of contracts for a single chain +// It is a mirror of changeset.ContractSet, and acts an an adapter to the internal package +// +// TODO: remove after CRE-227 type ContractSet struct { commonchangeset.MCMSWithTimelockState OCR3 map[common.Address]*ocr3_capability.OCR3Capability @@ -36,43 +29,21 @@ type ContractSet struct { WorkflowRegistry *workflow_registry.WorkflowRegistry } -func (cs ContractSet) TransferableContracts() []common.Address { - var out []common.Address - if cs.OCR3 != nil { - for _, ocr := range cs.OCR3 { - out = append(out, ocr.Address()) - } - } - if cs.Forwarder != nil { - out = append(out, cs.Forwarder.Address()) - } - if cs.CapabilitiesRegistry != nil { - out = append(out, cs.CapabilitiesRegistry.Address()) - } - if cs.WorkflowRegistry != nil { - out = append(out, cs.WorkflowRegistry.Address()) - } - return out +type getContractSetsRequest struct { + Chains map[uint64]deployment.Chain + AddressBook deployment.AddressBook } -func (cs ContractSet) View() (view.KeystoneChainView, error) { - out := view.NewKeystoneChainView() - if cs.CapabilitiesRegistry != nil { - capRegView, err := common_v1_0.GenerateCapabilityRegistryView(cs.CapabilitiesRegistry) - if err != nil { - return view.KeystoneChainView{}, err - } - out.CapabilityRegistry[cs.CapabilitiesRegistry.Address().String()] = capRegView - } - return out, nil +type getContractSetsResponse struct { + ContractSets map[uint64]ContractSet } -func (cs ContractSet) GetOCR3Contract(addr *common.Address) (*ocr3_capability.OCR3Capability, error) { +func (cs ContractSet) getOCR3Contract(addr *common.Address) (*ocr3_capability.OCR3Capability, error) { return getOCR3Contract(cs.OCR3, addr) } -func GetContractSets(lggr logger.Logger, req *GetContractSetsRequest) (*GetContractSetsResponse, error) { - resp := &GetContractSetsResponse{ +func getContractSets(lggr logger.Logger, req *getContractSetsRequest) (*getContractSetsResponse, error) { + resp := &getContractSetsResponse{ ContractSets: make(map[uint64]ContractSet), } for id, chain := range req.Chains { diff --git a/deployment/keystone/changeset/internal/types.go b/deployment/keystone/changeset/internal/types.go index 0ec1c7596b5..19b533e9ba8 100644 --- a/deployment/keystone/changeset/internal/types.go +++ b/deployment/keystone/changeset/internal/types.go @@ -258,7 +258,7 @@ type RegisteredDonConfig struct { func NewRegisteredDon(env deployment.Environment, cfg RegisteredDonConfig) (*RegisteredDon, error) { // load the don info from the capabilities registry - r, err := GetContractSets(env.Logger, &GetContractSetsRequest{ + r, err := getContractSets(env.Logger, &getContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/state.go b/deployment/keystone/changeset/state.go new file mode 100644 index 00000000000..fa9e1030ec5 --- /dev/null +++ b/deployment/keystone/changeset/state.go @@ -0,0 +1,203 @@ +package changeset + +import ( + "errors" + "fmt" + + "github.com/ethereum/go-ethereum/common" + + "github.com/smartcontractkit/chainlink-common/pkg/logger" + + "github.com/smartcontractkit/chainlink/deployment" + commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" + common_v1_0 "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" + "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" + + capabilities_registry "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry_1_1_0" + forwarder "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/forwarder_1_0_0" + ocr3_capability "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" + workflow_registry "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/workflow/generated/workflow_registry_wrapper" +) + +type GetContractSetsRequest struct { + Chains map[uint64]deployment.Chain + AddressBook deployment.AddressBook +} + +type GetContractSetsResponse struct { + ContractSets map[uint64]ContractSet +} + +type ContractSet struct { + commonchangeset.MCMSWithTimelockState + OCR3 map[common.Address]*ocr3_capability.OCR3Capability + Forwarder *forwarder.KeystoneForwarder + CapabilitiesRegistry *capabilities_registry.CapabilitiesRegistry + WorkflowRegistry *workflow_registry.WorkflowRegistry +} + +func (cs ContractSet) Convert() internal.ContractSet { + return internal.ContractSet{ + MCMSWithTimelockState: commonchangeset.MCMSWithTimelockState{ + MCMSWithTimelockContracts: cs.MCMSWithTimelockContracts, + }, + Forwarder: cs.Forwarder, + WorkflowRegistry: cs.WorkflowRegistry, + OCR3: cs.OCR3, + CapabilitiesRegistry: cs.CapabilitiesRegistry, + } +} + +func (cs ContractSet) TransferableContracts() []common.Address { + var out []common.Address + if cs.OCR3 != nil { + for _, ocr := range cs.OCR3 { + out = append(out, ocr.Address()) + } + } + if cs.Forwarder != nil { + out = append(out, cs.Forwarder.Address()) + } + if cs.CapabilitiesRegistry != nil { + out = append(out, cs.CapabilitiesRegistry.Address()) + } + if cs.WorkflowRegistry != nil { + out = append(out, cs.WorkflowRegistry.Address()) + } + return out +} + +// View is a view of the keystone chain +// It is best effort and logs errors +func (cs ContractSet) View(lggr logger.Logger) (KeystoneChainView, error) { + out := NewKeystoneChainView() + var allErrs error + if cs.CapabilitiesRegistry != nil { + capRegView, err := common_v1_0.GenerateCapabilityRegistryView(cs.CapabilitiesRegistry) + if err != nil { + allErrs = errors.Join(allErrs, err) + lggr.Warn("failed to generate capability registry view: %w", err) + } + out.CapabilityRegistry[cs.CapabilitiesRegistry.Address().String()] = capRegView + } + + if cs.OCR3 != nil { + for addr, ocr3Cap := range cs.OCR3 { + oc := *ocr3Cap + addrCopy := addr + ocrView, err := GenerateOCR3ConfigView(oc) + if err != nil { + allErrs = errors.Join(allErrs, err) + // don't block view on single OCR3 not being configured + if errors.Is(err, ErrOCR3NotConfigured) { + lggr.Warnf("ocr3 not configured for address %s", addr) + } else { + lggr.Errorf("failed to generate OCR3 config view: %v", err) + } + } + out.OCR3ConfigView[addrCopy.String()] = ocrView + } + } + + return out, allErrs +} + +func (cs ContractSet) GetOCR3Contract(addr *common.Address) (*ocr3_capability.OCR3Capability, error) { + return getOCR3Contract(cs.OCR3, addr) +} + +func GetContractSets(lggr logger.Logger, req *GetContractSetsRequest) (*GetContractSetsResponse, error) { + resp := &GetContractSetsResponse{ + ContractSets: make(map[uint64]ContractSet), + } + for id, chain := range req.Chains { + addrs, err := req.AddressBook.AddressesForChain(id) + if err != nil { + return nil, fmt.Errorf("failed to get addresses for chain %d: %w", id, err) + } + cs, err := loadContractSet(lggr, chain, addrs) + if err != nil { + return nil, fmt.Errorf("failed to load contract set for chain %d: %w", id, err) + } + resp.ContractSets[id] = *cs + } + return resp, nil +} + +func loadContractSet(lggr logger.Logger, chain deployment.Chain, addresses map[string]deployment.TypeAndVersion) (*ContractSet, error) { + var out ContractSet + mcmsWithTimelock, err := commonchangeset.MaybeLoadMCMSWithTimelockChainState(chain, addresses) + if err != nil { + return nil, fmt.Errorf("failed to load mcms contract: %w", err) + } + out.MCMSWithTimelockState = *mcmsWithTimelock + + for addr, tv := range addresses { + // todo handle versions + switch tv.Type { + case CapabilitiesRegistry: + c, err := capabilities_registry.NewCapabilitiesRegistry(common.HexToAddress(addr), chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to create capability registry contract from address %s: %w", addr, err) + } + out.CapabilitiesRegistry = c + case KeystoneForwarder: + c, err := forwarder.NewKeystoneForwarder(common.HexToAddress(addr), chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to create forwarder contract from address %s: %w", addr, err) + } + out.Forwarder = c + case OCR3Capability: + c, err := ocr3_capability.NewOCR3Capability(common.HexToAddress(addr), chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to create OCR3Capability contract from address %s: %w", addr, err) + } + if out.OCR3 == nil { + out.OCR3 = make(map[common.Address]*ocr3_capability.OCR3Capability) + } + out.OCR3[common.HexToAddress(addr)] = c + case WorkflowRegistry: + c, err := workflow_registry.NewWorkflowRegistry(common.HexToAddress(addr), chain.Client) + if err != nil { + return nil, fmt.Errorf("failed to create OCR3Capability contract from address %s: %w", addr, err) + } + out.WorkflowRegistry = c + default: + lggr.Warnw("unknown contract type", "type", tv.Type) + // ignore unknown contract types + } + } + return &out, nil +} + +// getOCR3Contract returns the OCR3 contract from the contract set. By default, it returns the only +// contract in the set if there is no address specified. If an address is specified, it returns the +// contract with that address. If the address is specified but not found in the contract set, it returns +// an error. +func getOCR3Contract(contracts map[common.Address]*ocr3_capability.OCR3Capability, addr *common.Address) (*ocr3_capability.OCR3Capability, error) { + // Fail if the OCR3 contract address is unspecified and there are multiple OCR3 contracts + if addr == nil && len(contracts) > 1 { + return nil, errors.New("OCR contract address is unspecified") + } + + // Use the first OCR3 contract if the address is unspecified + if addr == nil && len(contracts) == 1 { + // use the first OCR3 contract + for _, c := range contracts { + return c, nil + } + } + + // Select the OCR3 contract by address + if contract, ok := contracts[*addr]; ok { + return contract, nil + } + + addrSet := make([]string, 0, len(contracts)) + for a := range contracts { + addrSet = append(addrSet, a.String()) + } + + // Fail if the OCR3 contract address is specified but not found in the contract set + return nil, fmt.Errorf("OCR3 contract address %s not found in contract set %v", *addr, addrSet) +} diff --git a/deployment/keystone/changeset/test/helpers.go b/deployment/keystone/changeset/test/helpers.go index 3c90fd4a661..c20f725c9b6 100644 --- a/deployment/keystone/changeset/test/helpers.go +++ b/deployment/keystone/changeset/test/helpers.go @@ -22,7 +22,8 @@ import ( "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" commontypes "github.com/smartcontractkit/chainlink/deployment/common/types" "github.com/smartcontractkit/chainlink/deployment/environment/memory" - kschangeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" + + changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/workflowregistry" @@ -81,8 +82,8 @@ type TestEnv struct { AssetNodes map[string]memory.Node } -func (te TestEnv) ContractSets() map[uint64]internal.ContractSet { - r, err := internal.GetContractSets(te.Env.Logger, &internal.GetContractSetsRequest{ +func (te TestEnv) ContractSets() map[uint64]changeset.ContractSet { + r, err := changeset.GetContractSets(te.Env.Logger, &changeset.GetContractSetsRequest{ Chains: te.Env.Chains, AddressBook: te.Env.ExistingAddresses, }) @@ -91,7 +92,7 @@ func (te TestEnv) ContractSets() map[uint64]internal.ContractSet { } func (te TestEnv) CapabilitiesRegistry() *kcr.CapabilitiesRegistry { - r, err := internal.GetContractSets(te.Env.Logger, &internal.GetContractSetsRequest{ + r, err := changeset.GetContractSets(te.Env.Logger, &changeset.GetContractSetsRequest{ Chains: te.Env.Chains, AddressBook: te.Env.ExistingAddresses, }) @@ -141,16 +142,16 @@ func SetupTestEnv(t *testing.T, c TestConfig) TestEnv { } e, err := commonchangeset.Apply(t, e, nil, commonchangeset.Configure( - deployment.CreateLegacyChangeSet(kschangeset.DeployCapabilityRegistry), + deployment.CreateLegacyChangeSet(changeset.DeployCapabilityRegistry), registryChainSel, ), commonchangeset.Configure( - deployment.CreateLegacyChangeSet(kschangeset.DeployOCR3), + deployment.CreateLegacyChangeSet(changeset.DeployOCR3), registryChainSel, ), commonchangeset.Configure( - deployment.CreateLegacyChangeSet(kschangeset.DeployForwarder), - kschangeset.DeployForwarderRequest{}, + deployment.CreateLegacyChangeSet(changeset.DeployForwarder), + changeset.DeployForwarderRequest{}, ), commonchangeset.Configure( deployment.CreateLegacyChangeSet(workflowregistry.Deploy), @@ -244,7 +245,7 @@ func SetupTestEnv(t *testing.T, c TestConfig) TestEnv { } var allDons = []internal.DonCapabilities{wfDon, cwDon, assetDon} - csOut, err := kschangeset.ConfigureInitialContractsChangeset(env, kschangeset.InitialContractsCfg{ + csOut, err := changeset.ConfigureInitialContractsChangeset(env, changeset.InitialContractsCfg{ RegistryChainSel: registryChainSel, Dons: allDons, OCR3Config: &ocr3Config, @@ -252,12 +253,12 @@ func SetupTestEnv(t *testing.T, c TestConfig) TestEnv { require.NoError(t, err) require.Nil(t, csOut.AddressBook, "no new addresses should be created in configure initial contracts") - req := &internal.GetContractSetsRequest{ + req := &changeset.GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, } - contractSetsResp, err := internal.GetContractSets(lggr, req) + contractSetsResp, err := changeset.GetContractSets(lggr, req) require.NoError(t, err) require.Len(t, contractSetsResp.ContractSets, len(env.Chains)) // check the registry @@ -292,7 +293,7 @@ func SetupTestEnv(t *testing.T, c TestConfig) TestEnv { ) require.NoError(t, err) // extract the MCMS address - r, err := internal.GetContractSets(lggr, &internal.GetContractSetsRequest{ + r, err := changeset.GetContractSets(lggr, &changeset.GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) @@ -308,8 +309,8 @@ func SetupTestEnv(t *testing.T, c TestConfig) TestEnv { sel: {Timelock: mcms.Timelock, CallProxy: mcms.CallProxy}, }, commonchangeset.Configure( - deployment.CreateLegacyChangeSet(kschangeset.AcceptAllOwnershipsProposal), - &kschangeset.AcceptAllOwnershipRequest{ + deployment.CreateLegacyChangeSet(changeset.AcceptAllOwnershipsProposal), + &changeset.AcceptAllOwnershipRequest{ ChainSelector: sel, MinDelay: 0, }, diff --git a/deployment/keystone/changeset/types.go b/deployment/keystone/changeset/types.go new file mode 100644 index 00000000000..ae5718c4e3f --- /dev/null +++ b/deployment/keystone/changeset/types.go @@ -0,0 +1,13 @@ +package changeset + +import "github.com/smartcontractkit/chainlink/deployment" + +var ( + CapabilitiesRegistry deployment.ContractType = "CapabilitiesRegistry" // https://github.com/smartcontractkit/chainlink/blob/50c1b3dbf31bd145b312739b08967600a5c67f30/contracts/src/v0.8/keystone/CapabilitiesRegistry.sol#L392 + WorkflowRegistry deployment.ContractType = "WorkflowRegistry" // https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/workflow/WorkflowRegistry.sol + KeystoneForwarder deployment.ContractType = "KeystoneForwarder" // https://github.com/smartcontractkit/chainlink/blob/50c1b3dbf31bd145b312739b08967600a5c67f30/contracts/src/v0.8/keystone/KeystoneForwarder.sol#L90 + OCR3Capability deployment.ContractType = "OCR3Capability" // https://github.com/smartcontractkit/chainlink/blob/50c1b3dbf31bd145b312739b08967600a5c67f30/contracts/src/v0.8/keystone/OCR3Capability.sol#L12 + FeedConsumer deployment.ContractType = "FeedConsumer" // no type and a version in contract https://github.com/smartcontractkit/chainlink/blob/89183a8a5d22b1aeca0ade3b76d16aa84067aa57/contracts/src/v0.8/keystone/KeystoneFeedsConsumer.sol#L1 + RBACTimelock deployment.ContractType = "RBACTimelock" // no type and a version in contract https://github.com/smartcontractkit/ccip-owner-contracts/blob/main/src/RBACTimelock.sol + ProposerManyChainMultiSig deployment.ContractType = "ProposerManyChainMultiSig" // no type and a version in contract https://github.com/smartcontractkit/ccip-owner-contracts/blob/main/src/ManyChainMultiSig.sol +) diff --git a/deployment/keystone/changeset/update_don.go b/deployment/keystone/changeset/update_don.go index 6f168bb55d6..fb7a9be8403 100644 --- a/deployment/keystone/changeset/update_don.go +++ b/deployment/keystone/changeset/update_don.go @@ -98,7 +98,7 @@ func appendRequest(r *UpdateDonRequest) *AppendNodeCapabilitiesRequest { } func updateDonRequest(env deployment.Environment, r *UpdateDonRequest) (*internal.UpdateDonRequest, error) { - resp, err := internal.GetContractSets(env.Logger, &internal.GetContractSetsRequest{ + resp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/update_node_capabilities.go b/deployment/keystone/changeset/update_node_capabilities.go index bf869416604..1f88ed4f5f0 100644 --- a/deployment/keystone/changeset/update_node_capabilities.go +++ b/deployment/keystone/changeset/update_node_capabilities.go @@ -86,7 +86,7 @@ func (req *MutateNodeCapabilitiesRequest) updateNodeCapabilitiesImplRequest(e de return nil, nil, fmt.Errorf("failed to validate UpdateNodeCapabilitiesRequest: %w", err) } registryChain := e.Chains[req.RegistryChainSel] // exists because of the validation above - resp, err := internal.GetContractSets(e.Logger, &internal.GetContractSetsRequest{ + resp, err := GetContractSets(e.Logger, &GetContractSetsRequest{ Chains: map[uint64]deployment.Chain{req.RegistryChainSel: registryChain}, AddressBook: e.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/update_nodes.go b/deployment/keystone/changeset/update_nodes.go index cc7c1c08eb7..879af37d16c 100644 --- a/deployment/keystone/changeset/update_nodes.go +++ b/deployment/keystone/changeset/update_nodes.go @@ -63,7 +63,7 @@ func UpdateNodes(env deployment.Environment, req *UpdateNodesRequest) (deploymen if !ok { return deployment.ChangesetOutput{}, fmt.Errorf("registry chain selector %d does not exist in environment", req.RegistryChainSel) } - cresp, err := internal.GetContractSets(env.Logger, &internal.GetContractSetsRequest{ + cresp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/view.go b/deployment/keystone/changeset/view.go index f6f495fd30b..0a5667781ed 100644 --- a/deployment/keystone/changeset/view.go +++ b/deployment/keystone/changeset/view.go @@ -2,48 +2,61 @@ package changeset import ( "encoding/json" + "errors" "fmt" chainsel "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink/deployment" commonview "github.com/smartcontractkit/chainlink/deployment/common/view" - "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" - "github.com/smartcontractkit/chainlink/deployment/keystone/view" ) var _ deployment.ViewState = ViewKeystone func ViewKeystone(e deployment.Environment) (json.Marshaler, error) { - state, err := internal.GetContractSets(e.Logger, &internal.GetContractSetsRequest{ + lggr := e.Logger + state, err := GetContractSets(e.Logger, &GetContractSetsRequest{ Chains: e.Chains, AddressBook: e.ExistingAddresses, }) + // this error is unrecoverable if err != nil { - return nil, err + return nil, fmt.Errorf("failed to get contract sets: %w", err) } - chainViews := make(map[string]view.KeystoneChainView) + var viewErrs error + chainViews := make(map[string]KeystoneChainView) for chainSel, contracts := range state.ContractSets { chainid, err := chainsel.ChainIdFromSelector(chainSel) if err != nil { - return nil, fmt.Errorf("failed to resolve chain id for selector %d: %w", chainSel, err) + err2 := fmt.Errorf("failed to resolve chain id for selector %d: %w", chainSel, err) + lggr.Error(err2) + viewErrs = errors.Join(viewErrs, err2) + continue } chainName, err := chainsel.NameFromChainId(chainid) if err != nil { - return nil, fmt.Errorf("failed to get name for chainid %d selector %d:%w", chainid, chainSel, err) + err2 := fmt.Errorf("failed to resolve chain name for chain id %d: %w", chainid, err) + lggr.Error(err2) + viewErrs = errors.Join(viewErrs, err2) + continue } - v, err := contracts.View() + v, err := contracts.View(e.Logger) if err != nil { - return nil, fmt.Errorf("failed to view contract set: %w", err) + err2 := fmt.Errorf("failed to view chain %s: %w", chainName, err) + lggr.Error(err2) + viewErrs = errors.Join(viewErrs, err2) + // don't continue; add the partial view } chainViews[chainName] = v } nopsView, err := commonview.GenerateNopsView(e.NodeIDs, e.Offchain) if err != nil { - return nil, fmt.Errorf("failed to view nops: %w", err) + err2 := fmt.Errorf("failed to view nops: %w", err) + lggr.Error(err2) + viewErrs = errors.Join(viewErrs, err2) } - return &view.KeystoneView{ + return &KeystoneView{ Chains: chainViews, Nops: nopsView, - }, nil + }, viewErrs } diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go new file mode 100644 index 00000000000..0626243e99a --- /dev/null +++ b/deployment/keystone/changeset/view_contracts.go @@ -0,0 +1,161 @@ +package changeset + +import ( + "encoding/json" + "errors" + "math" + "time" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "google.golang.org/protobuf/proto" + + "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" + ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" + + capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + + ocr3_capability "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" + + "github.com/smartcontractkit/chainlink/deployment/common/view" + common_v1_0 "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" +) + +type KeystoneChainView struct { + CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"` + // OCR3ConfigView is a map of OCR3 contract addresses to their configuration view + OCR3ConfigView map[string]OCR3ConfigView `json:"ocr3ConfigViews,omitempty"` +} + +type OCR3ConfigView struct { + Signers []string `json:"signers"` + Transmitters []ocr2types.Account `json:"transmitters"` + F uint8 `json:"f"` + OnchainConfig []byte `json:"onchainConfig"` + OffchainConfigVersion uint64 `json:"offchainConfigVersion"` + OffchainConfig OracleConfig `json:"offchainConfig"` +} + +var ErrOCR3NotConfigured = errors.New("OCR3 not configured") + +func GenerateOCR3ConfigView(ocr3Cap ocr3_capability.OCR3Capability) (OCR3ConfigView, error) { + details, err := ocr3Cap.LatestConfigDetails(nil) + if err != nil { + return OCR3ConfigView{}, err + } + + blockNumber := uint64(details.BlockNumber) + configIterator, err := ocr3Cap.FilterConfigSet(&bind.FilterOpts{ + Start: blockNumber, + End: &blockNumber, + Context: nil, + }) + if err != nil { + return OCR3ConfigView{}, err + } + var config *ocr3_capability.OCR3CapabilityConfigSet + for configIterator.Next() { + // We wait for the iterator to receive an event + if configIterator.Event == nil { + return OCR3ConfigView{}, ErrOCR3NotConfigured + } + + config = configIterator.Event + } + if config == nil { + return OCR3ConfigView{}, ErrOCR3NotConfigured + } + + var signers []ocr2types.OnchainPublicKey + var readableSigners []string + for _, s := range config.Signers { + signers = append(signers, s) + readableSigners = append(readableSigners, string(s)) + } + var transmitters []ocr2types.Account + for _, t := range config.Transmitters { + transmitters = append(transmitters, ocr2types.Account(t.String())) + } + // `PublicConfigFromContractConfig` returns the `ocr2types.PublicConfig` that contains all the `OracleConfig` fields we need, including the + // report plugin config. + publicConfig, err := ocr3confighelper.PublicConfigFromContractConfig(true, ocr2types.ContractConfig{ + ConfigDigest: config.ConfigDigest, + ConfigCount: config.ConfigCount, + Signers: signers, + Transmitters: transmitters, + F: config.F, + OnchainConfig: nil, // empty onChain config, currently we always use a nil onchain config when calling SetConfig + OffchainConfigVersion: config.OffchainConfigVersion, + OffchainConfig: config.OffchainConfig, + }) + if err != nil { + return OCR3ConfigView{}, err + } + var cfg capocr3types.ReportingPluginConfig + if err = proto.Unmarshal(publicConfig.ReportingPluginConfig, &cfg); err != nil { + return OCR3ConfigView{}, err + } + oracleConfig := OracleConfig{ + MaxQueryLengthBytes: cfg.MaxQueryLengthBytes, + MaxObservationLengthBytes: cfg.MaxObservationLengthBytes, + MaxReportLengthBytes: cfg.MaxReportLengthBytes, + MaxOutcomeLengthBytes: cfg.MaxOutcomeLengthBytes, + MaxReportCount: cfg.MaxReportCount, + MaxBatchSize: cfg.MaxBatchSize, + OutcomePruningThreshold: cfg.OutcomePruningThreshold, + RequestTimeout: cfg.RequestTimeout.AsDuration(), + UniqueReports: true, // This is hardcoded to true in the OCR3 contract + + DeltaProgressMillis: millisecondsToUint32(publicConfig.DeltaProgress), + DeltaResendMillis: millisecondsToUint32(publicConfig.DeltaResend), + DeltaInitialMillis: millisecondsToUint32(publicConfig.DeltaInitial), + DeltaRoundMillis: millisecondsToUint32(publicConfig.DeltaRound), + DeltaGraceMillis: millisecondsToUint32(publicConfig.DeltaGrace), + DeltaCertifiedCommitRequestMillis: millisecondsToUint32(publicConfig.DeltaCertifiedCommitRequest), + DeltaStageMillis: millisecondsToUint32(publicConfig.DeltaStage), + MaxRoundsPerEpoch: publicConfig.RMax, + TransmissionSchedule: publicConfig.S, + + MaxDurationQueryMillis: millisecondsToUint32(publicConfig.MaxDurationQuery), + MaxDurationObservationMillis: millisecondsToUint32(publicConfig.MaxDurationObservation), + MaxDurationShouldAcceptMillis: millisecondsToUint32(publicConfig.MaxDurationShouldAcceptAttestedReport), + MaxDurationShouldTransmitMillis: millisecondsToUint32(publicConfig.MaxDurationShouldTransmitAcceptedReport), + + MaxFaultyOracles: publicConfig.F, + } + + return OCR3ConfigView{ + Signers: readableSigners, + Transmitters: transmitters, + F: config.F, + OnchainConfig: nil, // empty onChain config + OffchainConfigVersion: config.OffchainConfigVersion, + OffchainConfig: oracleConfig, + }, nil +} + +func millisecondsToUint32(dur time.Duration) uint32 { + ms := dur.Milliseconds() + if ms > int64(math.MaxUint32) { + return math.MaxUint32 + } + //nolint:gosec // disable G115 as it is practically impossible to overflow here + return uint32(ms) +} + +func NewKeystoneChainView() KeystoneChainView { + return KeystoneChainView{ + CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView), + OCR3ConfigView: make(map[string]OCR3ConfigView), + } +} + +type KeystoneView struct { + Chains map[string]KeystoneChainView `json:"chains,omitempty"` + Nops map[string]view.NopView `json:"nops,omitempty"` +} + +func (v KeystoneView) MarshalJSON() ([]byte, error) { + // Alias to avoid recursive calls + type Alias KeystoneView + return json.MarshalIndent(&struct{ Alias }{Alias: Alias(v)}, "", " ") +} diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index 5b32699fd89..da5520a7f62 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -1,40 +1,139 @@ -package changeset +package changeset_test import ( + "bytes" + "encoding/json" "testing" + "time" + "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/require" - "go.uber.org/zap/zapcore" - "github.com/smartcontractkit/chainlink-common/pkg/logger" + chain_selectors "github.com/smartcontractkit/chain-selectors" - "github.com/smartcontractkit/chainlink/deployment/environment/memory" + "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" + "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/internal" + "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/test" ) +var oracleConfig = changeset.OracleConfig{ + DeltaProgressMillis: 30000, + DeltaResendMillis: 5000, + DeltaInitialMillis: 5000, + DeltaRoundMillis: 2000, + DeltaGraceMillis: 500, + DeltaCertifiedCommitRequestMillis: 1000, + DeltaStageMillis: 30000, + MaxRoundsPerEpoch: 10, + TransmissionSchedule: []int{}, + MaxDurationQueryMillis: 1000, + MaxDurationObservationMillis: 1000, + MaxDurationShouldAcceptMillis: 1000, + MaxDurationShouldTransmitMillis: 1000, + MaxFaultyOracles: 1, + MaxQueryLengthBytes: 1000000, + MaxObservationLengthBytes: 1000000, + MaxReportLengthBytes: 1000000, + MaxOutcomeLengthBytes: 1000000, + MaxReportCount: 20, + MaxBatchSize: 1000, + OutcomePruningThreshold: 3600, + UniqueReports: true, + RequestTimeout: 30 * time.Second, +} + func TestKeystoneView(t *testing.T) { t.Parallel() - env := memory.NewMemoryEnvironment(t, logger.Test(t), zapcore.DebugLevel, memory.MemoryEnvironmentConfig{ - Nodes: 1, - Chains: 2, + env := test.SetupTestEnv(t, test.TestConfig{ + WFDonConfig: test.DonConfig{N: 4}, + AssetDonConfig: test.DonConfig{N: 4}, + WriterDonConfig: test.DonConfig{N: 4}, + NumChains: 1, }) - registryChain := env.AllChainSelectors()[0] - resp, err := DeployCapabilityRegistry(env, registryChain) - require.NoError(t, err) - require.NotNil(t, resp) - require.NoError(t, env.ExistingAddresses.Merge(resp.AddressBook)) - resp, err = DeployOCR3(env, registryChain) - require.NoError(t, err) - require.NotNil(t, resp) - require.NoError(t, env.ExistingAddresses.Merge(resp.AddressBook)) - resp, err = DeployForwarder(env, DeployForwarderRequest{}) - require.NoError(t, err) - require.NotNil(t, resp) - require.NoError(t, env.ExistingAddresses.Merge(resp.AddressBook)) + registryChain := env.Env.AllChainSelectors()[0] + var wfNodes []string + for id := range env.WFNodes { + wfNodes = append(wfNodes, id) + } + oracleConfig.TransmissionSchedule = []int{len(wfNodes)} - a, err := ViewKeystone(env) + addrs, err := env.Env.ExistingAddresses.AddressesForChain(registryChain) require.NoError(t, err) - b, err := a.MarshalJSON() - require.NoError(t, err) - require.NotEmpty(t, b) - t.Log(string(b)) + + var newOCR3Addr string + for addr, tv := range addrs { + if tv.Type == internal.OCR3Capability { + newOCR3Addr = addr + break + } + } + + t.Run("successfully generates a view of the keystone state", func(t *testing.T) { + oracleConfigCopy := oracleConfig + + w := &bytes.Buffer{} + na := common.HexToAddress(newOCR3Addr) + cfg := changeset.ConfigureOCR3Config{ + ChainSel: env.RegistrySelector, + NodeIDs: wfNodes, + Address: &na, + OCR3Config: &oracleConfigCopy, + WriteGeneratedConfig: w, + } + _, err = changeset.ConfigureOCR3Contract(env.Env, cfg) + require.NoError(t, err) + + a, err := changeset.ViewKeystone(env.Env) + require.NoError(t, err) + b, err := a.MarshalJSON() + require.NoError(t, err) + require.NotEmpty(t, b) + + var outView changeset.KeystoneView + require.NoError(t, json.Unmarshal(b, &outView)) + + chainID, err := chain_selectors.ChainIdFromSelector(registryChain) + require.NoError(t, err) + chainName, err := chain_selectors.NameFromChainId(chainID) + require.NoError(t, err) + + viewChain, ok := outView.Chains[chainName] + require.True(t, ok) + viewOCR3Config, ok := viewChain.OCR3ConfigView[newOCR3Addr] + require.True(t, ok) + require.Equal(t, oracleConfig, viewOCR3Config.OffchainConfig) + }) + + t.Run("fails to generate a view of the keystone state with OCR3 not configured", func(t *testing.T) { + // Deploy a new OCR3 contract + resp, err := changeset.DeployOCR3(env.Env, registryChain) + require.NoError(t, err) + require.NotNil(t, resp) + require.NoError(t, env.Env.ExistingAddresses.Merge(resp.AddressBook)) + + _, err = changeset.ViewKeystone(env.Env) + require.ErrorContains(t, err, "failed to view chain") + require.ErrorContains(t, err, "OCR3 not configured") + }) + + t.Run("fails to generate a view of the keystone state with a bad OracleConfig", func(t *testing.T) { + oracleConfigCopy := oracleConfig + oracleConfigCopy.DeltaRoundMillis = 0 + oracleConfigCopy.DeltaProgressMillis = 0 + + w := &bytes.Buffer{} + na := common.HexToAddress(newOCR3Addr) + cfg := changeset.ConfigureOCR3Config{ + ChainSel: env.RegistrySelector, + NodeIDs: wfNodes, + Address: &na, + OCR3Config: &oracleConfigCopy, + WriteGeneratedConfig: w, + } + _, err = changeset.ConfigureOCR3Contract(env.Env, cfg) + require.NoError(t, err) + _, err = changeset.ViewKeystone(env.Env) + require.ErrorContains(t, err, "failed to view chain") + require.ErrorContains(t, err, "DeltaRound (0s) must be less than DeltaProgress (0s)") + }) } diff --git a/deployment/keystone/view/view.go b/deployment/keystone/view/view.go deleted file mode 100644 index 1320344b7ca..00000000000 --- a/deployment/keystone/view/view.go +++ /dev/null @@ -1,30 +0,0 @@ -package view - -import ( - "encoding/json" - - "github.com/smartcontractkit/chainlink/deployment/common/view" - common_v1_0 "github.com/smartcontractkit/chainlink/deployment/common/view/v1_0" -) - -type KeystoneChainView struct { - CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"` - // TODO forwarders etc -} - -func NewKeystoneChainView() KeystoneChainView { - return KeystoneChainView{ - CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView), - } -} - -type KeystoneView struct { - Chains map[string]KeystoneChainView `json:"chains,omitempty"` - Nops map[string]view.NopView `json:"nops,omitempty"` -} - -func (v KeystoneView) MarshalJSON() ([]byte, error) { - // Alias to avoid recursive calls - type Alias KeystoneView - return json.MarshalIndent(&struct{ Alias }{Alias: Alias(v)}, "", " ") -} From 18df7375dfde5f9fb9d309df7142080dfaa4814e Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 15:16:49 -0400 Subject: [PATCH 22/53] Fixes merge + gomods tidy --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- deployment/keystone/changeset/test/env_setup.go | 2 +- 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, 13 insertions(+), 13 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index b5dbc8576ae..aa8496760dc 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 0893a46b161..adfb9a8e926 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1127,8 +1127,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7 h1:5NagQi0BzMkxgTXO0LbGcmqr5XLhWjC6T7ZScCp86H8= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 96bc92e7da8..2a6a6f181a8 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 diff --git a/deployment/go.sum b/deployment/go.sum index 38359c61bfb..ade6f358012 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1130,8 +1130,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7 h1:5NagQi0BzMkxgTXO0LbGcmqr5XLhWjC6T7ZScCp86H8= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/keystone/changeset/test/env_setup.go b/deployment/keystone/changeset/test/env_setup.go index 4d70f0334c6..036762dade6 100644 --- a/deployment/keystone/changeset/test/env_setup.go +++ b/deployment/keystone/changeset/test/env_setup.go @@ -51,7 +51,7 @@ func (c DonConfig) Validate() error { } type testEnvIface interface { - ContractSets() map[uint64]internal.ContractSet + ContractSets() map[uint64]changeset.ContractSet CapabilitiesRegistry() *kcr.CapabilitiesRegistry CapabilityInfos() []kcr.CapabilitiesRegistryCapabilityInfo Nops() []kcr.CapabilitiesRegistryNodeOperatorAdded diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 02bf5485df9..7948168895d 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250205141137-8f50d72601bb + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index bf1e2645f2e..0379cf3728c 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1382,8 +1382,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7 h1:5NagQi0BzMkxgTXO0LbGcmqr5XLhWjC6T7ZScCp86H8= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index a7c785ff412..05a7745f27c 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250205141137-8f50d72601bb + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index bfc97dce3b8..80dc73669d8 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1365,8 +1365,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214122756-01c6c2d85aee/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7 h1:5NagQi0BzMkxgTXO0LbGcmqr5XLhWjC6T7ZScCp86H8= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250211204327-6aca485891a7/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b h1:M6+cHEOcElD6n64TUILBcYmbGAwZIw+oEEKJmxVhJGk= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250211175547-dd6258ec090b/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From a7efa3bb0274edeb6f6da411341896ea971f914a Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 15:22:42 -0400 Subject: [PATCH 23/53] gomods tidy --- core/scripts/go.mod | 2 +- deployment/go.mod | 2 +- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index aa8496760dc..5bd370ecb02 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -13,7 +13,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../../deployment // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250129223716-34cbaaab2d04 + github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde ) require ( diff --git a/deployment/go.mod b/deployment/go.mod index 2a6a6f181a8..0bfbc970f56 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -7,7 +7,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ // Using a separate inline `require` here to avoid surrounding line changes // creating potential merge conflicts. -require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 +require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250214191649-18df7375dfde require ( github.com/Khan/genqlient v0.7.0 diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 7948168895d..569963580de 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -13,7 +13,7 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 + github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde ) require ( diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 05a7745f27c..f14dfdf808c 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -16,7 +16,7 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250128231431-9279badae2f0 + github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde ) require ( From ae70da0212cbcdfc3507946762b80f77cbd0f4ec Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 15:35:56 -0400 Subject: [PATCH 24/53] Fixes test --- deployment/keystone/changeset/view_test.go | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index da5520a7f62..aabcb4faace 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -44,18 +44,14 @@ var oracleConfig = changeset.OracleConfig{ func TestKeystoneView(t *testing.T) { t.Parallel() - env := test.SetupTestEnv(t, test.TestConfig{ - WFDonConfig: test.DonConfig{N: 4}, - AssetDonConfig: test.DonConfig{N: 4}, - WriterDonConfig: test.DonConfig{N: 4}, + env := test.SetupContractTestEnv(t, test.EnvWrapperConfig{ + WFDonConfig: test.DonConfig{N: 4, Name: "wfDon"}, + AssetDonConfig: test.DonConfig{N: 4, Name: "assetDon"}, + WriterDonConfig: test.DonConfig{N: 4, Name: "writerDon"}, NumChains: 1, }) registryChain := env.Env.AllChainSelectors()[0] - var wfNodes []string - for id := range env.WFNodes { - wfNodes = append(wfNodes, id) - } - oracleConfig.TransmissionSchedule = []int{len(wfNodes)} + oracleConfig.TransmissionSchedule = []int{len(env.Env.NodeIDs)} addrs, err := env.Env.ExistingAddresses.AddressesForChain(registryChain) require.NoError(t, err) @@ -75,7 +71,7 @@ func TestKeystoneView(t *testing.T) { na := common.HexToAddress(newOCR3Addr) cfg := changeset.ConfigureOCR3Config{ ChainSel: env.RegistrySelector, - NodeIDs: wfNodes, + NodeIDs: env.Env.NodeIDs, Address: &na, OCR3Config: &oracleConfigCopy, WriteGeneratedConfig: w, @@ -125,7 +121,7 @@ func TestKeystoneView(t *testing.T) { na := common.HexToAddress(newOCR3Addr) cfg := changeset.ConfigureOCR3Config{ ChainSel: env.RegistrySelector, - NodeIDs: wfNodes, + NodeIDs: env.Env.NodeIDs, Address: &na, OCR3Config: &oracleConfigCopy, WriteGeneratedConfig: w, From 897a796cad3d1c4c33b6b51d9a2a7da0ae5021f1 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 16:57:01 -0400 Subject: [PATCH 25/53] Renames view field --- deployment/keystone/changeset/state.go | 2 +- deployment/keystone/changeset/view_contracts.go | 6 +++--- deployment/keystone/changeset/view_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deployment/keystone/changeset/state.go b/deployment/keystone/changeset/state.go index fa9e1030ec5..1c703649055 100644 --- a/deployment/keystone/changeset/state.go +++ b/deployment/keystone/changeset/state.go @@ -95,7 +95,7 @@ func (cs ContractSet) View(lggr logger.Logger) (KeystoneChainView, error) { lggr.Errorf("failed to generate OCR3 config view: %v", err) } } - out.OCR3ConfigView[addrCopy.String()] = ocrView + out.OCR3Config[addrCopy.String()] = ocrView } } diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go index 0626243e99a..15d235fd7ef 100644 --- a/deployment/keystone/changeset/view_contracts.go +++ b/deployment/keystone/changeset/view_contracts.go @@ -22,8 +22,8 @@ import ( type KeystoneChainView struct { CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"` - // OCR3ConfigView is a map of OCR3 contract addresses to their configuration view - OCR3ConfigView map[string]OCR3ConfigView `json:"ocr3ConfigViews,omitempty"` + // OCR3Config is a map of OCR3 contract addresses to their configuration view + OCR3Config map[string]OCR3ConfigView `json:"ocr3Config,omitempty"` } type OCR3ConfigView struct { @@ -145,7 +145,7 @@ func millisecondsToUint32(dur time.Duration) uint32 { func NewKeystoneChainView() KeystoneChainView { return KeystoneChainView{ CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView), - OCR3ConfigView: make(map[string]OCR3ConfigView), + OCR3Config: make(map[string]OCR3ConfigView), } } diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index aabcb4faace..18567cd97e6 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -95,7 +95,7 @@ func TestKeystoneView(t *testing.T) { viewChain, ok := outView.Chains[chainName] require.True(t, ok) - viewOCR3Config, ok := viewChain.OCR3ConfigView[newOCR3Addr] + viewOCR3Config, ok := viewChain.OCR3Config[newOCR3Addr] require.True(t, ok) require.Equal(t, oracleConfig, viewOCR3Config.OffchainConfig) }) From 89c22840bf4de7f3396ae2af6d325f60e45fd3e7 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 21:20:29 -0400 Subject: [PATCH 26/53] Renames view field --- deployment/keystone/changeset/state.go | 2 +- deployment/keystone/changeset/view_contracts.go | 6 +++--- deployment/keystone/changeset/view_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deployment/keystone/changeset/state.go b/deployment/keystone/changeset/state.go index 1c703649055..581f4fa4d3f 100644 --- a/deployment/keystone/changeset/state.go +++ b/deployment/keystone/changeset/state.go @@ -95,7 +95,7 @@ func (cs ContractSet) View(lggr logger.Logger) (KeystoneChainView, error) { lggr.Errorf("failed to generate OCR3 config view: %v", err) } } - out.OCR3Config[addrCopy.String()] = ocrView + out.OCRContracts[addrCopy.String()] = ocrView } } diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go index 15d235fd7ef..36be4c18f1b 100644 --- a/deployment/keystone/changeset/view_contracts.go +++ b/deployment/keystone/changeset/view_contracts.go @@ -22,8 +22,8 @@ import ( type KeystoneChainView struct { CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"` - // OCR3Config is a map of OCR3 contract addresses to their configuration view - OCR3Config map[string]OCR3ConfigView `json:"ocr3Config,omitempty"` + // OCRContracts is a map of OCR3 contract addresses to their configuration view + OCRContracts map[string]OCR3ConfigView `json:"ocrContracts,omitempty"` } type OCR3ConfigView struct { @@ -145,7 +145,7 @@ func millisecondsToUint32(dur time.Duration) uint32 { func NewKeystoneChainView() KeystoneChainView { return KeystoneChainView{ CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView), - OCR3Config: make(map[string]OCR3ConfigView), + OCRContracts: make(map[string]OCR3ConfigView), } } diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index 18567cd97e6..f1e478f1fcb 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -95,7 +95,7 @@ func TestKeystoneView(t *testing.T) { viewChain, ok := outView.Chains[chainName] require.True(t, ok) - viewOCR3Config, ok := viewChain.OCR3Config[newOCR3Addr] + viewOCR3Config, ok := viewChain.OCRContracts[newOCR3Addr] require.True(t, ok) require.Equal(t, oracleConfig, viewOCR3Config.OffchainConfig) }) From d61cb4a9eafcb748d5069891500dacefd0865ed9 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 21:23:20 -0400 Subject: [PATCH 27/53] Hex encodes view signers field values --- deployment/keystone/changeset/view_contracts.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go index 36be4c18f1b..5897d040b1b 100644 --- a/deployment/keystone/changeset/view_contracts.go +++ b/deployment/keystone/changeset/view_contracts.go @@ -1,6 +1,7 @@ package changeset import ( + "encoding/hex" "encoding/json" "errors" "math" @@ -69,7 +70,7 @@ func GenerateOCR3ConfigView(ocr3Cap ocr3_capability.OCR3Capability) (OCR3ConfigV var readableSigners []string for _, s := range config.Signers { signers = append(signers, s) - readableSigners = append(readableSigners, string(s)) + readableSigners = append(readableSigners, hex.EncodeToString(s[:])) } var transmitters []ocr2types.Account for _, t := range config.Transmitters { From d700509506c5df6fbb7287073dcc76f7911043be Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 21:55:37 -0400 Subject: [PATCH 28/53] Fixes merge conflicts issues --- deployment/keystone/changeset/state.go | 10 ++++++++++ deployment/keystone/changeset/view_contracts.go | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/state.go b/deployment/keystone/changeset/state.go index 581f4fa4d3f..be7f63b7410 100644 --- a/deployment/keystone/changeset/state.go +++ b/deployment/keystone/changeset/state.go @@ -99,6 +99,16 @@ func (cs ContractSet) View(lggr logger.Logger) (KeystoneChainView, error) { } } + // Process the workflow registry and print if WorkflowRegistryError errors. + if cs.WorkflowRegistry != nil { + wrView, wrErrs := common_v1_0.GenerateWorkflowRegistryView(cs.WorkflowRegistry) + for _, err := range wrErrs { + allErrs = errors.Join(allErrs, err) + lggr.Errorf("WorkflowRegistry error: %v", err) + } + out.WorkflowRegistry[cs.WorkflowRegistry.Address().String()] = wrView + } + return out, allErrs } diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go index 5897d040b1b..99054fa8fd3 100644 --- a/deployment/keystone/changeset/view_contracts.go +++ b/deployment/keystone/changeset/view_contracts.go @@ -24,7 +24,8 @@ import ( type KeystoneChainView struct { CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"` // OCRContracts is a map of OCR3 contract addresses to their configuration view - OCRContracts map[string]OCR3ConfigView `json:"ocrContracts,omitempty"` + OCRContracts map[string]OCR3ConfigView `json:"ocrContracts,omitempty"` + WorkflowRegistry map[string]common_v1_0.WorkflowRegistryView `json:"workflowRegistry,omitempty"` } type OCR3ConfigView struct { @@ -147,6 +148,7 @@ func NewKeystoneChainView() KeystoneChainView { return KeystoneChainView{ CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView), OCRContracts: make(map[string]OCR3ConfigView), + WorkflowRegistry: make(map[string]common_v1_0.WorkflowRegistryView), } } From 95f6bd3b0ad4079aa6c32dcdff329ae56ab1f961 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 21:55:43 -0400 Subject: [PATCH 29/53] gomods tidy --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/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 d89fef172fc..766b36234cd 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 9c167e788a4..8de87618d8e 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1127,8 +1127,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 7eb093d9e34..342def9e05a 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 diff --git a/deployment/go.sum b/deployment/go.sum index ea1022673f4..1ea647b7d41 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1130,8 +1130,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 7063f1a643f..acb9b457f82 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 3dc62e190fa..15db545d515 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1382,8 +1382,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index ee50ededef6..cff2af62341 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index ca85d4dd80c..8edd51e4d77 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1365,8 +1365,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d h1:Crrg6l4ZvBf1f9wmZarPa6E4TcToSrhRq2C9QEiJIbw= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214190650-948938b3787d/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From d103564587161b65515c65a8e3ac90b48f753777 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 22:06:08 -0400 Subject: [PATCH 30/53] Fixes merge conflicts issues --- deployment/keystone/view/view.go | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 deployment/keystone/view/view.go diff --git a/deployment/keystone/view/view.go b/deployment/keystone/view/view.go deleted file mode 100644 index e69de29bb2d..00000000000 From b0191b9cb7a3560d813b4ada120c776c70afdb0b Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 14 Feb 2025 23:13:55 -0400 Subject: [PATCH 31/53] Fixes lint --- deployment/keystone/changeset/view_contracts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/view_contracts.go b/deployment/keystone/changeset/view_contracts.go index 99054fa8fd3..a5868f4d74e 100644 --- a/deployment/keystone/changeset/view_contracts.go +++ b/deployment/keystone/changeset/view_contracts.go @@ -71,7 +71,7 @@ func GenerateOCR3ConfigView(ocr3Cap ocr3_capability.OCR3Capability) (OCR3ConfigV var readableSigners []string for _, s := range config.Signers { signers = append(signers, s) - readableSigners = append(readableSigners, hex.EncodeToString(s[:])) + readableSigners = append(readableSigners, hex.EncodeToString(s)) } var transmitters []ocr2types.Account for _, t := range config.Transmitters { From a82f2ea102689dacb3a754a60e206b1de40dcd02 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 18 Feb 2025 13:51:30 -0400 Subject: [PATCH 32/53] Prevents break on 0 `RequestTimeout` --- .../keystone/changeset/internal/ocr3config.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 82000490514..4167795a69f 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -76,11 +76,16 @@ func (oc *OracleConfig) UnmarshalJSON(data []byte) error { return fmt.Errorf("failed to unmarshal OracleConfig: %w", err) } - requestTimeout, err := time.ParseDuration(temp.RequestTimeout) - if err != nil { - return fmt.Errorf("failed to parse RequestTimeout: %w", err) + if temp.RequestTimeout == "" { + oc.RequestTimeout = 0 + } else { + requestTimeout, err := time.ParseDuration(temp.RequestTimeout) + if err != nil { + return fmt.Errorf("failed to parse RequestTimeout: %w", err) + } + oc.RequestTimeout = requestTimeout } - oc.RequestTimeout = requestTimeout + return nil } From 99037ddb4690858b65337af9591d3f062c13e02b Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Tue, 18 Feb 2025 14:45:59 -0400 Subject: [PATCH 33/53] Prevents break on 0 `RequestTimeout` --- deployment/keystone/changeset/internal/ocr3config.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 4167795a69f..8fd28e32eda 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -278,6 +278,13 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR }) } + // let's keep reqTimeout as nil if it's 0, so we can use the default value within `chainlink-common`. + // See: https://github.com/smartcontractkit/chainlink-common/pull/1023/files#diff-dfda85aab0705d57a7fa2b7fba150451a32b6961655d67f79f23da8a3ad57614R73 + // TODO: update link after PR gets merged + var reqTimeout *durationpb.Duration + if cfg.RequestTimeout > 0 { + reqTimeout = durationpb.New(cfg.RequestTimeout) + } cfgBytes, err := proto.Marshal(&capocr3types.ReportingPluginConfig{ MaxQueryLengthBytes: cfg.MaxQueryLengthBytes, MaxObservationLengthBytes: cfg.MaxObservationLengthBytes, @@ -286,7 +293,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR MaxReportCount: cfg.MaxReportCount, MaxBatchSize: cfg.MaxBatchSize, OutcomePruningThreshold: cfg.OutcomePruningThreshold, - RequestTimeout: durationpb.New(cfg.RequestTimeout), + RequestTimeout: reqTimeout, }) if err != nil { return OCR2OracleConfig{}, fmt.Errorf("failed to marshal ReportingPluginConfig: %w", err) From e6ac35e06174adb733e3a403b222b076adc4c983 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 19 Feb 2025 15:10:56 -0400 Subject: [PATCH 34/53] gomods tidy --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/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 766b36234cd..cca58d94518 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 8de87618d8e..a5c23d28097 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1127,8 +1127,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 342def9e05a..39ead0d173b 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 diff --git a/deployment/go.sum b/deployment/go.sum index 1ea647b7d41..7c775101266 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1130,8 +1130,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index acb9b457f82..2c7a9e5c4bd 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 15db545d515..2c76d901050 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1382,8 +1382,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index cff2af62341..9391f5ee94d 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 8edd51e4d77..87d0d7cdac9 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1365,8 +1365,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c h1:8EiOPtIyPYXdUBfH8DDmSwojtAZEa8J57qUj6Dnu/CI= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250215013021-1780ca00667c/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From a69f52d77ba12829931683b964b015b4a1863419 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 19 Feb 2025 15:15:03 -0400 Subject: [PATCH 35/53] git merge conflicts --- deployment/keystone/changeset/internal/ocr3config.go | 7 ++----- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 6574cfd1b57..c6dfaeb8106 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -16,14 +16,11 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/durationpb" - "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/mcms" - "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" - mcmstypes "github.com/smartcontractkit/mcms/types" + capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" - - capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + mcmstypes "github.com/smartcontractkit/mcms/types" "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 2199b170abf..f3a95459303 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250219000908-751d873236f2 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.6.0 diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index ae9d64450bd..b40dfba93c8 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -28,7 +28,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250214202341-4190f2db1c01 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250219000908-751d873236f2 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 From f75f74457762b97fdbcdbb2418865c4d55c1c67f Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Wed, 19 Feb 2025 15:31:02 -0400 Subject: [PATCH 36/53] fixes lint --- deployment/keystone/changeset/internal/ocr3config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index c6dfaeb8106..64c588aecf0 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -16,12 +16,13 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/durationpb" - capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/types" mcmstypes "github.com/smartcontractkit/mcms/types" + capocr3types "github.com/smartcontractkit/chainlink-common/pkg/capabilities/consensus/ocr3/types" + "github.com/smartcontractkit/chainlink/deployment" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" kocr3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/ocr3_capability_1_0_0" From fe7335268944ee048353c7f730144d7421947039 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 12:21:52 -0400 Subject: [PATCH 37/53] gomods tidy --- deployment/go.mod | 2 +- integration-tests/go.mod | 15 ++++++++------- integration-tests/go.sum | 2 ++ integration-tests/load/go.mod | 6 +++--- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 ++-- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 ++-- 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/deployment/go.mod b/deployment/go.mod index 47e74e1150b..03875492fb8 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -7,7 +7,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ // Using a separate inline `require` here to avoid surrounding line changes // creating potential merge conflicts. -require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250214191649-18df7375dfde +require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 require ( github.com/Khan/genqlient v0.7.0 diff --git a/integration-tests/go.mod b/integration-tests/go.mod index a7bc9aa2550..c1cb3605001 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -12,8 +12,8 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221161645-4c8b48da7f04 + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 ) require ( @@ -28,8 +28,11 @@ require ( github.com/deckarep/golang-set/v2 v2.6.0 github.com/ethereum/go-ethereum v1.15.0 github.com/fxamacker/cbor/v2 v2.7.0 + github.com/gin-gonic/gin v1.10.0 github.com/go-resty/resty/v2 v2.15.3 + github.com/go-yaml/yaml v2.1.0+incompatible github.com/google/go-cmp v0.6.0 + github.com/google/go-github/v41 v41.0.0 github.com/google/uuid v1.6.0 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 @@ -46,10 +49,11 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250219000908-751d873236f2 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 + github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 @@ -67,6 +71,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/crypto v0.32.0 golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c + golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.10.0 golang.org/x/text v0.21.0 google.golang.org/grpc v1.67.1 @@ -212,7 +217,6 @@ require ( github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect @@ -255,7 +259,6 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect - github.com/google/go-github/v41 v41.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -437,7 +440,6 @@ require ( github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect - github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/mcms v0.10.0 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect @@ -513,7 +515,6 @@ require ( golang.org/x/arch v0.11.0 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.34.0 // indirect - golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.29.0 // indirect golang.org/x/term v0.28.0 // indirect golang.org/x/time v0.7.0 // indirect diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 697e56009e9..b9d8bbb5319 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -593,6 +593,8 @@ github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6l github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY= +github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= +github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index d2296561c30..9609cfdd985 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,9 +14,9 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221161645-4c8b48da7f04 github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 ) require ( @@ -28,7 +28,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250219000908-751d873236f2 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 7a4d6e8458a..5bb9518ad24 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/uuid v1.6.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.33.0 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.4 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.23 diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index f77bce8596b..4f205768f2b 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea h1:/1f/pWf7vSV9acTR9UPn2exPAwQG/LHGa4l9OywhS00= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index c7d561e335d..d8463657d9a 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -343,7 +343,7 @@ require ( github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea // indirect + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index c4a0b2e12fb..e79c45edf57 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea h1:/1f/pWf7vSV9acTR9UPn2exPAwQG/LHGa4l9OywhS00= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250214231858-f365e2bdecea/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From 9b05fb8f2f2f530d29e6f5dc286f35120caa1bb4 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 12:26:18 -0400 Subject: [PATCH 38/53] gomods tidy --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/go.sum | 4 ++-- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 20d2ef09eff..d742b59a075 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 4b48d4f9a31..67890a880b4 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1090,8 +1090,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 03875492fb8..1b3eaf1f9fc 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 diff --git a/deployment/go.sum b/deployment/go.sum index 98d9d0bc5b4..aa595f4700c 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1138,8 +1138,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index c1cb3605001..bc4d6ed25c0 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index b9d8bbb5319..2aa85543e00 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1390,8 +1390,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index 5bb9518ad24..f999ea76821 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/uuid v1.6.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.33.0 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.4 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.23 diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index 4f205768f2b..51e8f2b7399 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From d4c0599acfdfbce732e6ab6a27761435aa3adcde Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 12:26:26 -0400 Subject: [PATCH 39/53] gomods tidy --- integration-tests/load/go.mod | 2 +- integration-tests/load/go.sum | 4 ++-- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 9609cfdd985..806abe44884 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 79b56bff3a3..8b1cb85e3c4 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1373,8 +1373,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index d8463657d9a..921b44d6f46 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -343,7 +343,7 @@ require ( github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 // indirect + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index e79c45edf57..307db5f6650 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707 h1:uLAAT5O+3rWtZFw6MWaj6eV7xdwhKC/HALiFEHvEK+U= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250219190937-a4ab077d8707/go.mod h1:Z2e1ynSJ4pg83b4Qldbmryc5lmnrI3ojOdg1FUloa68= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= From 75eaa20718856494c053ce7738b3d72452c80fda Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 12:53:47 -0400 Subject: [PATCH 40/53] Fixes merge conflicts issues --- deployment/keystone/changeset/internal/deploy.go | 8 ++++---- .../keystone/changeset/internal/forwarder_deployer.go | 2 +- deployment/keystone/changeset/internal/types.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/deployment/keystone/changeset/internal/deploy.go b/deployment/keystone/changeset/internal/deploy.go index cd2e9687957..dc9ca1b3425 100644 --- a/deployment/keystone/changeset/internal/deploy.go +++ b/deployment/keystone/changeset/internal/deploy.go @@ -70,7 +70,7 @@ func ConfigureContracts(ctx context.Context, lggr logger.Logger, req ConfigureCo return nil, fmt.Errorf("invalid request: %w", err) } - contractSetsResp, err := getContractSets(lggr, &getContractSetsRequest{ + contractSetsResp, err := getContractSets(lggr, &GetContractSetsRequest{ Chains: req.Env.Chains, AddressBook: req.Env.ExistingAddresses, }) @@ -150,7 +150,7 @@ func GetRegistryContract(e *deployment.Environment, registryChainSel uint64) (*c return nil, deployment.Chain{}, fmt.Errorf("chain %d not found in environment", registryChainSel) } - contractSetsResp, err := getContractSets(e.Logger, &getContractSetsRequest{ + contractSetsResp, err := getContractSets(e.Logger, &GetContractSetsRequest{ Chains: e.Chains, AddressBook: e.ExistingAddresses, }) @@ -299,7 +299,7 @@ func ConfigureOCR3Contract(env *deployment.Environment, chainSel uint64, dons [] return fmt.Errorf("chain %d not found in environment", chainSel) } - contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) @@ -363,7 +363,7 @@ func ConfigureOCR3ContractFromJD(env *deployment.Environment, cfg ConfigureOCR3C if !ok { return nil, fmt.Errorf("chain %d not found in environment", cfg.ChainSel) } - contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/internal/forwarder_deployer.go b/deployment/keystone/changeset/internal/forwarder_deployer.go index f2b070d35aa..d830274f8ac 100644 --- a/deployment/keystone/changeset/internal/forwarder_deployer.go +++ b/deployment/keystone/changeset/internal/forwarder_deployer.go @@ -72,7 +72,7 @@ type ConfigureForwarderContractsResponse struct { // ConfigureForwardContracts configures the forwarder contracts on all chains for the given DONS // the address book is required to contain the an address of the deployed forwarder contract for every chain in the environment func ConfigureForwardContracts(env *deployment.Environment, req ConfigureForwarderContractsRequest) (*ConfigureForwarderContractsResponse, error) { - contractSetsResp, err := getContractSets(env.Logger, &getContractSetsRequest{ + contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/internal/types.go b/deployment/keystone/changeset/internal/types.go index 19b533e9ba8..7c29ab397a2 100644 --- a/deployment/keystone/changeset/internal/types.go +++ b/deployment/keystone/changeset/internal/types.go @@ -258,7 +258,7 @@ type RegisteredDonConfig struct { func NewRegisteredDon(env deployment.Environment, cfg RegisteredDonConfig) (*RegisteredDon, error) { // load the don info from the capabilities registry - r, err := getContractSets(env.Logger, &getContractSetsRequest{ + r, err := getContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) From bba45b4ea59be8d84c19568aa6cd9bc5d77e7eea Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 13:35:18 -0400 Subject: [PATCH 41/53] Fixes merge conflicts issues --- deployment/keystone/changeset/internal/deploy.go | 8 ++++---- .../keystone/changeset/internal/forwarder_deployer.go | 2 +- deployment/keystone/changeset/internal/state.go | 2 +- deployment/keystone/changeset/internal/state_test.go | 1 + deployment/keystone/changeset/internal/types.go | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/deployment/keystone/changeset/internal/deploy.go b/deployment/keystone/changeset/internal/deploy.go index dc9ca1b3425..e67ea047d7d 100644 --- a/deployment/keystone/changeset/internal/deploy.go +++ b/deployment/keystone/changeset/internal/deploy.go @@ -70,7 +70,7 @@ func ConfigureContracts(ctx context.Context, lggr logger.Logger, req ConfigureCo return nil, fmt.Errorf("invalid request: %w", err) } - contractSetsResp, err := getContractSets(lggr, &GetContractSetsRequest{ + contractSetsResp, err := GetContractSets(lggr, &GetContractSetsRequest{ Chains: req.Env.Chains, AddressBook: req.Env.ExistingAddresses, }) @@ -150,7 +150,7 @@ func GetRegistryContract(e *deployment.Environment, registryChainSel uint64) (*c return nil, deployment.Chain{}, fmt.Errorf("chain %d not found in environment", registryChainSel) } - contractSetsResp, err := getContractSets(e.Logger, &GetContractSetsRequest{ + contractSetsResp, err := GetContractSets(e.Logger, &GetContractSetsRequest{ Chains: e.Chains, AddressBook: e.ExistingAddresses, }) @@ -299,7 +299,7 @@ func ConfigureOCR3Contract(env *deployment.Environment, chainSel uint64, dons [] return fmt.Errorf("chain %d not found in environment", chainSel) } - contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) @@ -363,7 +363,7 @@ func ConfigureOCR3ContractFromJD(env *deployment.Environment, cfg ConfigureOCR3C if !ok { return nil, fmt.Errorf("chain %d not found in environment", cfg.ChainSel) } - contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/internal/forwarder_deployer.go b/deployment/keystone/changeset/internal/forwarder_deployer.go index d830274f8ac..90a3e8cfb1d 100644 --- a/deployment/keystone/changeset/internal/forwarder_deployer.go +++ b/deployment/keystone/changeset/internal/forwarder_deployer.go @@ -72,7 +72,7 @@ type ConfigureForwarderContractsResponse struct { // ConfigureForwardContracts configures the forwarder contracts on all chains for the given DONS // the address book is required to contain the an address of the deployed forwarder contract for every chain in the environment func ConfigureForwardContracts(env *deployment.Environment, req ConfigureForwarderContractsRequest) (*ConfigureForwarderContractsResponse, error) { - contractSetsResp, err := getContractSets(env.Logger, &GetContractSetsRequest{ + contractSetsResp, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) diff --git a/deployment/keystone/changeset/internal/state.go b/deployment/keystone/changeset/internal/state.go index 63a7b7b2e39..2c68688b67b 100644 --- a/deployment/keystone/changeset/internal/state.go +++ b/deployment/keystone/changeset/internal/state.go @@ -47,7 +47,7 @@ func (cs ContractSet) getOCR3Contract(addr *common.Address) (*ocr3_capability.OC return getOCR3Contract(cs.OCR3, addr) } -func getContractSets(lggr logger.Logger, req *GetContractSetsRequest) (*GetContractSetsResponse, error) { +func GetContractSets(lggr logger.Logger, req *GetContractSetsRequest) (*GetContractSetsResponse, error) { resp := &GetContractSetsResponse{ ContractSets: make(map[uint64]ContractSet), } diff --git a/deployment/keystone/changeset/internal/state_test.go b/deployment/keystone/changeset/internal/state_test.go index bfed62266ca..057cad4c10c 100644 --- a/deployment/keystone/changeset/internal/state_test.go +++ b/deployment/keystone/changeset/internal/state_test.go @@ -8,6 +8,7 @@ import ( chainsel "github.com/smartcontractkit/chain-selectors" "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink/deployment" commonchangeset "github.com/smartcontractkit/chainlink/deployment/common/changeset" "github.com/smartcontractkit/chainlink/deployment/common/proposalutils" diff --git a/deployment/keystone/changeset/internal/types.go b/deployment/keystone/changeset/internal/types.go index 7c29ab397a2..0ec1c7596b5 100644 --- a/deployment/keystone/changeset/internal/types.go +++ b/deployment/keystone/changeset/internal/types.go @@ -258,7 +258,7 @@ type RegisteredDonConfig struct { func NewRegisteredDon(env deployment.Environment, cfg RegisteredDonConfig) (*RegisteredDon, error) { // load the don info from the capabilities registry - r, err := getContractSets(env.Logger, &GetContractSetsRequest{ + r, err := GetContractSets(env.Logger, &GetContractSetsRequest{ Chains: env.Chains, AddressBook: env.ExistingAddresses, }) From e9bc4d649380736fef6d32baff442ad1749bdaa9 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 13:53:34 -0400 Subject: [PATCH 42/53] bumps chainlink-common + fixes(?) --- core/scripts/go.mod | 2 +- core/scripts/go.sum | 4 ++-- deployment/go.mod | 2 +- deployment/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 ++-- system-tests/lib/cre/contracts/contracts.go | 7 ++++--- system-tests/lib/go.mod | 2 +- system-tests/lib/go.sum | 4 ++-- system-tests/tests/go.mod | 2 +- system-tests/tests/go.sum | 4 ++-- .../tests/smoke/capabilities/por_price_provider.go | 2 +- .../tests/smoke/capabilities/workflow_test.go | 13 +++++++------ 15 files changed, 30 insertions(+), 28 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index d742b59a075..69a8101e721 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -34,7 +34,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.22 diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 67890a880b4..b669fbc7142 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1090,8 +1090,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/deployment/go.mod b/deployment/go.mod index 1b3eaf1f9fc..927e189e333 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -32,7 +32,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-framework/multinode v0.0.0-20250211162441-3d6cea220efb github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 diff --git a/deployment/go.sum b/deployment/go.sum index aa595f4700c..dac05d40387 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1138,8 +1138,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index bc4d6ed25c0..864a5200816 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -50,7 +50,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 2aa85543e00..572c4348812 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1390,8 +1390,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 806abe44884..cfff9067b6a 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -29,7 +29,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.10 diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 8b1cb85e3c4..84de17e0725 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1373,8 +1373,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/lib/cre/contracts/contracts.go b/system-tests/lib/cre/contracts/contracts.go index 84c63d02fe7..c86eaf79034 100644 --- a/system-tests/lib/cre/contracts/contracts.go +++ b/system-tests/lib/cre/contracts/contracts.go @@ -11,6 +11,7 @@ import ( "github.com/rs/zerolog" capabilitiespb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" + "github.com/smartcontractkit/chainlink/deployment" keystone_changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry_1_1_0" @@ -140,13 +141,13 @@ func ConfigureKeystone(input types.ConfigureKeystoneInput) error { TransmissionSchedule: transmissionSchedule, MaxDurationQueryMillis: 1000, MaxDurationObservationMillis: 1000, - MaxDurationAcceptMillis: 1000, - MaxDurationTransmitMillis: 1000, + MaxDurationShouldAcceptMillis: 1000, + MaxDurationShouldTransmitMillis: 1000, MaxFaultyOracles: 1, MaxQueryLengthBytes: 1000000, MaxObservationLengthBytes: 1000000, MaxReportLengthBytes: 1000000, - MaxRequestBatchSize: 1000, + MaxBatchSize: 1000, UniqueReports: true, } diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index f999ea76821..ce6adcbb43b 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -17,7 +17,7 @@ require ( github.com/google/uuid v1.6.0 github.com/pkg/errors v0.9.1 github.com/rs/zerolog v1.33.0 - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.4 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.23 diff --git a/system-tests/lib/go.sum b/system-tests/lib/go.sum index 51e8f2b7399..f90f0a9c885 100644 --- a/system-tests/lib/go.sum +++ b/system-tests/lib/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index 921b44d6f46..46bd055a5ec 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -343,7 +343,7 @@ require ( github.com/smartcontractkit/chainlink-automation v0.8.1 // indirect github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 // indirect github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 // indirect - github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d // indirect + github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect github.com/smartcontractkit/chainlink-framework/chains v0.0.0-20250207205350-420ccacab78a // indirect diff --git a/system-tests/tests/go.sum b/system-tests/tests/go.sum index 307db5f6650..ea371215e11 100644 --- a/system-tests/tests/go.sum +++ b/system-tests/tests/go.sum @@ -1126,8 +1126,8 @@ github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 h1 github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051/go.mod h1:Hht/OJq/PxC+gnBCIPyzHt4Otsw6mYwUVsmtOqIvlxo= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01 h1:R3OD6Phi0ULIQ2uvHiKVWYdgpi/O1Mt46CUK1UApcXU= github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20250214202341-4190f2db1c01/go.mod h1:Bmwq4lNb5tE47sydN0TKetcLEGbgl+VxHEWp4S0LI60= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d h1:FUHHl/EtKSdSs0OLeV6vsWI+E9w0H6stLmUPdMZW2Gc= -github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221161120-cbe05b00f76d/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 h1:BTN2nQgFKBxgas6oqY3ym82O+wT++WlpP1+a6KzIfY0= +github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0/go.mod h1:YQuXIqQpmpAqstWV0LHaDTJ5nsSWuip5ivEM+Fisb+4= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5 h1:CvDfgWoLoYPapOumE/UZCplfCu5oNmy9BuH+6V6+fJ8= github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20250128203428-08031923fbe5/go.mod h1:pDZagSGjs9U+l4YIFhveDznMHqxuuz+5vRxvVgpbdr8= github.com/smartcontractkit/chainlink-feeds v0.1.1 h1:JzvUOM/OgGQA1sOqTXXl52R6AnNt+Wg64sVG+XSA49c= diff --git a/system-tests/tests/smoke/capabilities/por_price_provider.go b/system-tests/tests/smoke/capabilities/por_price_provider.go index 7fe4ce18cc7..e5afcc7eea0 100644 --- a/system-tests/tests/smoke/capabilities/por_price_provider.go +++ b/system-tests/tests/smoke/capabilities/por_price_provider.go @@ -1,4 +1,4 @@ -package capabilities_test +package capabilities import ( "encoding/json" diff --git a/system-tests/tests/smoke/capabilities/workflow_test.go b/system-tests/tests/smoke/capabilities/workflow_test.go index eeed08ff176..346120a6aa7 100644 --- a/system-tests/tests/smoke/capabilities/workflow_test.go +++ b/system-tests/tests/smoke/capabilities/workflow_test.go @@ -29,6 +29,7 @@ import ( "github.com/smartcontractkit/chainlink/deployment" cldlogger "github.com/smartcontractkit/chainlink/deployment/logger" + "github.com/smartcontractkit/chainlink/system-tests/tests/smoke/capabilities" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -230,7 +231,7 @@ type registerPoRWorkflowInput struct { workflowRegistryAddress common.Address feedConsumerAddress common.Address capabilitiesRegistryAddress common.Address - priceProvider PriceProvider + priceProvider capabilities.PriceProvider sethClient *seth.Client deployerPrivateKey string blockchain *blockchain.Output @@ -484,7 +485,7 @@ func CreateInfrastructure( } type setupOutput struct { - priceProvider PriceProvider + priceProvider capabilities.PriceProvider feedsConsumerAddress common.Address forwarderAddress common.Address sethClient *seth.Client @@ -492,7 +493,7 @@ type setupOutput struct { donTopology *keystonetypes.DonTopology } -func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfig, priceProvider PriceProvider, binaryDownloadOutput binaryDownloadOutput, mustSetCapabilitiesFn func(input []*ns.Input) []*keystonetypes.CapabilitiesAwareNodeSet) *setupOutput { +func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfig, priceProvider capabilities.PriceProvider, binaryDownloadOutput binaryDownloadOutput, mustSetCapabilitiesFn func(input []*ns.Input) []*keystonetypes.CapabilitiesAwareNodeSet) *setupOutput { // Universal setup -- START envInput := InfrastructureInput{ jdInput: in.JD, @@ -564,7 +565,7 @@ func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfi // Allow extra IPs and ports for the fake data provider, which is running on host machine and requires explicit whitelisting var extraAllowedIPs []string var extraAllowedPorts []int - if _, ok := priceProvider.(*FakePriceProvider); ok { + if _, ok := priceProvider.(*capabilities.FakePriceProvider); ok { extraAllowedIPs, extraAllowedPorts, err = extraAllowedPortsAndIps(testLogger, in.Fake.Port, envOutput.donTopology.MetaDons[0].NodeOutput.Output) require.NoError(t, err, "failed to get extra allowed ports and IPs") } @@ -728,7 +729,7 @@ func TestKeystoneWithOCR3Workflow_SingleDon_MockedPrice(t *testing.T) { } } - priceProvider, priceErr := NewFakePriceProvider(testLogger, in.Fake) + priceProvider, priceErr := capabilities.NewFakePriceProvider(testLogger, in.Fake) require.NoError(t, priceErr, "failed to create fake price provider") setupOutput := setupTestEnvironment(t, testLogger, in, priceProvider, *binaryDownloadOutput, mustSetCapabilitiesFn) @@ -816,7 +817,7 @@ func TestKeystoneWithOCR3Workflow_TwoDons_LivePrice(t *testing.T) { } } - priceProvider := NewTrueUSDPriceProvider(testLogger) + priceProvider := capabilities.NewTrueUSDPriceProvider(testLogger) setupOutput := setupTestEnvironment(t, testLogger, in, priceProvider, *binaryDownloadOutput, mustSetCapabilitiesFn) // Log extra information that might help debugging From 34c2d51a64bcc31b46ce38373328f3504dd94baa Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 14:49:39 -0400 Subject: [PATCH 43/53] gomods tidy --- core/scripts/go.mod | 4 ++-- deployment/go.mod | 2 +- integration-tests/go.mod | 4 ++-- integration-tests/load/go.mod | 4 ++-- system-tests/lib/go.mod | 4 ++-- system-tests/tests/go.mod | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/scripts/go.mod b/core/scripts/go.mod index b2c35da8da1..960ecae5f58 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -12,8 +12,8 @@ replace github.com/smartcontractkit/chainlink/deployment => ../../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250213022122-3f5fc4eae2e8 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250214191649-18df7375dfde + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) require ( diff --git a/deployment/go.mod b/deployment/go.mod index 8c4d94e6e41..4cd4d490643 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -7,7 +7,7 @@ replace github.com/smartcontractkit/chainlink/v2 => ../ // Using a separate inline `require` here to avoid surrounding line changes // creating potential merge conflicts. -require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 +require github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a require ( github.com/Khan/genqlient v0.7.0 diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 864a5200816..8e926c3f84e 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -12,8 +12,8 @@ replace github.com/smartcontractkit/chainlink/deployment => ../deployment // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221161645-4c8b48da7f04 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) require ( diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index cfff9067b6a..8f50b6e862b 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -14,9 +14,9 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221161645-4c8b48da7f04 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 - github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221161645-4c8b48da7f04 + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) require ( diff --git a/system-tests/lib/go.mod b/system-tests/lib/go.mod index a11b9d8071e..73b5fd75cf6 100644 --- a/system-tests/lib/go.mod +++ b/system-tests/lib/go.mod @@ -3,8 +3,8 @@ module github.com/smartcontractkit/chainlink/system-tests/lib go 1.23.3 require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250206093113-4e72c05bdba6 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250206093113-4e72c05bdba6 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) // Make sure we're working with the latest chainlink libs diff --git a/system-tests/tests/go.mod b/system-tests/tests/go.mod index bfa4b5bc352..3c9153b1847 100644 --- a/system-tests/tests/go.mod +++ b/system-tests/tests/go.mod @@ -5,8 +5,8 @@ go 1.23.3 // Using a separate `require` here to avoid surrounding line changes // creating potential merge conflicts. require ( - github.com/smartcontractkit/chainlink/deployment v0.0.0-20250206093113-4e72c05bdba6 - github.com/smartcontractkit/chainlink/v2 v2.19.0-ccip1.5.16-alpha.0.0.20250206093113-4e72c05bdba6 + github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a + github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) // Make sure we're working with the latest chainlink libs From 769f47aecde4e5c2c7e6e73096f33d554949b058 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 14:56:51 -0400 Subject: [PATCH 44/53] gomods tidy --- integration-tests/go.mod | 2 +- integration-tests/load/go.mod | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 8e926c3f84e..230a0b3f540 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -49,7 +49,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250221121938-dd0db587bff4 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 8f50b6e862b..6cf753c18af 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -15,7 +15,7 @@ replace github.com/smartcontractkit/chainlink/integration-tests => ../ // creating potential merge conflicts. require ( github.com/smartcontractkit/chainlink/deployment v0.0.0-20250221182743-098d1b0a763a - github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250211210516-c98bb1ee1bd8 + github.com/smartcontractkit/chainlink/integration-tests v0.0.0-20250221184958-34c2d51a64bc github.com/smartcontractkit/chainlink/v2 v2.0.0-20250221182743-098d1b0a763a ) @@ -28,7 +28,7 @@ require ( github.com/rs/zerolog v1.33.0 github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.40 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20250220215921-f69bcbaa0051 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20250221121938-dd0db587bff4 github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 From f7faf31f7531d2839be17ee69e1fcc95e91bd352 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 15:49:12 -0400 Subject: [PATCH 45/53] remove unused file --- .../smoke/capabilities/workflow_test.go | 2533 ----------------- 1 file changed, 2533 deletions(-) delete mode 100644 integration-tests/smoke/capabilities/workflow_test.go diff --git a/integration-tests/smoke/capabilities/workflow_test.go b/integration-tests/smoke/capabilities/workflow_test.go deleted file mode 100644 index 73a41e3a272..00000000000 --- a/integration-tests/smoke/capabilities/workflow_test.go +++ /dev/null @@ -1,2533 +0,0 @@ -package capabilities_test - -import ( - "bufio" - "bytes" - "context" - "crypto/sha256" - "encoding/base64" - "encoding/hex" - "encoding/json" - "fmt" - "io" - "math/big" - "net/http" - "net/url" - "os" - "os/exec" - "path/filepath" - "regexp" - "runtime" - "slices" - "strconv" - "strings" - "sync" - "testing" - "time" - - "github.com/ethereum/go-ethereum/common" - "github.com/gin-gonic/gin" - "github.com/go-yaml/yaml" - "github.com/google/go-github/v41/github" - "github.com/google/uuid" - "github.com/pkg/errors" - "github.com/rs/zerolog" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "golang.org/x/oauth2" - "google.golang.org/grpc/credentials/insecure" - - "github.com/smartcontractkit/chainlink-testing-framework/framework" - "github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain" - "github.com/smartcontractkit/chainlink-testing-framework/framework/components/fake" - "github.com/smartcontractkit/chainlink-testing-framework/framework/components/jd" - ns "github.com/smartcontractkit/chainlink-testing-framework/framework/components/simple_node_set" - "github.com/smartcontractkit/chainlink-testing-framework/seth" - "github.com/smartcontractkit/chainlink/deployment" - "github.com/smartcontractkit/chainlink/integration-tests/actions" - - pkgworkflows "github.com/smartcontractkit/chainlink-common/pkg/workflows" - jobv1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/job" - - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/workflow/generated/workflow_registry_wrapper" - "github.com/smartcontractkit/chainlink/v2/core/logger" - - chainselectors "github.com/smartcontractkit/chain-selectors" - - capabilitiespb "github.com/smartcontractkit/chainlink-common/pkg/capabilities/pb" - ctfconfig "github.com/smartcontractkit/chainlink-testing-framework/lib/config" - "github.com/smartcontractkit/chainlink-testing-framework/lib/utils/ptr" - - "github.com/smartcontractkit/chainlink/deployment/environment/devenv" - "github.com/smartcontractkit/chainlink/deployment/environment/nodeclient" - keystone_changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset" - workflow_registry_changeset "github.com/smartcontractkit/chainlink/deployment/keystone/changeset/workflowregistry" - kcr "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/capabilities_registry_1_1_0" -) - -type WorkflowConfig struct { - UseCRECLI bool `toml:"use_cre_cli"` - ShouldCompileNewWorkflow bool `toml:"should_compile_new_workflow"` - // Tells the test where the workflow to compile is located - WorkflowFolderLocation *string `toml:"workflow_folder_location"` - CompiledWorkflowConfig *CompiledConfig `toml:"compiled_config"` - DependenciesConfig *DependenciesConfig `toml:"dependencies"` - WorkflowName string `toml:"workflow_name" validate:"required" ` -} - -// Defines relases/versions of test dependencies that will be downloaded from Github -type DependenciesConfig struct { - CapabiltiesVersion string `toml:"capabilities_version"` - CRECLIVersion string `toml:"cre_cli_version"` -} - -// Defines the location of already compiled workflow binary and config files -// They will be used if WorkflowConfig.ShouldCompileNewWorkflow is `false` -// Otherwise test will compile and upload a new workflow -type CompiledConfig struct { - BinaryURL string `toml:"binary_url"` - ConfigURL string `toml:"config_url"` -} - -type TestConfig struct { - BlockchainA *blockchain.Input `toml:"blockchain_a" validate:"required"` - NodeSets []*CapabilitiesAwareNodeSet `toml:"nodesets" validate:"required"` - WorkflowConfig *WorkflowConfig `toml:"workflow_config" validate:"required"` - JD *jd.Input `toml:"jd" validate:"required"` - PriceProvider *PriceProviderConfig `toml:"price_provider"` -} - -type CapabilitiesAwareNodeSet struct { - *ns.Input - Capabilities []string `toml:"capabilities"` - DONType string `toml:"don_type"` -} -type FakeConfig struct { - *fake.Input - Prices []float64 `toml:"prices"` -} - -type PriceProviderConfig struct { - Fake *FakeConfig `toml:"fake"` - FeedID string `toml:"feed_id" validate:"required"` - URL string `toml:"url"` -} - -func downloadGHAssetFromRelease(owner, repository, releaseTag, assetName, ghToken string) ([]byte, error) { - var content []byte - if ghToken == "" { - return content, errors.New("no github token provided") - } - - // assuming 180s is enough to fetch releases, find the asset we need and download it - // some assets might be 30+ MB, so we need to give it some time (for really slow connections) - ctx, cancelFn := context.WithTimeout(context.Background(), 180*time.Second) - defer cancelFn() - ts := oauth2.StaticTokenSource( - &oauth2.Token{AccessToken: ghToken}, - ) - tc := oauth2.NewClient(ctx, ts) - - ghClient := github.NewClient(tc) - - ghReleases, _, err := ghClient.Repositories.ListReleases(ctx, owner, repository, &github.ListOptions{PerPage: 20}) - if err != nil { - return content, errors.Wrapf(err, "failed to list releases for %s", repository) - } - - var ghRelease *github.RepositoryRelease - for _, release := range ghReleases { - if release.TagName == nil { - continue - } - - if *release.TagName == releaseTag { - ghRelease = release - break - } - } - - if ghRelease == nil { - return content, errors.New("failed to find release with tag: " + releaseTag) - } - - var assetID int64 - for _, asset := range ghRelease.Assets { - if strings.Contains(asset.GetName(), assetName) { - assetID = asset.GetID() - break - } - } - - if assetID == 0 { - return content, fmt.Errorf("failed to find asset %s for %s", assetName, *ghRelease.TagName) - } - - asset, _, err := ghClient.Repositories.DownloadReleaseAsset(ctx, owner, repository, assetID, tc) - if err != nil { - return content, errors.Wrapf(err, "failed to download asset %s for %s", assetName, *ghRelease.TagName) - } - - content, err = io.ReadAll(asset) - if err != nil { - return content, err - } - - return content, nil -} - -func GenerateWorkflowIDFromStrings(owner string, name string, workflow []byte, config []byte, secretsURL string) (string, error) { - ownerWithoutPrefix := owner - if strings.HasPrefix(owner, "0x") { - ownerWithoutPrefix = owner[2:] - } - - ownerb, err := hex.DecodeString(ownerWithoutPrefix) - if err != nil { - return "", err - } - - wid, err := pkgworkflows.GenerateWorkflowID(ownerb, name, workflow, config, secretsURL) - if err != nil { - return "", err - } - - return hex.EncodeToString(wid[:]), nil -} - -func isInstalled(name string) bool { - _, err := exec.LookPath(name) - return err == nil -} - -func download(url string) ([]byte, error) { - ctx, cancelFn := context.WithTimeout(context.Background(), 120*time.Second) - defer cancelFn() - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil) - if err != nil { - return nil, err - } - resp, err := http.DefaultClient.Do(req) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("received non-200 response: %d", resp.StatusCode) - } - - data, err := io.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("failed to read response body: %w", err) - } - - return data, nil -} - -func downloadAndDecode(url string) ([]byte, error) { - data, err := download(url) - if err != nil { - return nil, err - } - - decoded, err := base64.StdEncoding.DecodeString(string(data)) - if err != nil { - return nil, fmt.Errorf("failed to decode base64 content: %w", err) - } - - return decoded, nil -} - -type CRECLISettings struct { - DevPlatform DevPlatform `yaml:"dev-platform"` - UserWorkflow UserWorkflow `yaml:"user-workflow"` - Logging Logging `yaml:"logging"` - McmsConfig McmsConfig `yaml:"mcms-config"` - Contracts Contracts `yaml:"contracts"` - Rpcs []RPC `yaml:"rpcs"` -} - -type DevPlatform struct { - CapabilitiesRegistryAddress string `yaml:"capabilities-registry-contract-address"` - DonID uint32 `yaml:"don-id"` - WorkflowRegistryAddress string `yaml:"workflow-registry-contract-address"` -} - -type UserWorkflow struct { - WorkflowOwnerAddress string `yaml:"workflow-owner-address"` -} - -type Logging struct { - SethConfigPath string `yaml:"seth-config-path"` -} - -type McmsConfig struct { - ProposalsDirectory string `yaml:"proposals-directory"` -} - -type Contracts struct { - ContractRegistry []ContractRegistry `yaml:"registries"` -} - -type ContractRegistry struct { - Name string `yaml:"name"` - Address string `yaml:"address"` - ChainSelector uint64 `yaml:"chain-selector"` -} - -type RPC struct { - ChainSelector uint64 `yaml:"chain-selector"` - URL string `yaml:"url"` -} - -type PoRWorkflowConfig struct { - FeedID string `json:"feed_id"` - URL string `json:"url"` - ConsumerAddress string `json:"consumer_address"` -} - -const ( - CRECLISettingsFileName = ".cre-cli-settings.yaml" - cronCapabilityAssetFile = "amd64_cron" - e2eJobDistributorImageEnvVarName = "E2E_JD_IMAGE" - e2eJobDistributorVersionEnvVarName = "E2E_JD_VERSION" - ghReadTokenEnvVarName = "GITHUB_READ_TOKEN" - GistIP = "185.199.108.133" -) - -var ( - CRECLICommand string -) - -func downloadAndInstallChainlinkCLI(ghToken, version string) error { - system := runtime.GOOS - arch := runtime.GOARCH - - switch system { - case "darwin", "linux": - // nothing to do, we have the binaries - default: - return fmt.Errorf("chainlnk-cli does not support OS: %s", system) - } - - switch arch { - case "amd64", "arm64": - // nothing to do, we have the binaries - default: - return fmt.Errorf("chainlnk-cli does not support arch: %s", arch) - } - - CRECLIAssetFile := fmt.Sprintf("cre_%s_%s_%s.tar.gz", version, system, arch) - content, err := downloadGHAssetFromRelease("smartcontractkit", "dev-platform", version, CRECLIAssetFile, ghToken) - if err != nil { - return errors.Wrapf(err, "failed to download CRE CLI asset %s", CRECLIAssetFile) - } - - tmpfile, err := os.CreateTemp("", CRECLIAssetFile) - if err != nil { - return errors.Wrapf(err, "failed to create temp file for CRE CLI asset %s", CRECLIAssetFile) - } - defer tmpfile.Close() - - if _, err := tmpfile.Write(content); err != nil { - return errors.Wrapf(err, "failed to write content to temp file for CRE CLI asset %s", CRECLIAssetFile) - } - - cmd := exec.Command("tar", "-xvf", tmpfile.Name(), "-C", ".") // #nosec G204 - if cmd.Run() != nil { - return errors.Wrapf(err, "failed to extract CRE CLI asset %s", CRECLIAssetFile) - } - - extractedFileName := fmt.Sprintf("cre_%s_%s_%s", version, system, arch) - cmd = exec.Command("chmod", "+x", extractedFileName) - if cmd.Run() != nil { - return errors.Wrapf(err, "failed to make %s executable", extractedFileName) - } - - // set it to absolute path, because some commands (e.g. compile) need to be executed in the context - // of the workflow directory - extractedFile, err := os.Open(extractedFileName) - if err != nil { - return errors.Wrapf(err, "failed to open %s", extractedFileName) - } - - CRECLICommand, err = filepath.Abs(extractedFile.Name()) - if err != nil { - return errors.Wrapf(err, "failed to get absolute path for %s", tmpfile.Name()) - } - - if isInstalled := isInstalled(CRECLICommand); !isInstalled { - return errors.New("failed to install CRE CLI or it is not available in the PATH") - } - - return nil -} - -func downloadCronCapability(ghToken, version string) (string, error) { - content, err := downloadGHAssetFromRelease("smartcontractkit", "capabilities", version, cronCapabilityAssetFile, ghToken) - if err != nil { - return "", err - } - - fileName := cronCapabilityAssetFile - file, err := os.Create(cronCapabilityAssetFile) - if err != nil { - return "", err - } - defer file.Close() - - if _, err := file.Write(content); err != nil { - return "", err - } - - return fileName, nil -} - -func validateInputsAndEnvVars(t *testing.T, in *TestConfig) { - require.NotEmpty(t, os.Getenv("PRIVATE_KEY"), "PRIVATE_KEY env var must be set") - require.NotEmpty(t, in.WorkflowConfig.DependenciesConfig, "dependencies config must be set") - - if !in.WorkflowConfig.UseCRECLI { - require.False(t, in.WorkflowConfig.ShouldCompileNewWorkflow, "if you are not using CRE CLI you cannot compile a new workflow") - } - - var ghReadToken string - // this is a small hack to avoid changing the reusable workflow - if os.Getenv("CI") == "true" { - // This part should ideally happen outside of the test, but due to how our reusable e2e test workflow is structured now - // we cannot execute this part in workflow steps (it doesn't support any pre-execution hooks) - require.NotEmpty(t, os.Getenv(ctfconfig.E2E_TEST_CHAINLINK_IMAGE_ENV), "missing env var: "+ctfconfig.E2E_TEST_CHAINLINK_IMAGE_ENV) - require.NotEmpty(t, os.Getenv(ctfconfig.E2E_TEST_CHAINLINK_VERSION_ENV), "missing env var: "+ctfconfig.E2E_TEST_CHAINLINK_VERSION_ENV) - require.NotEmpty(t, os.Getenv(e2eJobDistributorImageEnvVarName), "missing env var: "+e2eJobDistributorImageEnvVarName) - require.NotEmpty(t, os.Getenv(e2eJobDistributorVersionEnvVarName), "missing env var: "+e2eJobDistributorVersionEnvVarName) - - // disabled until we can figure out how to generate a gist read:write token in CI - /* - This test can be run in two modes: - 1. `existing` mode: it uses a workflow binary (and configuration) file that is already uploaded to Gist - 2. `compile` mode: it compiles a new workflow binary and uploads it to Gist - - For the `new` mode to work, the `GITHUB_API_TOKEN` env var must be set to a token that has `gist:read` and `gist:write` permissions, but this permissions - are tied to account not to repository. Currently, we have no service account in the CI at all. And using a token that's tied to personal account of a developer - is not a good idea. So, for now, we are only allowing the `existing` mode in CI. - */ - require.False(t, in.WorkflowConfig.ShouldCompileNewWorkflow, "you cannot compile a new workflow in the CI as of now due to issues with generating a gist write token") - - // we use this special function to subsitute a placeholder env variable with the actual environment variable name - // it is defined in .github/e2e-tests.yml as '{{ env.GITHUB_API_TOKEN }}' - ghReadToken = ctfconfig.MustReadEnvVar_String(ghReadTokenEnvVarName) - } else { - ghReadToken = os.Getenv(ghReadTokenEnvVarName) - } - - require.NotEmpty(t, ghReadToken, ghReadTokenEnvVarName+" env var must be set") - require.NotEmpty(t, in.WorkflowConfig.DependenciesConfig.CapabiltiesVersion, "capabilities_version must be set in the dependencies config") - - _, err := downloadCronCapability(ghReadToken, in.WorkflowConfig.DependenciesConfig.CapabiltiesVersion) - require.NoError(t, err, "failed to download cron capability. Make sure token has content:read permissions to the capabilities repo") - - if in.WorkflowConfig.UseCRECLI { - require.NotEmpty(t, in.WorkflowConfig.DependenciesConfig.CRECLIVersion, "chainlink_cli_version must be set in the dependencies config") - - err = downloadAndInstallChainlinkCLI(ghReadToken, in.WorkflowConfig.DependenciesConfig.CRECLIVersion) - require.NoError(t, err, "failed to download and install CRE CLI. Make sure token has content:read permissions to the dev-platform repo") - - if in.WorkflowConfig.ShouldCompileNewWorkflow { - gistWriteToken := os.Getenv("GIST_WRITE_TOKEN") - require.NotEmpty(t, gistWriteToken, "GIST_WRITE_TOKEN must be set to use CRE CLI to compile workflows. It requires gist:read and gist:write permissions") - err := os.Setenv("GITHUB_API_TOKEN", gistWriteToken) - require.NoError(t, err, "failed to set GITHUB_API_TOKEN env var") - require.NotEmpty(t, in.WorkflowConfig.WorkflowFolderLocation, "workflow_folder_location must be set, when compiling new workflow") - } - } - - if in.PriceProvider.Fake == nil { - require.NotEmpty(t, in.PriceProvider.URL, "URL must be set in the price provider config, if fake provider is not used") - } - - if len(in.NodeSets) == 1 { - noneEmpty := in.NodeSets[0].DONType != "" && len(in.NodeSets[0].Capabilities) > 0 - bothEmpty := in.NodeSets[0].DONType == "" && len(in.NodeSets[0].Capabilities) == 0 - require.True(t, noneEmpty || bothEmpty, "either both DONType and Capabilities must be set or both must be empty, when using only one node set") - } else { - for _, nodeSet := range in.NodeSets { - require.NotEmpty(t, nodeSet.Capabilities, "capabilities must be set for each node set") - require.NotEmpty(t, nodeSet.DONType, "don_type must be set for each node set") - } - } - - // make sure the feed id is in the correct format - in.PriceProvider.FeedID = strings.TrimPrefix(in.PriceProvider.FeedID, "0x") -} - -// copied from Bala's unmerged PR: https://github.com/smartcontractkit/chainlink/pull/15751 -// TODO: remove this once the PR is merged and import his function -// IMPORTANT ADDITION: prefix to differentiate between the different DONs -func getNodeInfo(nodeOut *ns.Output, prefix string, bootstrapNodeCount int) ([]devenv.NodeInfo, error) { - var nodeInfo []devenv.NodeInfo - for i := 1; i <= len(nodeOut.CLNodes); i++ { - p2pURL, err := url.Parse(nodeOut.CLNodes[i-1].Node.DockerP2PUrl) - if err != nil { - return nil, fmt.Errorf("failed to parse p2p url: %w", err) - } - if i <= bootstrapNodeCount { - nodeInfo = append(nodeInfo, devenv.NodeInfo{ - IsBootstrap: true, - Name: fmt.Sprintf("%s_bootstrap-%d", prefix, i), - P2PPort: p2pURL.Port(), - CLConfig: nodeclient.ChainlinkConfig{ - URL: nodeOut.CLNodes[i-1].Node.HostURL, - Email: nodeOut.CLNodes[i-1].Node.APIAuthUser, - Password: nodeOut.CLNodes[i-1].Node.APIAuthPassword, - InternalIP: nodeOut.CLNodes[i-1].Node.InternalIP, - }, - }) - } else { - nodeInfo = append(nodeInfo, devenv.NodeInfo{ - IsBootstrap: false, - Name: fmt.Sprintf("%s_node-%d", prefix, i), - P2PPort: p2pURL.Port(), - CLConfig: nodeclient.ChainlinkConfig{ - URL: nodeOut.CLNodes[i-1].Node.HostURL, - Email: nodeOut.CLNodes[i-1].Node.APIAuthUser, - Password: nodeOut.CLNodes[i-1].Node.APIAuthPassword, - InternalIP: nodeOut.CLNodes[i-1].Node.InternalIP, - }, - }) - } - } - return nodeInfo, nil -} - -func buildChainlinkDeploymentEnv(t *testing.T, keystoneEnv *KeystoneEnvironment) { - lgr := logger.TestLogger(t) - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Blockchain, "blockchain must be set") - require.NotNil(t, keystoneEnv.WrappedNodeOutput, "wrapped node output must be set") - require.NotNil(t, keystoneEnv.JD, "job distributor must be set") - require.NotNil(t, keystoneEnv.SethClient, "seth client must be set") - require.GreaterOrEqual(t, len(keystoneEnv.Blockchain.Nodes), 1, "expected at least one node in the blockchain output") - require.GreaterOrEqual(t, len(keystoneEnv.WrappedNodeOutput), 1, "expected at least one node in the wrapped node output") - - envs := make([]*deployment.Environment, len(keystoneEnv.WrappedNodeOutput)) - keystoneEnv.dons = make([]*devenv.DON, len(keystoneEnv.WrappedNodeOutput)) - - for i, nodeOutput := range keystoneEnv.WrappedNodeOutput { - // assume that each nodeset has only one bootstrap node - nodeInfo, err := getNodeInfo(nodeOutput.Output, nodeOutput.NodeSetName, 1) - require.NoError(t, err, "failed to get node info") - - jdConfig := devenv.JDConfig{ - GRPC: keystoneEnv.JD.HostGRPCUrl, - WSRPC: keystoneEnv.JD.DockerWSRPCUrl, - Creds: insecure.NewCredentials(), - NodeInfo: nodeInfo, - } - - devenvConfig := devenv.EnvironmentConfig{ - JDConfig: jdConfig, - Chains: []devenv.ChainConfig{ - { - ChainID: keystoneEnv.SethClient.Cfg.Network.ChainID, - ChainName: keystoneEnv.SethClient.Cfg.Network.Name, - ChainType: strings.ToUpper(keystoneEnv.Blockchain.Family), - WSRPCs: []devenv.CribRPCs{{ - External: keystoneEnv.Blockchain.Nodes[0].HostWSUrl, - Internal: keystoneEnv.Blockchain.Nodes[0].DockerInternalWSUrl, - }}, - HTTPRPCs: []devenv.CribRPCs{{ - External: keystoneEnv.Blockchain.Nodes[0].HostHTTPUrl, - Internal: keystoneEnv.Blockchain.Nodes[0].DockerInternalHTTPUrl, - }}, - DeployerKey: keystoneEnv.SethClient.NewTXOpts(seth.WithNonce(nil)), // set nonce to nil, so that it will be fetched from the chain - }, - }, - } - - env, don, err := devenv.NewEnvironment(context.Background, lgr, devenvConfig) - require.NoError(t, err, "failed to create environment") - - envs[i] = env - keystoneEnv.dons[i] = don - } - - var nodeIDs []string - for _, env := range envs { - nodeIDs = append(nodeIDs, env.NodeIDs...) - } - - // we assume that all DONs run on the same chain and that there's only one chain - // also, we don't care which instance of offchain client we use, because we have - // only one instance of offchain client and we have just configured it to work - // with nodes from all DONs - keystoneEnv.Environment = &deployment.Environment{ - Name: envs[0].Name, - Logger: envs[0].Logger, - ExistingAddresses: envs[0].ExistingAddresses, - Chains: envs[0].Chains, - Offchain: envs[0].Offchain, - OCRSecrets: envs[0].OCRSecrets, - GetContext: envs[0].GetContext, - NodeIDs: nodeIDs, - } -} - -func deployKeystoneContracts(t *testing.T, testLogger zerolog.Logger, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Environment, "environment must be set") - require.NotEmpty(t, keystoneEnv.ChainSelector, "chain selector must be set") - - keystoneEnv.KeystoneContractAddresses = &KeystoneContractAddresses{} - - // Deploy keystone forwarder contract - keystoneEnv.KeystoneContractAddresses.ForwarderAddress = deployKeystoneForwarder(t, testLogger, keystoneEnv.Environment, keystoneEnv.ChainSelector) - - // Deploy OCR3 contract - keystoneEnv.KeystoneContractAddresses.OCR3CapabilityAddress = deployOCR3(t, testLogger, keystoneEnv.Environment, keystoneEnv.ChainSelector) - - // Deploy capabilities registry contract - keystoneEnv.KeystoneContractAddresses.CapabilitiesRegistryAddress = deployCapabilitiesRegistry(t, testLogger, keystoneEnv.Environment, keystoneEnv.ChainSelector) -} - -func deployOCR3(t *testing.T, testLogger zerolog.Logger, ctfEnv *deployment.Environment, chainSelector uint64) common.Address { - output, err := keystone_changeset.DeployOCR3(*ctfEnv, chainSelector) - require.NoError(t, err, "failed to deploy OCR3 Capability contract") - - err = ctfEnv.ExistingAddresses.Merge(output.AddressBook) - require.NoError(t, err, "failed to merge address book") - - addresses, err := ctfEnv.ExistingAddresses.AddressesForChain(chainSelector) - require.NoError(t, err, "failed to get addresses for chain %d from the address book", chainSelector) - - var forwarderAddress common.Address - for addrStr, tv := range addresses { - if strings.Contains(tv.String(), "OCR3Capability") { - forwarderAddress = common.HexToAddress(addrStr) - testLogger.Info().Msgf("Deployed OCR3Capability contract at %s", forwarderAddress.Hex()) - break - } - } - - return forwarderAddress -} - -func deployCapabilitiesRegistry(t *testing.T, testLogger zerolog.Logger, ctfEnv *deployment.Environment, chainSelector uint64) common.Address { - output, err := keystone_changeset.DeployCapabilityRegistry(*ctfEnv, chainSelector) - require.NoError(t, err, "failed to deploy Capabilities Registry contract") - - err = ctfEnv.ExistingAddresses.Merge(output.AddressBook) - require.NoError(t, err, "failed to merge address book") - - addresses, err := ctfEnv.ExistingAddresses.AddressesForChain(chainSelector) - require.NoError(t, err, "failed to get addresses for chain %d from the address book", chainSelector) - - var forwarderAddress common.Address - for addrStr, tv := range addresses { - if strings.Contains(tv.String(), "CapabilitiesRegistry") { - forwarderAddress = common.HexToAddress(addrStr) - testLogger.Info().Msgf("Deployed Capabilities Registry contract at %s", forwarderAddress.Hex()) - break - } - } - - return forwarderAddress -} - -func deployKeystoneForwarder(t *testing.T, testLogger zerolog.Logger, ctfEnv *deployment.Environment, chainSelector uint64) common.Address { - output, err := keystone_changeset.DeployForwarder(*ctfEnv, keystone_changeset.DeployForwarderRequest{ - ChainSelectors: []uint64{chainSelector}, - }) - require.NoError(t, err, "failed to deploy forwarder contract") - - err = ctfEnv.ExistingAddresses.Merge(output.AddressBook) - require.NoError(t, err, "failed to merge address book") - - addresses, err := ctfEnv.ExistingAddresses.AddressesForChain(chainSelector) - require.NoError(t, err, "failed to get addresses for chain %d from the address book", chainSelector) - - var forwarderAddress common.Address - for addrStr, tv := range addresses { - if strings.Contains(tv.String(), "KeystoneForwarder") { - forwarderAddress = common.HexToAddress(addrStr) - testLogger.Info().Msgf("Deployed KeystoneForwarder contract at %s", forwarderAddress.Hex()) - break - } - } - - return forwarderAddress -} - -func prepareWorkflowRegistry(t *testing.T, testLogger zerolog.Logger, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Environment, "environment must be set") - require.NotEmpty(t, keystoneEnv.ChainSelector, "chain selector must be set") - require.NotNil(t, keystoneEnv.SethClient, "seth client must be set") - require.NotEmpty(t, keystoneEnv.WorkflowDONID, "workflow DON ID must be set") - - output, err := workflow_registry_changeset.Deploy(*keystoneEnv.Environment, keystoneEnv.ChainSelector) - require.NoError(t, err, "failed to deploy workflow registry contract") - - err = keystoneEnv.Environment.ExistingAddresses.Merge(output.AddressBook) - require.NoError(t, err, "failed to merge address book") - - addresses, err := keystoneEnv.Environment.ExistingAddresses.AddressesForChain(keystoneEnv.ChainSelector) - require.NoError(t, err, "failed to get addresses for chain %d from the address book", keystoneEnv.ChainSelector) - - var workflowRegistryAddr common.Address - for addrStr, tv := range addresses { - if strings.Contains(tv.String(), "WorkflowRegistry") { - workflowRegistryAddr = common.HexToAddress(addrStr) - testLogger.Info().Msgf("Deployed WorkflowRegistry contract at %s", workflowRegistryAddr.Hex()) - } - } - - // Configure Workflow Registry contract - _, err = workflow_registry_changeset.UpdateAllowedDons(*keystoneEnv.Environment, &workflow_registry_changeset.UpdateAllowedDonsRequest{ - RegistryChainSel: keystoneEnv.ChainSelector, - DonIDs: []uint32{keystoneEnv.WorkflowDONID}, - Allowed: true, - }) - require.NoError(t, err, "failed to update allowed Dons") - - _, err = workflow_registry_changeset.UpdateAuthorizedAddresses(*keystoneEnv.Environment, &workflow_registry_changeset.UpdateAuthorizedAddressesRequest{ - RegistryChainSel: keystoneEnv.ChainSelector, - Addresses: []string{keystoneEnv.SethClient.MustGetRootKeyAddress().Hex()}, - Allowed: true, - }) - require.NoError(t, err, "failed to update authorized addresses") - - keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress = workflowRegistryAddr -} - -func prepareFeedsConsumer(t *testing.T, testLogger zerolog.Logger, workflowName string, keystonEnv *KeystoneEnvironment) { - require.NotNil(t, keystonEnv, "keystone environment must be set") - require.NotNil(t, keystonEnv.Environment, "environment must be set") - require.NotEmpty(t, keystonEnv.ChainSelector, "chain selector must be set") - require.NotNil(t, keystonEnv.SethClient, "seth client must be set") - require.NotNil(t, keystonEnv.KeystoneContractAddresses, "keystone contract addresses must be set") - require.NotEmpty(t, keystonEnv.KeystoneContractAddresses.ForwarderAddress, "forwarder address must be set") - - output, err := keystone_changeset.DeployFeedsConsumer(*keystonEnv.Environment, &keystone_changeset.DeployFeedsConsumerRequest{ - ChainSelector: keystonEnv.ChainSelector, - }) - require.NoError(t, err, "failed to deploy feeds_consumer contract") - - err = keystonEnv.Environment.ExistingAddresses.Merge(output.AddressBook) - require.NoError(t, err, "failed to merge address book") - - addresses, err := keystonEnv.Environment.ExistingAddresses.AddressesForChain(keystonEnv.ChainSelector) - require.NoError(t, err, "failed to get addresses for chain %d from the address book", keystonEnv.ChainSelector) - - var feedsConsumerAddress common.Address - for addrStr, tv := range addresses { - if strings.Contains(tv.String(), "FeedConsumer") { - feedsConsumerAddress = common.HexToAddress(addrStr) - testLogger.Info().Msgf("Deployed FeedConsumer contract at %s", feedsConsumerAddress.Hex()) - break - } - } - - require.NotEmpty(t, feedsConsumerAddress, "failed to find FeedConsumer address in the address book") - - // configure Keystone Feeds Consumer contract, so it can accept reports from the forwarder contract, - // that come from our workflow that is owned by the root private key - feedsConsumerInstance, err := feeds_consumer.NewKeystoneFeedsConsumer(feedsConsumerAddress, keystonEnv.SethClient.Client) - require.NoError(t, err, "failed to create feeds consumer instance") - - // Prepare hex-encoded and truncated workflow name - var workflowNameBytes [10]byte - var HashTruncateName = func(name string) string { - // Compute SHA-256 hash of the input string - hash := sha256.Sum256([]byte(name)) - - // Encode as hex to ensure UTF8 - var hashBytes []byte = hash[:] - resultHex := hex.EncodeToString(hashBytes) - - // Truncate to 10 bytes - truncated := []byte(resultHex)[:10] - return string(truncated) - } - - truncated := HashTruncateName(workflowName) - copy(workflowNameBytes[:], []byte(truncated)) - - _, decodeErr := keystonEnv.SethClient.Decode(feedsConsumerInstance.SetConfig( - keystonEnv.SethClient.NewTXOpts(), - []common.Address{keystonEnv.KeystoneContractAddresses.ForwarderAddress}, // allowed senders - []common.Address{keystonEnv.SethClient.MustGetRootKeyAddress()}, // allowed workflow owners - // here we need to use hex-encoded workflow name converted to []byte - [][10]byte{workflowNameBytes}, // allowed workflow names - )) - require.NoError(t, decodeErr, "failed to set config for feeds consumer") - - keystonEnv.KeystoneContractAddresses.FeedsConsumerAddress = feedsConsumerAddress -} - -func registerWorkflowDirectly(t *testing.T, in *TestConfig, sc *seth.Client, workflowRegistryAddr common.Address, donID uint32, workflowName string) { - require.NotEmpty(t, in.WorkflowConfig.CompiledWorkflowConfig.BinaryURL) - workFlowData, err := downloadAndDecode(in.WorkflowConfig.CompiledWorkflowConfig.BinaryURL) - require.NoError(t, err, "failed to download and decode workflow binary") - - var configData []byte - if in.WorkflowConfig.CompiledWorkflowConfig.ConfigURL != "" { - configData, err = download(in.WorkflowConfig.CompiledWorkflowConfig.ConfigURL) - require.NoError(t, err, "failed to download workflow config") - } - - // use non-encoded workflow name - workflowID, idErr := GenerateWorkflowIDFromStrings(sc.MustGetRootKeyAddress().Hex(), workflowName, workFlowData, configData, "") - require.NoError(t, idErr, "failed to generate workflow ID") - - workflowRegistryInstance, err := workflow_registry_wrapper.NewWorkflowRegistry(workflowRegistryAddr, sc.Client) - require.NoError(t, err, "failed to create workflow registry instance") - - // use non-encoded workflow name - _, decodeErr := sc.Decode(workflowRegistryInstance.RegisterWorkflow(sc.NewTXOpts(), workflowName, [32]byte(common.Hex2Bytes(workflowID)), donID, uint8(0), in.WorkflowConfig.CompiledWorkflowConfig.BinaryURL, in.WorkflowConfig.CompiledWorkflowConfig.ConfigURL, "")) - require.NoError(t, decodeErr, "failed to register workflow") -} - -//revive:disable // ignore confusing-results -func compileWorkflowWithCRECLI(t *testing.T, in *TestConfig, feedsConsumerAddress common.Address, feedID, dataURL string, settingsFile *os.File) (string, string) { - configFile, err := os.CreateTemp("", "config.json") - require.NoError(t, err, "failed to create workflow config file") - - cleanFeedId := strings.TrimPrefix(feedID, "0x") - feedLength := len(cleanFeedId) - - require.GreaterOrEqual(t, feedLength, 32, "feed ID must be at least 32 characters long") - - if feedLength > 32 { - cleanFeedId = cleanFeedId[:32] - } - - feedIDToUse := "0x" + cleanFeedId - - workflowConfig := PoRWorkflowConfig{ - FeedID: feedIDToUse, - URL: dataURL, - ConsumerAddress: feedsConsumerAddress.Hex(), - } - - configMarshalled, err := json.Marshal(workflowConfig) - require.NoError(t, err, "failed to marshal workflow config") - - _, err = configFile.Write(configMarshalled) - require.NoError(t, err, "failed to write workflow config file") - - var outputBuffer bytes.Buffer - - // the CLI expects the workflow code to be located in the same directory as its `go.mod`` file. That's why we assume that the file, which - // contains the entrypoint method is always named `main.go`. This is a limitation of the CLI, which we can't change. - compileCmd := exec.Command(CRECLICommand, "workflow", "compile", "-S", settingsFile.Name(), "-c", configFile.Name(), "main.go") // #nosec G204 - compileCmd.Stdout = &outputBuffer - compileCmd.Stderr = &outputBuffer - compileCmd.Dir = *in.WorkflowConfig.WorkflowFolderLocation - err = compileCmd.Start() - require.NoError(t, err, "failed to start compile command") - - err = compileCmd.Wait() - fmt.Println("Compile output:\n", outputBuffer.String()) - - require.NoError(t, err, "failed to wait for compile command") - - re := regexp.MustCompile(`Gist URL=([^\s]+)`) - matches := re.FindAllStringSubmatch(outputBuffer.String(), -1) - require.Len(t, matches, 2, "failed to find 2 gist URLs in compile output") - - ansiEscapePattern := `\x1b\[[0-9;]*m` - re = regexp.MustCompile(ansiEscapePattern) - - workflowGistURL := re.ReplaceAllString(matches[0][1], "") - workflowConfigURL := re.ReplaceAllString(matches[1][1], "") - - require.NotEmpty(t, workflowGistURL, "failed to find workflow gist URL") - require.NotEmpty(t, workflowConfigURL, "failed to find workflow config gist URL") - - return workflowGistURL, workflowConfigURL -} - -func preapreCRECLISettingsFile(t *testing.T, sc *seth.Client, capRegAddr, workflowRegistryAddr common.Address, donID uint32, chainSelector uint64, rpcHTTPURL string) *os.File { - settingsFile, err := os.CreateTemp("", CRECLISettingsFileName) - require.NoError(t, err, "failed to create CRE CLI settings file") - - settings := CRECLISettings{ - DevPlatform: DevPlatform{ - CapabilitiesRegistryAddress: capRegAddr.Hex(), - DonID: donID, - WorkflowRegistryAddress: workflowRegistryAddr.Hex(), - }, - UserWorkflow: UserWorkflow{ - WorkflowOwnerAddress: sc.MustGetRootKeyAddress().Hex(), - }, - Logging: Logging{}, - McmsConfig: McmsConfig{ - ProposalsDirectory: "./", - }, - Contracts: Contracts{ - ContractRegistry: []ContractRegistry{ - { - Name: "CapabilitiesRegistry", - Address: capRegAddr.Hex(), - ChainSelector: chainSelector, - }, - { - Name: "WorkflowRegistry", - Address: workflowRegistryAddr.Hex(), - ChainSelector: chainSelector, - }, - }, - }, - Rpcs: []RPC{ - { - ChainSelector: chainSelector, - URL: rpcHTTPURL, - }, - }, - } - - settingsMarshalled, err := yaml.Marshal(settings) - require.NoError(t, err, "failed to marshal CRE CLI settings") - - _, err = settingsFile.Write(settingsMarshalled) - require.NoError(t, err, "failed to write %s settings file", CRECLISettingsFileName) - - return settingsFile -} - -func registerWorkflow(t *testing.T, in *TestConfig, workflowName string, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Environment, "environment must be set") - require.NotNil(t, keystoneEnv.SethClient, "seth client must be set") - require.NotNil(t, keystoneEnv.Blockchain, "blockchain must be set") - require.NotEmpty(t, keystoneEnv.ChainSelector, "chain selector must be set") - require.NotNil(t, keystoneEnv.KeystoneContractAddresses, "keystone contract addresses must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.CapabilitiesRegistryAddress, "capabilities registry address must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress, "workflow registry address must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.FeedsConsumerAddress, "feed consumer address must be set") - require.NotEmpty(t, keystoneEnv.DeployerPrivateKey, "deployer private key must be set") - require.NotEmpty(t, keystoneEnv.WorkflowDONID, "workflow DON ID must be set") - require.NotNil(t, keystoneEnv.PriceProvider, "price provider must be set") - - // Register workflow directly using the provided binary and config URLs - // This is a legacy solution, probably we can remove it soon, but there's still quite a lot of people - // who have no access to dev-platform repo, so they cannot use the CRE CLI - if !in.WorkflowConfig.ShouldCompileNewWorkflow && !in.WorkflowConfig.UseCRECLI { - registerWorkflowDirectly(t, in, keystoneEnv.SethClient, keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress, keystoneEnv.WorkflowDONID, workflowName) - - return - } - - // These two env vars are required by the CRE CLI - err := os.Setenv("WORKFLOW_OWNER_ADDRESS", keystoneEnv.SethClient.MustGetRootKeyAddress().Hex()) - require.NoError(t, err, "failed to set WORKFLOW_OWNER_ADDRESS env var") - - err = os.Setenv("ETH_PRIVATE_KEY", keystoneEnv.DeployerPrivateKey) - require.NoError(t, err, "failed to set ETH_PRIVATE_KEY env var") - - // create CRE CLI settings file - settingsFile := preapreCRECLISettingsFile(t, keystoneEnv.SethClient, keystoneEnv.KeystoneContractAddresses.CapabilitiesRegistryAddress, keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress, keystoneEnv.WorkflowDONID, keystoneEnv.ChainSelector, keystoneEnv.Blockchain.Nodes[0].HostHTTPUrl) - - var workflowGistURL string - var workflowConfigURL string - - // compile and upload the workflow, if we are not using an existing one - if in.WorkflowConfig.ShouldCompileNewWorkflow { - workflowGistURL, workflowConfigURL = compileWorkflowWithCRECLI(t, in, keystoneEnv.KeystoneContractAddresses.FeedsConsumerAddress, in.PriceProvider.FeedID, keystoneEnv.PriceProvider.URL(), settingsFile) - } else { - workflowGistURL = in.WorkflowConfig.CompiledWorkflowConfig.BinaryURL - workflowConfigURL = in.WorkflowConfig.CompiledWorkflowConfig.ConfigURL - } - - // register the workflow - registerCmd := exec.Command(CRECLICommand, "workflow", "register", workflowName, "-b", workflowGistURL, "-c", workflowConfigURL, "-S", settingsFile.Name(), "-v") - registerCmd.Stdout = os.Stdout - registerCmd.Stderr = os.Stderr - err = registerCmd.Run() - require.NoError(t, err, "failed to register workflow using CRE CLI") -} - -func startSingleNodeSet(t *testing.T, nsInput *CapabilitiesAwareNodeSet, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Blockchain, "blockchain environment must be set") - - // Hack for CI that allows us to dynamically set the chainlink image and version - // CTFv2 currently doesn't support dynamic image and version setting - if os.Getenv("CI") == "true" { - // Due to how we pass custom env vars to reusable workflow we need to use placeholders, so first we need to resolve what's the name of the target environment variable - // that stores chainlink version and then we can use it to resolve the image name - image := fmt.Sprintf("%s:%s", os.Getenv(ctfconfig.E2E_TEST_CHAINLINK_IMAGE_ENV), ctfconfig.MustReadEnvVar_String(ctfconfig.E2E_TEST_CHAINLINK_VERSION_ENV)) - for _, nodeSpec := range nsInput.NodeSpecs { - nodeSpec.Node.Image = image - } - } - - nodeset, err := ns.NewSharedDBNodeSet(nsInput.Input, keystoneEnv.Blockchain) - require.NoError(t, err, "failed to deploy node set") - - keystoneEnv.WrappedNodeOutput = append(keystoneEnv.WrappedNodeOutput, &WrappedNodeOutput{ - nodeset, - nsInput.Name, - nsInput.Capabilities, - }) -} - -// In order to whitelist host IP in the gateway, we need to resolve the host.docker.internal to the host IP, -// and since CL image doesn't have dig or nslookup, we need to use curl. -func resolveHostDockerInternaIp(testLogger zerolog.Logger, nsOutput *ns.Output) (string, error) { - containerName := nsOutput.CLNodes[0].Node.ContainerName - cmd := []string{"curl", "-v", "http://host.docker.internal"} - output, err := framework.ExecContainer(containerName, cmd) - if err != nil { - return "", err - } - - re := regexp.MustCompile(`.*Trying ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+).*`) - matches := re.FindStringSubmatch(output) - if len(matches) < 2 { - testLogger.Error().Msgf("failed to extract IP address from curl output:\n%s", output) - return "", errors.New("failed to extract IP address from curl output") - } - - testLogger.Info().Msgf("Resolved host.docker.internal to %s", matches[1]) - - return matches[1], nil -} - -func fundNodes(t *testing.T, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.SethClient, "seth client must be set") - require.NotNil(t, keystoneEnv.dons, "dons must be set") - - for _, don := range keystoneEnv.dons { - for _, node := range don.Nodes { - _, err := actions.SendFunds(zerolog.Logger{}, keystoneEnv.SethClient, actions.FundsToSendPayload{ - ToAddress: common.HexToAddress(node.AccountAddr[keystoneEnv.SethClient.Cfg.Network.ChainID]), - Amount: big.NewInt(5000000000000000000), - PrivateKey: keystoneEnv.SethClient.MustGetRootPrivateKey(), - }) - require.NoError(t, err, "failed to send funds to node %s", node.AccountAddr[keystoneEnv.SethClient.Cfg.Network.ChainID]) - } - } -} - -type CapabilityFlag = string - -// DON types -const ( - WorkflowDON CapabilityFlag = "workflow" - CapabilitiesDON CapabilityFlag = "capabilities" -) - -// Capabilities -const ( - OCR3Capability CapabilityFlag = "ocr3" - CronCapability CapabilityFlag = "cron" - CustomComputeCapability CapabilityFlag = "custom-compute" - WriteEVMCapability CapabilityFlag = "write-evm" - - // Add more capabilities as needed -) - -var ( - // Add new capabilities here as well, if single DON should have them by default - SingleDonFlags = []string{"workflow", "capabilities", "ocr3", "cron", "custom-compute", "write-evm"} -) - -// WrappedNodeOutput is a struct that holds the node output and the name of the node set (required by multiple functions) -type WrappedNodeOutput struct { - *ns.Output - NodeSetName string - Capabilities []string -} - -// DONTopology is a struct that holds the DON references and various metadata -type DONTopology struct { - DON *devenv.DON - NodeInput *CapabilitiesAwareNodeSet - NodeOutput *WrappedNodeOutput - ID uint32 - Flags []string -} - -func hasFlag(values []string, flag string) bool { - return slices.Contains(values, flag) -} - -func mustOneDONTopologyWithFlag(t *testing.T, donTopologies []*DONTopology, flag string) *DONTopology { - donTopologies = DONTopologyWithFlag(donTopologies, flag) - require.Len(t, donTopologies, 1, "expected exactly one DON topology with flag %d", flag) - - return donTopologies[0] -} - -func DONTopologyWithFlag(donTopologies []*DONTopology, flag string) []*DONTopology { - var result []*DONTopology - - for _, donTopology := range donTopologies { - if hasFlag(donTopology.Flags, flag) { - result = append(result, donTopology) - } - } - - return result -} - -type PeeringData struct { - GlobalBootstraperPeerId string - GlobalBootstraperAddress string -} - -func peeringData(donTopologies []*DONTopology) (PeeringData, error) { - globalBootstraperPeerId, globalBootstraperAddress, err := globalBootstraperNodeData(donTopologies) - if err != nil { - return PeeringData{}, err - } - - return PeeringData{ - GlobalBootstraperPeerId: globalBootstraperPeerId, - GlobalBootstraperAddress: globalBootstraperAddress, - }, nil -} - -type KeystoneContractAddresses struct { - CapabilitiesRegistryAddress common.Address - ForwarderAddress common.Address - OCR3CapabilityAddress common.Address - WorkflowRegistryAddress common.Address - FeedsConsumerAddress common.Address -} - -type KeystoneEnvironment struct { - *deployment.Environment - Blockchain *blockchain.Output - SethClient *seth.Client - ChainSelector uint64 - DeployerPrivateKey string - KeystoneContractAddresses *KeystoneContractAddresses - - JD *jd.Output - - WrappedNodeOutput []*WrappedNodeOutput - DONTopology []*DONTopology - dons []*devenv.DON - WorkflowDONID uint32 - - PriceProvider PriceProvider -} - -func configureNodes(t *testing.T, testLogger zerolog.Logger, in *TestConfig, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.Environment, "environment must be set") - require.NotNil(t, keystoneEnv.Blockchain, "blockchain must be set") - require.NotNil(t, keystoneEnv.WrappedNodeOutput, "wrapped node output must be set") - require.NotNil(t, keystoneEnv.JD, "job distributor must be set") - require.NotNil(t, keystoneEnv.SethClient, "seth client must be set") - require.NotEmpty(t, keystoneEnv.DONTopology, "DON topology must not be empty") - require.NotNil(t, keystoneEnv.KeystoneContractAddresses, "keystone contract addresses must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.CapabilitiesRegistryAddress, "capabilities registry address must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.OCR3CapabilityAddress, "OCR3 capability address must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.ForwarderAddress, "forwarder address must be set") - require.NotEmpty(t, keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress, "workflow registry address must be set") - require.GreaterOrEqual(t, len(keystoneEnv.DONTopology), 1, "expected at least one DON topology") - - peeringData, err := peeringData(keystoneEnv.DONTopology) - require.NoError(t, err, "failed to get peering data") - - for i, donTopology := range keystoneEnv.DONTopology { - keystoneEnv.DONTopology[i].NodeOutput = configureDON(t, donTopology.DON, donTopology.NodeInput, donTopology.NodeOutput, keystoneEnv.Blockchain, donTopology.ID, donTopology.Flags, peeringData, keystoneEnv.KeystoneContractAddresses.CapabilitiesRegistryAddress, keystoneEnv.KeystoneContractAddresses.WorkflowRegistryAddress, keystoneEnv.KeystoneContractAddresses.ForwarderAddress) - } - - nodeOutputs := make([]*WrappedNodeOutput, 0, len(keystoneEnv.DONTopology)) - for i := range keystoneEnv.DONTopology { - nodeOutputs = append(nodeOutputs, keystoneEnv.DONTopology[i].NodeOutput) - } - - // after restarting the nodes, we need to reinitialize the JD clients otherwise - // communication between JD and nodes will fail due to invalidated session cookie - keystoneEnv.Environment = reinitialiseJDClients(t, keystoneEnv.Environment, keystoneEnv.JD, nodeOutputs...) - - for _, donTopology := range keystoneEnv.DONTopology { - ips, ports := extraAllowedPortsAndIps(t, testLogger, in, donTopology.NodeOutput.Output) - createJobs(t, keystoneEnv.Environment, donTopology.DON, donTopology.NodeOutput, keystoneEnv.Blockchain, keystoneEnv.KeystoneContractAddresses.OCR3CapabilityAddress, donTopology.ID, donTopology.Flags, ports, ips) - } -} - -func globalBootstraperNodeData(donTopologies []*DONTopology) (string, string, error) { - if len(donTopologies) == 1 { - // if there is only one DON, then the global bootstrapper is the bootstrap node of the DON - peerId, err := nodeToP2PID(donTopologies[0].DON.Nodes[0], keyExtractingTransformFn) - if err != nil { - return "", "", errors.Wrapf(err, "failed to get peer ID for node %s", donTopologies[0].DON.Nodes[0].Name) - } - - return peerId, donTopologies[0].NodeOutput.CLNodes[0].Node.ContainerName, nil - } else if len(donTopologies) > 1 { - // if there's more than one DON, then peering capabilitity needs to point to the same bootstrap node - // for all the DONs, and so we need to find it first. For us, it will always be the bootstrap node of the workflow DON. - for _, donTopology := range donTopologies { - if hasFlag(donTopology.Flags, WorkflowDON) { - peerId, err := nodeToP2PID(donTopology.DON.Nodes[0], keyExtractingTransformFn) - if err != nil { - return "", "", errors.Wrapf(err, "failed to get peer ID for node %s", donTopology.DON.Nodes[0].Name) - } - - return peerId, donTopology.NodeOutput.CLNodes[0].Node.ContainerName, nil - } - } - - return "", "", errors.New("expected at least one workflow DON") - } - - return "", "", errors.New("expected at least one DON topology") -} - -func buildWorkerNodeConfig(donBootstrapNodePeerId, donBootstrapNodeAddress string, peeringData PeeringData, bc *blockchain.Output, capRegAddr, forwarderAddress, workflowRegistryAddr common.Address, donID uint32, flags []string, nodeAddress string) string { - workerNodeConfig := fmt.Sprintf(` - [Feature] - LogPoller = true - - [OCR2] - Enabled = true - DatabaseTimeout = '1s' - ContractPollInterval = '1s' - - [P2P.V2] - Enabled = true - ListenAddresses = ['0.0.0.0:5001'] - DefaultBootstrappers = ['%s@%s:5001'] - - [Capabilities.Peering.V2] - Enabled = true - ListenAddresses = ['0.0.0.0:6690'] - DefaultBootstrappers = ['%s@%s:6690'] - - [[EVM]] - ChainID = '%s' - - [[EVM.Nodes]] - Name = 'anvil' - WSURL = '%s' - HTTPURL = '%s' - - # Capabilities registry address, always needed - [Capabilities.ExternalRegistry] - Address = '%s' - NetworkID = 'evm' - ChainID = '%s' - `, - donBootstrapNodePeerId, - donBootstrapNodeAddress, - peeringData.GlobalBootstraperPeerId, - peeringData.GlobalBootstraperAddress, - bc.ChainID, - bc.Nodes[0].DockerInternalWSUrl, - bc.Nodes[0].DockerInternalHTTPUrl, - capRegAddr, - bc.ChainID, - ) - - if hasFlag(flags, WriteEVMCapability) { - writeEVMConfig := fmt.Sprintf(` - # Required for the target capability to be initialized - [EVM.Workflow] - FromAddress = '%s' - ForwarderAddress = '%s' - GasLimitDefault = 400_000 - `, - nodeAddress, - forwarderAddress.Hex(), - ) - workerNodeConfig += writeEVMConfig - } - - // if it's workflow DON configure workflow registry - if hasFlag(flags, WorkflowDON) { - workflowRegistryConfig := fmt.Sprintf(` - [Capabilities.WorkflowRegistry] - Address = "%s" - NetworkID = "evm" - ChainID = "%s" - `, - workflowRegistryAddr.Hex(), - bc.ChainID, - ) - - workerNodeConfig += workflowRegistryConfig - } - - // workflow DON nodes always needs gateway connector, otherwise they won't be able to fetch the workflow - // it's also required by custom compute, which can only run on workflow DON nodes - if hasFlag(flags, WorkflowDON) || hasFlag(flags, CustomComputeCapability) { - // assuming for now that gateway always used port 5003 and /node path - gatewayAddress := fmt.Sprintf("ws://%s:5003/node", donBootstrapNodeAddress) - gatewayConfig := fmt.Sprintf(` - [Capabilities.GatewayConnector] - DonID = "%s" - ChainIDForNodeKey = "%s" - NodeAddress = '%s' - - [[Capabilities.GatewayConnector.Gateways]] - Id = "por_gateway" - URL = "%s" - `, - strconv.FormatUint(uint64(donID), 10), - bc.ChainID, - nodeAddress, - gatewayAddress, - ) - - workerNodeConfig += gatewayConfig - } - - return workerNodeConfig -} - -func configureDON(t *testing.T, don *devenv.DON, nodeInput *CapabilitiesAwareNodeSet, nodeOutput *WrappedNodeOutput, bc *blockchain.Output, donID uint32, flags []string, peeringData PeeringData, capRegAddr, workflowRegistryAddr, forwarderAddress common.Address) *WrappedNodeOutput { - workflowNodeSet := don.Nodes[1:] - - donBootstrapNodePeerId, err := nodeToP2PID(don.Nodes[0], keyExtractingTransformFn) - require.NoError(t, err, "failed to get bootstrap node peer ID") - - donBootstrapNodeAddress := nodeOutput.CLNodes[0].Node.ContainerName - - chainIDInt, err := strconv.Atoi(bc.ChainID) - require.NoError(t, err, "failed to convert chain ID to int") - chainIDUint64 := mustSafeUint64(int64(chainIDInt)) - - // bootstrap node in the DON always points to itself as the OCR peering bootstrapper - bootstrapNodeConfig := fmt.Sprintf(` - [Feature] - LogPoller = true - - [OCR2] - Enabled = true - DatabaseTimeout = '1s' - ContractPollInterval = '1s' - - [P2P.V2] - Enabled = true - ListenAddresses = ['0.0.0.0:5001'] - DefaultBootstrappers = ['%s@localhost:5001'] - - [[EVM]] - ChainID = '%s' - - [[EVM.Nodes]] - Name = 'anvil' - WSURL = '%s' - HTTPURL = '%s' - - # Capabilities registry address, required for do2don p2p mesh to work and for capabilities discovery - # Required even, when all capabilities are local to DON in a single DON scenario - [Capabilities.ExternalRegistry] - Address = '%s' - NetworkID = 'evm' - ChainID = '%s' - `, - donBootstrapNodePeerId, - bc.ChainID, - bc.Nodes[0].DockerInternalWSUrl, - bc.Nodes[0].DockerInternalHTTPUrl, - capRegAddr, - bc.ChainID, - ) - - // configure Don2Don peering capability for workflow DON's bootstrap node, but not for other DON's bootstrap nodes - // since they do not have any capabilities - if hasFlag(flags, WorkflowDON) { - bootstrapNodeConfig += fmt.Sprintf(` - [Capabilities.Peering.V2] - Enabled = true - ListenAddresses = ['0.0.0.0:6690'] - DefaultBootstrappers = ['%s@%s:6690'] - `, - peeringData.GlobalBootstraperPeerId, - "localhost", // bootstrap node should always point to itself as the bootstrapper - ) - } - - nodeInput.NodeSpecs[0].Node.TestConfigOverrides = bootstrapNodeConfig - - // configure worker nodes with OCR Peering, Don2Don peering, EVM, and capabilities registry - for i := range workflowNodeSet { - nodeInput.NodeSpecs[i+1].Node.TestConfigOverrides = buildWorkerNodeConfig(donBootstrapNodePeerId, donBootstrapNodeAddress, peeringData, bc, capRegAddr, forwarderAddress, workflowRegistryAddr, donID, flags, workflowNodeSet[i].AccountAddr[chainIDUint64]) - } - - // we need to restart all nodes for configuration changes to take effect - nodeset, err := ns.UpgradeNodeSet(t, nodeInput.Input, bc, 5*time.Second) - require.NoError(t, err, "failed to upgrade node set") - - return &WrappedNodeOutput{nodeset, nodeInput.Name, nodeInput.Capabilities} -} - -func createJobs(t *testing.T, ctfEnv *deployment.Environment, don *devenv.DON, nodeOutput *WrappedNodeOutput, bc *blockchain.Output, ocr3CapabilityAddress common.Address, donID uint32, flags []string, extraAllowedPorts []int, extraAllowedIps []string) { - donBootstrapNodePeerId, err := nodeToP2PID(don.Nodes[0], keyExtractingTransformFn) - require.NoError(t, err, "failed to get bootstrap node peer ID") - - donBootstrapNodeAddress := nodeOutput.CLNodes[0].Node.ContainerName - - chainIDInt, err := strconv.Atoi(bc.ChainID) - require.NoError(t, err, "failed to convert chain ID to int") - chainIDUint64 := mustSafeUint64(int64(chainIDInt)) - - jobCount := 2 + (len(don.Nodes)-1)*3 - errCh := make(chan error, jobCount) - - var wg sync.WaitGroup - - // configuration of bootstrap node - wg.Add(1) - go func() { - defer wg.Done() - - // create Bootstrap (OCR3 capability) job, if DON has OCR3 capability - if hasFlag(flags, OCR3Capability) { - bootstrapJobSpec := fmt.Sprintf(` - type = "bootstrap" - schemaVersion = 1 - externalJobID = "%s" - name = "Botostrap" - contractID = "%s" - contractConfigTrackerPollInterval = "1s" - contractConfigConfirmations = 1 - relay = "evm" - [relayConfig] - chainID = %s - providerType = "ocr3-capability" - `, uuid.NewString(), - ocr3CapabilityAddress.Hex(), - bc.ChainID) - - bootstrapJobRequest := &jobv1.ProposeJobRequest{ - NodeId: don.Nodes[0].NodeID, - Spec: bootstrapJobSpec, - } - - _, bootErr := ctfEnv.Offchain.ProposeJob(context.Background(), bootstrapJobRequest) - if bootErr != nil { - errCh <- errors.Wrapf(bootErr, "failed to propose bootstrap ocr3 job") - return - } - } - - // if it's a workflow DON or it has custom compute capability, we need to create a gateway job - if hasFlag(flags, WorkflowDON) || hasFlag(flags, CustomComputeCapability) { - var gatewayMembers string - for i := 1; i < len(don.Nodes); i++ { - gatewayMembers += fmt.Sprintf(` - [[gatewayConfig.Dons.Members]] - Address = "%s" - Name = "Node %d"`, - don.Nodes[i].AccountAddr[chainIDUint64], - i, - ) - } - - gatewayJobSpec := fmt.Sprintf(` - type = "gateway" - schemaVersion = 1 - externalJobID = "%s" - name = "Gateway" - forwardingAllowed = false - [gatewayConfig.ConnectionManagerConfig] - AuthChallengeLen = 10 - AuthGatewayId = "por_gateway" - AuthTimestampToleranceSec = 5 - HeartbeatIntervalSec = 20 - [[gatewayConfig.Dons]] - DonId = "%s" - F = 1 - HandlerName = "web-api-capabilities" - [gatewayConfig.Dons.HandlerConfig] - MaxAllowedMessageAgeSec = 1_000 - [gatewayConfig.Dons.HandlerConfig.NodeRateLimiter] - GlobalBurst = 10 - GlobalRPS = 50 - PerSenderBurst = 10 - PerSenderRPS = 10 - %s - [gatewayConfig.NodeServerConfig] - HandshakeTimeoutMillis = 1_000 - MaxRequestBytes = 100_000 - Path = "/node" - Port = 5_003 #this is the port the other nodes will use to connect to the gateway - ReadTimeoutMillis = 1_000 - RequestTimeoutMillis = 10_000 - WriteTimeoutMillis = 1_000 - [gatewayConfig.UserServerConfig] - ContentTypeHeader = "application/jsonrpc" - MaxRequestBytes = 100_000 - Path = "/" - Port = 5_002 - ReadTimeoutMillis = 1_000 - RequestTimeoutMillis = 10_000 - WriteTimeoutMillis = 1_000 - [gatewayConfig.HTTPClientConfig] - MaxResponseBytes = 100_000_000 - `, - uuid.NewString(), - strconv.FormatUint(uint64(donID), 10), - gatewayMembers, - ) - - if len(extraAllowedPorts) != 0 { - var allowedPorts string - for _, port := range extraAllowedPorts { - allowedPorts += fmt.Sprintf("%d, ", port) - } - - // when we pass custom allowed IPs, defaults are not used and we need to - // pass HTTP and HTTPS explicitly - gatewayJobSpec += fmt.Sprintf(` - AllowedPorts = [80, 443, %s] - `, - allowedPorts, - ) - } - - if len(extraAllowedIps) != 0 { - allowedIPs := strings.Join(extraAllowedIps, `", "`) - - gatewayJobSpec += fmt.Sprintf(` - AllowedIps = ["%s"] - `, - allowedIPs, - ) - } - - gatewayJobRequest := &jobv1.ProposeJobRequest{ - NodeId: don.Nodes[0].NodeID, - Spec: gatewayJobSpec, - } - - _, gateErr := ctfEnv.Offchain.ProposeJob(context.Background(), gatewayJobRequest) - if gateErr != nil { - errCh <- errors.Wrapf(gateErr, "failed to propose gateway job for the bootstrap node") - } - } - }() - - // configuration of worker nodes - for i, node := range don.Nodes { - // First node is a bootstrap node, so we skip it - if i == 0 { - continue - } - - wg.Add(1) - go func() { - defer wg.Done() - - // create cron capability job, if DON has cron capability - // remember that since we are using a capability that is not bundled-in, we need to point the job - // to binary location within the container - if hasFlag(flags, CronCapability) { - cronJobSpec := fmt.Sprintf(` - type = "standardcapabilities" - schemaVersion = 1 - externalJobID = "%s" - name = "cron-capabilities" - forwardingAllowed = false - command = "/home/capabilities/%s" - config = "" - `, - uuid.NewString(), - cronCapabilityAssetFile) - - cronJobRequest := &jobv1.ProposeJobRequest{ - NodeId: node.NodeID, - Spec: cronJobSpec, - } - - _, cronErr := ctfEnv.Offchain.ProposeJob(context.Background(), cronJobRequest) - if cronErr != nil { - errCh <- errors.Wrapf(cronErr, "failed to propose cron job for node %s", node.NodeID) - return - } - } - - // create custom compute capability job, if DON has custom compute capability - if hasFlag(flags, CustomComputeCapability) { - computeJobSpec := fmt.Sprintf(` - type = "standardcapabilities" - schemaVersion = 1 - name = "compute-capabilities" - externalJobID = "%s" - forwardingAllowed = false - command = "__builtin_custom-compute-action" - config = """ - NumWorkers = 3 - [rateLimiter] - globalRPS = 20.0 - globalBurst = 30 - perSenderRPS = 1.0 - perSenderBurst = 5 - """`, - uuid.NewString(), - ) - - computeJobRequest := &jobv1.ProposeJobRequest{ - NodeId: node.NodeID, - Spec: computeJobSpec, - } - - _, compErr := ctfEnv.Offchain.ProposeJob(context.Background(), computeJobRequest) - if compErr != nil { - errCh <- errors.Wrapf(compErr, "failed to propose compute job for node %s", node.NodeID) - return - } - } - - // create OCR3 consensus job, if DON has OCR3 capability - if hasFlag(flags, OCR3Capability) { - consensusJobSpec := fmt.Sprintf(` - type = "offchainreporting2" - schemaVersion = 1 - externalJobID = "%s" - name = "Keystone OCR3 Consensus Capability" - contractID = "%s" - ocrKeyBundleID = "%s" - p2pv2Bootstrappers = [ - "%s@%s", - ] - relay = "evm" - pluginType = "plugin" - transmitterID = "%s" - [relayConfig] - chainID = "%s" - [pluginConfig] - command = "/usr/local/bin/chainlink-ocr3-capability" - ocrVersion = 3 - pluginName = "ocr-capability" - providerType = "ocr3-capability" - telemetryType = "plugin" - [onchainSigningStrategy] - strategyName = 'multi-chain' - [onchainSigningStrategy.config] - evm = "%s" - `, - uuid.NewString(), - ocr3CapabilityAddress, - node.Ocr2KeyBundleID, - donBootstrapNodePeerId, - // assume that OCR3 nodes always use port 5001 (that's P2P V2 port of the bootstrap node) - donBootstrapNodeAddress+":5001", - don.Nodes[i].AccountAddr[chainIDUint64], - bc.ChainID, - node.Ocr2KeyBundleID, - ) - - consensusJobRequest := &jobv1.ProposeJobRequest{ - NodeId: node.NodeID, - Spec: consensusJobSpec, - } - - _, consErr := ctfEnv.Offchain.ProposeJob(context.Background(), consensusJobRequest) - if consErr != nil { - errCh <- errors.Wrapf(consErr, "failed to propose consensus job for node %s ", node.NodeID) - } - } - }() - } - wg.Wait() - close(errCh) - - errFound := false - for err := range errCh { - errFound = true - //nolint:testifylint // we want to assert here to catch all errors - assert.NoError(t, err, "job creation/acception failed") - } - - require.False(t, errFound, "failed to create at least one job for DON: %d", donID) -} - -func reinitialiseJDClients(t *testing.T, ctfEnv *deployment.Environment, jdOutput *jd.Output, nodeOutputs ...*WrappedNodeOutput) *deployment.Environment { - offchainClients := make([]deployment.OffchainClient, len(nodeOutputs)) - - for i, nodeOutput := range nodeOutputs { - nodeInfo, err := getNodeInfo(nodeOutput.Output, nodeOutput.NodeSetName, 1) - require.NoError(t, err, "failed to get node info") - - jdConfig := devenv.JDConfig{ - GRPC: jdOutput.HostGRPCUrl, - WSRPC: jdOutput.DockerWSRPCUrl, - Creds: insecure.NewCredentials(), - NodeInfo: nodeInfo, - } - - offChain, err := devenv.NewJDClient(context.Background(), jdConfig) - require.NoError(t, err, "failed to create JD client") - - offchainClients[i] = offChain - } - - // we don't really care, which instance we set here, since there's only one - // what's important is that we create a new JD client for each DON, because - // that authenticates JD with each node - ctfEnv.Offchain = offchainClients[0] - - return ctfEnv -} - -func mustSafeUint64(input int64) uint64 { - if input < 0 { - panic(fmt.Errorf("int64 %d is below uint64 min value", input)) - } - return uint64(input) -} - -func mustSafeUint32(input int) uint32 { - if input < 0 { - panic(fmt.Errorf("int %d is below uint32 min value", input)) - } - maxUint32 := (1 << 32) - 1 - if input > maxUint32 { - panic(fmt.Errorf("int %d exceeds uint32 max value", input)) - } - return uint32(input) -} - -func noOpTransformFn(value string) string { - return value -} - -func keyExtractingTransformFn(value string) string { - parts := strings.Split(value, "_") - if len(parts) > 1 { - return parts[len(parts)-1] - } - return value -} - -func nodeToP2PID(node devenv.Node, transformFn func(string) string) (string, error) { - for _, label := range node.Labels() { - if label.Key == devenv.NodeLabelP2PIDType { - if label.Value == nil { - return "", fmt.Errorf("p2p label value is nil for node %s", node.Name) - } - return transformFn(*label.Value), nil - } - } - - return "", fmt.Errorf("p2p label not found for node %s", node.Name) -} - -func configureContracts(t *testing.T, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must be set") - require.NotNil(t, keystoneEnv.DONTopology, "DON topology must be set") - require.NotEmpty(t, keystoneEnv.ChainSelector, "chain selector must be set") - require.NotNil(t, keystoneEnv.Environment, "environment must be set") - - donCapabilities := make([]keystone_changeset.DonCapabilities, 0, len(keystoneEnv.DONTopology)) - - for _, donTopology := range keystoneEnv.DONTopology { - var capabilities []keystone_changeset.DONCapabilityWithConfig - - // check what capabilities each DON has and register them with Capabilities Registry contract - if hasFlag(donTopology.Flags, CronCapability) { - capabilities = append(capabilities, keystone_changeset.DONCapabilityWithConfig{ - Capability: kcr.CapabilitiesRegistryCapability{ - LabelledName: "cron-trigger", - Version: "1.0.0", - CapabilityType: 0, // TRIGGER - }, - Config: &capabilitiespb.CapabilityConfig{}, - }) - } - - if hasFlag(donTopology.Flags, CustomComputeCapability) { - capabilities = append(capabilities, keystone_changeset.DONCapabilityWithConfig{ - Capability: kcr.CapabilitiesRegistryCapability{ - LabelledName: "custom-compute", - Version: "1.0.0", - CapabilityType: 1, // ACTION - }, - Config: &capabilitiespb.CapabilityConfig{}, - }) - } - - if hasFlag(donTopology.Flags, OCR3Capability) { - capabilities = append(capabilities, keystone_changeset.DONCapabilityWithConfig{ - Capability: kcr.CapabilitiesRegistryCapability{ - LabelledName: "offchain_reporting", - Version: "1.0.0", - CapabilityType: 2, // CONSENSUS - ResponseType: 0, // REPORT - }, - Config: &capabilitiespb.CapabilityConfig{}, - }) - } - - if hasFlag(donTopology.Flags, WriteEVMCapability) { - capabilities = append(capabilities, keystone_changeset.DONCapabilityWithConfig{ - Capability: kcr.CapabilitiesRegistryCapability{ - LabelledName: "write_geth-testnet", - Version: "1.0.0", - CapabilityType: 3, // TARGET - ResponseType: 1, // OBSERVATION_IDENTICAL - }, - Config: &capabilitiespb.CapabilityConfig{}, - }) - } - - // Add support for new capabilities here as needed - - donPeerIds := make([]string, len(donTopology.DON.Nodes)-1) - for i, node := range donTopology.DON.Nodes { - if i == 0 { - continue - } - - p2pId, err := nodeToP2PID(node, noOpTransformFn) - require.NoError(t, err, "failed to get p2p id for node %s", node.Name) - - donPeerIds[i-1] = p2pId - } - - // we only need to assign P2P IDs to NOPs, since `ConfigureInitialContractsChangeset` method - // will take care of creating DON to Nodes mapping - nop := keystone_changeset.NOP{ - Name: fmt.Sprintf("NOP for %s DON", donTopology.NodeOutput.NodeSetName), - Nodes: donPeerIds, - } - - donName := donTopology.NodeOutput.NodeSetName + "-don" - donCapabilities = append(donCapabilities, keystone_changeset.DonCapabilities{ - Name: donName, - F: 1, - Nops: []keystone_changeset.NOP{nop}, - Capabilities: capabilities, - }) - } - - var transmissionSchedule []int - - for _, donTopology := range keystoneEnv.DONTopology { - if hasFlag(donTopology.Flags, OCR3Capability) { - // this schedule makes sure that all worker nodes are transmitting OCR3 reports - transmissionSchedule = []int{len(donTopology.DON.Nodes) - 1} - break - } - } - - require.NotEmpty(t, transmissionSchedule, "transmission schedule must not be empty") - - // values supplied by Alexandr Yepishev as the expected values for OCR3 config - oracleConfig := keystone_changeset.OracleConfig{ - DeltaProgressMillis: 5000, - DeltaResendMillis: 5000, - DeltaInitialMillis: 5000, - DeltaRoundMillis: 2000, - DeltaGraceMillis: 500, - DeltaCertifiedCommitRequestMillis: 1000, - DeltaStageMillis: 30000, - MaxRoundsPerEpoch: 10, - TransmissionSchedule: transmissionSchedule, - MaxDurationQueryMillis: 1000, - MaxDurationObservationMillis: 1000, - MaxDurationShouldAcceptMillis: 1000, - MaxDurationShouldTransmitMillis: 1000, - MaxFaultyOracles: 1, - MaxQueryLengthBytes: 1000000, - MaxObservationLengthBytes: 1000000, - MaxReportLengthBytes: 1000000, - MaxOutcomeLengthBytes: 1000000, - MaxReportCount: 20, - MaxBatchSize: 1000, - OutcomePruningThreshold: 3600, - UniqueReports: true, - RequestTimeout: 30 * time.Second, - } - - cfg := keystone_changeset.InitialContractsCfg{ - RegistryChainSel: keystoneEnv.ChainSelector, - Dons: donCapabilities, - OCR3Config: &oracleConfig, - } - - _, err := keystone_changeset.ConfigureInitialContractsChangeset(*keystoneEnv.Environment, cfg) - require.NoError(t, err, "failed to configure initial contracts") -} - -func startJobDistributor(t *testing.T, in *TestConfig, keystoneEnv *KeystoneEnvironment) { - if os.Getenv("CI") == "true" { - jdImage := ctfconfig.MustReadEnvVar_String(e2eJobDistributorImageEnvVarName) - jdVersion := os.Getenv(e2eJobDistributorVersionEnvVarName) - in.JD.Image = fmt.Sprintf("%s:%s", jdImage, jdVersion) - } - jdOutput, err := jd.NewJD(in.JD) - require.NoError(t, err, "failed to create new job distributor") - - keystoneEnv.JD = jdOutput -} - -func nodeSetFlags(nodeSet *CapabilitiesAwareNodeSet) ([]string, error) { - var stringCaps []string - if len(nodeSet.Capabilities) == 0 && nodeSet.DONType == "" { - // if no flags are set, we assign all known capabilities to the DON - return SingleDonFlags, nil - } - - stringCaps = append(stringCaps, append(nodeSet.Capabilities, nodeSet.DONType)...) - return stringCaps, nil -} - -func buildDONTopology(t *testing.T, in *TestConfig, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, in, "test config must not be nil") - require.NotNil(t, keystoneEnv, "keystone environment must not be nil") - require.NotNil(t, keystoneEnv.dons, "keystone environment must have DONs") - require.NotNil(t, keystoneEnv.WrappedNodeOutput, "keystone environment must have node outputs") - - require.Equal(t, len(keystoneEnv.dons), len(keystoneEnv.WrappedNodeOutput), "number of DONs and node outputs must match") - keystoneEnv.DONTopology = make([]*DONTopology, len(keystoneEnv.dons)) - - // one DON to do everything - if len(keystoneEnv.dons) == 1 { - flags, err := nodeSetFlags(in.NodeSets[0]) - require.NoError(t, err, "failed to convert string flags to bitmap for nodeset %s", in.NodeSets[0].Name) - - keystoneEnv.DONTopology[0] = &DONTopology{ - DON: keystoneEnv.dons[0], - NodeInput: in.NodeSets[0], - NodeOutput: keystoneEnv.WrappedNodeOutput[0], - ID: 1, - Flags: flags, - } - } else { - for i, don := range keystoneEnv.dons { - flags, err := nodeSetFlags(in.NodeSets[i]) - require.NoError(t, err, "failed to convert string flags to bitmap for nodeset %s", in.NodeSets[i].Name) - - keystoneEnv.DONTopology[i] = &DONTopology{ - DON: don, - NodeInput: in.NodeSets[i], - NodeOutput: keystoneEnv.WrappedNodeOutput[i], - ID: mustSafeUint32(i + 1), - Flags: flags, - } - } - } - - keystoneEnv.WorkflowDONID = mustOneDONTopologyWithFlag(t, keystoneEnv.DONTopology, WorkflowDON).ID -} - -func getLogFileHandles(t *testing.T, l zerolog.Logger, ns *ns.Output) ([]*os.File, error) { - var logFiles []*os.File - - var belongsToCurrentEnv = func(filePath string) bool { - for i, clNode := range ns.CLNodes { - if clNode == nil { - continue - } - - // skip the first node, as it's the bootstrap node - if i == 0 { - continue - } - - if strings.EqualFold(filePath, clNode.Node.ContainerName+".log") { - return true - } - } - return false - } - - logsDir := "logs/docker-" + t.Name() - - fileWalkErr := filepath.Walk(logsDir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if !info.IsDir() && belongsToCurrentEnv(info.Name()) { - file, fileErr := os.Open(path) - if fileErr != nil { - return fmt.Errorf("failed to open file %s: %w", path, fileErr) - } - logFiles = append(logFiles, file) - } - return nil - }) - - expectedLogCount := len(ns.CLNodes) - 1 - if len(logFiles) != expectedLogCount { - l.Warn().Int("Expected", expectedLogCount).Int("Got", len(logFiles)).Msg("Number of log files does not match number of worker nodes. Some logs might be missing.") - } - - if fileWalkErr != nil { - l.Error().Err(fileWalkErr).Msg("Error walking through log files. Will not look for report transmission transaction hashes") - return nil, fileWalkErr - } - - return logFiles, nil -} - -// This function is used to go through Chainlink Node logs and look for entries related to report transmissions. -// Once such a log entry is found, it looks for transaction hash and then it tries to decode the transaction and print the result. -func debugReportTransmissions(logFiles []*os.File, l zerolog.Logger, wsRPCURL string) { - /* - Example log entry: - 2025-01-28T14:44:48.080Z [DEBUG] Node sent transaction multinode@v0.0.0-20250121205514-f73e2f86c23b/transaction_sender.go:180 chainID=1337 logger=EVM.1337.TransactionSender tx={"type":"0x0","chainId":"0x539","nonce":"0x0","to":"0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9","gas":"0x61a80","gasPrice":"0x3b9aca00","maxPriorityFeePerGas":null,"maxFeePerGas":null,"value":"0x0","input":"0x11289565000000000000000000000000a513e6e4b8f2a923d98304ec87f64353c4d5c853000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000010d010f715db03509d388f706e16137722000e26aa650a64ac826ae8e5679cdf57fd96798ed50000000010000000100000a9c593aaed2f5371a5bc0779d1b8ea6f9c7d37bfcbb876a0a9444dbd36f64306466323239353031f39fd6e51aad88f6f4ce6ab8827279cfffb92266000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001018bfe88407000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bb5c162c8000000000000000000000000000000000000000000000000000000006798ed37000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000e700d4c57250eac9dc925c951154c90c1b6017944322fb2075055d8bdbe19000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000041561c171b7465e8efef35572ef82adedb49ea71b8344a34a54ce5e853f80ca1ad7d644ebe710728f21ebfc3e2407bd90173244f744faa011c3a57213c8c585de90000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004165e6f3623acc43f163a58761655841bfebf3f6b4ea5f8d34c64188036b0ac23037ebbd3854b204ca26d828675395c4b9079ca068d9798326eb8c93f26570a1080100000000000000000000000000000000000000000000000000000000000000","v":"0xa96","r":"0x168547e96e7088c212f85a4e8dddce044bbb2abfd5ccc8a5451fdfcb812c94e5","s":"0x2a735a3df046632c2aaa7e583fe161113f3345002e6c9137bbfa6800a63f28a4","hash":"0x3fc5508310f8deef09a46ad594dcc5dc9ba415319ef1dfa3136335eb9e87ff4d"} version=2.19.0@05c05a9 - - What we are looking for: - "hash":"0x3fc5508310f8deef09a46ad594dcc5dc9ba415319ef1dfa3136335eb9e87ff4d" - */ - reportTransmissionTxHashPattern := regexp.MustCompile(`"hash":"(0x[0-9a-fA-F]+)"`) - - // let's be prudent and assume that in extreme scenario when feed price isn't updated, but - // transmission is still sent, we might have multiple transmissions per node, and if we want - // to avoid blocking on the channel, we need to have a higher buffer - resultsCh := make(chan string, len(logFiles)*4) - - wg := &sync.WaitGroup{} - for _, f := range logFiles { - wg.Add(1) - file := f - - go func() { - defer wg.Done() - - scanner := bufio.NewScanner(file) - scanner.Split(bufio.ScanLines) - - for scanner.Scan() { - jsonLogLine := scanner.Text() - - if !strings.Contains(jsonLogLine, "Node sent transaction") { - continue - } - - match := reportTransmissionTxHashPattern.MatchString(jsonLogLine) - if match { - resultsCh <- reportTransmissionTxHashPattern.FindStringSubmatch(jsonLogLine)[1] - } - } - }() - } - - wg.Wait() - close(resultsCh) - - if len(resultsCh) == 0 { - l.Error().Msg("❌ No report transmissions found in Chainlink Node logs.") - return - } - - // required as Seth prints transaction traces to stdout with debug level - _ = os.Setenv(seth.LogLevelEnvVar, "debug") - - sc, err := seth.NewClientBuilder(). - WithRpcUrl(wsRPCURL). - WithReadOnlyMode(). - WithGethWrappersFolders([]string{"../../../core/gethwrappers/keystone/generated"}). // point Seth to the folder with keystone geth wrappers, so that it can load contract ABIs - Build() - - if err != nil { - l.Error().Err(err).Msg("Failed to create seth client") - return - } - - for txHash := range resultsCh { - l.Info().Msgf("🔍 Tracing report transmission transaction %s", txHash) - // set tracing level to all to trace also successful transactions - sc.Cfg.TracingLevel = seth.TracingLevel_All - tx, _, err := sc.Client.TransactionByHash(context.Background(), common.HexToHash(txHash)) - if err != nil { - l.Warn().Err(err).Msgf("Failed to get transaction by hash %s", txHash) - continue - } - _, decodedErr := sc.DecodeTx(tx) - - if decodedErr != nil { - l.Error().Err(decodedErr).Msgf("Transmission transaction %s failed due to %s", txHash, decodedErr.Error()) - continue - } - } -} - -// this function is used to print debug information from Chainlink Node logs -// it checks whether workflow was executing, OCR was executing and whether reports were sent -// and if they were, it traces each report transmission transaction -func printTestDebug(t *testing.T, l zerolog.Logger, keystoneEnv *KeystoneEnvironment) { - require.NotNil(t, keystoneEnv, "keystone environment must not be nil") - require.NotNil(t, keystoneEnv.DONTopology, "keystone environment must have DON topology") - require.NotNil(t, keystoneEnv.Blockchain, "keystone environment must have blockchain") - - l.Info().Msg("🔍 Debug information from Chainlink Node logs:") - - for _, donTopology := range keystoneEnv.DONTopology { - logFiles, err := getLogFileHandles(t, l, donTopology.NodeOutput.Output) - if err != nil { - l.Error().Err(err).Msg("Failed to get log file handles. No debug information will be printed") - return - } - - defer func() { - for _, f := range logFiles { - _ = f.Close() - } - }() - - // assuming one bootstrap node - workflowNodeCount := len(donTopology.NodeOutput.CLNodes) - 1 - - if hasFlag(donTopology.Flags, WorkflowDON) { - if !checkIfWorkflowWasExecuting(logFiles, workflowNodeCount) { - l.Error().Msg("❌ Workflow was not executing") - return - } else { - l.Info().Msg("✅ Workflow was executing") - } - } - - if hasFlag(donTopology.Flags, OCR3Capability) { - if !checkIfOCRWasExecuting(logFiles, workflowNodeCount) { - l.Error().Msg("❌ OCR was not executing") - return - } else { - l.Info().Msg("✅ OCR was executing") - } - } - - if hasFlag(donTopology.Flags, WriteEVMCapability) { - if !checkIfAtLeastOneReportWasSent(logFiles, workflowNodeCount) { - l.Error().Msg("❌ Reports were not sent") - return - } else { - l.Info().Msg("✅ Reports were sent") - - // debug report transmissions - debugReportTransmissions(logFiles, l, keystoneEnv.Blockchain.Nodes[0].HostWSUrl) - } - } - - // Add support for new capabilities here as needed, if there is some specific debug information to be printed - } -} - -func checkIfLogsHaveText(logFiles []*os.File, bufferSize int, expectedText string, validationFn func(int) bool) bool { - wg := &sync.WaitGroup{} - - resultsCh := make(chan struct{}, bufferSize) - - for _, f := range logFiles { - wg.Add(1) - file := f - - go func() { - defer func() { - wg.Done() - // reset file pointer to the beginning of the file - // so that subsequent reads start from the beginning - _, _ = file.Seek(0, io.SeekStart) - }() - - scanner := bufio.NewScanner(file) - scanner.Split(bufio.ScanLines) - - for scanner.Scan() { - jsonLogLine := scanner.Text() - - if strings.Contains(jsonLogLine, expectedText) { - resultsCh <- struct{}{} - return - } - } - }() - } - - wg.Wait() - close(resultsCh) - - var found int - for range resultsCh { - found++ - } - - return validationFn(found) -} - -func exactCountValidationFn(expected int) func(int) bool { - return func(found int) bool { - return found == expected - } -} - -func checkIfWorkflowWasExecuting(logFiles []*os.File, workflowNodeCount int) bool { - return checkIfLogsHaveText(logFiles, workflowNodeCount, "step request enqueued", exactCountValidationFn(workflowNodeCount)) -} - -func checkIfOCRWasExecuting(logFiles []*os.File, workflowNodeCount int) bool { - return checkIfLogsHaveText(logFiles, workflowNodeCount, "✅ committed outcome", exactCountValidationFn(workflowNodeCount)) -} - -func checkIfAtLeastOneReportWasSent(logFiles []*os.File, workflowNodeCount int) bool { - // we are looking for "Node sent transaction" log entry, which might appear various times in the logs - // but most probably not in the logs of all nodes, since they take turns in sending reports - // our buffer must be large enough to capture all the possible log entries in order to avoid channel blocking - bufferSize := workflowNodeCount * 4 - - return checkIfLogsHaveText(logFiles, bufferSize, "Node sent transaction", func(found int) bool { return found > 0 }) -} - -func logTestInfo(l zerolog.Logger, feedId, workflowName, feedConsumerAddr, forwarderAddr string) { - l.Info().Msg("------ Test configuration:") - l.Info().Msgf("Feed ID: %s", feedId) - l.Info().Msgf("Workflow name: %s", workflowName) - l.Info().Msgf("FeedConsumer address: %s", feedConsumerAddr) - l.Info().Msgf("KeystoneForwarder address: %s", forwarderAddr) -} - -func float64ToBigInt(f float64) *big.Int { - f *= 100 - - bigFloat := new(big.Float).SetFloat64(f) - - bigInt := new(big.Int) - bigFloat.Int(bigInt) // Truncate towards zero - - return bigInt -} - -func setupFakeDataProvider(t *testing.T, testLogger zerolog.Logger, in *TestConfig, priceIndex *int) string { - _, err := fake.NewFakeDataProvider(in.PriceProvider.Fake.Input) - require.NoError(t, err) - fakeApiPath := "/fake/api/price" - fakeFinalUrl := fmt.Sprintf("%s:%d%s", framework.HostDockerInternal(), in.PriceProvider.Fake.Port, fakeApiPath) - - getPriceResponseFn := func() map[string]interface{} { - response := map[string]interface{}{ - "accountName": "TrueUSD", - "totalTrust": in.PriceProvider.Fake.Prices[*priceIndex], - "ripcord": false, - "updatedAt": time.Now().Format(time.RFC3339), - } - - marshalled, err := json.Marshal(response) - if err == nil { - testLogger.Info().Msgf("Returning response: %s", string(marshalled)) - } else { - testLogger.Info().Msgf("Returning response: %v", response) - } - - return response - } - - err = fake.Func("GET", fakeApiPath, func(c *gin.Context) { - c.JSON(200, getPriceResponseFn()) - }) - - require.NoError(t, err, "failed to set up fake data provider") - - return fakeFinalUrl -} - -func setupPriceProvider(t *testing.T, testLogger zerolog.Logger, in *TestConfig, keystoneEnv *KeystoneEnvironment) { - if in.PriceProvider.Fake != nil { - keystoneEnv.PriceProvider = NewFakePriceProvider(t, testLogger, in) - return - } - - keystoneEnv.PriceProvider = NewLivePriceProvider(t, testLogger, in) -} - -// PriceProvider abstracts away the logic of checking whether the feed has been correctly updated -// and it also returns port and URL of the price provider. This is so, because when using a mocked -// price provider we need start a separate service and whitelist its port and IP with the gateway job. -// Also, since it's a mocked price provider we can now check whether the feed has been correctly updated -// instead of only checking whether it has some price that's != 0. -type PriceProvider interface { - URL() string - NextPrice(price *big.Int, elapsed time.Duration) bool - CheckPrices() -} - -// LivePriceProvider is a PriceProvider implementation that uses a live feed to get the price, typically http://api.real-time-reserves.verinumus.io -type LivePriceProvider struct { - t *testing.T - testLogger zerolog.Logger - url string - actualPrices []*big.Int -} - -func NewLivePriceProvider(t *testing.T, testLogger zerolog.Logger, in *TestConfig) PriceProvider { - return &LivePriceProvider{ - testLogger: testLogger, - url: in.PriceProvider.URL, - t: t, - } -} - -func (l *LivePriceProvider) NextPrice(price *big.Int, elapsed time.Duration) bool { - // if price is nil or 0 it means that the feed hasn't been updated yet - if price == nil || price.Cmp(big.NewInt(0)) == 0 { - return true - } - - l.testLogger.Info().Msgf("Feed updated after %s - price set, price=%s", elapsed, price) - l.actualPrices = append(l.actualPrices, price) - - // no other price to return, we are done - return false -} - -func (l *LivePriceProvider) URL() string { - return l.url -} - -func (l *LivePriceProvider) CheckPrices() { - // we don't have a way to check the price in the live feed, so we always assume it's correct - // as long as it's != 0. And we only wait for the first price to be set. - require.NotEmpty(l.t, l.actualPrices, "no prices found in the feed") - require.NotEqual(l.t, l.actualPrices[0], big.NewInt(0), "price found in the feed is 0") -} - -// FakePriceProvider is a PriceProvider implementation that uses a mocked feed to get the price -// It returns a configured price sequence and makes sure that the feed has been correctly updated -type FakePriceProvider struct { - t *testing.T - testLogger zerolog.Logger - priceIndex *int - url string - expectedPrices []*big.Int - actualPrices []*big.Int -} - -func NewFakePriceProvider(t *testing.T, testLogger zerolog.Logger, in *TestConfig) PriceProvider { - priceIndex := ptr.Ptr(0) - expectedPrices := make([]*big.Int, len(in.PriceProvider.Fake.Prices)) - for i, p := range in.PriceProvider.Fake.Prices { - // convert float64 to big.Int by multiplying by 100 - // just like the PoR workflow does - expectedPrices[i] = float64ToBigInt(p) - } - - return &FakePriceProvider{ - t: t, - testLogger: testLogger, - expectedPrices: expectedPrices, - priceIndex: priceIndex, - url: setupFakeDataProvider(t, testLogger, in, priceIndex), - } -} - -func (f *FakePriceProvider) priceAlreadyFound(price *big.Int) bool { - for _, p := range f.actualPrices { - if p.Cmp(price) == 0 { - return true - } - } - - return false -} - -func (f *FakePriceProvider) NextPrice(price *big.Int, elapsed time.Duration) bool { - // if price is nil or 0 it means that the feed hasn't been updated yet - if price == nil || price.Cmp(big.NewInt(0)) == 0 { - return true - } - - if !f.priceAlreadyFound(price) { - f.testLogger.Info().Msgf("Feed updated after %s - price set, price=%s", elapsed, price) - f.actualPrices = append(f.actualPrices, price) - - if len(f.actualPrices) == len(f.expectedPrices) { - // all prices found, nothing more to check - return false - } else { - require.Less(f.t, len(f.actualPrices), len(f.expectedPrices), "more prices found than expected") - f.testLogger.Info().Msgf("Changing price provider price to %s", f.expectedPrices[len(f.actualPrices)].String()) - *f.priceIndex = len(f.actualPrices) - - // set new price and continue checking - return true - } - } - - // continue checking, price not updated yet - return true -} - -func (f *FakePriceProvider) CheckPrices() { - require.EqualValues(f.t, f.expectedPrices, f.actualPrices, "prices found in the feed do not match prices set in the mock") - f.testLogger.Info().Msgf("All %d mocked prices were found in the feed", len(f.expectedPrices)) -} - -func (f *FakePriceProvider) URL() string { - return f.url -} - -func startBlockchain(t *testing.T, in *TestConfig, keystoneEnv *KeystoneEnvironment) { - bc, err := blockchain.NewBlockchainNetwork(in.BlockchainA) - require.NoError(t, err, "failed to create blockchain network") - - pkey := os.Getenv("PRIVATE_KEY") - require.NotEmpty(t, pkey, "private key must not be empty") - - sc, err := seth.NewClientBuilder(). - WithRpcUrl(bc.Nodes[0].HostWSUrl). - WithPrivateKeys([]string{pkey}). - Build() - require.NoError(t, err, "failed to create seth client") - - chainSelector, err := chainselectors.SelectorFromChainId(sc.Cfg.Network.ChainID) - require.NoError(t, err, "failed to get chain selector for chain id %d", sc.Cfg.Network.ChainID) - - keystoneEnv.Blockchain = bc - keystoneEnv.SethClient = sc - keystoneEnv.DeployerPrivateKey = pkey - keystoneEnv.ChainSelector = chainSelector -} - -func extraAllowedPortsAndIps(t *testing.T, testLogger zerolog.Logger, in *TestConfig, nodeOutput *ns.Output) ([]string, []int) { - // no need to allow anything, if we are using live feed - if in.PriceProvider.Fake == nil { - return nil, nil - } - - // we need to explicitly allow the port used by the fake data provider - // and IP corresponding to host.docker.internal or the IP of the host machine, if we are running on Linux, - // because that's where the fake data provider is running - var hostIp string - var err error - - system := runtime.GOOS - switch system { - case "darwin": - hostIp, err = resolveHostDockerInternaIp(testLogger, nodeOutput) - require.NoError(t, err, "failed to resolve host.docker.internal IP") - case "linux": - // for linux framework already returns an IP, so we don't need to resolve it, - // but we need to remove the http:// prefix - hostIp = strings.ReplaceAll(framework.HostDockerInternal(), "http://", "") - default: - err = fmt.Errorf("unsupported OS: %s", system) - } - require.NoError(t, err, "failed to resolve host.docker.internal IP") - - testLogger.Info().Msgf("Will allow IP %s and port %d for the fake data provider", hostIp, in.PriceProvider.Fake.Port) - - // we also need to explicitly allow Gist's IP - return []string{hostIp, GistIP}, []int{in.PriceProvider.Fake.Port} -} -func TestKeystoneWithOCR3Workflow(t *testing.T) { - testLogger := framework.L - - // Load test configuration - in, err := framework.Load[TestConfig](t) - require.NoError(t, err, "couldn't load test config") - validateInputsAndEnvVars(t, in) - - keystoneEnv := &KeystoneEnvironment{} - - // Create a new blockchain network and Seth client to interact with it - startBlockchain(t, in, keystoneEnv) - - // Get either a no-op price provider (for live endpoint) - // or a fake price provider (for mock endpoint) - setupPriceProvider(t, testLogger, in, keystoneEnv) - - // Start job distributor - startJobDistributor(t, in, keystoneEnv) - - // Deploy the DONs - for _, nodeSet := range in.NodeSets { - startSingleNodeSet(t, nodeSet, keystoneEnv) - } - - // Prepare the chainlink/deployment environment, which also configures chains for nodes and job distributor - buildChainlinkDeploymentEnv(t, keystoneEnv) - - // Fund the nodes - fundNodes(t, keystoneEnv) - - buildDONTopology(t, in, keystoneEnv) - - // Deploy keystone contracts (forwarder, capability registry, ocr3 capability) - deployKeystoneContracts(t, testLogger, keystoneEnv) - - // Deploy and pre-configure workflow registry contract (using only workflow DON id) - prepareWorkflowRegistry(t, testLogger, keystoneEnv) - - // Deploy and configure Keystone Feeds Consumer contract - prepareFeedsConsumer(t, testLogger, in.WorkflowConfig.WorkflowName, keystoneEnv) - - // Register the workflow (either via CRE CLI or by calling the workflow registry directly; using only workflow DON id) - registerWorkflow(t, in, in.WorkflowConfig.WorkflowName, keystoneEnv) - - // update node configuration and create jobs - configureNodes(t, testLogger, in, keystoneEnv) - - // Log extra information that might help debugging - t.Cleanup(func() { - if t.Failed() { - logTestInfo(testLogger, in.PriceProvider.FeedID, in.WorkflowConfig.WorkflowName, keystoneEnv.KeystoneContractAddresses.FeedsConsumerAddress.Hex(), keystoneEnv.KeystoneContractAddresses.ForwarderAddress.Hex()) - - logDir := fmt.Sprintf("%s-%s", framework.DefaultCTFLogsDir, t.Name()) - - err := os.RemoveAll(logDir) - if err != nil { - testLogger.Error().Err(err).Msg("failed to remove log directory") - return - } - - _, err = framework.SaveContainerLogs(logDir) - if err != nil { - testLogger.Error().Err(err).Msg("failed to save container logs") - return - } - - printTestDebug(t, testLogger, keystoneEnv) - } - }) - - // CAUTION: It is crucial to configure OCR3 jobs on nodes before configuring the workflow contracts. - // Wait for OCR listeners to be ready before setting the configuration. - // If the ConfigSet event is missed, OCR protocol will not start. - // TODO make it fluent! - testLogger.Info().Msg("Waiting 30s for OCR listeners to be ready...") - time.Sleep(30 * time.Second) - testLogger.Info().Msg("Proceeding to set OCR3 configuration.") - - // Configure the workflow DON and contracts - configureContracts(t, keystoneEnv) - - // It can take a while before the first report is produced, particularly on CI. - timeout := 10 * time.Minute - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - feedsConsumerInstance, err := feeds_consumer.NewKeystoneFeedsConsumer(keystoneEnv.KeystoneContractAddresses.FeedsConsumerAddress, keystoneEnv.SethClient.Client) - require.NoError(t, err, "failed to create feeds consumer instance") - - testLogger.Info().Msg("Waiting for feed to update...") - startTime := time.Now() - feedBytes := common.HexToHash(in.PriceProvider.FeedID) - - for { - select { - case <-ctx.Done(): - testLogger.Error().Msgf("feed did not update, timeout after %s", timeout) - t.FailNow() - case <-time.After(10 * time.Second): - elapsed := time.Since(startTime).Round(time.Second) - price, _, err := feedsConsumerInstance.GetPrice( - keystoneEnv.SethClient.NewCallOpts(), - feedBytes, - ) - require.NoError(t, err, "failed to get price from Keystone Consumer contract") - - if !keystoneEnv.PriceProvider.NextPrice(price, elapsed) { - // check if all expected prices were found and finish the test - keystoneEnv.PriceProvider.CheckPrices() - return - } - testLogger.Info().Msgf("Feed not updated yet, waiting for %s", elapsed) - } - } -} From 569f7de99a46e3dba36e8d35372d9c602a70f4fe Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 15:50:54 -0400 Subject: [PATCH 46/53] fixes conflicts --- .../tests/smoke/capabilities/por_price_provider.go | 2 +- .../tests/smoke/capabilities/workflow_test.go | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/system-tests/tests/smoke/capabilities/por_price_provider.go b/system-tests/tests/smoke/capabilities/por_price_provider.go index e5afcc7eea0..7fe4ce18cc7 100644 --- a/system-tests/tests/smoke/capabilities/por_price_provider.go +++ b/system-tests/tests/smoke/capabilities/por_price_provider.go @@ -1,4 +1,4 @@ -package capabilities +package capabilities_test import ( "encoding/json" diff --git a/system-tests/tests/smoke/capabilities/workflow_test.go b/system-tests/tests/smoke/capabilities/workflow_test.go index 346120a6aa7..eeed08ff176 100644 --- a/system-tests/tests/smoke/capabilities/workflow_test.go +++ b/system-tests/tests/smoke/capabilities/workflow_test.go @@ -29,7 +29,6 @@ import ( "github.com/smartcontractkit/chainlink/deployment" cldlogger "github.com/smartcontractkit/chainlink/deployment/logger" - "github.com/smartcontractkit/chainlink/system-tests/tests/smoke/capabilities" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/keystone/generated/feeds_consumer" "github.com/smartcontractkit/chainlink/v2/core/logger" @@ -231,7 +230,7 @@ type registerPoRWorkflowInput struct { workflowRegistryAddress common.Address feedConsumerAddress common.Address capabilitiesRegistryAddress common.Address - priceProvider capabilities.PriceProvider + priceProvider PriceProvider sethClient *seth.Client deployerPrivateKey string blockchain *blockchain.Output @@ -485,7 +484,7 @@ func CreateInfrastructure( } type setupOutput struct { - priceProvider capabilities.PriceProvider + priceProvider PriceProvider feedsConsumerAddress common.Address forwarderAddress common.Address sethClient *seth.Client @@ -493,7 +492,7 @@ type setupOutput struct { donTopology *keystonetypes.DonTopology } -func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfig, priceProvider capabilities.PriceProvider, binaryDownloadOutput binaryDownloadOutput, mustSetCapabilitiesFn func(input []*ns.Input) []*keystonetypes.CapabilitiesAwareNodeSet) *setupOutput { +func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfig, priceProvider PriceProvider, binaryDownloadOutput binaryDownloadOutput, mustSetCapabilitiesFn func(input []*ns.Input) []*keystonetypes.CapabilitiesAwareNodeSet) *setupOutput { // Universal setup -- START envInput := InfrastructureInput{ jdInput: in.JD, @@ -565,7 +564,7 @@ func setupTestEnvironment(t *testing.T, testLogger zerolog.Logger, in *TestConfi // Allow extra IPs and ports for the fake data provider, which is running on host machine and requires explicit whitelisting var extraAllowedIPs []string var extraAllowedPorts []int - if _, ok := priceProvider.(*capabilities.FakePriceProvider); ok { + if _, ok := priceProvider.(*FakePriceProvider); ok { extraAllowedIPs, extraAllowedPorts, err = extraAllowedPortsAndIps(testLogger, in.Fake.Port, envOutput.donTopology.MetaDons[0].NodeOutput.Output) require.NoError(t, err, "failed to get extra allowed ports and IPs") } @@ -729,7 +728,7 @@ func TestKeystoneWithOCR3Workflow_SingleDon_MockedPrice(t *testing.T) { } } - priceProvider, priceErr := capabilities.NewFakePriceProvider(testLogger, in.Fake) + priceProvider, priceErr := NewFakePriceProvider(testLogger, in.Fake) require.NoError(t, priceErr, "failed to create fake price provider") setupOutput := setupTestEnvironment(t, testLogger, in, priceProvider, *binaryDownloadOutput, mustSetCapabilitiesFn) @@ -817,7 +816,7 @@ func TestKeystoneWithOCR3Workflow_TwoDons_LivePrice(t *testing.T) { } } - priceProvider := capabilities.NewTrueUSDPriceProvider(testLogger) + priceProvider := NewTrueUSDPriceProvider(testLogger) setupOutput := setupTestEnvironment(t, testLogger, in, priceProvider, *binaryDownloadOutput, mustSetCapabilitiesFn) // Log extra information that might help debugging From a62d10aeb46e2e7421713c3917aff45f63dd0ae4 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 15:56:46 -0400 Subject: [PATCH 47/53] Updates comment --- deployment/keystone/changeset/internal/ocr3config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deployment/keystone/changeset/internal/ocr3config.go b/deployment/keystone/changeset/internal/ocr3config.go index 64c588aecf0..39f1c3817b2 100644 --- a/deployment/keystone/changeset/internal/ocr3config.go +++ b/deployment/keystone/changeset/internal/ocr3config.go @@ -279,8 +279,7 @@ func GenerateOCR3Config(cfg OracleConfig, nca []NodeKeys, secrets deployment.OCR } // let's keep reqTimeout as nil if it's 0, so we can use the default value within `chainlink-common`. - // See: https://github.com/smartcontractkit/chainlink-common/pull/1023/files#diff-dfda85aab0705d57a7fa2b7fba150451a32b6961655d67f79f23da8a3ad57614R73 - // TODO: update link after PR gets merged + // See: https://github.com/smartcontractkit/chainlink-common/blob/main/pkg/capabilities/consensus/ocr3/factory.go#L73 var reqTimeout *durationpb.Duration if cfg.RequestTimeout > 0 { reqTimeout = durationpb.New(cfg.RequestTimeout) From 8b84cd84415eb274868c41de2a4b0d7d62bea987 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 16:15:07 -0400 Subject: [PATCH 48/53] gomods tidy --- integration-tests/go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 7f6661815c4..5c0b1130e0c 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -593,8 +593,6 @@ github.com/go-webauthn/webauthn v0.9.4 h1:YxvHSqgUyc5AK2pZbqkWWR55qKeDPhP8zLDr6l github.com/go-webauthn/webauthn v0.9.4/go.mod h1:LqupCtzSef38FcxzaklmOn7AykGKhAhr9xlRbdbgnTw= github.com/go-webauthn/x v0.1.5 h1:V2TCzDU2TGLd0kSZOXdrqDVV5JB9ILnKxA9S53CSBw0= github.com/go-webauthn/x v0.1.5/go.mod h1:qbzWwcFcv4rTwtCLOZd+icnr6B7oSsAGZJqlt8cukqY= -github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o= -github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/go-zookeeper/zk v1.0.3 h1:7M2kwOsc//9VeeFiPtf+uSJlVpU66x9Ba5+8XK7/TDg= github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= From e44dc3a8c84ad9d6a8d05d13fba891cd9ed57012 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 16:15:11 -0400 Subject: [PATCH 49/53] gomods tidy --- integration-tests/go.mod | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 230a0b3f540..ea30dd6990f 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -28,11 +28,8 @@ require ( github.com/deckarep/golang-set/v2 v2.6.0 github.com/ethereum/go-ethereum v1.15.0 github.com/fxamacker/cbor/v2 v2.7.0 - github.com/gin-gonic/gin v1.10.0 github.com/go-resty/resty/v2 v2.15.3 - github.com/go-yaml/yaml v2.1.0+incompatible github.com/google/go-cmp v0.6.0 - github.com/google/go-github/v41 v41.0.0 github.com/google/uuid v1.6.0 github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 @@ -53,7 +50,6 @@ require ( github.com/smartcontractkit/chainlink-common v0.4.2-0.20250221174903-e1e47fdb11b0 github.com/smartcontractkit/chainlink-integrations/evm v0.0.0-20250213145514-41d874782c02 github.com/smartcontractkit/chainlink-protos/job-distributor v0.9.0 - github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 github.com/smartcontractkit/chainlink-testing-framework/lib v1.51.0 github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0 @@ -71,7 +67,6 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/crypto v0.32.0 golang.org/x/exp v0.0.0-20250128182459-e0ece0dbea4c - golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.10.0 golang.org/x/text v0.21.0 google.golang.org/grpc v1.67.1 @@ -217,6 +212,7 @@ require ( github.com/getsentry/sentry-go v0.27.0 // indirect github.com/gin-contrib/sessions v0.0.5 // indirect github.com/gin-contrib/sse v0.1.0 // indirect + github.com/gin-gonic/gin v1.10.0 // indirect github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-json-experiment/json v0.0.0-20231102232822-2e55bd4e08b0 // indirect @@ -259,6 +255,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/flatbuffers v24.3.25+incompatible // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect + github.com/google/go-github/v41 v41.0.0 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/go-tpm v0.9.0 // indirect github.com/google/gofuzz v1.2.0 // indirect @@ -440,6 +437,7 @@ require ( github.com/smartcontractkit/chainlink-protos/rmn/v1.6/go v0.0.0-20250131130834-15e0d4cde2a6 // indirect github.com/smartcontractkit/chainlink-protos/svr v0.0.0-20250123084029-58cce9b32112 // indirect github.com/smartcontractkit/chainlink-solana v1.1.2-0.20250213203720-e15b1333a14a // indirect + github.com/smartcontractkit/chainlink-testing-framework/framework v0.5.0 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect github.com/smartcontractkit/mcms v0.10.0 // indirect github.com/smartcontractkit/tdh2/go/ocr2/decryptionplugin v0.0.0-20241009055228-33d0c0bf38de // indirect @@ -515,6 +513,7 @@ require ( golang.org/x/arch v0.11.0 // indirect golang.org/x/mod v0.22.0 // indirect golang.org/x/net v0.34.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.29.0 // indirect golang.org/x/term v0.28.0 // indirect golang.org/x/time v0.7.0 // indirect From 3ec8385116e71b2360aeccff16341a1f319e22c8 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Fri, 21 Feb 2025 21:19:24 -0400 Subject: [PATCH 50/53] Renames property correctly --- core/scripts/keystone/ocr_config.json | 2 +- core/scripts/keystone/src/generate_local_ocr3_config.go | 2 +- core/scripts/keystone/src/testdata/SampleConfig.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scripts/keystone/ocr_config.json b/core/scripts/keystone/ocr_config.json index 6e417ca3a67..54ab3925755 100644 --- a/core/scripts/keystone/ocr_config.json +++ b/core/scripts/keystone/ocr_config.json @@ -3,7 +3,7 @@ "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxRequestBatchSize": 1000, + "MaxBatchSize": 1000, "UniqueReports": true, "DeltaProgressMillis": 5000, diff --git a/core/scripts/keystone/src/generate_local_ocr3_config.go b/core/scripts/keystone/src/generate_local_ocr3_config.go index 9605415946e..b21492583ab 100644 --- a/core/scripts/keystone/src/generate_local_ocr3_config.go +++ b/core/scripts/keystone/src/generate_local_ocr3_config.go @@ -76,7 +76,7 @@ func (g *generateLocalOCR3Config) Run(args []string) { "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxRequestBatchSize": 1000, + "MaxBatchSize": 1000, "UniqueReports": true, "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, diff --git a/core/scripts/keystone/src/testdata/SampleConfig.json b/core/scripts/keystone/src/testdata/SampleConfig.json index f45d7d4a9cd..ace6879e2d4 100644 --- a/core/scripts/keystone/src/testdata/SampleConfig.json +++ b/core/scripts/keystone/src/testdata/SampleConfig.json @@ -3,7 +3,7 @@ "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxRequestBatchSize": 1000, + "MaxBatchSize": 1000, "UniqueReports": true, "RequestTimeout": "30s", "DeltaProgressMillis": 5000, From 97e2bfb85ee7e71acaeec5fb26621559c5b95855 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Mon, 24 Feb 2025 12:10:39 -0400 Subject: [PATCH 51/53] Sets lower `MaxBatchSize` on examples/tests --- core/scripts/keystone/src/testdata/SampleConfig.json | 2 +- deployment/keystone/changeset/internal/ocr3config_test.go | 2 +- deployment/keystone/changeset/view_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/scripts/keystone/src/testdata/SampleConfig.json b/core/scripts/keystone/src/testdata/SampleConfig.json index ace6879e2d4..d39dc759af7 100644 --- a/core/scripts/keystone/src/testdata/SampleConfig.json +++ b/core/scripts/keystone/src/testdata/SampleConfig.json @@ -3,7 +3,7 @@ "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxBatchSize": 1000, + "MaxBatchSize": 20, "UniqueReports": true, "RequestTimeout": "30s", "DeltaProgressMillis": 5000, diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index 582be5dea2a..747cc015ae9 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -59,7 +59,7 @@ var ocr3Cfg = ` "MaxReportLengthBytes": 1000000, "MaxOutcomeLengthBytes": 1000000, "MaxReportCount": 20, - "MaxBatchSize": 1000, + "MaxBatchSize": 20, "OutcomePruningThreshold": 3600, "UniqueReports": true, "RequestTimeout": "30s", diff --git a/deployment/keystone/changeset/view_test.go b/deployment/keystone/changeset/view_test.go index f1e478f1fcb..aa21ba4619b 100644 --- a/deployment/keystone/changeset/view_test.go +++ b/deployment/keystone/changeset/view_test.go @@ -36,7 +36,7 @@ var oracleConfig = changeset.OracleConfig{ MaxReportLengthBytes: 1000000, MaxOutcomeLengthBytes: 1000000, MaxReportCount: 20, - MaxBatchSize: 1000, + MaxBatchSize: 20, OutcomePruningThreshold: 3600, UniqueReports: true, RequestTimeout: 30 * time.Second, From 6179fe757be689e6f2c32b4b57dbd756f8b9da01 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Mon, 24 Feb 2025 12:20:01 -0400 Subject: [PATCH 52/53] Sets lower `MaxBatchSize` on examples/tests --- core/scripts/keystone/ocr_config.json | 2 +- core/scripts/keystone/src/generate_local_ocr3_config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/scripts/keystone/ocr_config.json b/core/scripts/keystone/ocr_config.json index 54ab3925755..96691e48620 100644 --- a/core/scripts/keystone/ocr_config.json +++ b/core/scripts/keystone/ocr_config.json @@ -3,7 +3,7 @@ "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxBatchSize": 1000, + "MaxBatchSize": 20, "UniqueReports": true, "DeltaProgressMillis": 5000, diff --git a/core/scripts/keystone/src/generate_local_ocr3_config.go b/core/scripts/keystone/src/generate_local_ocr3_config.go index b21492583ab..5dff8019179 100644 --- a/core/scripts/keystone/src/generate_local_ocr3_config.go +++ b/core/scripts/keystone/src/generate_local_ocr3_config.go @@ -76,7 +76,7 @@ func (g *generateLocalOCR3Config) Run(args []string) { "MaxQueryLengthBytes": 1000000, "MaxObservationLengthBytes": 1000000, "MaxReportLengthBytes": 1000000, - "MaxBatchSize": 1000, + "MaxBatchSize": 20, "UniqueReports": true, "DeltaProgressMillis": 5000, "DeltaResendMillis": 5000, From 357a1cb4437d18a48bcd6081c5f05c1d50c537b5 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Mon, 24 Feb 2025 12:53:05 -0400 Subject: [PATCH 53/53] Fixes test --- deployment/keystone/changeset/internal/ocr3config_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/keystone/changeset/internal/ocr3config_test.go b/deployment/keystone/changeset/internal/ocr3config_test.go index 747cc015ae9..1c7f8e5b7ef 100644 --- a/deployment/keystone/changeset/internal/ocr3config_test.go +++ b/deployment/keystone/changeset/internal/ocr3config_test.go @@ -49,7 +49,7 @@ var wantOCR3Config = `{ "F": 3, "OnchainConfig": "0x", "OffchainConfigVersion": 30, - "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020092021c08c0843d10c0843d18c0843d20c0843d281430e80738901c4202081e98028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" + "OffchainConfig": "0xc80180e497d012d00180e497d012d80180a8d6b907e00180cab5ee01e80180d88ee16ff0010afa01010a82022003dacd15fc96c965c648e3623180de002b71a97cf6eeca9affb91f461dcd6ce1820220255096a3b7ade10e29c648e0b407fc486180464f713446b1da04f013df6179c8820220dba3c61e5f8bec594be481bcaf67ecea0d1c2950edb15b158ce3dbc77877def3820220b4c4993d6c15fee63800db901a8b35fa419057610962caab1c1d7bed557091278202202a4c7dec127fdd8145e48c5edb9467225098bd8c8ad1dade868325b787affbde820220283471ed66d61fbe11f64eff65d738b59a0301c9a4f846280db26c64c9fdd3f8820220aa3419628ea3536783742d17d8adf05681aa6a6bd2b206fbde78c7e5aa38586d82022001496edce35663071d74472e02119432ba059b3904d205e4358014410e4f2be3820220ad08c2a5878cada53521f4e2bb449f191ccca7899246721a0deeea19f7b83f70820220c805572b813a072067eab2087ddbee8aa719090e12890b15c01094f0d3f74a5f8a02008a02008a02008a02008a02008a02008a02008a02008a02008a020092021b08c0843d10c0843d18c0843d20c0843d2814301438901c4202081e98028094ebdc03a0028094ebdc03a8028094ebdc03b0028094ebdc03ba02f8010a20da47a8cc1c10796dd43f98ed113c648625e2e504c16ac5da9c65669e2377241b1220f5beca3bb11406079dc174183105c474c862a73c257ce8b3d9f5ca065e6264691a10805015e4203740495a23e93c1bd06ba81a10ca58ff36ffb0545dc3f800ddd6f8d0481a1076f664639ca8b5209e488895faa5460f1a104a1e89a7f2d8c89158f18856bf289c2a1a10c2f4330787831f419713ad4990e347d31a10fd403ec0797c001a2794b51d6178916d1a10e14fff88fdd3d1554ed861104ddc56a81a10b0284b9817fec2c3066c6f2651d17fc41a10b090233a67d502f78191c9e19a2a032b1a10e483414860bb612af50ee15ce8cd8ef5c00280e497d012c8028094ebdc03" }` var ocr3Cfg = `