System information
Erigon version: v2.54.0
OS & Version: Linux
Erigon Command (with flags/config):
--chain=mainnet
--http.addr=0.0.0.0
--http
--ws
--http.api=eth,debug,net,trace,web3,erigon
Consensus Layer Command (with flags/config):
Chain/Network: ethereum mainnet
Expected behaviour
if the reorg begins with 18673916, I expect 18673916 to be republished
18673915, 18673916, 18673916, 18673917, 18673918
Actual behaviour
18673916 is not republished, and 18673917's parentHash points to a 18673916 header that was never received
18673915, 18673916, 18673917, 18673918
Steps to reproduce the behaviour
import (
"github.com/ethereum/go-ethereum/ethclient"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/core/types"
)
rpcClient, err := rpc.Dial("ws://localhost:8545")
if err != nil {
panic(err)
}
client := ethclient.NewClient(rpcClient)
var headerPC = make(chan *types.Header, 10)
client.SubscribeNewHead(context.Background(), headerPC)
for newHeader := range headerPC {
fmt.Printf("new header received: %d\n\thash: %s\n\tparentHash: %s\n",
newHeader.Number.Uint64(), newHeader.Hash().String(), newHeader.ParentHash.String(),
)
}
golang log output
new header received: 18673915
hash: 0xbe0b325962b2c29e8ead4ed70f0e62528856e8bf2659d49f8fc3c12b4b015cdd
parentHash: 0x2fa1de31e4f1dafc3778aa60f0f97dd4cdf36279cce30421df7cf1160dca843e
new header received: 18673916
hash: 0xc70ada05d79f36c9d17d762fc651c0d54fa7e62df417a8c6d806bd4179fab5c7
parentHash: 0xbe0b325962b2c29e8ead4ed70f0e62528856e8bf2659d49f8fc3c12b4b015cdd
new header received: 18673917
hash: 0xac48845a43c1158dc310b34c583328653028a69bd2c7d5007da233e73a6816f1
parentHash: 0x8ea7a7ab7991b914b0013ace4129a91d37b135123e407d356929558ee778c80f
new header received: 18673918
hash: 0x95ae4130df1613c1af9ea8d7e5949b5fcf94a4941a8862567256e8fe29caef43
parentHash: 0xac48845a43c1158dc310b34c583328653028a69bd2c7d5007da233e73a6816f1
erigon logs
[INFO] [11-29|01:12:48.621] RPC Daemon notified of new headers from=18673914 to=18673915 hash=0xbe0b325962b2c29e8ead4ed70f0e62528856e8bf2659d49f8fc3c12b...
[INFO] [11-29|01:12:48.621] head updated hash=0xbe0b325962b2c29e8ead4ed70f0e62528856e8bf2659d49f8fc3c12b4b015cdd number=18673915
[INFO] [11-29|01:13:03.129] [NewPayload] Handling new payload height=18673916 hash=0xc70ada05d79f36c9d17d762fc651c0d54fa7e62df417a8c6d806bd4179fab5c7
[INFO] [11-29|01:13:03.638] [updateForkchoice] Fork choice update: flushing in-memory state (built by previous newPayload)
[INFO] [11-29|01:13:04.058] RPC Daemon notified of new headers from=18673915 to=18673916 hash=0xc70ada05d79f36c9d17d762fc651c0d54fa7e62df417a8c6d806bd41...
[INFO] [11-29|01:13:04.058] head updated hash=0xc70ada05d79f36c9d17d762fc651c0d54fa7e62df417a8c6d806bd4179fab5c7 number=18673916
[INFO] [11-29|01:13:12.606] [NewPayload] Handling new payload height=18673916 hash=0x8ea7a7ab7991b914b0013ace4129a91d37b135123e407d356929558ee778c80f
[INFO] [11-29|01:13:13.101] [5/12 HashState] Unwinding started from=18673916 to=18673915 storage=false codes=true
[INFO] [11-29|01:13:13.102] [5/12 HashState] Unwinding started from=18673916 to=18673915 storage=false codes=false
[INFO] [11-29|01:13:13.105] [5/12 HashState] Unwinding started from=18673916 to=18673915 storage=true codes=false
[INFO] [11-29|01:13:13.111] [6/12 IntermediateHashes] Unwinding from=18673916 to=18673915 csbucket=AccountChangeSet
[INFO] [11-29|01:13:13.113] [6/12 IntermediateHashes] Unwinding from=18673916 to=18673915 csbucket=StorageChangeSet
[INFO] [11-29|01:13:13.146] [6/12 IntermediateHashes] Trie root hash=0x9ae17ccebb28ab234900448c18571a746f1646bfda12c21c8307ba8b4212ec09
[INFO] [11-29|01:13:13.162] [4/12 Execution] Unwind Execution from=18673916 to=18673915
[INFO] [11-29|01:13:13.244] [4/12 Execution] Completed on block=18673916
[INFO] [11-29|01:13:13.517] head updated hash=0x8ea7a7ab7991b914b0013ace4129a91d37b135123e407d356929558ee778c80f number=18673916
[INFO] [11-29|01:13:26.206] [NewPayload] Handling new payload height=18673917 hash=0xac48845a43c1158dc310b34c583328653028a69bd2c7d5007da233e73a6816f1
[INFO] [11-29|01:13:26.542] [updateForkchoice] Fork choice update: flushing in-memory state (built by previous newPayload)
[INFO] [11-29|01:13:26.853] RPC Daemon notified of new headers from=18673916 to=18673917 hash=0xac48845a43c1158dc310b34c583328653028a69bd2c7d5007da233e7...
[INFO] [11-29|01:13:26.853] head updated hash=0xac48845a43c1158dc310b34c583328653028a69bd2c7d5007da233e73a6816f1 number=18673917
[INFO] [11-29|01:13:35.972] [NewPayload] Handling new payload height=18673918 hash=0x95ae4130df1613c1af9ea8d7e5949b5fcf94a4941a8862567256e8fe29caef43
System information
Erigon version: v2.54.0
OS & Version: Linux
Erigon Command (with flags/config):
Consensus Layer Command (with flags/config):
Chain/Network: ethereum mainnet
Expected behaviour
if the reorg begins with 18673916, I expect 18673916 to be republished
18673915, 18673916, 18673916, 18673917, 18673918
Actual behaviour
18673916 is not republished, and 18673917's parentHash points to a 18673916 header that was never received
18673915, 18673916, 18673917, 18673918
Steps to reproduce the behaviour
golang log output
erigon logs