From c1978d621209ea9aea6d1eb5f0a55301eee73925 Mon Sep 17 00:00:00 2001 From: stackman27 Date: Mon, 11 Dec 2023 17:08:52 -0800 Subject: [PATCH] new soak attempt --- .github/workflows/on-demand-ocr-soak-test.yml | 1 + common/config/chaintype.go | 5 ++-- .../config/toml/defaults/Bttc_Testnet.toml | 28 +++++++++++++++++++ .../contracts/contract_deployer.go | 6 ++++ integration-tests/go.mod | 2 +- integration-tests/go.sum | 2 ++ 6 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 core/chains/evm/config/toml/defaults/Bttc_Testnet.toml diff --git a/.github/workflows/on-demand-ocr-soak-test.yml b/.github/workflows/on-demand-ocr-soak-test.yml index 567d9510de9..74ce85764d5 100644 --- a/.github/workflows/on-demand-ocr-soak-test.yml +++ b/.github/workflows/on-demand-ocr-soak-test.yml @@ -30,6 +30,7 @@ on: - "KROMA_SEPOLIA" - "WEMIX_TESTNET" - "WEMIX_MAINNET" + - "BTTC_TESTNET" fundingPrivateKey: description: Private funding key (Skip for Simulated) required: false diff --git a/common/config/chaintype.go b/common/config/chaintype.go index 21fb8cd297d..dc88f7b8758 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" + ChainBttc ChainType = "bttc" ) 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(ChainBttc)}, ", ")) // 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, ChainBttc: return true } return false diff --git a/core/chains/evm/config/toml/defaults/Bttc_Testnet.toml b/core/chains/evm/config/toml/defaults/Bttc_Testnet.toml new file mode 100644 index 00000000000..707b9c0223c --- /dev/null +++ b/core/chains/evm/config/toml/defaults/Bttc_Testnet.toml @@ -0,0 +1,28 @@ +ChainID = '1029' +FinalityDepth = 9000 +# blocks are generated every 2-4s +LogPollInterval = '2s' +# Blocks are only emitted when a transaction happens / no empty blocks +NoNewHeadsThreshold = '0' + +[GasEstimator] +EIP1559DynamicFees = false + + +[GasEstimator.BlockHistory] +# how many blocks we want to keep in memory to calculate gas price +# # Average block time of 2s +BlockHistorySize = 24 + +[Transactions] +ResendAfterThreshold = '30s' + +[HeadTracker] +# re-org for bttc is really high so we want to check for the block where reorg happens +HistoryDepth = 500 + +[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..57c5d7a4aed 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.BttcClient: + 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 BttcContractDeployer struct { + *EthereumContractDeployer +} + // NewEthereumContractDeployer returns an instantiated instance of the ETH contract deployer func NewEthereumContractDeployer(ethClient blockchain.EVMClient, logger zerolog.Logger) *EthereumContractDeployer { return &EthereumContractDeployer{ diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 72c15a89669..bb96a6a14d5 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -25,7 +25,7 @@ require ( github.com/slack-go/slack v0.12.2 github.com/smartcontractkit/chainlink-automation v1.0.1 github.com/smartcontractkit/chainlink-common v0.1.7-0.20231206181640-faad3f11cfad - github.com/smartcontractkit/chainlink-testing-framework v1.21.0 + github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231212004253-2116ad28ef8a 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-20231130143053-c5102a9c0fb7 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 494e5c21ec9..c6b44b1a1ad 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1444,6 +1444,8 @@ github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231206154215-ec1718b7df3 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20231206154215-ec1718b7df3e/go.mod h1:9YIi413QRRytafTzpWm+Z+5NWBNxSqokhKyeEZ3ynlA= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231205180940-ea2e3e916725 h1:NbhPVwxx+53WN/Uld1V6c4iLgoGvUYFOsVd2kfcexe8= github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20231205180940-ea2e3e916725/go.mod h1:vHrPBipRL52NdPp77KXNU2k1IoCUa1B33N9otZQPYko= +github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231212004253-2116ad28ef8a h1:Ywn4t58PxRqT0i7rX7cyS5G44aCrN8XKT0JZlp2jLUs= +github.com/smartcontractkit/chainlink-testing-framework v1.19.2-0.20231212004253-2116ad28ef8a/go.mod h1:zScXRqmvbyTFUooyLYrOp4+V/sFPUbFJNRc72YmnuIk= github.com/smartcontractkit/chainlink-testing-framework v1.21.0 h1:MrtpGMgPpcRX06FtDEj14Vokoo6Sx8e0/D6AA9LxCgM= github.com/smartcontractkit/chainlink-testing-framework v1.21.0/go.mod h1:9SCqZ+lcWZNEofpPgasQ+wUF6A6fFgZvWmhqQJwFYV0= github.com/smartcontractkit/chainlink-vrf v0.0.0-20231120191722-fef03814f868 h1:FFdvEzlYwcuVHkdZ8YnZR/XomeMGbz5E2F2HZI3I3w8=