[PAN-3065] Disable Istanbul block (#1849)

Istanbul is not ready.  Disable the genesis configuration so it doesn't
accidentially get configured.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 5 years ago committed by Adrian Sutton
parent 31dce47edf
commit 9e2fdc7e1e
  1. 14
      config/src/main/java/tech/pegasys/pantheon/config/JsonGenesisConfigOptions.java
  2. 3
      config/src/test/java/tech/pegasys/pantheon/config/GenesisConfigOptionsTest.java

@ -22,8 +22,13 @@ import java.util.OptionalLong;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.google.common.collect.ImmutableMap;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class JsonGenesisConfigOptions implements GenesisConfigOptions {
private final Logger LOG = LogManager.getLogger();
private static final String ETHASH_CONFIG_KEY = "ethash";
private static final String IBFT_LEGACY_CONFIG_KEY = "ibft";
private static final String IBFT2_CONFIG_KEY = "ibft2";
@ -140,9 +145,13 @@ public class JsonGenesisConfigOptions implements GenesisConfigOptions {
return getOptionalLong("constantinoplefixblock");
}
// Disabled until Istanbul is settled
@Override
public OptionalLong getIstanbulBlockNumber() {
return getOptionalLong("istanbulblock");
if (configRoot.has("istanbulblock")) {
LOG.warn("IstanbulBlock was requested but configuration is not enabled");
}
return OptionalLong.empty();
}
@Override
@ -188,7 +197,8 @@ public class JsonGenesisConfigOptions implements GenesisConfigOptions {
getByzantiumBlockNumber().ifPresent(l -> builder.put("byzantiumBlock", l));
getConstantinopleBlockNumber().ifPresent(l -> builder.put("constantinopleBlock", l));
getConstantinopleFixBlockNumber().ifPresent(l -> builder.put("constantinopleFixBlock", l));
getIstanbulBlockNumber().ifPresent(l -> builder.put("istanbulBlock", l));
// Disabled until Istanbul is settled
// getIstanbulBlockNumber().ifPresent(l -> builder.put("istanbulBlock", l));
getContractSizeLimit().ifPresent(l -> builder.put("contractSizeLimit", l));
getEvmStackSize().ifPresent(l -> builder.put("evmstacksize", l));
if (isClique()) {

@ -128,7 +128,8 @@ public class GenesisConfigOptionsTest {
@Test
public void shouldGetIstanbulBlockNumber() {
final GenesisConfigOptions config = fromConfigOptions(singletonMap("istanbulBlock", 1000));
assertThat(config.getIstanbulBlockNumber()).hasValue(1000);
// Disabled until Istanbul is settled
assertThat(config.getIstanbulBlockNumber()).isEmpty();
}
@Test

Loading…
Cancel
Save