Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TT-791] Migrate OCRv1/v2 tests from EVMClient to Seth #12076

Merged
merged 24 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e901161
use simple bash script to set BASE64 env var
Tofel Feb 13, 2024
10297e6
Merge branch 'tt_878_easier_soak_load_test_run' into tt_791_seth_ocr_…
Tofel Feb 14, 2024
bc27459
added some OCR actions that use Seth, refactored others to use it if …
Tofel Feb 16, 2024
e5ccdbd
move ocr2 smoke tests to seth
Tofel Feb 23, 2024
63f62c5
don't panic, when network is not known to Seth, use defaults instead
Tofel Feb 23, 2024
d486f33
restore some old ocr helper functions
Tofel Feb 23, 2024
e19eb7f
add chain-of-responsibility-based fund returning function
Tofel Feb 23, 2024
85787f0
Merge branch 'develop' into tt_791_seth_ocr_tests
Tofel Feb 26, 2024
707d948
fix some bugs, add Deprecated comments to deprecated functions, add l…
Tofel Feb 26, 2024
da62d82
small streamlines
Tofel Feb 26, 2024
605a4f0
fix lints
Tofel Feb 26, 2024
a07a805
go mod tidy, use latest Seth
Tofel Feb 26, 2024
cb8540c
more go.mod
Tofel Feb 26, 2024
909fc5b
lints + more go.mods
Tofel Feb 26, 2024
dc3c626
use EVMClient by default when building docker test env
Tofel Feb 26, 2024
43d3b52
ignore code duplication in files that will be deleted when we finish …
Tofel Feb 26, 2024
13671b5
fixed forwarder soak test
Tofel Feb 26, 2024
7ec024d
change flow so that OCRv2 soak tests can run with forwarders
Tofel Feb 26, 2024
a47d56e
Merge branch 'develop' into tt_791_seth_ocr_tests
Tofel Feb 27, 2024
c300f44
code review changes
Tofel Feb 27, 2024
b3d99cf
merge 2 interfaces + move OCRv1 smoke tests to Seth
Tofel Feb 27, 2024
991d4fb
add method for funding CL nodes from root private key
Tofel Feb 27, 2024
7002b7e
Merge branch 'develop' into tt_791_seth_ocr_tests
Tofel Feb 28, 2024
cff5d09
Merge branch 'develop' into tt_791_seth_ocr_tests
Tofel Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ require (
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/XSAM/otelsql v0.27.0 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/avast/retry-go/v4 v4.5.1 // indirect
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
Expand Down Expand Up @@ -298,7 +298,7 @@ require (
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
go.uber.org/ratelimit v0.3.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1L
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
Expand All @@ -157,6 +156,8 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -1411,8 +1412,9 @@ go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKY
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA=
go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg=
go.uber.org/ratelimit v0.3.0 h1:IdZd9wqvFXnvLvSEBo0KPcGfkoBGNkpTHlrE3Rcjkjw=
go.uber.org/ratelimit v0.3.0/go.mod h1:So5LG7CV1zWpY1sHe+DXTJqQvOx+FFPFaAs2SnoyBaI=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/armon/go-metrics v0.4.1 // indirect
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 // indirect
github.com/benbjohnson/clock v1.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
Expand Down Expand Up @@ -315,7 +315,7 @@ require (
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
go.uber.org/ratelimit v0.3.0 // indirect
golang.org/x/arch v0.7.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ github.com/alexbrainman/sspi v0.0.0-20210105120005-909beea2cc74/go.mod h1:cEWa1L
github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc=
github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI=
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg=
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
Expand All @@ -161,6 +160,8 @@ github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59 h1:WWB576BN5zNSZc
github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I=
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
Expand Down Expand Up @@ -1406,8 +1407,9 @@ go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKY
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA=
go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg=
go.uber.org/ratelimit v0.3.0 h1:IdZd9wqvFXnvLvSEBo0KPcGfkoBGNkpTHlrE3Rcjkjw=
go.uber.org/ratelimit v0.3.0/go.mod h1:So5LG7CV1zWpY1sHe+DXTJqQvOx+FFPFaAs2SnoyBaI=
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
Expand Down
18 changes: 5 additions & 13 deletions integration-tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ test_node_migrations: install_gotestfmt ## Run all node migration tests.
go test -timeout 1h -count=1 -json $(args) ./migration 2>&1 | tee /tmp/gotest.log | gotestfmt

.PHONY: test_node_migrations_simulated
test_node_migrations_simulated: install_gotestfmt
test_node_migrations_simulated: install_gotestfmt
TEST_LOG_LEVEL="disabled" \
go test -timeout 1h -count=1 -json $(args) ./migration 2>&1 | tee /tmp/gotest.log | gotestfmt

Expand All @@ -145,30 +145,22 @@ test_node_migrations_simulated_verbose:
# Soak
.PHONY: test_soak_ocr
test_soak_ocr:
go test -v -count=1 -run TestOCRSoak ./soak

.PHONY: test_soak_ocr_simulated
test_soak_ocr_simulated:
. ./scripts/check_base64_env_var.sh
go test -v -count=1 -run TestOCRSoak ./soak

.PHONY: test_soak_forwarder_ocr
test_soak_forwarder_ocr:
go test -v -count=1 -run TestForwarderOCRSoak ./soak

.PHONY: test_soak_forwarder_ocr_simulated
test_soak_forwarder_ocr_simulated:
. ./scripts/check_base64_env_var.sh
go test -v -count=1 -run TestForwarderOCRSoak ./soak

.PHONY: test_soak_automation
test_soak_automation:
go test -v -run ^TestAutomationBenchmark$$ ./benchmark -count=1

.PHONY: test_soak_automation_simulated
test_soak_automation_simulated:
. ./scripts/check_base64_env_var.sh
go test -v -run ^TestAutomationBenchmark$$ ./benchmark -count=1

.PHONY: test_benchmark_automation
test_benchmark_automation: ## Run the automation benchmark tests
. ./scripts/check_base64_env_var.sh
go test -timeout 30m -v -run ^TestAutomationBenchmark$$ ./benchmark -count=1

.PHONY: test_reorg_automation
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/actions/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ import (
// Example: When deploying 1000 contracts, stop every ContractDeploymentInterval have been deployed to wait before continuing
var ContractDeploymentInterval = 200

// FundChainlinkNodes will fund all of the provided Chainlink nodes with a set amount of native currency
// FundChainlinkNodes will fund all of the provided Chainlink nodes with a set amountCreateOCRv2Jobs of native currency
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.FundChainlinkNodes
func FundChainlinkNodes(
nodes []*client.ChainlinkK8sClient,
client blockchain.EVMClient,
Expand Down Expand Up @@ -303,6 +304,7 @@ func TeardownSuite(

// TeardownRemoteSuite is used when running a test within a remote-test-runner, like for long-running performance and
// soak tests
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.TeardownRemoteSuite
func TeardownRemoteSuite(
t *testing.T,
namespace string,
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/actions/actions_local.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Package actions enables common chainlink interactions
package actions

import (
"github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"
)
import "github.com/smartcontractkit/chainlink/integration-tests/docker/test_env"

// UpgradeChainlinkNodeVersions upgrades all Chainlink nodes to a new version, and then runs the test environment
// to apply the upgrades
Expand Down
4 changes: 3 additions & 1 deletion integration-tests/actions/ocr2_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
)

// DeployOCRv2Contracts deploys a number of OCRv2 contracts and configures them with defaults
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.DeployOCRv2Contracts
func DeployOCRv2Contracts(
numberOfContracts int,
linkTokenContract contracts.LinkToken,
Expand Down Expand Up @@ -85,6 +86,7 @@ func DeployOCRv2Contracts(
return ocrInstances, client.WaitForEvents()
}

// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.ConfigureOCRv2AggregatorContracts
func ConfigureOCRv2AggregatorContracts(
client blockchain.EVMClient,
contractConfig *contracts.OCRv2Config,
Expand Down Expand Up @@ -266,7 +268,7 @@ func CreateOCRv2Jobs(
workerChainlinkNodes []*client.ChainlinkK8sClient,
mockserver *ctfClient.MockserverClient,
mockServerValue int, // Value to get from the mock server when querying the path
chainId uint64, // EVM chain ID
chainId int64, // EVM chain ID
forwardingAllowed bool,
) error {
// Collect P2P ID
Expand Down
17 changes: 10 additions & 7 deletions integration-tests/actions/ocr_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
// This actions file often returns functions, rather than just values. These are used as common test helpers, and are
// handy to have returning as functions so that Ginkgo can use them in an aesthetically pleasing way.

// DeployOCRContracts deploys and funds a certain number of offchain aggregator contracts
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.DeployOCRContracts
func DeployOCRContracts(
numberOfContracts int,
linkTokenContract contracts.LinkToken,
Expand Down Expand Up @@ -90,7 +90,7 @@ func DeployOCRContracts(
for contractCount, ocrInstance := range ocrInstances {
// Exclude the first node, which will be used as a bootstrapper
err = ocrInstance.SetConfig(
workerNodes,
contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(workerNodes),
contracts.DefaultOffChainAggregatorConfig(len(workerNodes)),
transmitterAddresses,
)
Expand All @@ -113,6 +113,7 @@ func DeployOCRContracts(

// DeployOCRContractsForwarderFlow deploys and funds a certain number of offchain
// aggregator contracts with forwarders as effectiveTransmitters
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.DeployOCRContractsForwarderFlow
func DeployOCRContractsForwarderFlow(
t *testing.T,
numberOfContracts int,
Expand Down Expand Up @@ -163,7 +164,7 @@ func DeployOCRContractsForwarderFlow(
for contractCount, ocrInstance := range ocrInstances {
// Exclude the first node, which will be used as a bootstrapper
err = ocrInstance.SetConfig(
workerNodes,
contracts.ChainlinkK8sClientToChainlinkNodeWithKeysAndAddress(workerNodes),
contracts.DefaultOffChainAggregatorConfig(len(workerNodes)),
forwarderAddresses,
)
Expand Down Expand Up @@ -267,7 +268,7 @@ func CreateOCRJobsWithForwarder(
workerNodes []*client.ChainlinkK8sClient,
mockValue int,
mockserver *ctfClient.MockserverClient,
evmChainID string,
evmChainID int64,
) {
for _, ocrInstance := range ocrInstances {
bootstrapP2PIds, err := bootstrapNode.MustReadP2PKeys()
Expand All @@ -276,7 +277,7 @@ func CreateOCRJobsWithForwarder(
bootstrapSpec := &client.OCRBootstrapJobSpec{
Name: fmt.Sprintf("bootstrap-%s", uuid.New().String()),
ContractAddress: ocrInstance.Address(),
EVMChainID: evmChainID,
EVMChainID: fmt.Sprint(evmChainID),
P2PPeerID: bootstrapP2PId,
IsBootstrapPeer: true,
}
Expand Down Expand Up @@ -307,7 +308,7 @@ func CreateOCRJobsWithForwarder(
bootstrapPeers := []*client.ChainlinkClient{bootstrapNode.ChainlinkClient}
ocrSpec := &client.OCRTaskJobSpec{
ContractAddress: ocrInstance.Address(),
EVMChainID: evmChainID,
EVMChainID: fmt.Sprint(evmChainID),
P2PPeerID: nodeP2PId,
P2PBootstrapPeers: bootstrapPeers,
KeyBundleID: nodeOCRKeyId,
Expand All @@ -322,6 +323,7 @@ func CreateOCRJobsWithForwarder(
}

// StartNewRound requests a new round from the ocr contracts and waits for confirmation
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.StartNewRound
func StartNewRound(
roundNumber int64,
ocrInstances []contracts.OffchainAggregator,
Expand All @@ -345,6 +347,7 @@ func StartNewRound(

// WatchNewRound watches for a new OCR round, similarly to StartNewRound, but it does not explicitly request a new
// round from the contract, as this can cause some odd behavior in some cases
// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.WatchNewRound
func WatchNewRound(
roundNumber int64,
ocrInstances []contracts.OffchainAggregator,
Expand Down Expand Up @@ -430,7 +433,7 @@ func SetAllAdapterResponsesToDifferentValues(
}

// BuildNodeContractPairID builds a UUID based on a related pair of a Chainlink node and OCR contract
func BuildNodeContractPairID(node *client.ChainlinkK8sClient, ocrInstance contracts.OffchainAggregator) (string, error) {
func BuildNodeContractPairID(node contracts.ChainlinkNodeWithKeysAndAddress, ocrInstance contracts.OffchainAggregator) (string, error) {
if node == nil {
return "", fmt.Errorf("chainlink node is nil")
}
Expand Down
31 changes: 8 additions & 23 deletions integration-tests/actions/ocr_helpers_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ func DeployOCRContractsLocal(
if err != nil {
return nil, fmt.Errorf("getting node common addresses should not fail: %w", err)
}

for _, ocrInstance := range ocrInstances {
// Exclude the first node, which will be used as a bootstrapper
err = ocrInstance.SetConfigLocal(
workerNodes,
err = ocrInstance.SetConfig(
contracts.ChainlinkClientToChainlinkNodeWithKeysAndAddress(workerNodes),
contracts.DefaultOffChainAggregatorConfig(len(workerNodes)),
transmitterAddresses,
)
Expand Down Expand Up @@ -182,7 +183,7 @@ func CreateOCRJobsLocal(
}
nodeOCRKeyId := nodeOCRKeys.Data[0].ID

nodeContractPairID, err := BuildNodeContractPairIDLocal(node, ocrInstance)
nodeContractPairID, err := BuildNodeContractPairID(node, ocrInstance)
if err != nil {
return err
}
Expand Down Expand Up @@ -218,29 +219,13 @@ func CreateOCRJobsLocal(
return nil
}

func BuildNodeContractPairIDLocal(node *client.ChainlinkClient, ocrInstance contracts.OffchainAggregator) (string, error) {
if node == nil {
return "", fmt.Errorf("chainlink node is nil")
}
if ocrInstance == nil {
return "", fmt.Errorf("OCR Instance is nil")
}
nodeAddress, err := node.PrimaryEthAddress()
if err != nil {
return "", fmt.Errorf("getting chainlink node's primary ETH address failed: %w", err)
}
shortNodeAddr := nodeAddress[2:12]
shortOCRAddr := ocrInstance.Address()[2:12]
return strings.ToLower(fmt.Sprintf("node_%s_contract_%s", shortNodeAddr, shortOCRAddr)), nil
}

func SetAdapterResponseLocal(
response int,
ocrInstance contracts.OffchainAggregator,
chainlinkNode *client.ChainlinkClient,
mockAdapter *test_env.Killgrave,
) error {
nodeContractPairID, err := BuildNodeContractPairIDLocal(chainlinkNode, ocrInstance)
nodeContractPairID, err := BuildNodeContractPairID(chainlinkNode, ocrInstance)
if err != nil {
return err
}
Expand Down Expand Up @@ -342,8 +327,8 @@ func DeployOCRContractsForwarderFlowLocal(
// Set Config
for _, ocrInstance := range ocrInstances {
// Exclude the first node, which will be used as a bootstrapper
err := ocrInstance.SetConfigLocal(
workerNodes,
err := ocrInstance.SetConfig(
contracts.ChainlinkClientToChainlinkNodeWithKeysAndAddress(workerNodes),
contracts.DefaultOffChainAggregatorConfig(len(workerNodes)),
forwarderAddresses,
)
Expand Down Expand Up @@ -399,7 +384,7 @@ func CreateOCRJobsWithForwarderLocal(
}
nodeOCRKeyId := nodeOCRKeys.Data[0].ID

nodeContractPairID, err := BuildNodeContractPairIDLocal(node, ocrInstance)
nodeContractPairID, err := BuildNodeContractPairID(node, ocrInstance)
if err != nil {
return err
}
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/actions/operator_forwarder_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/smartcontractkit/chainlink/integration-tests/contracts"
)

// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.DeployForwarderContracts
func DeployForwarderContracts(
t *testing.T,
contractDeployer contracts.ContractDeployer,
Expand Down Expand Up @@ -49,6 +50,7 @@ func DeployForwarderContracts(
return operators, authorizedForwarders, operatorFactoryInstance
}

// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.AcceptAuthorizedReceiversOperator
func AcceptAuthorizedReceiversOperator(
t *testing.T,
operator common.Address,
Expand Down Expand Up @@ -178,6 +180,7 @@ func SubscribeOperatorFactoryEvents(
}()
}

// Deprecated: we are moving away from blockchain.EVMClient, use actions_seth.TrackForwarder
func TrackForwarder(
t *testing.T,
chainClient blockchain.EVMClient,
Expand Down
Loading
Loading