From 7bbaeaa1d18d314d15fa07d1aaf9ff2d3e498ec5 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 20 Nov 2023 14:22:56 -0800 Subject: [PATCH 1/7] added kava for soak testing --- .github/workflows/on-demand-ocr-soak-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index 567d9510de9..e22475ae044 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -30,6 +30,8 @@ on: - "KROMA_SEPOLIA" - "WEMIX_TESTNET" - "WEMIX_MAINNET" + - "Kava_MAINNET" + - "Kava_TESTNET" fundingPrivateKey: description: Private funding key (Skip for Simulated) required: false From 63f8b8faaff738bb8d3c4a067e6fbb96aebbbe36 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 20 Nov 2023 15:11:43 -0800 Subject: [PATCH 2/7] more setup --- common/config/chaintype.go | 5 ++- .../config/toml/defaults/Kava_Mainnet.toml | 45 +++++++++++++++++++ .../config/toml/defaults/Kava_Testnet.toml | 26 +++++++++++ .../contracts/contract_deployer.go | 6 +++ 4 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 core/chains/evm/config/toml/defaults/Kava_Mainnet.toml create mode 100644 core/chains/evm/config/toml/defaults/Kava_Testnet.toml diff --git a/common/config/chaintype.go b/common/config/chaintype.go index 21fb8cd297d..3993940d0ef 100644 --- a/common/config/chaintype.go +++ b/common/config/chaintype.go @@ -18,16 +18,17 @@ const ( ChainWeMix ChainType = "wemix" ChainKroma ChainType = "kroma" ChainZkSync ChainType = "zksync" + ChainKava ChainType = "kava" ) var ErrInvalidChainType = fmt.Errorf("must be one of %s or omitted", strings.Join([]string{ string(ChainArbitrum), string(ChainMetis), string(ChainXDai), string(ChainOptimismBedrock), string(ChainCelo), - string(ChainKroma), string(ChainWeMix), string(ChainZkSync)}, ", ")) + string(ChainKroma), string(ChainWeMix), string(ChainZkSync), string(ChainKava)}, ", ")) // IsValid returns true if the ChainType value is known or empty. func (c ChainType) IsValid() bool { switch c { - case "", ChainArbitrum, ChainMetis, ChainOptimismBedrock, ChainXDai, ChainCelo, ChainKroma, ChainWeMix, ChainZkSync: + case "", ChainArbitrum, ChainMetis, ChainOptimismBedrock, ChainXDai, ChainCelo, ChainKroma, ChainWeMix, ChainZkSync, ChainKava: return true } return false diff --git a/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml b/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml new file mode 100644 index 00000000000..071b88c64db --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml @@ -0,0 +1,45 @@ +ChainID = '2222' +ChainType = 'kava-mainnet' +FinalityDepth = 1 +LogPollInterval = '6s' +NoNewHeadsThreshold = '40s' +MinIncomingConfirmations = 1 + + + + +[GasEstimator] + +EIP1559DynamicFees = false +PriceMin = '1 wei' +BumpMin = '100 wei' + + + + +[GasEstimator.BlockHistory] +BlockHistorySize = 24 + + + + +[Transactions] +ResendAfterThreshold = '30s' + + + + +[HeadTracker] +HistoryDepth = 400 + + + + +[NodePool] +SyncThreshold = 10 + + + + +[OCR] +ContractConfirmations = 1 \ No newline at end of file diff --git a/core/chains/evm/config/toml/defaults/Kava_Testnet.toml b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml new file mode 100644 index 00000000000..2311ef8f7ad --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml @@ -0,0 +1,26 @@ +ChainID = '2221' +ChainType = 'kava-testnet' +FinalityDepth = 1 +LogPollInterval = '6s' +NoNewHeadsThreshold = '40s' +MinIncomingConfirmations = 1 + +[GasEstimator] +EIP1559DynamicFees = false +PriceMin = '1 wei' +BumpMin = '100 wei' + +[GasEstimator.BlockHistory] +BlockHistorySize = 24 + +[Transactions] +ResendAfterThreshold = '30s' + +[HeadTracker] +HistoryDepth = 400 + +[NodePool] +SyncThreshold = 10 + +[OCR] +ContractConfirmations = 1 \ No newline at end of file diff --git a/integration-tests/contracts/contract_deployer.go b/integration-tests/contracts/contract_deployer.go index 528f07ec68e..7f39948517b 100644 --- a/integration-tests/contracts/contract_deployer.go +++ b/integration-tests/contracts/contract_deployer.go @@ -181,6 +181,8 @@ func NewContractDeployer(bcClient blockchain.EVMClient, logger zerolog.Logger) ( return &KromaContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil case *blockchain.WeMixClient: return &WeMixContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil + case *blockchain.KavaClient: + return &WeMixContractDeployer{NewEthereumContractDeployer(clientImpl, logger)}, nil } return nil, errors.New("unknown blockchain client implementation for contract deployer, register blockchain client in NewContractDeployer") } @@ -256,6 +258,10 @@ type WeMixContractDeployer struct { *EthereumContractDeployer } +type KavaContractDeployer struct { + *EthereumContractDeployer +} + // NewEthereumContractDeployer returns an instantiated instance of the ETH contract deployer func NewEthereumContractDeployer(ethClient blockchain.EVMClient, logger zerolog.Logger) *EthereumContractDeployer { return &EthereumContractDeployer{ From 927c5edeedce4d59b221f407af7cb534b12d44a4 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Fri, 24 Nov 2023 11:37:52 -0800 Subject: [PATCH 3/7] update deleted --- .../config/toml/defaults/Kava_Mainnet.toml | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 core/chains/evm/config/toml/defaults/Kava_Mainnet.toml diff --git a/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml b/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml deleted file mode 100644 index 071b88c64db..00000000000 --- a/core/chains/evm/config/toml/defaults/Kava_Mainnet.toml +++ /dev/null @@ -1,45 +0,0 @@ -ChainID = '2222' -ChainType = 'kava-mainnet' -FinalityDepth = 1 -LogPollInterval = '6s' -NoNewHeadsThreshold = '40s' -MinIncomingConfirmations = 1 - - - - -[GasEstimator] - -EIP1559DynamicFees = false -PriceMin = '1 wei' -BumpMin = '100 wei' - - - - -[GasEstimator.BlockHistory] -BlockHistorySize = 24 - - - - -[Transactions] -ResendAfterThreshold = '30s' - - - - -[HeadTracker] -HistoryDepth = 400 - - - - -[NodePool] -SyncThreshold = 10 - - - - -[OCR] -ContractConfirmations = 1 \ No newline at end of file From 0cd8d04b2ced2924863fa2d57113f6f417baa187 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Fri, 24 Nov 2023 11:52:10 -0800 Subject: [PATCH 4/7] updated version --- integration-tests/go.mod | 2 +- integration-tests/go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 2338c0caa58..4fb2cc95445 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -24,7 +24,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.0-alpha.0.0.20231120164534-d4cab696c459 github.com/smartcontractkit/chainlink-common v0.1.7-0.20231121180428-d7f28e91ccc3 - github.com/smartcontractkit/chainlink-testing-framework v1.19.5 + github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231120221959-1aa43ee080e0 github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000 github.com/smartcontractkit/libocr v0.0.0-20231107151413-13e0202ae8d7 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 21be8c1f480..356a60a709d 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -2380,8 +2380,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231117191230-aa6640f2edd github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231117191230-aa6640f2edd1/go.mod h1:UfW7/PZKon+iDEHtrHOfvMnS5GfYOW/SdMZ6P97rPEk= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231117204155-b253a2f56664 h1:yxaHuDTtj2xxtsR8b+LJw8xDvyr6v/F6GP3InsP4wPI= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231117204155-b253a2f56664/go.mod h1:3Fa+HQTZ3R3fPC0hUqugvoo+NEeo8Y4J2WOnQfi7O34= -github.com/smartcontractkit/chainlink-testing-framework v1.19.5 h1:Iq1L7wCA8IkBBtP3p6W2ttu8v9cJp95spusnozW1UrA= -github.com/smartcontractkit/chainlink-testing-framework v1.19.5/go.mod h1:+FVgkz6phTc+piVT57AcQfr3I8xvZgZ1lOpRPOu/dLQ= +github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231120221959-1aa43ee080e0 h1:7f6HXjfsHjgYWGMfQpfqi7CWb66uUDqgsJPe7Ct3xq0= +github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231120221959-1aa43ee080e0/go.mod h1:zScXRqmvbyTFUooyLYrOp4+V/sFPUbFJNRc72YmnuIk= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868/go.mod h1:Kn1Hape05UzFZ7bOUnm3GVsHzP0TNrVmpfXYNHdqGGs= github.com/smartcontractkit/go-plugin v0.0.0-20231003134350-e49dad63b306 h1:ko88+ZznniNJZbZPWAvHQU8SwKAdHngdDZ+pvVgB5ss= From 0d2fcd815ed86b781e7c75676ebfdc99dc1e8878 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Fri, 24 Nov 2023 12:15:01 -0800 Subject: [PATCH 5/7] nit --- .github/workflows/on-demand-ocr-soak-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index e22475ae044..62e29a17cef 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -30,8 +30,8 @@ on: - "KROMA_SEPOLIA" - "WEMIX_TESTNET" - "WEMIX_MAINNET" - - "Kava_MAINNET" - - "Kava_TESTNET" + - "KAVA_MAINNET" + - "KAVA_TESTNET" fundingPrivateKey: description: Private funding key (Skip for Simulated) required: false From 5fcd7ca1daa26e4ffe4aa2890847675b6ffc4bbe Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 27 Nov 2023 10:41:25 -0800 Subject: [PATCH 6/7] fixed issue --- core/chains/evm/config/toml/defaults/Kava_Testnet.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/chains/evm/config/toml/defaults/Kava_Testnet.toml b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml index 2311ef8f7ad..eb51ef77d16 100644 --- a/core/chains/evm/config/toml/defaults/Kava_Testnet.toml +++ b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml @@ -1,5 +1,5 @@ ChainID = '2221' -ChainType = 'kava-testnet' +ChainType = 'kava' FinalityDepth = 1 LogPollInterval = '6s' NoNewHeadsThreshold = '40s' From 97f43b8b4dfdc18443c0e274e3409b8f869ee50c Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 27 Nov 2023 15:51:10 -0800 Subject: [PATCH 7/7] more fix --- .../chains/evm/config/toml/defaults/Kava_Testnet.toml | 1 - integration-tests/soak/ocr_test.go | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/chains/evm/config/toml/defaults/Kava_Testnet.toml b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml index eb51ef77d16..419b1c6cbd3 100644 --- a/core/chains/evm/config/toml/defaults/Kava_Testnet.toml +++ b/core/chains/evm/config/toml/defaults/Kava_Testnet.toml @@ -1,5 +1,4 @@ ChainID = '2221' -ChainType = 'kava' FinalityDepth = 1 LogPollInterval = '6s' NoNewHeadsThreshold = '40s' diff --git a/integration-tests/soak/ocr_test.go b/integration-tests/soak/ocr_test.go index 4d7971d678e..4f42ff803e5 100644 --- a/integration-tests/soak/ocr_test.go +++ b/integration-tests/soak/ocr_test.go @@ -1,13 +1,16 @@ package soak import ( + "fmt" "testing" "github.com/stretchr/testify/require" "github.com/smartcontractkit/chainlink-testing-framework/logging" + "github.com/smartcontractkit/chainlink-testing-framework/networks" "github.com/smartcontractkit/chainlink/integration-tests/actions" + "github.com/smartcontractkit/chainlink/integration-tests/config" "github.com/smartcontractkit/chainlink/integration-tests/testsetups" ) @@ -16,10 +19,10 @@ func TestOCRSoak(t *testing.T) { // Use this variable to pass in any custom EVM specific TOML values to your Chainlink nodes customNetworkTOML := `` // Uncomment below for debugging TOML issues on the node - // network := networks.MustGetSelectedNetworksFromEnv()[0] - // fmt.Println("Using Chainlink TOML\n---------------------") - // fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCR1Config, customNetworkTOML, network)) - // fmt.Println("---------------------") + network := networks.MustGetSelectedNetworksFromEnv()[0] + fmt.Println("Using Chainlink TOML\n---------------------") + fmt.Println(networks.AddNetworkDetailedConfig(config.BaseOCR1Config, customNetworkTOML, network)) + fmt.Println("---------------------") ocrSoakTest, err := testsetups.NewOCRSoakTest(t, false) require.NoError(t, err, "Error creating soak test")