From 289211420e846392833c30eb96e05167ab12c7ec Mon Sep 17 00:00:00 2001 From: Charlie Chen <34498985+ws4charlie@users.noreply.github.com> Date: Wed, 25 Sep 2024 02:43:08 -0500 Subject: [PATCH] feat: add Bitcoin Testnet4 static chain info (#2911) * add bitcoin Testnet4 static chain info * add changelog entry * remove integer based Signet and Testnet4 chain names as they're deprecated * fix generated files * fix compile error * fix unit test --- changelog.md | 1 + docs/openapi/openapi.swagger.yaml | 1 - pkg/chains/chains.go | 15 +- pkg/chains/chains.pb.go | 189 +++++++++--------- pkg/chains/chains_test.go | 9 +- .../zetacore/pkg/chains/chains.proto | 2 - .../zetacore/pkg/chains/chains_pb.d.ts | 5 - zetaclient/config/types.go | 2 +- 8 files changed, 117 insertions(+), 107 deletions(-) diff --git a/changelog.md b/changelog.md index ba31057d0a..ea6a525170 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,7 @@ * [2870](https://github.com/zeta-chain/node/pull/2870) - support for multiple Bitcoin chains in the zetaclient * [2883](https://github.com/zeta-chain/node/pull/2883) - add chain static information for btc signet testnet * [2907](https://github.com/zeta-chain/node/pull/2907) - derive Bitcoin tss address by chain id and added more Signet static info +* [2911](https://github.com/zeta-chain/node/pull/2911) - add chain static information for btc testnet4 ### Refactor diff --git a/docs/openapi/openapi.swagger.yaml b/docs/openapi/openapi.swagger.yaml index 43ec9bc0e1..26c2c2cb9d 100644 --- a/docs/openapi/openapi.swagger.yaml +++ b/docs/openapi/openapi.swagger.yaml @@ -56986,7 +56986,6 @@ definitions: - solana_mainnet - solana_devnet - solana_localnet - - btc_signet_testnet default: empty title: |- ChainName represents the name of the chain diff --git a/pkg/chains/chains.go b/pkg/chains/chains.go index 38c9252291..addd6a14df 100644 --- a/pkg/chains/chains.go +++ b/pkg/chains/chains.go @@ -169,8 +169,8 @@ var ( Name: "btc_testnet", } + // BitcoinSignetTestnet is Bitcoin Signet testnet BitcoinSignetTestnet = Chain{ - ChainName: ChainName_btc_signet_testnet, ChainId: 18333, Network: Network_btc, NetworkType: NetworkType_testnet, @@ -181,6 +181,18 @@ var ( Name: "btc_signet_testnet", } + // BitcoinTestnet4 is Bitcoin testnet4 + BitcoinTestnet4 = Chain{ + ChainId: 18334, + Network: Network_btc, + NetworkType: NetworkType_testnet, + Vm: Vm_no_vm, + Consensus: Consensus_bitcoin, + IsExternal: true, + CctxGateway: CCTXGateway_observers, + Name: "btc_testnet4", + } + // Amoy is Polygon amoy testnet Amoy = Chain{ ChainName: ChainName_amoy_testnet, @@ -360,6 +372,7 @@ func DefaultChainsList() []Chain { Ethereum, BitcoinTestnet, BitcoinSignetTestnet, + BitcoinTestnet4, Mumbai, Amoy, BscTestnet, diff --git a/pkg/chains/chains.pb.go b/pkg/chains/chains.pb.go index 885f0acbbd..217ad55328 100644 --- a/pkg/chains/chains.pb.go +++ b/pkg/chains/chains.pb.go @@ -60,29 +60,28 @@ func (ReceiveStatus) EnumDescriptor() ([]byte, []int) { type ChainName int32 const ( - ChainName_empty ChainName = 0 - ChainName_eth_mainnet ChainName = 1 - ChainName_zeta_mainnet ChainName = 2 - ChainName_btc_mainnet ChainName = 3 - ChainName_polygon_mainnet ChainName = 4 - ChainName_bsc_mainnet ChainName = 5 - ChainName_goerli_testnet ChainName = 6 - ChainName_mumbai_testnet ChainName = 7 - ChainName_bsc_testnet ChainName = 10 - ChainName_zeta_testnet ChainName = 11 - ChainName_btc_testnet ChainName = 12 - ChainName_sepolia_testnet ChainName = 13 - ChainName_goerli_localnet ChainName = 14 - ChainName_btc_regtest ChainName = 15 - ChainName_amoy_testnet ChainName = 16 - ChainName_optimism_mainnet ChainName = 17 - ChainName_optimism_sepolia ChainName = 18 - ChainName_base_mainnet ChainName = 19 - ChainName_base_sepolia ChainName = 20 - ChainName_solana_mainnet ChainName = 21 - ChainName_solana_devnet ChainName = 22 - ChainName_solana_localnet ChainName = 23 - ChainName_btc_signet_testnet ChainName = 24 + ChainName_empty ChainName = 0 + ChainName_eth_mainnet ChainName = 1 + ChainName_zeta_mainnet ChainName = 2 + ChainName_btc_mainnet ChainName = 3 + ChainName_polygon_mainnet ChainName = 4 + ChainName_bsc_mainnet ChainName = 5 + ChainName_goerli_testnet ChainName = 6 + ChainName_mumbai_testnet ChainName = 7 + ChainName_bsc_testnet ChainName = 10 + ChainName_zeta_testnet ChainName = 11 + ChainName_btc_testnet ChainName = 12 + ChainName_sepolia_testnet ChainName = 13 + ChainName_goerli_localnet ChainName = 14 + ChainName_btc_regtest ChainName = 15 + ChainName_amoy_testnet ChainName = 16 + ChainName_optimism_mainnet ChainName = 17 + ChainName_optimism_sepolia ChainName = 18 + ChainName_base_mainnet ChainName = 19 + ChainName_base_sepolia ChainName = 20 + ChainName_solana_mainnet ChainName = 21 + ChainName_solana_devnet ChainName = 22 + ChainName_solana_localnet ChainName = 23 ) var ChainName_name = map[int32]string{ @@ -108,33 +107,31 @@ var ChainName_name = map[int32]string{ 21: "solana_mainnet", 22: "solana_devnet", 23: "solana_localnet", - 24: "btc_signet_testnet", } var ChainName_value = map[string]int32{ - "empty": 0, - "eth_mainnet": 1, - "zeta_mainnet": 2, - "btc_mainnet": 3, - "polygon_mainnet": 4, - "bsc_mainnet": 5, - "goerli_testnet": 6, - "mumbai_testnet": 7, - "bsc_testnet": 10, - "zeta_testnet": 11, - "btc_testnet": 12, - "sepolia_testnet": 13, - "goerli_localnet": 14, - "btc_regtest": 15, - "amoy_testnet": 16, - "optimism_mainnet": 17, - "optimism_sepolia": 18, - "base_mainnet": 19, - "base_sepolia": 20, - "solana_mainnet": 21, - "solana_devnet": 22, - "solana_localnet": 23, - "btc_signet_testnet": 24, + "empty": 0, + "eth_mainnet": 1, + "zeta_mainnet": 2, + "btc_mainnet": 3, + "polygon_mainnet": 4, + "bsc_mainnet": 5, + "goerli_testnet": 6, + "mumbai_testnet": 7, + "bsc_testnet": 10, + "zeta_testnet": 11, + "btc_testnet": 12, + "sepolia_testnet": 13, + "goerli_localnet": 14, + "btc_regtest": 15, + "amoy_testnet": 16, + "optimism_mainnet": 17, + "optimism_sepolia": 18, + "base_mainnet": 19, + "base_sepolia": 20, + "solana_mainnet": 21, + "solana_devnet": 22, + "solana_localnet": 23, } func (x ChainName) String() string { @@ -458,56 +455,56 @@ func init() { } var fileDescriptor_236b85e7bff6130d = []byte{ - // 781 bytes of a gzipped FileDescriptorProto + // 770 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x8e, 0xe4, 0x34, - 0x10, 0xee, 0x24, 0xfd, 0x5b, 0x3d, 0x3f, 0x5e, 0xef, 0xb0, 0x84, 0x95, 0x68, 0x06, 0x24, 0xa0, - 0x35, 0x82, 0x1e, 0x01, 0x47, 0x0e, 0xa0, 0x1d, 0xb1, 0x08, 0x21, 0xf6, 0x10, 0x56, 0x2b, 0xc4, - 0xa5, 0x71, 0xbb, 0x8b, 0xb4, 0xd5, 0xb1, 0x1d, 0xc5, 0xee, 0xec, 0x36, 0x4f, 0xc1, 0x43, 0x70, - 0xe0, 0x3d, 0xb8, 0x70, 0xdc, 0x23, 0x47, 0x34, 0xf3, 0x20, 0x20, 0x3b, 0x4e, 0x7a, 0xb8, 0x30, - 0x73, 0x8a, 0xfd, 0xe5, 0xfb, 0xaa, 0xbe, 0xb2, 0xab, 0x0c, 0x17, 0xbf, 0xa0, 0x65, 0x7c, 0xc3, - 0x84, 0xba, 0xf4, 0x2b, 0x5d, 0xe1, 0x65, 0xb9, 0xcd, 0x2f, 0x3d, 0x64, 0xc2, 0x67, 0x51, 0x56, - 0xda, 0x6a, 0xfa, 0x76, 0xc7, 0x5d, 0xb4, 0xdc, 0x45, 0xb9, 0xcd, 0x17, 0x0d, 0xe9, 0xf1, 0x59, - 0xae, 0x73, 0xed, 0x99, 0x97, 0x6e, 0xd5, 0x88, 0xde, 0xfb, 0x27, 0x81, 0xc1, 0x95, 0x23, 0xd0, - 0xb7, 0x60, 0xec, 0x99, 0x4b, 0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 0x19, 0x72, 0x14, 0x35, 0x7e, - 0x6f, 0x99, 0xdd, 0x19, 0x3a, 0x85, 0x11, 0xaf, 0x90, 0x59, 0x5c, 0x93, 0x9e, 0xdb, 0x98, 0x1d, - 0xe7, 0x68, 0x0c, 0x89, 0x28, 0xc0, 0xf0, 0x67, 0x26, 0x0a, 0x5c, 0x93, 0xf8, 0x71, 0xff, 0xf7, - 0xdf, 0x66, 0xd1, 0xc5, 0x1f, 0x09, 0x4c, 0xba, 0x9b, 0xa6, 0x13, 0x18, 0xa0, 0x2c, 0xed, 0x9e, - 0xf4, 0xe8, 0x29, 0x4c, 0xd1, 0x6e, 0x96, 0x92, 0x09, 0xa5, 0xd0, 0x92, 0x88, 0x12, 0x38, 0x72, - 0x56, 0x3b, 0x24, 0x76, 0x94, 0x95, 0xe5, 0x1d, 0x90, 0xd0, 0x87, 0x70, 0x5a, 0xea, 0x62, 0x9f, - 0x6b, 0xd5, 0x81, 0x7d, 0xcf, 0x32, 0x07, 0xd6, 0x80, 0x52, 0x38, 0xc9, 0x35, 0x56, 0x85, 0x58, - 0x5a, 0x34, 0xd6, 0x61, 0x43, 0x87, 0xc9, 0x9d, 0x5c, 0xb1, 0x03, 0x36, 0x6a, 0x85, 0x2d, 0x00, - 0x9d, 0x83, 0x16, 0x99, 0xb6, 0x0e, 0x5a, 0xe0, 0xc8, 0x39, 0x30, 0x58, 0xea, 0x42, 0x1c, 0x58, - 0xc7, 0x0e, 0x0c, 0x09, 0x0b, 0xcd, 0x59, 0xe1, 0xc0, 0x93, 0x56, 0x5a, 0x61, 0xee, 0x88, 0xe4, - 0xd4, 0x45, 0x67, 0x52, 0xef, 0x3b, 0x1d, 0xa1, 0x67, 0x40, 0x74, 0x69, 0x85, 0x14, 0x46, 0x76, - 0xf6, 0x1f, 0xfc, 0x07, 0x0d, 0xb9, 0x08, 0x75, 0xea, 0x15, 0x33, 0xd8, 0xf1, 0x1e, 0x76, 0x48, - 0xcb, 0x39, 0x73, 0x45, 0x1a, 0x5d, 0x30, 0x75, 0x38, 0xc3, 0x37, 0xe8, 0x03, 0x38, 0x0e, 0xd8, - 0x1a, 0x6b, 0x07, 0x3d, 0xf2, 0x35, 0x34, 0x50, 0x67, 0xf7, 0x4d, 0xfa, 0x08, 0xa8, 0xb3, 0x6b, - 0x44, 0xae, 0xd0, 0x76, 0x1e, 0xd3, 0x70, 0x8b, 0x08, 0xa3, 0x30, 0x1d, 0x74, 0x04, 0x09, 0xda, - 0x0d, 0xe9, 0xd1, 0x31, 0xf4, 0xdd, 0x69, 0x91, 0xc8, 0x41, 0x2b, 0xcb, 0x49, 0xec, 0x7a, 0x21, - 0xdc, 0x0f, 0x49, 0x3c, 0x6a, 0x38, 0xe9, 0xd3, 0x23, 0x18, 0xb7, 0x05, 0x91, 0x81, 0x93, 0x39, - 0xdb, 0x64, 0xe8, 0x9a, 0xa5, 0xf1, 0x41, 0x46, 0x21, 0xcd, 0x53, 0x98, 0xde, 0x1a, 0x42, 0x17, - 0xae, 0x2d, 0xc4, 0xf7, 0x59, 0xeb, 0x2a, 0xf2, 0x89, 0x2a, 0x51, 0x37, 0x6d, 0x02, 0x30, 0x0c, - 0xb5, 0x25, 0x21, 0xce, 0x87, 0x10, 0xbf, 0x90, 0xae, 0xd9, 0x94, 0x5e, 0xd6, 0x92, 0xf4, 0xbc, - 0xe9, 0x5a, 0x36, 0x56, 0x4d, 0x2d, 0xbb, 0xee, 0xfc, 0x09, 0x26, 0xdd, 0xd8, 0x39, 0x9f, 0x68, - 0x37, 0x58, 0xe1, 0xce, 0x49, 0x4e, 0x00, 0x2c, 0xaa, 0x35, 0x56, 0x52, 0xa8, 0x90, 0x72, 0x25, - 0x2c, 0xd7, 0x42, 0x91, 0xb8, 0x29, 0x69, 0x69, 0x2c, 0xe3, 0x5b, 0x92, 0xb8, 0x1b, 0x0b, 0x07, - 0xda, 0x0d, 0x2e, 0xe9, 0x87, 0x0c, 0x1f, 0xc1, 0xf4, 0xd6, 0xb0, 0x35, 0x87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 0x6b, 0xa1, 0x48, 0xdc, 0x94, 0xb4, 0x34, 0x96, 0xf1, 0x2d, + 0x49, 0xdc, 0x64, 0x42, 0xe3, 0xba, 0x0b, 0x4a, 0xfa, 0x21, 0xc3, 0xc7, 0x30, 0xbd, 0x75, 0xa9, + 0x9a, 0xa6, 0x79, 0x4b, 0xc7, 0x30, 0xd1, 0x2b, 0x83, 0x55, 0x8d, 0x95, 0x21, 0x51, 0xc3, 0x7e, + 0xfc, 0xe5, 0x5f, 0xd7, 0xb3, 0xe8, 0xd5, 0xf5, 0x2c, 0xfa, 0xe7, 0x7a, 0x16, 0xfd, 0x76, 0x33, + 0xeb, 0xbd, 0xba, 0x99, 0xf5, 0xfe, 0xbe, 0x99, 0xf5, 0x7e, 0xfa, 0x20, 0x17, 0x76, 0xb3, 0x5b, + 0x2d, 0xb8, 0x96, 0xfe, 0x41, 0xff, 0xa4, 0x79, 0xdb, 0x95, 0x5e, 0xdf, 0x7e, 0xd7, 0x57, 0x43, + 0xff, 0x38, 0x7f, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x0b, 0xc3, 0x03, 0xff, 0x05, + 0x00, 0x00, } func (m *Chain) Marshal() (dAtA []byte, err error) { diff --git a/pkg/chains/chains_test.go b/pkg/chains/chains_test.go index 5b5caf77cb..90545bee1c 100644 --- a/pkg/chains/chains_test.go +++ b/pkg/chains/chains_test.go @@ -11,7 +11,9 @@ import ( func TestChain_Name(t *testing.T) { t.Run("new Name field is compatible with ChainName enum", func(t *testing.T) { for _, chain := range chains.DefaultChainsList() { - require.EqualValues(t, chain.Name, chain.ChainName.String()) + if chain.ChainName != chains.ChainName_empty { + require.EqualValues(t, chain.Name, chain.ChainName.String()) + } } }) } @@ -43,6 +45,7 @@ func TestChainListByNetworkType(t *testing.T) { chains.ZetaChainTestnet, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -95,6 +98,7 @@ func TestChainListByNetwork(t *testing.T) { chains.BitcoinMainnet, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.BitcoinRegtest, }, }, @@ -144,6 +148,7 @@ func TestDefaultChainList(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -181,6 +186,7 @@ func TestChainListByGateway(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, @@ -224,6 +230,7 @@ func TestExternalChainList(t *testing.T) { chains.Ethereum, chains.BitcoinTestnet, chains.BitcoinSignetTestnet, + chains.BitcoinTestnet4, chains.Mumbai, chains.Amoy, chains.BscTestnet, diff --git a/proto/zetachain/zetacore/pkg/chains/chains.proto b/proto/zetachain/zetacore/pkg/chains/chains.proto index 40a420e007..63b146cf42 100644 --- a/proto/zetachain/zetacore/pkg/chains/chains.proto +++ b/proto/zetachain/zetacore/pkg/chains/chains.proto @@ -48,8 +48,6 @@ enum ChainName { solana_mainnet = 21; solana_devnet = 22; solana_localnet = 23; - - btc_signet_testnet = 24; } // Network represents the network of the chain diff --git a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts index 6aaa826636..af161efd7b 100644 --- a/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts +++ b/typescript/zetachain/zetacore/pkg/chains/chains_pb.d.ts @@ -148,11 +148,6 @@ export declare enum ChainName { * @generated from enum value: solana_localnet = 23; */ solana_localnet = 23, - - /** - * @generated from enum value: btc_signet_testnet = 24; - */ - btc_signet_testnet = 24, } /** diff --git a/zetaclient/config/types.go b/zetaclient/config/types.go index b9a889272a..bf225b97f4 100644 --- a/zetaclient/config/types.go +++ b/zetaclient/config/types.go @@ -50,7 +50,7 @@ type BTCConfig struct { RPCUsername string `mask:"filled"` RPCPassword string `mask:"filled"` RPCHost string `mask:"filled"` - RPCParams string // "regtest", "mainnet", "testnet3" , "signet" + RPCParams string // "regtest", "mainnet", "testnet3" , "signet", "testnet4" RPCAlertLatency int64 }