Change Istanbul64 to Istanbul99 (#1903)

When interop testing between Besu and Quorum, it was found
that Quorum's management of the ibft protocol had somewhat
changed, and resulted in besu failing to peer with Quorum

To overcome this, the version of the istanbul protocol in
Besu was upgraded to 99 (matching Quorum's).

Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
pull/1918/head
Trent Mohay 4 years ago committed by GitHub
parent c05b0999ee
commit 8e8d907fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      besu/src/main/java/org/hyperledger/besu/controller/IbftLegacyBesuControllerBuilder.java
  2. 12
      consensus/ibftlegacy/src/main/java/org/hyperledger/besu/consensus/ibftlegacy/protocol/Istanbul99Protocol.java
  3. 8
      consensus/ibftlegacy/src/main/java/org/hyperledger/besu/consensus/ibftlegacy/protocol/Istanbul99ProtocolManager.java

@ -23,8 +23,8 @@ import org.hyperledger.besu.consensus.common.VoteTallyUpdater;
import org.hyperledger.besu.consensus.common.bft.BftContext;
import org.hyperledger.besu.consensus.ibftlegacy.IbftLegacyBlockInterface;
import org.hyperledger.besu.consensus.ibftlegacy.IbftProtocolSchedule;
import org.hyperledger.besu.consensus.ibftlegacy.protocol.Istanbul64Protocol;
import org.hyperledger.besu.consensus.ibftlegacy.protocol.Istanbul64ProtocolManager;
import org.hyperledger.besu.consensus.ibftlegacy.protocol.Istanbul99Protocol;
import org.hyperledger.besu.consensus.ibftlegacy.protocol.Istanbul99ProtocolManager;
import org.hyperledger.besu.ethereum.ProtocolContext;
import org.hyperledger.besu.ethereum.blockcreation.MiningCoordinator;
import org.hyperledger.besu.ethereum.blockcreation.NoopMiningCoordinator;
@ -58,7 +58,7 @@ public class IbftLegacyBesuControllerBuilder extends BesuControllerBuilder {
protected SubProtocolConfiguration createSubProtocolConfiguration(
final EthProtocolManager ethProtocolManager) {
return new SubProtocolConfiguration()
.withSubProtocol(Istanbul64Protocol.get(), ethProtocolManager);
.withSubProtocol(Istanbul99Protocol.get(), ethProtocolManager);
}
@Override
@ -113,7 +113,7 @@ public class IbftLegacyBesuControllerBuilder extends BesuControllerBuilder {
@Override
protected String getSupportedProtocol() {
return Istanbul64Protocol.get().getName();
return Istanbul99Protocol.get().getName();
}
@Override
@ -128,7 +128,7 @@ public class IbftLegacyBesuControllerBuilder extends BesuControllerBuilder {
final EthScheduler scheduler,
final List<PeerValidator> peerValidators) {
LOG.info("Operating on IBFT-1.0 network.");
return new Istanbul64ProtocolManager(
return new Istanbul99ProtocolManager(
protocolContext.getBlockchain(),
networkId,
protocolContext.getWorldStateArchive(),

@ -24,19 +24,19 @@ import java.util.Arrays;
import java.util.List;
/**
* Represents the istanbul/64 protocol as used by Quorum (effectively an extension of eth/63, which
* Represents the istanbul/64 protocol as used by Quorum (effectively an extension of eth/65, which
* adds a single message type (0x11) to encapsulate all communications required for IBFT block
* mining.
*/
public class Istanbul64Protocol implements SubProtocol {
public class Istanbul99Protocol implements SubProtocol {
private static final String NAME = "istanbul";
private static final int VERSION = 64;
private static final int VERSION = 99;
static final Capability ISTANBUL64 = Capability.create(NAME, 64);
static final Capability ISTANBUL99 = Capability.create(NAME, 99);
static final int INSTANBUL_MSG = 0x11;
private static final Istanbul64Protocol INSTANCE = new Istanbul64Protocol();
private static final Istanbul99Protocol INSTANCE = new Istanbul99Protocol();
private static final List<Integer> istanbul64Messages =
Arrays.asList(
@ -115,7 +115,7 @@ public class Istanbul64Protocol implements SubProtocol {
}
}
public static Istanbul64Protocol get() {
public static Istanbul99Protocol get() {
return INSTANCE;
}
}

@ -32,9 +32,9 @@ import java.math.BigInteger;
import java.util.List;
/** This allows for interoperability with Quorum, but shouldn't be used otherwise. */
public class Istanbul64ProtocolManager extends EthProtocolManager {
public class Istanbul99ProtocolManager extends EthProtocolManager {
public Istanbul64ProtocolManager(
public Istanbul99ProtocolManager(
final Blockchain blockchain,
final BigInteger networkId,
final WorldStateArchive worldStateArchive,
@ -62,11 +62,11 @@ public class Istanbul64ProtocolManager extends EthProtocolManager {
@Override
public List<Capability> getSupportedCapabilities() {
return singletonList(Istanbul64Protocol.ISTANBUL64);
return singletonList(Istanbul99Protocol.ISTANBUL99);
}
@Override
public String getSupportedProtocol() {
return Istanbul64Protocol.get().getName();
return Istanbul99Protocol.get().getName();
}
}
Loading…
Cancel
Save