// Copyright 2016 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // The go-ethereum library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with the go-ethereum library. If not, see . package params // The built-in network configs in this file are the canonical sources used by // backfill when persisted or custom configs omit fields that should inherit a // known network default. BackfillMissingFieldsFrom copies generic fork blocks, // system-contract addresses, consensus-engine stubs, and nested XDPoS defaults // from these presets into the destination config; BackfillCustomMigratedFieldsFrom // reads the same presets only for the narrow historical custom-migration // whitelist. Keeping these presets complete and explicit defines what later // backfill is allowed to inherit. import ( "errors" "math/big" "github.com/XinFinOrg/XDPoSChain/common" ) const ( ConsensusEngineVersion1 = "v1" ConsensusEngineVersion2 = "v2" defaultV2SwitchRound = 0 ConsensusOptionalTestChainID uint64 = 1337 mainnetV2SwitchBlock uint64 = 80370000 // Target 2nd Oct 2024 testnetV2SwitchBlock uint64 = 56828700 // Target 13th Nov 2023 devnetV2SwitchBlock uint64 = 2700 ) var ( ErrMissingForkSwitch = errors.New("missing fork switch") ErrWrongForkSwitchOrder = errors.New("wrong fork switch order") ) var ( MainnetGenesisHash = common.HexToHash("0x4a9d748bd78a8d0385b67788c2435dcdb914f98a96250b68863a1f8b7642d6b1") // XDC Mainnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0xbdea512b4f12ff1135ec92c00dc047ffb93890c2ea1aa0eefe9b013d80640075") // XDC Testnet genesis hash to enforce below configs on DevnetGenesisHash = common.HexToHash("0x50e63112ebf55bba9115ea875eedc3f6c62b42440d23786323e2678a9848b7ac") // XDC Devnet genesis hash to enforce below configs on ) var ( MainnetV2Configs = map[uint64]*V2Config{ defaultV2SwitchRound: { MaxMasternodes: 108, SwitchRound: 0, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 30, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 2000: { MaxMasternodes: 108, SwitchRound: 2000, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 600, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 8000: { MaxMasternodes: 108, SwitchRound: 8000, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 60, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 220000: { MaxMasternodes: 108, SwitchRound: 220000, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 30, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 460000: { MaxMasternodes: 108, SwitchRound: 460000, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 20, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 3200000: { MaxMasternodes: 108, SwitchRound: 3200000, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, } TestnetV2Configs = map[uint64]*V2Config{ defaultV2SwitchRound: { MaxMasternodes: 15, SwitchRound: 0, CertThreshold: 0.45, TimeoutSyncThreshold: 3, TimeoutPeriod: 60, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 900000: { MaxMasternodes: 108, SwitchRound: 900000, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 60, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 20277000: { MaxMasternodes: 108, SwitchRound: 20277000, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 27360000: { MaxMasternodes: 25, MaxProtectorNodes: 3, MaxObserverNodes: 2, SwitchRound: 27360000, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 63.42, ProtectorReward: 50.27, ObserverReward: 25.13, MinimumMinerBlockPerEpoch: 5, LimitPenaltyEpoch: 5, MinimumSigningTx: 30, }, 27400500: { MaxMasternodes: 108, MaxProtectorNodes: 432, MaxObserverNodes: 99999, // unlimit like mainnet SwitchRound: 27400500, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 63.4196, ProtectorReward: 50.7357, ObserverReward: 25.3678, MinimumMinerBlockPerEpoch: 5, LimitPenaltyEpoch: 5, MinimumSigningTx: 30, }, } DevnetV2Configs = map[uint64]*V2Config{ defaultV2SwitchRound: { SwitchRound: 0, MaxMasternodes: 18, MaxProtectorNodes: 0, MaxObserverNodes: 0, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 0, ProtectorReward: 0, ObserverReward: 0, MinimumMinerBlockPerEpoch: 0, LimitPenaltyEpoch: 0, MinimumSigningTx: 0, }, 45000: { SwitchRound: 45000, MaxMasternodes: 10, MaxProtectorNodes: 3, MaxObserverNodes: 10, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 63.42, ProtectorReward: 50.27, ObserverReward: 25.13, MinimumMinerBlockPerEpoch: 5, LimitPenaltyEpoch: 5, MinimumSigningTx: 30, }, 1683000: { SwitchRound: 1683000, MaxMasternodes: 10, MaxProtectorNodes: 3, MaxObserverNodes: 10, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 63.4196, ProtectorReward: 50.7357, ObserverReward: 25.3678, MinimumMinerBlockPerEpoch: 5, LimitPenaltyEpoch: 5, MinimumSigningTx: 30, }, } LocalnetV2Configs = map[uint64]*V2Config{ defaultV2SwitchRound: { MaxMasternodes: 108, MaxProtectorNodes: 432, MaxObserverNodes: 2000, SwitchRound: 0, CertThreshold: 0.667, TimeoutSyncThreshold: 3, TimeoutPeriod: 10, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 63.42, ProtectorReward: 50.27, ObserverReward: 25.13, MinimumMinerBlockPerEpoch: 5, LimitPenaltyEpoch: 5, MinimumSigningTx: 30, }, } UnitTestV2Configs = map[uint64]*V2Config{ defaultV2SwitchRound: { MaxMasternodes: 18, SwitchRound: 0, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 4, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 10: { MaxMasternodes: 18, SwitchRound: 10, CertThreshold: 0.667, TimeoutSyncThreshold: 2, TimeoutPeriod: 4, MinePeriod: 3, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, }, 900: { MaxMasternodes: 20, MaxProtectorNodes: 17, MaxObserverNodes: 1, SwitchRound: 900, CertThreshold: 0.667, TimeoutSyncThreshold: 4, TimeoutPeriod: 5, MinePeriod: 2, ExpTimeoutConfig: ExpTimeoutConfig{Base: 1.0, MaxExponent: 0}, MasternodeReward: 500, // double as Reward ProtectorReward: 400, ObserverReward: 300.125, LimitPenaltyEpoch: 2, MinimumSigningTx: 2, }, } // XDPoSChain mainnet config XDCMainnetChainConfig = &ChainConfig{ ChainID: big.NewInt(50), HomesteadBlock: big.NewInt(1), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(1), EIP150Block: big.NewInt(2), EIP155Block: big.NewInt(3), EIP158Block: big.NewInt(3), ByzantiumBlock: big.NewInt(4), ConstantinopleBlock: nil, PetersburgBlock: nil, IstanbulBlock: nil, TIPSigningBlock: big.NewInt(3000000), TIPRandomizeBlock: big.NewInt(3464000), TIPIncreaseMasternodesBlock: big.NewInt(5000000), DenylistBlock: big.NewInt(38383838), TIPNoHalvingMNRewardBlock: big.NewInt(38383838), TIPXDCXBlock: big.NewInt(38383838), TIPXDCXLendingBlock: big.NewInt(38383838), TIPXDCXCancellationFeeBlock: big.NewInt(38383838), TIPTRC21FeeBlock: big.NewInt(38383838), BerlinBlock: big.NewInt(76321000), LondonBlock: big.NewInt(76321000), MergeBlock: big.NewInt(76321000), ShanghaiBlock: big.NewInt(76321000), Gas50xBlock: big.NewInt(80370000), TIPXDCXMinerDisableBlock: big.NewInt(80370000), TIPXDCXReceiverDisableBlock: big.NewInt(80370900), EIP1559Block: big.NewInt(98800200), CancunBlock: big.NewInt(98802000), PragueBlock: nil, OsakaBlock: nil, DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Period: 2, Epoch: 900, Reward: 5000, RewardCheckpoint: 900, Gap: 450, FoundationWalletAddr: common.HexToAddress("xdc92a289fe95a85c53b8d0d113cbaef0c1ec98ac65"), MaxMasternodesV2: 108, V2: &V2{ SwitchEpoch: mainnetV2SwitchBlock / 900, SwitchBlock: big.NewInt(int64(mainnetV2SwitchBlock)), CurrentConfig: MainnetV2Configs[0], AllConfigs: MainnetV2Configs, }, }, } // MainnetChainConfig is the chain parameters to run a node on the ethereum main network. MainnetChainConfig = &ChainConfig{ ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(1150000), DAOForkBlock: big.NewInt(1920000), DAOForkSupport: true, TIP2019Block: nil, EIP150Block: big.NewInt(2463000), EIP155Block: big.NewInt(2675000), EIP158Block: big.NewInt(2675000), ByzantiumBlock: big.NewInt(4370000), ConstantinopleBlock: nil, PetersburgBlock: nil, IstanbulBlock: nil, TIPSigningBlock: nil, TIPRandomizeBlock: nil, TIPIncreaseMasternodesBlock: nil, DenylistBlock: nil, TIPNoHalvingMNRewardBlock: nil, TIPXDCXBlock: nil, TIPXDCXLendingBlock: nil, TIPXDCXCancellationFeeBlock: nil, TIPTRC21FeeBlock: nil, BerlinBlock: nil, LondonBlock: nil, MergeBlock: nil, ShanghaiBlock: nil, Gas50xBlock: nil, TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: nil, CancunBlock: nil, PragueBlock: nil, OsakaBlock: nil, DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.Address{}, XDCXListingSMC: common.Address{}, RelayerRegistrationSMC: common.Address{}, LendingRegistrationSMC: common.Address{}, Clique: nil, Ethash: new(EthashConfig), XDPoS: nil, } // TestnetChainConfig contains the chain parameters to run a node on the Apothem testnet. TestnetChainConfig = &ChainConfig{ ChainID: big.NewInt(51), HomesteadBlock: big.NewInt(1), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(1), EIP150Block: big.NewInt(2), EIP155Block: big.NewInt(3), EIP158Block: big.NewInt(3), ByzantiumBlock: big.NewInt(4), ConstantinopleBlock: nil, PetersburgBlock: nil, IstanbulBlock: nil, TIPSigningBlock: big.NewInt(3000000), TIPRandomizeBlock: big.NewInt(3464000), TIPIncreaseMasternodesBlock: big.NewInt(5000000), DenylistBlock: big.NewInt(23779191), TIPNoHalvingMNRewardBlock: big.NewInt(23779191), TIPXDCXBlock: big.NewInt(23779191), TIPXDCXLendingBlock: big.NewInt(23779191), TIPXDCXCancellationFeeBlock: big.NewInt(23779191), TIPTRC21FeeBlock: big.NewInt(23779191), Gas50xBlock: big.NewInt(56828700), Gas2500xBlock: big.NewInt(83600000), BerlinBlock: big.NewInt(61290000), LondonBlock: big.NewInt(61290000), MergeBlock: big.NewInt(61290000), ShanghaiBlock: big.NewInt(61290000), TIPXDCXMinerDisableBlock: big.NewInt(61290000), TIPXDCXReceiverDisableBlock: big.NewInt(66825000), EIP1559Block: big.NewInt(71550000), CancunBlock: big.NewInt(71551800), PragueBlock: nil, OsakaBlock: nil, DynamicGasLimitBlock: big.NewInt(83600000), TIPUpgradeRewardBlock: big.NewInt(83600000), TIPUpgradePenaltyBlock: big.NewInt(83600000), TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x0E2C88753131CE01c7551B726b28BFD04e44003F"), XDCXListingSMC: common.HexToAddress("0x14B2Bf043b9c31827A472CE4F94294fE9a6277e0"), RelayerRegistrationSMC: common.HexToAddress("0xA1996F69f47ba14Cb7f661010A7C31974277958c"), LendingRegistrationSMC: common.HexToAddress("0x28d7fC2Cf5c18203aaCD7459EFC6Af0643C97bE8"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Period: 2, Epoch: 900, Reward: 5000, RewardCheckpoint: 900, Gap: 450, FoundationWalletAddr: common.HexToAddress("xdc746249c61f5832c5eed53172776b460491bdcd5c"), MaxMasternodesV2: 15, V2: &V2{ SwitchEpoch: testnetV2SwitchBlock / 900, SwitchBlock: big.NewInt(int64(testnetV2SwitchBlock)), CurrentConfig: TestnetV2Configs[0], AllConfigs: TestnetV2Configs, }, }, } // DevnetChainConfig contains the chain parameters to run a node on the devnet. DevnetChainConfig = &ChainConfig{ ChainID: big.NewInt(551), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, PetersburgBlock: nil, IstanbulBlock: nil, TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), Gas2500xBlock: big.NewInt(1385100), TIPXDCXMinerDisableBlock: big.NewInt(0), TIPXDCXReceiverDisableBlock: big.NewInt(0), EIP1559Block: big.NewInt(25000), CancunBlock: big.NewInt(25000), PragueBlock: big.NewInt(50000), OsakaBlock: nil, DynamicGasLimitBlock: big.NewInt(50000), TIPUpgradeRewardBlock: big.NewInt(50000), TIPUpgradePenaltyBlock: big.NewInt(50000), TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Period: 2, Epoch: 900, Reward: 1026, RewardCheckpoint: 900, Gap: 450, FoundationWalletAddr: common.HexToAddress("0xf8b10955abe83acfdae2dbd4b5d351fc5e1c3672"), MaxMasternodesV2: 18, V2: &V2{ SwitchEpoch: devnetV2SwitchBlock / 900, SwitchBlock: big.NewInt(int64(devnetV2SwitchBlock)), CurrentConfig: DevnetV2Configs[0], AllConfigs: DevnetV2Configs, }, }, } // LocalnetChainConfig contains the chain parameters to run a node on the local network. LocalnetChainConfig = &ChainConfig{ ChainID: big.NewInt(5151), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, PetersburgBlock: nil, IstanbulBlock: nil, TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), Gas2500xBlock: big.NewInt(10), TIPXDCXMinerDisableBlock: big.NewInt(0), TIPXDCXReceiverDisableBlock: big.NewInt(0), EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: nil, DynamicGasLimitBlock: big.NewInt(0), TIPUpgradeRewardBlock: big.NewInt(0), TIPUpgradePenaltyBlock: big.NewInt(0), TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Period: 2, Epoch: 900, Reward: 250, RewardCheckpoint: 900, Gap: 450, SkipV1Validation: true, FoundationWalletAddr: common.HexToAddress("0x0000000000000000000000000000000000000068"), MaxMasternodesV2: 108, V2: &V2{ SwitchEpoch: 0, SwitchBlock: big.NewInt(0), CurrentConfig: LocalnetV2Configs[0], AllConfigs: LocalnetV2Configs, }, }, } // AllEthashProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers into the Ethash consensus. AllEthashProtocolChanges = &ChainConfig{ ChainID: new(big.Int).SetUint64(ConsensusOptionalTestChainID), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: new(EthashConfig), XDPoS: nil, } // AllDevChainProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers into the XDPoS consensus. // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. AllDevChainProtocolChanges = &ChainConfig{ ChainID: new(big.Int).SetUint64(ConsensusOptionalTestChainID), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Epoch: 900, Gap: 450, SkipV1Validation: true, FoundationWalletAddr: common.HexToAddress("0x0000000000000000000000000000000000000068"), Reward: 250, MaxMasternodesV2: 108, V2: &V2{ SwitchEpoch: 1, SwitchBlock: big.NewInt(900), CurrentConfig: UnitTestV2Configs[0], AllConfigs: UnitTestV2Configs, }, }, } // AllCliqueProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers into the Clique consensus. AllCliqueProtocolChanges = &ChainConfig{ ChainID: new(big.Int).SetUint64(ConsensusOptionalTestChainID), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: &CliqueConfig{Period: 0, Epoch: 900}, Ethash: nil, XDPoS: nil, } // XDPoS config with v2 engine after block 901 TestXDPoSMockChainConfig = &ChainConfig{ ChainID: new(big.Int).SetUint64(ConsensusOptionalTestChainID), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: nil, XDPoS: &XDPoSConfig{ Epoch: 900, Gap: 450, SkipV1Validation: true, FoundationWalletAddr: common.HexToAddress("0x0000000000000000000000000000000000000068"), Reward: 250, MaxMasternodesV2: 108, V2: &V2{ SwitchEpoch: 1, SwitchBlock: big.NewInt(900), CurrentConfig: UnitTestV2Configs[0], AllConfigs: UnitTestV2Configs, }, }, } // TestChainConfig contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers for testing purposes. TestChainConfig = &ChainConfig{ ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: new(EthashConfig), XDPoS: nil, } // MergedTestChainConfig contains every protocol change (EIPs) introduced // and accepted by the Ethereum core developers for testing purposes. MergedTestChainConfig = &ChainConfig{ ChainID: big.NewInt(1), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, TIP2019Block: big.NewInt(0), EIP150Block: big.NewInt(0), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), TIPSigningBlock: big.NewInt(0), TIPRandomizeBlock: big.NewInt(0), TIPIncreaseMasternodesBlock: big.NewInt(0), DenylistBlock: big.NewInt(0), TIPNoHalvingMNRewardBlock: big.NewInt(0), TIPXDCXBlock: big.NewInt(0), TIPXDCXLendingBlock: big.NewInt(0), TIPXDCXCancellationFeeBlock: big.NewInt(0), TIPTRC21FeeBlock: big.NewInt(0), BerlinBlock: big.NewInt(0), LondonBlock: big.NewInt(0), MergeBlock: big.NewInt(0), ShanghaiBlock: big.NewInt(0), Gas50xBlock: big.NewInt(0), TIPXDCXMinerDisableBlock: nil, TIPXDCXReceiverDisableBlock: nil, EIP1559Block: big.NewInt(0), CancunBlock: big.NewInt(0), PragueBlock: big.NewInt(0), OsakaBlock: big.NewInt(0), DynamicGasLimitBlock: nil, TIPUpgradeRewardBlock: nil, TIPUpgradePenaltyBlock: nil, TIPEpochHalvingBlock: nil, TRC21IssuerSMC: common.HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"), XDCXListingSMC: common.HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"), RelayerRegistrationSMC: common.HexToAddress("0x16c63b79f9C8784168103C0b74E6A59EC2de4a02"), LendingRegistrationSMC: common.HexToAddress("0x7d761afd7ff65a79e4173897594a194e3c506e57"), Clique: nil, Ethash: new(EthashConfig), XDPoS: nil, } TestRules = TestChainConfig.Rules(new(big.Int)) )