mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
fix segmentation fork when Capella for epoch is MaxUint64 (#13126)
* fix segmentation fork when Capella for epoch is MaxUint64 fix segmentation fix segmentation * Update cmd/prysmctl/testnet/generate_genesis.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> * Update cmd/prysmctl/testnet/generate_genesis.go Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> --------- Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
This commit is contained in:
@@ -272,12 +272,16 @@ func generateGenesis(ctx context.Context) (state.BeaconState, error) {
|
||||
// set timestamps for genesis and shanghai fork
|
||||
gen.Timestamp = f.GenesisTime
|
||||
gen.Config.ShanghaiTime = interop.GethShanghaiTime(f.GenesisTime, params.BeaconConfig())
|
||||
//gen.Config.CancunTime = interop.GethCancunTime(f.GenesisTime, params.BeaconConfig())
|
||||
gen.Config.CancunTime = interop.GethCancunTime(f.GenesisTime, params.BeaconConfig())
|
||||
log.
|
||||
WithField("shanghai", fmt.Sprintf("%d", *gen.Config.ShanghaiTime)).
|
||||
WithField("cancun", fmt.Sprintf("%d", *gen.Config.CancunTime)).
|
||||
Info("setting fork geth times")
|
||||
|
||||
fields := logrus.Fields{}
|
||||
if gen.Config.ShanghaiTime != nil {
|
||||
fields["shanghai"] = fmt.Sprintf("%d", *gen.Config.ShanghaiTime)
|
||||
}
|
||||
if gen.Config.CancunTime != nil {
|
||||
fields["cancun"] = fmt.Sprintf("%d", *gen.Config.CancunTime)
|
||||
}
|
||||
log.WithFields(fields).Info("Setting fork geth times")
|
||||
if v > version.Altair {
|
||||
// set ttd to zero so EL goes post-merge immediately
|
||||
gen.Config.TerminalTotalDifficulty = big.NewInt(0)
|
||||
|
||||
Reference in New Issue
Block a user