forked from node-real/bsc
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
There are two hard forks, the first hard fork support new tx, epoch0, epoch1, second hard fork support epoch rotate. we could delay state expiry, fix issues, and upgrade features between two hard forks.
STATE_EXPIRY_HARDFORK1_BLOCKNUM indicates start epoch1, STATE_EXPIRY_HARDFORK2_BLOCKNUM indicates start epoch2 and start epoch rotate by EpochPeriod.
Epoch definition, calculate block epoch by:
func getCurrentEpoch(block uint64) uint64 {
if block < STATE_EXPIRY_HARDFORK1_BLOCKNUM {
return 0
} else if block < STATE_EXPIRY_HARDFORK2_BLOCKNUM {
return 1
} else {
return (block - STATE_EXPIRY_HARDFORK2_BLOCKNUM) / EpochPeriod + 2
}
}EpochPeriod = 7,008,000.
When merge furture Verkle Tree, from N epoch for special upgrade.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels