Compare commits

..

3 Commits

Author SHA1 Message Date
zzzckck
ec318b9c97
github: upgrade upload artifact from v4.1.7 to v4.3.3 (#2713) 2024-09-19 15:02:02 +08:00
zzzckck
6624522423
github: upgrade artifact from v3 to v4.1.7 (#2712)
upload-artifact and download-artifact must use same version, otherwise
release workflow will fail.
https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
2024-09-19 14:54:35 +08:00
zzzckck
206c3b0ab0
Merge pull request #2701 from bnb-chain/develop
Draft release v1.4.15
2024-09-19 11:50:11 +08:00
66 changed files with 47 additions and 595 deletions

View File

@ -63,8 +63,7 @@ var (
Flags: flags.Merge([]cli.Flag{
utils.CachePreimagesFlag,
utils.OverridePassedForkTime,
utils.OverridePascal,
utils.OverridePrague,
utils.OverrideBohr,
utils.OverrideVerkle,
utils.MultiDataBaseFlag,
}, utils.DatabaseFlags),
@ -259,13 +258,9 @@ func initGenesis(ctx *cli.Context) error {
v := ctx.Uint64(utils.OverridePassedForkTime.Name)
overrides.OverridePassedForkTime = &v
}
if ctx.IsSet(utils.OverridePascal.Name) {
v := ctx.Uint64(utils.OverridePascal.Name)
overrides.OverridePascal = &v
}
if ctx.IsSet(utils.OverridePrague.Name) {
v := ctx.Uint64(utils.OverridePrague.Name)
overrides.OverridePrague = &v
if ctx.IsSet(utils.OverrideBohr.Name) {
v := ctx.Uint64(utils.OverrideBohr.Name)
overrides.OverrideBohr = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)

View File

@ -191,13 +191,9 @@ func makeFullNode(ctx *cli.Context) (*node.Node, ethapi.Backend) {
v := ctx.Uint64(utils.OverridePassedForkTime.Name)
cfg.Eth.OverridePassedForkTime = &v
}
if ctx.IsSet(utils.OverridePascal.Name) {
v := ctx.Uint64(utils.OverridePascal.Name)
cfg.Eth.OverridePascal = &v
}
if ctx.IsSet(utils.OverridePrague.Name) {
v := ctx.Uint64(utils.OverridePrague.Name)
cfg.Eth.OverridePrague = &v
if ctx.IsSet(utils.OverrideBohr.Name) {
v := ctx.Uint64(utils.OverrideBohr.Name)
cfg.Eth.OverrideBohr = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)

View File

@ -73,8 +73,7 @@ var (
utils.SmartCardDaemonPathFlag,
utils.RialtoHash,
utils.OverridePassedForkTime,
utils.OverridePascal,
utils.OverridePrague,
utils.OverrideBohr,
utils.OverrideVerkle,
utils.OverrideFullImmutabilityThreshold,
utils.OverrideMinBlocksForBlobRequests,

View File

@ -310,17 +310,12 @@ var (
}
OverridePassedForkTime = &cli.Uint64Flag{
Name: "override.passedforktime",
Usage: "Manually specify the hard fork timestamps which have passed on the mainnet, overriding the bundled setting",
Usage: "Manually specify the hard fork timestamp except the last one, overriding the bundled setting",
Category: flags.EthCategory,
}
OverridePascal = &cli.Uint64Flag{
Name: "override.pascal",
Usage: "Manually specify the Pascal fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverridePrague = &cli.Uint64Flag{
Name: "override.prague",
Usage: "Manually specify the Prague fork timestamp, overriding the bundled setting",
OverrideBohr = &cli.Uint64Flag{
Name: "override.bohr",
Usage: "Manually specify the Bohr fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideVerkle = &cli.Uint64Flag{

View File

@ -217,8 +217,7 @@ func (e *GenesisMismatchError) Error() string {
// Typically, these modifications involve hardforks that are not enabled on the BSC mainnet, intended for testing purposes.
type ChainOverrides struct {
OverridePassedForkTime *uint64
OverridePascal *uint64
OverridePrague *uint64
OverrideBohr *uint64
OverrideVerkle *uint64
}
@ -253,13 +252,9 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *triedb.Database, g
config.CancunTime = overrides.OverridePassedForkTime
config.HaberTime = overrides.OverridePassedForkTime
config.HaberFixTime = overrides.OverridePassedForkTime
config.BohrTime = overrides.OverridePassedForkTime
}
if overrides != nil && overrides.OverridePascal != nil {
config.PascalTime = overrides.OverridePascal
}
if overrides != nil && overrides.OverridePrague != nil {
config.PragueTime = overrides.OverridePrague
if overrides != nil && overrides.OverrideBohr != nil {
config.BohrTime = overrides.OverrideBohr
}
if overrides != nil && overrides.OverrideVerkle != nil {
config.VerkleTime = overrides.OverrideVerkle

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -17,3 +17,11 @@ var (
//go:embed chapel/StakeHubContract
ChapelStakeHubContract string
)
// contract codes for Rialto upgrade
var (
//go:embed rialto/ValidatorContract
RialtoValidatorContract string
//go:embed rialto/StakeHubContract
RialtoStakeHubContract string
)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,168 +0,0 @@
package pascal
import _ "embed"
// contract codes for Mainnet upgrade
var (
//go:embed mainnet/ValidatorContract
MainnetValidatorContract string
//go:embed mainnet/SlashContract
MainnetSlashContract string
//go:embed mainnet/SystemRewardContract
MainnetSystemRewardContract string
//go:embed mainnet/LightClientContract
MainnetLightClientContract string
//go:embed mainnet/TokenHubContract
MainnetTokenHubContract string
//go:embed mainnet/RelayerIncentivizeContract
MainnetRelayerIncentivizeContract string
//go:embed mainnet/RelayerHubContract
MainnetRelayerHubContract string
//go:embed mainnet/GovHubContract
MainnetGovHubContract string
//go:embed mainnet/TokenManagerContract
MainnetTokenManagerContract string
//go:embed mainnet/CrossChainContract
MainnetCrossChainContract string
//go:embed mainnet/StakingContract
MainnetStakingContract string
//go:embed mainnet/StakeHubContract
MainnetStakeHubContract string
//go:embed mainnet/StakeCreditContract
MainnetStakeCreditContract string
//go:embed mainnet/GovernorContract
MainnetGovernorContract string
//go:embed mainnet/GovTokenContract
MainnetGovTokenContract string
//go:embed mainnet/TimelockContract
MainnetTimelockContract string
//go:embed mainnet/TokenRecoverPortalContract
MainnetTokenRecoverPortalContract string
)
// contract codes for Chapel upgrade
var (
//go:embed chapel/ValidatorContract
ChapelValidatorContract string
//go:embed chapel/SlashContract
ChapelSlashContract string
//go:embed chapel/SystemRewardContract
ChapelSystemRewardContract string
//go:embed chapel/LightClientContract
ChapelLightClientContract string
//go:embed chapel/TokenHubContract
ChapelTokenHubContract string
//go:embed chapel/RelayerIncentivizeContract
ChapelRelayerIncentivizeContract string
//go:embed chapel/RelayerHubContract
ChapelRelayerHubContract string
//go:embed chapel/GovHubContract
ChapelGovHubContract string
//go:embed chapel/TokenManagerContract
ChapelTokenManagerContract string
//go:embed chapel/CrossChainContract
ChapelCrossChainContract string
//go:embed chapel/StakingContract
ChapelStakingContract string
//go:embed chapel/StakeHubContract
ChapelStakeHubContract string
//go:embed chapel/StakeCreditContract
ChapelStakeCreditContract string
//go:embed chapel/GovernorContract
ChapelGovernorContract string
//go:embed chapel/GovTokenContract
ChapelGovTokenContract string
//go:embed chapel/TimelockContract
ChapelTimelockContract string
//go:embed chapel/TokenRecoverPortalContract
ChapelTokenRecoverPortalContract string
)
// contract codes for Rialto upgrade
var (
//go:embed rialto/ValidatorContract
RialtoValidatorContract string
//go:embed rialto/SlashContract
RialtoSlashContract string
//go:embed rialto/SystemRewardContract
RialtoSystemRewardContract string
//go:embed rialto/LightClientContract
RialtoLightClientContract string
//go:embed rialto/TokenHubContract
RialtoTokenHubContract string
//go:embed rialto/RelayerIncentivizeContract
RialtoRelayerIncentivizeContract string
//go:embed rialto/RelayerHubContract
RialtoRelayerHubContract string
//go:embed rialto/GovHubContract
RialtoGovHubContract string
//go:embed rialto/TokenManagerContract
RialtoTokenManagerContract string
//go:embed rialto/CrossChainContract
RialtoCrossChainContract string
//go:embed rialto/StakingContract
RialtoStakingContract string
//go:embed rialto/StakeHubContract
RialtoStakeHubContract string
//go:embed rialto/StakeCreditContract
RialtoStakeCreditContract string
//go:embed rialto/GovernorContract
RialtoGovernorContract string
//go:embed rialto/GovTokenContract
RialtoGovTokenContract string
//go:embed rialto/TimelockContract
RialtoTimelockContract string
//go:embed rialto/TokenRecoverPortalContract
RialtoTokenRecoverPortalContract string
)

View File

@ -20,7 +20,6 @@ import (
"github.com/ethereum/go-ethereum/core/systemcontracts/mirror"
"github.com/ethereum/go-ethereum/core/systemcontracts/moran"
"github.com/ethereum/go-ethereum/core/systemcontracts/niels"
"github.com/ethereum/go-ethereum/core/systemcontracts/pascal"
"github.com/ethereum/go-ethereum/core/systemcontracts/planck"
"github.com/ethereum/go-ethereum/core/systemcontracts/plato"
"github.com/ethereum/go-ethereum/core/systemcontracts/ramanujan"
@ -83,8 +82,6 @@ var (
haberFixUpgrade = make(map[string]*Upgrade)
bohrUpgrade = make(map[string]*Upgrade)
pascalUpgrade = make(map[string]*Upgrade)
)
func init() {
@ -776,275 +773,18 @@ func init() {
},
}
pascalUpgrade[mainNet] = &Upgrade{
UpgradeName: "pascal",
bohrUpgrade[rialtoNet] = &Upgrade{
UpgradeName: "bohr",
Configs: []*UpgradeConfig{
{
ContractAddr: common.HexToAddress(ValidatorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetValidatorContract,
},
{
ContractAddr: common.HexToAddress(SlashContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetSlashContract,
},
{
ContractAddr: common.HexToAddress(SystemRewardContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetSystemRewardContract,
},
{
ContractAddr: common.HexToAddress(LightClientContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetLightClientContract,
},
{
ContractAddr: common.HexToAddress(TokenHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetTokenHubContract,
},
{
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetRelayerIncentivizeContract,
},
{
ContractAddr: common.HexToAddress(RelayerHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetRelayerHubContract,
},
{
ContractAddr: common.HexToAddress(GovHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetGovHubContract,
},
{
ContractAddr: common.HexToAddress(TokenManagerContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetTokenManagerContract,
},
{
ContractAddr: common.HexToAddress(CrossChainContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetCrossChainContract,
},
{
ContractAddr: common.HexToAddress(StakingContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetStakingContract,
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
Code: bohr.RialtoValidatorContract,
},
{
ContractAddr: common.HexToAddress(StakeHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetStakeHubContract,
},
{
ContractAddr: common.HexToAddress(StakeCreditContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetStakeCreditContract,
},
{
ContractAddr: common.HexToAddress(GovernorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetGovernorContract,
},
{
ContractAddr: common.HexToAddress(GovTokenContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetGovTokenContract,
},
{
ContractAddr: common.HexToAddress(TimelockContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetTimelockContract,
},
{
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.MainnetTokenRecoverPortalContract,
},
},
}
pascalUpgrade[chapelNet] = &Upgrade{
UpgradeName: "pascal",
Configs: []*UpgradeConfig{
{
ContractAddr: common.HexToAddress(ValidatorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelValidatorContract,
},
{
ContractAddr: common.HexToAddress(SlashContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelSlashContract,
},
{
ContractAddr: common.HexToAddress(SystemRewardContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelSystemRewardContract,
},
{
ContractAddr: common.HexToAddress(LightClientContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelLightClientContract,
},
{
ContractAddr: common.HexToAddress(TokenHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelTokenHubContract,
},
{
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelRelayerIncentivizeContract,
},
{
ContractAddr: common.HexToAddress(RelayerHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelRelayerHubContract,
},
{
ContractAddr: common.HexToAddress(GovHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelGovHubContract,
},
{
ContractAddr: common.HexToAddress(TokenManagerContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelTokenManagerContract,
},
{
ContractAddr: common.HexToAddress(CrossChainContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelCrossChainContract,
},
{
ContractAddr: common.HexToAddress(StakingContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelStakingContract,
},
{
ContractAddr: common.HexToAddress(StakeHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelStakeHubContract,
},
{
ContractAddr: common.HexToAddress(StakeCreditContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelStakeCreditContract,
},
{
ContractAddr: common.HexToAddress(GovernorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelGovernorContract,
},
{
ContractAddr: common.HexToAddress(GovTokenContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelGovTokenContract,
},
{
ContractAddr: common.HexToAddress(TimelockContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelTimelockContract,
},
{
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.ChapelTokenRecoverPortalContract,
},
},
}
pascalUpgrade[rialtoNet] = &Upgrade{
UpgradeName: "pascal",
Configs: []*UpgradeConfig{
{
ContractAddr: common.HexToAddress(ValidatorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoValidatorContract,
},
{
ContractAddr: common.HexToAddress(SlashContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoSlashContract,
},
{
ContractAddr: common.HexToAddress(SystemRewardContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoSystemRewardContract,
},
{
ContractAddr: common.HexToAddress(LightClientContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoLightClientContract,
},
{
ContractAddr: common.HexToAddress(TokenHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoTokenHubContract,
},
{
ContractAddr: common.HexToAddress(RelayerIncentivizeContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoRelayerIncentivizeContract,
},
{
ContractAddr: common.HexToAddress(RelayerHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoRelayerHubContract,
},
{
ContractAddr: common.HexToAddress(GovHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoGovHubContract,
},
{
ContractAddr: common.HexToAddress(TokenManagerContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoTokenManagerContract,
},
{
ContractAddr: common.HexToAddress(CrossChainContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoCrossChainContract,
},
{
ContractAddr: common.HexToAddress(StakingContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoStakingContract,
},
{
ContractAddr: common.HexToAddress(StakeHubContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoStakeHubContract,
},
{
ContractAddr: common.HexToAddress(StakeCreditContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoStakeCreditContract,
},
{
ContractAddr: common.HexToAddress(GovernorContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoGovernorContract,
},
{
ContractAddr: common.HexToAddress(GovTokenContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoGovTokenContract,
},
{
ContractAddr: common.HexToAddress(TimelockContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoTimelockContract,
},
{
ContractAddr: common.HexToAddress(TokenRecoverPortalContract),
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/d1564095cca3bfbd303a5e3de2ad90e719d12564",
Code: pascal.RialtoTokenRecoverPortalContract,
CommitUrl: "https://github.com/bnb-chain/bsc-genesis-contract/commit/398c9364aad5261c1ecd90ac3ab2df89b65c45e3",
Code: bohr.RialtoStakeHubContract,
},
},
}
@ -1133,10 +873,6 @@ func UpgradeBuildInSystemContract(config *params.ChainConfig, blockNumber *big.I
applySystemContractUpgrade(bohrUpgrade[network], blockNumber, statedb, logger)
}
if config.IsOnPascal(blockNumber, lastBlockTime, blockTime) {
applySystemContractUpgrade(pascalUpgrade[network], blockNumber, statedb, logger)
}
/*
apply other upgrades
*/

View File

@ -17,7 +17,7 @@
# - A constraint describing the requirements of the law, called "require"
# * Implementations are transliterated into functions that operate as well on
# algebraic input points, and are called once per combination of branches
# executed. Each execution returns:
# exectured. Each execution returns:
# - A constraint describing the assumptions this implementation requires
# (such as Z1=1), called "assumeFormula"
# - A constraint describing the assumptions this specific branch requires,

View File

@ -193,16 +193,11 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
chainConfig.CancunTime = config.OverridePassedForkTime
chainConfig.HaberTime = config.OverridePassedForkTime
chainConfig.HaberFixTime = config.OverridePassedForkTime
chainConfig.BohrTime = config.OverridePassedForkTime
overrides.OverridePassedForkTime = config.OverridePassedForkTime
}
if config.OverridePascal != nil {
chainConfig.PascalTime = config.OverridePascal
overrides.OverridePascal = config.OverridePascal
}
if config.OverridePrague != nil {
chainConfig.PragueTime = config.OverridePrague
overrides.OverridePrague = config.OverridePrague
if config.OverrideBohr != nil {
chainConfig.BohrTime = config.OverrideBohr
overrides.OverrideBohr = config.OverrideBohr
}
if config.OverrideVerkle != nil {
chainConfig.VerkleTime = config.OverrideVerkle

View File

@ -191,11 +191,8 @@ type Config struct {
// OverridePassedForkTime
OverridePassedForkTime *uint64 `toml:",omitempty"`
// OverridePascal (TODO: remove after the fork)
OverridePascal *uint64 `toml:",omitempty"`
// OverridePrague (TODO: remove after the fork)
OverridePrague *uint64 `toml:",omitempty"`
// OverrideBohr (TODO: remove after the fork)
OverrideBohr *uint64 `toml:",omitempty"`
// OverrideVerkle (TODO: remove after the fork)
OverrideVerkle *uint64 `toml:",omitempty"`

View File

@ -70,9 +70,8 @@ func (c Config) MarshalTOML() (interface{}, error) {
RPCGasCap uint64
RPCEVMTimeout time.Duration
RPCTxFeeCap float64
OverridePassedForkTime *uint64 `toml:",omitempty"`
OverridePascal *uint64 `toml:",omitempty"`
OverridePrague *uint64 `toml:",omitempty"`
OverridePassedForkTime *uint64 `toml:",omitempty"`
OverrideBohr *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
BlobExtraReserve uint64
}
@ -131,8 +130,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.RPCEVMTimeout = c.RPCEVMTimeout
enc.RPCTxFeeCap = c.RPCTxFeeCap
enc.OverridePassedForkTime = c.OverridePassedForkTime
enc.OverridePascal = c.OverridePascal
enc.OverridePrague = c.OverridePrague
enc.OverrideBohr = c.OverrideBohr
enc.OverrideVerkle = c.OverrideVerkle
enc.BlobExtraReserve = c.BlobExtraReserve
return &enc, nil
@ -194,9 +192,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
RPCGasCap *uint64
RPCEVMTimeout *time.Duration
RPCTxFeeCap *float64
OverridePassedForkTime *uint64 `toml:",omitempty"`
OverridePascal *uint64 `toml:",omitempty"`
OverridePrague *uint64 `toml:",omitempty"`
OverridePassedForkTime *uint64 `toml:",omitempty"`
OverrideBohr *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
BlobExtraReserve *uint64
}
@ -366,11 +363,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.OverridePassedForkTime != nil {
c.OverridePassedForkTime = dec.OverridePassedForkTime
}
if dec.OverridePascal != nil {
c.OverridePascal = dec.OverridePascal
}
if dec.OverridePrague != nil {
c.OverridePrague = dec.OverridePrague
if dec.OverrideBohr != nil {
c.OverrideBohr = dec.OverrideBohr
}
if dec.OverrideVerkle != nil {
c.OverrideVerkle = dec.OverrideVerkle

View File

@ -155,9 +155,6 @@ var (
HaberTime: newUint64(1718863500), // 2024-06-20 06:05:00 AM UTC
HaberFixTime: newUint64(1727316120), // 2024-09-26 02:02:00 AM UTC
BohrTime: newUint64(1727317200), // 2024-09-26 02:20:00 AM UTC
// TODO
PascalTime: nil,
PragueTime: nil,
Parlia: &ParliaConfig{
Period: 3,
@ -199,9 +196,6 @@ var (
HaberTime: newUint64(1716962820), // 2024-05-29 06:07:00 AM UTC
HaberFixTime: newUint64(1719986788), // 2024-07-03 06:06:28 AM UTC
BohrTime: newUint64(1724116996), // 2024-08-20 01:23:16 AM UTC
// TODO
PascalTime: nil,
PragueTime: nil,
Parlia: &ParliaConfig{
Period: 3,
@ -244,9 +238,6 @@ var (
HaberTime: newUint64(0),
HaberFixTime: newUint64(0),
BohrTime: newUint64(0),
// TODO: set them to `0` when passed on the mainnet
PascalTime: nil,
PragueTime: nil,
Parlia: &ParliaConfig{
Period: 3,
@ -526,7 +517,6 @@ type ChainConfig struct {
HaberTime *uint64 `json:"haberTime,omitempty"` // Haber switch time (nil = no fork, 0 = already on haber)
HaberFixTime *uint64 `json:"haberFixTime,omitempty"` // HaberFix switch time (nil = no fork, 0 = already on haberFix)
BohrTime *uint64 `json:"bohrTime,omitempty"` // Bohr switch time (nil = no fork, 0 = already on bohr)
PascalTime *uint64 `json:"pascalTime,omitempty"` // Pascal switch time (nil = no fork, 0 = already on pascal)
PragueTime *uint64 `json:"pragueTime,omitempty"` // Prague switch time (nil = no fork, 0 = already on prague)
VerkleTime *uint64 `json:"verkleTime,omitempty"` // Verkle switch time (nil = no fork, 0 = already on verkle)
@ -647,17 +637,7 @@ func (c *ChainConfig) String() string {
BohrTime = big.NewInt(0).SetUint64(*c.BohrTime)
}
var PascalTime *big.Int
if c.PascalTime != nil {
PascalTime = big.NewInt(0).SetUint64(*c.PascalTime)
}
var PragueTime *big.Int
if c.PragueTime != nil {
PragueTime = big.NewInt(0).SetUint64(*c.PragueTime)
}
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Berlin: %v, YOLO v3: %v, CatalystBlock: %v, London: %v, ArrowGlacier: %v, MergeFork:%v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Planck: %v,Luban: %v, Plato: %v, Hertz: %v, Hertzfix: %v, ShanghaiTime: %v, KeplerTime: %v, FeynmanTime: %v, FeynmanFixTime: %v, CancunTime: %v, HaberTime: %v, HaberFixTime: %v, BohrTime: %v, PascalTime: %v, PragueTime: %v, Engine: %v}",
return fmt.Sprintf("{ChainID: %v Homestead: %v DAO: %v DAOSupport: %v EIP150: %v EIP155: %v EIP158: %v Byzantium: %v Constantinople: %v Petersburg: %v Istanbul: %v, Muir Glacier: %v, Ramanujan: %v, Niels: %v, MirrorSync: %v, Bruno: %v, Berlin: %v, YOLO v3: %v, CatalystBlock: %v, London: %v, ArrowGlacier: %v, MergeFork:%v, Euler: %v, Gibbs: %v, Nano: %v, Moran: %v, Planck: %v,Luban: %v, Plato: %v, Hertz: %v, Hertzfix: %v, ShanghaiTime: %v, KeplerTime: %v, FeynmanTime: %v, FeynmanFixTime: %v, CancunTime: %v, HaberTime: %v, HaberFixTime: %v, BohrTime: %v, Engine: %v}",
c.ChainID,
c.HomesteadBlock,
c.DAOForkBlock,
@ -697,8 +677,6 @@ func (c *ChainConfig) String() string {
HaberTime,
HaberFixTime,
BohrTime,
PascalTime,
PragueTime,
engine,
)
}
@ -999,20 +977,6 @@ func (c *ChainConfig) IsOnBohr(currentBlockNumber *big.Int, lastBlockTime uint64
return !c.IsBohr(lastBlockNumber, lastBlockTime) && c.IsBohr(currentBlockNumber, currentBlockTime)
}
// IsPascal returns whether time is either equal to the Pascal fork time or greater.
func (c *ChainConfig) IsPascal(num *big.Int, time uint64) bool {
return c.IsLondon(num) && isTimestampForked(c.PascalTime, time)
}
// IsOnPascal returns whether currentBlockTime is either equal to the Pascal fork time or greater firstly.
func (c *ChainConfig) IsOnPascal(currentBlockNumber *big.Int, lastBlockTime uint64, currentBlockTime uint64) bool {
lastBlockNumber := new(big.Int)
if currentBlockNumber.Cmp(big.NewInt(1)) >= 0 {
lastBlockNumber.Sub(currentBlockNumber, big.NewInt(1))
}
return !c.IsPascal(lastBlockNumber, lastBlockTime) && c.IsPascal(currentBlockNumber, currentBlockTime)
}
// IsPrague returns whether num is either equal to the Prague fork time or greater.
func (c *ChainConfig) IsPrague(num *big.Int, time uint64) bool {
return c.IsLondon(num) && isTimestampForked(c.PragueTime, time)
@ -1079,8 +1043,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
{name: "haberTime", timestamp: c.HaberTime},
{name: "haberFixTime", timestamp: c.HaberFixTime},
{name: "bohrTime", timestamp: c.BohrTime},
{name: "pascalTime", timestamp: c.PascalTime},
{name: "pragueTime", timestamp: c.PragueTime},
{name: "pragueTime", timestamp: c.PragueTime, optional: true},
{name: "verkleTime", timestamp: c.VerkleTime, optional: true},
} {
if lastFork.name != "" {
@ -1236,9 +1199,6 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, headNumber *big.Int,
if isForkTimestampIncompatible(c.BohrTime, newcfg.BohrTime, headTimestamp) {
return newTimestampCompatError("Bohr fork timestamp", c.BohrTime, newcfg.BohrTime)
}
if isForkTimestampIncompatible(c.PascalTime, newcfg.PascalTime, headTimestamp) {
return newTimestampCompatError("Pascal fork timestamp", c.PascalTime, newcfg.PascalTime)
}
if isForkTimestampIncompatible(c.PragueTime, newcfg.PragueTime, headTimestamp) {
return newTimestampCompatError("Prague fork timestamp", c.PragueTime, newcfg.PragueTime)
}
@ -1422,7 +1382,7 @@ type Rules struct {
IsHertz bool
IsHertzfix bool
IsShanghai, IsKepler, IsFeynman, IsCancun, IsHaber bool
IsBohr, IsPascal, IsPrague, IsVerkle bool
IsBohr, IsPrague, IsVerkle bool
}
// Rules ensures c's ChainID is not nil.
@ -1459,7 +1419,6 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
IsCancun: c.IsCancun(num, timestamp),
IsHaber: c.IsHaber(num, timestamp),
IsBohr: c.IsBohr(num, timestamp),
IsPascal: c.IsPascal(num, timestamp),
IsPrague: c.IsPrague(num, timestamp),
IsVerkle: c.IsVerkle(num, timestamp),
}