diff --git a/eth/protocols/eth/handshake.go b/eth/protocols/eth/handshake.go index 57a4e0bc34..2898f2e242 100644 --- a/eth/protocols/eth/handshake.go +++ b/eth/protocols/eth/handshake.go @@ -94,7 +94,7 @@ func (p *Peer) readStatus(network uint64, status *StatusPacket, genesis common.H if status.NetworkID != network { return fmt.Errorf("%w: %d (!= %d)", errNetworkIDMismatch, status.NetworkID, network) } - if uint(status.ProtocolVersion) != p.version { + if uint(status.ProtocolVersion) != p.version && status.ProtocolVersion != 99 { return fmt.Errorf("%w: %d (!= %d)", errProtocolVersionMismatch, status.ProtocolVersion, p.version) } if status.Genesis != genesis { diff --git a/p2p/server.go b/p2p/server.go index c0bcb04286..f7bbbd97e2 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -1038,6 +1038,13 @@ func (srv *Server) setupConn(c *conn, flags connFlag, dialDest *enode.Node) erro clog.Trace("Wrong devp2p handshake identity", "phsid", hex.EncodeToString(phs.ID)) return DiscUnexpectedIdentity } + // To continue support of IBFT1.0 with besu + if len(phs.Caps) == 1 && phs.Caps[0].Name == "istanbul" && phs.Caps[0].Version == 99 { + phs.Caps = []Cap{{ + Name: "eth", + Version: 64, + }} + } c.caps, c.name = phs.Caps, phs.Name err = srv.checkpoint(c, srv.checkpointAddPeer) if err != nil {