From 91cbe818ea568bc03bef86642047c7a89589fa15 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 1 Apr 2025 14:34:10 +0800 Subject: [PATCH] common, params: define cancun block for testnet and print more chain config --- common/constants.all.go | 12 ++++++------ common/constants.devnet.go | 2 +- common/constants.local.go | 4 +++- common/constants.mainnet.go | 2 +- common/constants.testnet.go | 4 ++-- common/constants/constants.go.devnet | 7 +++---- common/constants/constants.go.local | 7 +++---- common/constants/constants.go.testnet | 7 +++---- params/config.go | 2 ++ 9 files changed, 24 insertions(+), 23 deletions(-) diff --git a/common/constants.all.go b/common/constants.all.go index 28732c7d4c..1a06eecf2b 100644 --- a/common/constants.all.go +++ b/common/constants.all.go @@ -104,13 +104,13 @@ var ( BlockNumberGas50x = MaintnetConstant.blockNumberGas50x TIPXDCXMinerDisable = MaintnetConstant.tipXDCXMinerDisable TIPXDCXReceiverDisable = MaintnetConstant.tipXDCXReceiverDisable - TIPUpgradeReward = MaintnetConstant.tipUpgradeReward - TIPEpochHalving = MaintnetConstant.tipEpochHalving Eip1559Block = MaintnetConstant.eip1559Block CancunBlock = MaintnetConstant.cancunBlock + TIPUpgradeReward = MaintnetConstant.tipUpgradeReward + TIPEpochHalving = MaintnetConstant.tipEpochHalving - TRC21IssuerSMCTestNet = MaintnetConstant.trc21IssuerSMCTestNet TRC21IssuerSMC = MaintnetConstant.trc21IssuerSMC + TRC21IssuerSMCTestNet = MaintnetConstant.trc21IssuerSMCTestNet XDCXListingSMC = MaintnetConstant.xdcxListingSMC XDCXListingSMCTestNet = MaintnetConstant.xdcxListingSMCTestNet @@ -171,13 +171,13 @@ func CopyConstans(chainID uint64) { BlockNumberGas50x = c.blockNumberGas50x TIPXDCXMinerDisable = c.tipXDCXMinerDisable TIPXDCXReceiverDisable = c.tipXDCXReceiverDisable - TIPUpgradeReward = c.tipUpgradeReward - TIPEpochHalving = c.tipEpochHalving Eip1559Block = c.eip1559Block CancunBlock = c.cancunBlock + TIPUpgradeReward = c.tipUpgradeReward + TIPEpochHalving = c.tipEpochHalving - TRC21IssuerSMCTestNet = c.trc21IssuerSMCTestNet TRC21IssuerSMC = c.trc21IssuerSMC + TRC21IssuerSMCTestNet = c.trc21IssuerSMCTestNet XDCXListingSMC = c.xdcxListingSMC XDCXListingSMCTestNet = c.xdcxListingSMCTestNet diff --git a/common/constants.devnet.go b/common/constants.devnet.go index 0d2f6bdc80..4c7503ba3f 100644 --- a/common/constants.devnet.go +++ b/common/constants.devnet.go @@ -33,8 +33,8 @@ var DevnetConstant = constant{ tipUpgradeReward: big.NewInt(1773000), tipEpochHalving: big.NewInt(9999999999), - trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), + trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), diff --git a/common/constants.local.go b/common/constants.local.go index ac5ebb7cb4..e9c318bfaf 100644 --- a/common/constants.local.go +++ b/common/constants.local.go @@ -30,9 +30,11 @@ var localConstant = constant{ tipXDCXReceiverDisable: big.NewInt(0), eip1559Block: big.NewInt(0), cancunBlock: big.NewInt(0), + tipUpgradeReward: big.NewInt(0), + tipEpochHalving: big.NewInt(0), - trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), + trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), diff --git a/common/constants.mainnet.go b/common/constants.mainnet.go index 7ec193a3cc..d4b55d7196 100644 --- a/common/constants.mainnet.go +++ b/common/constants.mainnet.go @@ -33,8 +33,8 @@ var MaintnetConstant = constant{ tipUpgradeReward: big.NewInt(9999999999), tipEpochHalving: big.NewInt(9999999999), - trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), + trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), diff --git a/common/constants.testnet.go b/common/constants.testnet.go index eff027da36..dbdfa41061 100644 --- a/common/constants.testnet.go +++ b/common/constants.testnet.go @@ -29,12 +29,12 @@ var TestnetConstant = constant{ tipXDCXMinerDisable: big.NewInt(61290000), // Target 31st March 2024 tipXDCXReceiverDisable: big.NewInt(66825000), // Target 26 Aug 2024 eip1559Block: big.NewInt(71550000), // Target 14th Feb 2025 - cancunBlock: big.NewInt(9999999999), + cancunBlock: big.NewInt(73425600), tipUpgradeReward: big.NewInt(9999999999), tipEpochHalving: big.NewInt(9999999999), - trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), + trc21IssuerSMCTestNet: HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), xdcxListingSMCTestNet: HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), diff --git a/common/constants/constants.go.devnet b/common/constants/constants.go.devnet index 429dbcf756..160d1eb27f 100644 --- a/common/constants/constants.go.devnet +++ b/common/constants/constants.go.devnet @@ -1,9 +1,8 @@ // Notice: this file only saves const variables for all network. // Please run the following commands after modify this file: -// -// cp common/constants.go common/constants/constants.go.devnet -// cp common/constants.go common/constants/constants.go.testnet -// cp common/constants.go common/constants/constants.go.local +// cp common/constants.go common/constants/constants.go.testnet +// cp common/constants.go common/constants/constants.go.devnet +// cp common/constants.go common/constants/constants.go.local package common diff --git a/common/constants/constants.go.local b/common/constants/constants.go.local index 429dbcf756..160d1eb27f 100644 --- a/common/constants/constants.go.local +++ b/common/constants/constants.go.local @@ -1,9 +1,8 @@ // Notice: this file only saves const variables for all network. // Please run the following commands after modify this file: -// -// cp common/constants.go common/constants/constants.go.devnet -// cp common/constants.go common/constants/constants.go.testnet -// cp common/constants.go common/constants/constants.go.local +// cp common/constants.go common/constants/constants.go.testnet +// cp common/constants.go common/constants/constants.go.devnet +// cp common/constants.go common/constants/constants.go.local package common diff --git a/common/constants/constants.go.testnet b/common/constants/constants.go.testnet index 429dbcf756..160d1eb27f 100644 --- a/common/constants/constants.go.testnet +++ b/common/constants/constants.go.testnet @@ -1,9 +1,8 @@ // Notice: this file only saves const variables for all network. // Please run the following commands after modify this file: -// -// cp common/constants.go common/constants/constants.go.devnet -// cp common/constants.go common/constants/constants.go.testnet -// cp common/constants.go common/constants/constants.go.local +// cp common/constants.go common/constants/constants.go.testnet +// cp common/constants.go common/constants/constants.go.devnet +// cp common/constants.go common/constants/constants.go.local package common diff --git a/params/config.go b/params/config.go index ad453ae91a..bc74e4b5e6 100644 --- a/params/config.go +++ b/params/config.go @@ -642,6 +642,8 @@ func (c *ChainConfig) Description() string { banner += fmt.Sprintf(" - Shanghai: %-8v\n", shanghaiBlock) banner += fmt.Sprintf(" - Eip1559: %-8v\n", eip1559Block) banner += fmt.Sprintf(" - Cancun: %-8v\n", cancunBlock) + banner += fmt.Sprintf(" - TIPUpgradeReward: %-8v\n", common.TIPUpgradeReward) + banner += fmt.Sprintf(" - TIPEpochHalving: %-8v\n", common.TIPEpochHalving) banner += fmt.Sprintf(" - Engine: %v", engine) return banner }