From 3ba522aba1c47a5793343c13f637417fa971a59d Mon Sep 17 00:00:00 2001 From: Shane Bammel Date: Mon, 3 Oct 2022 22:35:48 -0500 Subject: [PATCH] Allow mismatching EIP158 ChainID if at fork --- params/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/params/config.go b/params/config.go index 0533c7599..f3a239e7a 100644 --- a/params/config.go +++ b/params/config.go @@ -700,7 +700,8 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, headNumber *big.Int, if isForkBlockIncompatible(c.EIP158Block, newcfg.EIP158Block, headNumber) { return newBlockCompatError("EIP158 fork block", c.EIP158Block, newcfg.EIP158Block) } - if c.IsEIP158(headNumber) && !configBlockEqual(c.ChainID, newcfg.ChainID) { + // allow mismatching ChainID if we're at the PrimordialPulseBlock + if c.IsEIP158(headNumber) && !configBlockEqual(c.ChainID, newcfg.ChainID) && !newcfg.IsPrimordialPulseBlock(new(big.Int).Add(headNumber, common.Big1)) { return newBlockCompatError("EIP158 chain ID", c.EIP158Block, newcfg.EIP158Block) } if isForkBlockIncompatible(c.ByzantiumBlock, newcfg.ByzantiumBlock, headNumber) {