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

[Test] Kava soak setup #11381

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/workflows/on-demand-ocr-soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions common/config/chaintype.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions core/chains/evm/config/toml/defaults/Kava_Testnet.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ChainID = '2221'
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
6 changes: 6 additions & 0 deletions integration-tests/contracts/contract_deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
11 changes: 7 additions & 4 deletions integration-tests/soak/ocr_test.go
Original file line number Diff line number Diff line change
@@ -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"
)

Expand All @@ -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")
Expand Down
Loading