Remove deprecated Rinkeby network (#5540)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/5572/head
Fabio Di Fabio 1 year ago committed by GitHub
parent 9ae1b535a0
commit c1cfaf462a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      CHANGELOG.md
  2. 19
      besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java
  3. 15
      besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java
  4. 44
      besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
  5. 4
      besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java
  6. 10
      besu/src/test/java/org/hyperledger/besu/cli/config/EthNetworkConfigTest.java
  7. 10
      besu/src/test/java/org/hyperledger/besu/ethereum/p2p/config/DefaultDiscoveryConfiguration.java
  8. 806
      config/src/main/resources/rinkeby.json
  9. 21
      consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueExtraDataTest.java
  10. 139
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdTest.java
  11. 15
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdTestUtil.java
  12. 31
      ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/MainnetProtocolScheduleTest.java

@ -4,7 +4,8 @@
### Breaking Changes
- Move blockchain related variables in a dedicated storage, to pave the way to future optimizations [#5471](https://github.com/hyperledger/besu/pull/5471). The migration is performed automatically at startup,
and in case a rollback is needed, before installing a previous version, the migration can be reverted, using the subcommand `storage revert-variables` with the same configuration use to run Besu.
and in case a rollback is needed, before installing a previous version, the migration can be reverted, using the subcommand `storage revert-variables` with the same configuration use to run Besu.
- Remove deprecated Rinkeby named network. [#5540](https://github.com/hyperledger/besu/pull/5540)
### Additions and Improvements
- Allow Ethstats connection url to specify ws:// or wss:// scheme. [#5494](https://github.com/hyperledger/besu/issues/5494)

@ -23,8 +23,6 @@ import org.apache.commons.lang3.StringUtils;
public enum NetworkName {
/** Mainnet network name. */
MAINNET("/mainnet.json", BigInteger.valueOf(1)),
/** Rinkeby network name. */
RINKEBY("/rinkeby.json", BigInteger.valueOf(4)),
/** Sepolia network name. */
SEPOLIA("/sepolia.json", BigInteger.valueOf(11155111)),
/** Goerli network name. */
@ -55,21 +53,8 @@ public enum NetworkName {
this.genesisFile = genesisFile;
this.networkId = networkId;
this.canFastSync = canFastSync;
// https://blog.ethereum.org/2022/06/21/testnet-deprecation/
switch (networkId.intValue()) {
case 3:
deprecationDate = "in Q4 2022";
break;
case 4:
deprecationDate = "in Q2/Q3 2023";
break;
case 1337802:
deprecationDate = "after the Mainnet Merge";
break;
default:
deprecationDate = null;
}
// no deprecations planned
this.deprecationDate = null;
}
/**

@ -81,21 +81,6 @@ public class ForkIdsNetworkConfigTest {
new ForkId(Bytes.ofUnsignedInt(0xf7f9bc08L), 0L),
new ForkId(Bytes.ofUnsignedInt(0xf7f9bc08L), 0L))
},
new Object[] {
NetworkName.RINKEBY,
List.of(
new ForkId(Bytes.ofUnsignedInt(0x3b8e0691L), 1L),
new ForkId(Bytes.ofUnsignedInt(0x60949295L), 2L),
new ForkId(Bytes.ofUnsignedInt(0x8bde40ddL), 3L),
new ForkId(Bytes.ofUnsignedInt(0xcb3a64bbL), 1035301L),
new ForkId(Bytes.ofUnsignedInt(0x8d748b57L), 3660663L),
new ForkId(Bytes.ofUnsignedInt(0xe49cab14L), 4321234L),
new ForkId(Bytes.ofUnsignedInt(0xafec6b27L), 5435345L),
new ForkId(Bytes.ofUnsignedInt(0xcbdb8838L), 8290928L),
new ForkId(Bytes.ofUnsignedInt(0x6910c8bdL), 8897988L),
new ForkId(Bytes.ofUnsignedInt(0x8e29f2f3L), 0L),
new ForkId(Bytes.ofUnsignedInt(0x8e29f2f3L), 0L))
},
new Object[] {
NetworkName.GOERLI,
List.of(

@ -27,7 +27,6 @@ import static org.hyperledger.besu.cli.config.NetworkName.GOERLI;
import static org.hyperledger.besu.cli.config.NetworkName.KOTTI;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.config.NetworkName.MORDOR;
import static org.hyperledger.besu.cli.config.NetworkName.RINKEBY;
import static org.hyperledger.besu.cli.config.NetworkName.SEPOLIA;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPRECATION_WARNING_MSG;
@ -41,8 +40,6 @@ import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfigura
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.GOERLI_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.MAINNET_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.MAINNET_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.RINKEBY_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.RINKEBY_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.worldstate.DataStorageFormat.BONSAI;
import static org.hyperledger.besu.nat.kubernetes.KubernetesNatManager.DEFAULT_BESU_SERVICE_NAME_FILTER;
import static org.junit.Assume.assumeThat;
@ -1061,27 +1058,11 @@ public class BesuCommandTest extends CommandTestAbstract {
assertThat(config.getNetworkId()).isEqualTo(BigInteger.valueOf(2023));
}
@Test
public void testGenesisPathRinkebyEthConfig() {
final ArgumentCaptor<EthNetworkConfig> networkArg =
ArgumentCaptor.forClass(EthNetworkConfig.class);
parseCommand("--network", "rinkeby");
verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any(), any());
verify(mockControllerBuilder).build();
final EthNetworkConfig config = networkArg.getValue();
assertThat(config.getBootNodes()).isEqualTo(RINKEBY_BOOTSTRAP_NODES);
assertThat(config.getDnsDiscoveryUrl()).isEqualTo(RINKEBY_DISCOVERY_URL);
assertThat(config.getNetworkId()).isEqualTo(BigInteger.valueOf(4));
}
@Test
public void genesisAndNetworkMustNotBeUsedTogether() throws Exception {
final Path genesisFile = createFakeGenesisFile(GENESIS_VALID_JSON);
parseCommand("--genesis-file", genesisFile.toString(), "--network", "rinkeby");
parseCommand("--genesis-file", genesisFile.toString(), "--network", "mainnet");
Mockito.verifyNoInteractions(mockRunnerBuilder);
@ -3941,24 +3922,6 @@ public class BesuCommandTest extends CommandTestAbstract {
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
@Test
public void rinkebyValuesAreUsed() {
parseCommand("--network", "rinkeby");
final ArgumentCaptor<EthNetworkConfig> networkArg =
ArgumentCaptor.forClass(EthNetworkConfig.class);
verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any(), any());
verify(mockControllerBuilder).build();
assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(RINKEBY));
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
verify(mockLogger, times(1)).warn(contains("Rinkeby is deprecated and will be shutdown"));
}
@Test
public void goerliValuesAreUsed() {
parseCommand("--network", "goerli");
@ -4076,11 +4039,6 @@ public class BesuCommandTest extends CommandTestAbstract {
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
@Test
public void rinkebyValuesCanBeOverridden() throws Exception {
networkValuesCanBeOverridden("rinkeby");
}
@Test
public void goerliValuesCanBeOverridden() throws Exception {
networkValuesCanBeOverridden("goerli");

@ -19,15 +19,17 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
import org.hyperledger.besu.cli.config.NetworkName;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
class NetworkDeprecationMessageTest {
@Disabled("There are no deprecation planned at this time, but keeping for reference")
@ParameterizedTest
@EnumSource(
value = NetworkName.class,
names = {"RINKEBY"})
names = {"A_DEPRECATED_NETWORK_NAME"})
void shouldGenerateDeprecationMessageForDeprecatedNetworks(final NetworkName network) {
assertThat(NetworkDeprecationMessage.generate(network))
.contains(network.normalize() + " is deprecated and will be shutdown");

@ -20,8 +20,6 @@ import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfigura
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.GOERLI_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.MAINNET_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.MAINNET_DISCOVERY_URL;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.RINKEBY_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.RINKEBY_DISCOVERY_URL;
import java.math.BigInteger;
@ -40,14 +38,6 @@ public class EthNetworkConfigTest {
assertThat(config.getNetworkId()).isEqualTo(BigInteger.ONE);
}
@Test
public void testDefaultRinkebyConfig() {
EthNetworkConfig config = EthNetworkConfig.getNetworkConfig(NetworkName.RINKEBY);
assertThat(config.getDnsDiscoveryUrl()).isEqualTo(RINKEBY_DISCOVERY_URL);
assertThat(config.getBootNodes()).isEqualTo(RINKEBY_BOOTSTRAP_NODES);
assertThat(config.getNetworkId()).isEqualTo(BigInteger.valueOf(4));
}
@Test
public void testDefaultGoerliConfig() {
EthNetworkConfig config = EthNetworkConfig.getNetworkConfig(NetworkName.GOERLI);

@ -28,8 +28,6 @@ public class DefaultDiscoveryConfiguration {
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net";
public static final String MAINNET_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net";
public static final String RINKEBY_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net";
public static final List<EnodeURL> MAINNET_BOOTSTRAP_NODES =
Collections.unmodifiableList(
@ -42,14 +40,6 @@ public class DefaultDiscoveryConfiguration {
)
.map(EnodeURLImpl::fromString)
.collect(toList()));
public static final List<EnodeURL> RINKEBY_BOOTSTRAP_NODES =
Collections.unmodifiableList(
Stream.of(
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303",
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303",
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303")
.map(EnodeURLImpl::fromString)
.collect(toList()));
public static final List<EnodeURL> GOERLI_BOOTSTRAP_NODES =
Collections.unmodifiableList(
Stream.of(

@ -1,806 +0,0 @@
{
"config": {
"chainId": 4,
"homesteadBlock": 1,
"eip150Block": 2,
"eip158Block": 3,
"byzantiumBlock": 1035301,
"constantinopleBlock": 3660663,
"petersburgBlock": 4321234,
"istanbulBlock": 5435345,
"berlinBlock": 8290928,
"londonBlock": 8897988,
"clique": {
"blockperiodseconds": 15,
"epochlength": 30000
},
"discovery": {
"dns": "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.rinkeby.ethdisco.net",
"bootnodes": [
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30303",
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303",
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30303"
]
}
},
"nonce": "0x0",
"timestamp": "0x58ee40ba",
"extraData": "0x52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x47b760",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"0000000000000000000000000000000000000000": {
"balance": "0x1"
},
"0000000000000000000000000000000000000001": {
"balance": "0x1"
},
"0000000000000000000000000000000000000002": {
"balance": "0x1"
},
"0000000000000000000000000000000000000003": {
"balance": "0x1"
},
"0000000000000000000000000000000000000004": {
"balance": "0x1"
},
"0000000000000000000000000000000000000005": {
"balance": "0x1"
},
"0000000000000000000000000000000000000006": {
"balance": "0x1"
},
"0000000000000000000000000000000000000007": {
"balance": "0x1"
},
"0000000000000000000000000000000000000008": {
"balance": "0x1"
},
"0000000000000000000000000000000000000009": {
"balance": "0x1"
},
"000000000000000000000000000000000000000a": {
"balance": "0x1"
},
"000000000000000000000000000000000000000b": {
"balance": "0x1"
},
"000000000000000000000000000000000000000c": {
"balance": "0x1"
},
"000000000000000000000000000000000000000d": {
"balance": "0x1"
},
"000000000000000000000000000000000000000e": {
"balance": "0x1"
},
"000000000000000000000000000000000000000f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000010": {
"balance": "0x1"
},
"0000000000000000000000000000000000000011": {
"balance": "0x1"
},
"0000000000000000000000000000000000000012": {
"balance": "0x1"
},
"0000000000000000000000000000000000000013": {
"balance": "0x1"
},
"0000000000000000000000000000000000000014": {
"balance": "0x1"
},
"0000000000000000000000000000000000000015": {
"balance": "0x1"
},
"0000000000000000000000000000000000000016": {
"balance": "0x1"
},
"0000000000000000000000000000000000000017": {
"balance": "0x1"
},
"0000000000000000000000000000000000000018": {
"balance": "0x1"
},
"0000000000000000000000000000000000000019": {
"balance": "0x1"
},
"000000000000000000000000000000000000001a": {
"balance": "0x1"
},
"000000000000000000000000000000000000001b": {
"balance": "0x1"
},
"000000000000000000000000000000000000001c": {
"balance": "0x1"
},
"000000000000000000000000000000000000001d": {
"balance": "0x1"
},
"000000000000000000000000000000000000001e": {
"balance": "0x1"
},
"000000000000000000000000000000000000001f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000020": {
"balance": "0x1"
},
"0000000000000000000000000000000000000021": {
"balance": "0x1"
},
"0000000000000000000000000000000000000022": {
"balance": "0x1"
},
"0000000000000000000000000000000000000023": {
"balance": "0x1"
},
"0000000000000000000000000000000000000024": {
"balance": "0x1"
},
"0000000000000000000000000000000000000025": {
"balance": "0x1"
},
"0000000000000000000000000000000000000026": {
"balance": "0x1"
},
"0000000000000000000000000000000000000027": {
"balance": "0x1"
},
"0000000000000000000000000000000000000028": {
"balance": "0x1"
},
"0000000000000000000000000000000000000029": {
"balance": "0x1"
},
"000000000000000000000000000000000000002a": {
"balance": "0x1"
},
"000000000000000000000000000000000000002b": {
"balance": "0x1"
},
"000000000000000000000000000000000000002c": {
"balance": "0x1"
},
"000000000000000000000000000000000000002d": {
"balance": "0x1"
},
"000000000000000000000000000000000000002e": {
"balance": "0x1"
},
"000000000000000000000000000000000000002f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000030": {
"balance": "0x1"
},
"0000000000000000000000000000000000000031": {
"balance": "0x1"
},
"0000000000000000000000000000000000000032": {
"balance": "0x1"
},
"0000000000000000000000000000000000000033": {
"balance": "0x1"
},
"0000000000000000000000000000000000000034": {
"balance": "0x1"
},
"0000000000000000000000000000000000000035": {
"balance": "0x1"
},
"0000000000000000000000000000000000000036": {
"balance": "0x1"
},
"0000000000000000000000000000000000000037": {
"balance": "0x1"
},
"0000000000000000000000000000000000000038": {
"balance": "0x1"
},
"0000000000000000000000000000000000000039": {
"balance": "0x1"
},
"000000000000000000000000000000000000003a": {
"balance": "0x1"
},
"000000000000000000000000000000000000003b": {
"balance": "0x1"
},
"000000000000000000000000000000000000003c": {
"balance": "0x1"
},
"000000000000000000000000000000000000003d": {
"balance": "0x1"
},
"000000000000000000000000000000000000003e": {
"balance": "0x1"
},
"000000000000000000000000000000000000003f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000040": {
"balance": "0x1"
},
"0000000000000000000000000000000000000041": {
"balance": "0x1"
},
"0000000000000000000000000000000000000042": {
"balance": "0x1"
},
"0000000000000000000000000000000000000043": {
"balance": "0x1"
},
"0000000000000000000000000000000000000044": {
"balance": "0x1"
},
"0000000000000000000000000000000000000045": {
"balance": "0x1"
},
"0000000000000000000000000000000000000046": {
"balance": "0x1"
},
"0000000000000000000000000000000000000047": {
"balance": "0x1"
},
"0000000000000000000000000000000000000048": {
"balance": "0x1"
},
"0000000000000000000000000000000000000049": {
"balance": "0x1"
},
"000000000000000000000000000000000000004a": {
"balance": "0x1"
},
"000000000000000000000000000000000000004b": {
"balance": "0x1"
},
"000000000000000000000000000000000000004c": {
"balance": "0x1"
},
"000000000000000000000000000000000000004d": {
"balance": "0x1"
},
"000000000000000000000000000000000000004e": {
"balance": "0x1"
},
"000000000000000000000000000000000000004f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000050": {
"balance": "0x1"
},
"0000000000000000000000000000000000000051": {
"balance": "0x1"
},
"0000000000000000000000000000000000000052": {
"balance": "0x1"
},
"0000000000000000000000000000000000000053": {
"balance": "0x1"
},
"0000000000000000000000000000000000000054": {
"balance": "0x1"
},
"0000000000000000000000000000000000000055": {
"balance": "0x1"
},
"0000000000000000000000000000000000000056": {
"balance": "0x1"
},
"0000000000000000000000000000000000000057": {
"balance": "0x1"
},
"0000000000000000000000000000000000000058": {
"balance": "0x1"
},
"0000000000000000000000000000000000000059": {
"balance": "0x1"
},
"000000000000000000000000000000000000005a": {
"balance": "0x1"
},
"000000000000000000000000000000000000005b": {
"balance": "0x1"
},
"000000000000000000000000000000000000005c": {
"balance": "0x1"
},
"000000000000000000000000000000000000005d": {
"balance": "0x1"
},
"000000000000000000000000000000000000005e": {
"balance": "0x1"
},
"000000000000000000000000000000000000005f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000060": {
"balance": "0x1"
},
"0000000000000000000000000000000000000061": {
"balance": "0x1"
},
"0000000000000000000000000000000000000062": {
"balance": "0x1"
},
"0000000000000000000000000000000000000063": {
"balance": "0x1"
},
"0000000000000000000000000000000000000064": {
"balance": "0x1"
},
"0000000000000000000000000000000000000065": {
"balance": "0x1"
},
"0000000000000000000000000000000000000066": {
"balance": "0x1"
},
"0000000000000000000000000000000000000067": {
"balance": "0x1"
},
"0000000000000000000000000000000000000068": {
"balance": "0x1"
},
"0000000000000000000000000000000000000069": {
"balance": "0x1"
},
"000000000000000000000000000000000000006a": {
"balance": "0x1"
},
"000000000000000000000000000000000000006b": {
"balance": "0x1"
},
"000000000000000000000000000000000000006c": {
"balance": "0x1"
},
"000000000000000000000000000000000000006d": {
"balance": "0x1"
},
"000000000000000000000000000000000000006e": {
"balance": "0x1"
},
"000000000000000000000000000000000000006f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000070": {
"balance": "0x1"
},
"0000000000000000000000000000000000000071": {
"balance": "0x1"
},
"0000000000000000000000000000000000000072": {
"balance": "0x1"
},
"0000000000000000000000000000000000000073": {
"balance": "0x1"
},
"0000000000000000000000000000000000000074": {
"balance": "0x1"
},
"0000000000000000000000000000000000000075": {
"balance": "0x1"
},
"0000000000000000000000000000000000000076": {
"balance": "0x1"
},
"0000000000000000000000000000000000000077": {
"balance": "0x1"
},
"0000000000000000000000000000000000000078": {
"balance": "0x1"
},
"0000000000000000000000000000000000000079": {
"balance": "0x1"
},
"000000000000000000000000000000000000007a": {
"balance": "0x1"
},
"000000000000000000000000000000000000007b": {
"balance": "0x1"
},
"000000000000000000000000000000000000007c": {
"balance": "0x1"
},
"000000000000000000000000000000000000007d": {
"balance": "0x1"
},
"000000000000000000000000000000000000007e": {
"balance": "0x1"
},
"000000000000000000000000000000000000007f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000080": {
"balance": "0x1"
},
"0000000000000000000000000000000000000081": {
"balance": "0x1"
},
"0000000000000000000000000000000000000082": {
"balance": "0x1"
},
"0000000000000000000000000000000000000083": {
"balance": "0x1"
},
"0000000000000000000000000000000000000084": {
"balance": "0x1"
},
"0000000000000000000000000000000000000085": {
"balance": "0x1"
},
"0000000000000000000000000000000000000086": {
"balance": "0x1"
},
"0000000000000000000000000000000000000087": {
"balance": "0x1"
},
"0000000000000000000000000000000000000088": {
"balance": "0x1"
},
"0000000000000000000000000000000000000089": {
"balance": "0x1"
},
"000000000000000000000000000000000000008a": {
"balance": "0x1"
},
"000000000000000000000000000000000000008b": {
"balance": "0x1"
},
"000000000000000000000000000000000000008c": {
"balance": "0x1"
},
"000000000000000000000000000000000000008d": {
"balance": "0x1"
},
"000000000000000000000000000000000000008e": {
"balance": "0x1"
},
"000000000000000000000000000000000000008f": {
"balance": "0x1"
},
"0000000000000000000000000000000000000090": {
"balance": "0x1"
},
"0000000000000000000000000000000000000091": {
"balance": "0x1"
},
"0000000000000000000000000000000000000092": {
"balance": "0x1"
},
"0000000000000000000000000000000000000093": {
"balance": "0x1"
},
"0000000000000000000000000000000000000094": {
"balance": "0x1"
},
"0000000000000000000000000000000000000095": {
"balance": "0x1"
},
"0000000000000000000000000000000000000096": {
"balance": "0x1"
},
"0000000000000000000000000000000000000097": {
"balance": "0x1"
},
"0000000000000000000000000000000000000098": {
"balance": "0x1"
},
"0000000000000000000000000000000000000099": {
"balance": "0x1"
},
"000000000000000000000000000000000000009a": {
"balance": "0x1"
},
"000000000000000000000000000000000000009b": {
"balance": "0x1"
},
"000000000000000000000000000000000000009c": {
"balance": "0x1"
},
"000000000000000000000000000000000000009d": {
"balance": "0x1"
},
"000000000000000000000000000000000000009e": {
"balance": "0x1"
},
"000000000000000000000000000000000000009f": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000a9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000aa": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ab": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ac": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ad": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ae": {
"balance": "0x1"
},
"00000000000000000000000000000000000000af": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000b9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ba": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000be": {
"balance": "0x1"
},
"00000000000000000000000000000000000000bf": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000c9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ca": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ce": {
"balance": "0x1"
},
"00000000000000000000000000000000000000cf": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000d9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000da": {
"balance": "0x1"
},
"00000000000000000000000000000000000000db": {
"balance": "0x1"
},
"00000000000000000000000000000000000000dc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000dd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000de": {
"balance": "0x1"
},
"00000000000000000000000000000000000000df": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000e9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ea": {
"balance": "0x1"
},
"00000000000000000000000000000000000000eb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ec": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ed": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ee": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ef": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f0": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f1": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f2": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f3": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f4": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f5": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f6": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f7": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f8": {
"balance": "0x1"
},
"00000000000000000000000000000000000000f9": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fa": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fb": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fc": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fd": {
"balance": "0x1"
},
"00000000000000000000000000000000000000fe": {
"balance": "0x1"
},
"00000000000000000000000000000000000000ff": {
"balance": "0x1"
},
"31b98d14007bdee637298086988a0bbd31184523": {
"balance": "0x200000000000000000000000000000000000000000000000000000000000000"
}
}
}

@ -36,7 +36,6 @@ import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.Lists;
import org.apache.tuweni.bytes.Bytes;
import org.bouncycastle.util.encoders.Hex;
import org.junit.jupiter.api.Test;
public class CliqueExtraDataTest {
@ -67,26 +66,6 @@ public class CliqueExtraDataTest {
assertThat(decodedExtraData.getVanityData()).isEqualTo(vanityData);
}
@Test
public void parseRinkebyGenesisBlockExtraData() {
// Rinkeby genesis block extra data text found @ rinkeby.io
final byte[] genesisBlockExtraData =
Hex.decode(
"52657370656374206d7920617574686f7269746168207e452e436172746d616e42eb768f2244c8811c63729a21a3569731535f067ffc57839b00206d1ad20c69a1981b489f772031b279182d99e65703f0076e4812653aab85fca0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
final Bytes bufferToInject = Bytes.wrap(genesisBlockExtraData);
final CliqueExtraData extraData =
CliqueExtraData.decodeRaw(
new BlockHeaderTestFixture()
.number(BlockHeader.GENESIS_BLOCK_NUMBER)
.blockHeaderFunctions(new CliqueBlockHeaderFunctions())
.extraData(bufferToInject)
.buildHeader());
assertThat(extraData.getProposerSeal()).isEmpty();
assertThat(extraData.getValidators().size()).isEqualTo(3);
}
@Test
public void insufficientDataResultsInAnIllegalArgumentException() {
final Bytes illegalData =

@ -330,124 +330,6 @@ public class ForkIdTest {
Optional.of(ForkIds.SEPOLIA),
empty()
},
// Rinkeby test cases
{
"Rinkeby // Unsynced, last Frontier block",
Network.RINKEBY,
0L,
0L,
ForkIdTestUtil.wantForkId("0x3b8e0691", 1L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First and last Homestead block",
Network.RINKEBY,
1L,
0L,
ForkIdTestUtil.wantForkId("0x60949295", 2L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First and last Tangerine block",
Network.RINKEBY,
2L,
0L,
ForkIdTestUtil.wantForkId("0x8bde40dd", 3L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First Spurious block",
Network.RINKEBY,
3L,
0L,
ForkIdTestUtil.wantForkId("0xcb3a64bb", 1035301L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // Last Spurious block",
Network.RINKEBY,
1035300L,
0L,
ForkIdTestUtil.wantForkId("0xcb3a64bb", 1035301L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First Byzantium block",
Network.RINKEBY,
1035301L,
0L,
ForkIdTestUtil.wantForkId("0x8d748b57", 3660663L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // Last Byzantium block",
Network.RINKEBY,
3660662L,
0L,
ForkIdTestUtil.wantForkId("0x8d748b57", 3660663L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First Constantinople block",
Network.RINKEBY,
3660663L,
0L,
ForkIdTestUtil.wantForkId("0xe49cab14", 4321234L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // Last Constantinople block",
Network.RINKEBY,
4321233L,
0L,
ForkIdTestUtil.wantForkId("0xe49cab14", 4321234L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First Petersburg block",
Network.RINKEBY,
4321234L,
0L,
ForkIdTestUtil.wantForkId("0xafec6b27", 5435345L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // Last Petersburg block",
Network.RINKEBY,
5435344L,
0L,
ForkIdTestUtil.wantForkId("0xafec6b27", 5435345L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // First Istanbul block",
Network.RINKEBY,
5435345L,
0L,
ForkIdTestUtil.wantForkId("0xcbdb8838", 0L),
Optional.of(ForkIds.RINKEBY),
empty()
},
{
"Rinkeby // Future Istanbul block",
Network.RINKEBY,
6000000L,
0L,
ForkIdTestUtil.wantForkId("0xcbdb8838", 0L),
Optional.of(ForkIds.RINKEBY),
empty()
},
// Goerli test cases
{
"Goerli // Unsynced, last Frontier, Homestead, Tangerine, Spurious, Byzantium, Constantinople and first Petersburg block",
@ -631,18 +513,6 @@ public class ForkIdTest {
empty(),
wantPeerCheck("0x5cddc0e1", 0L, false)
},
{
"check13ByzantiumWithRemoteAnnouncingRinkebyPetersburg",
Network.network(
GenesisHash.MAINNET,
asList(1150000L, 1920000L, 2463000L, 2675000L, 4370000L, 7280000L),
emptyList()),
7987396L,
0L,
empty(),
empty(),
wantPeerCheck("0xafec6b27", 0L, false)
},
// Timestamp based peer check cases adapted from EIP-6122 test cases
{
"withdrawalsCheck1ShanghaiWithRemoteAnnouncingTheSame",
@ -752,15 +622,6 @@ public class ForkIdTest {
empty(),
wantPeerCheck("0x5cddc0e1", 0L, false)
},
{
"withdrawalsCheck13ShanghaiWithRemoteAnnouncingRinkebyPetersburg",
Network.MAINNET_WITH_SHANGHAI,
20000000L,
1668000001L,
empty(),
empty(),
wantPeerCheck("0xafec6b27", 0L, false)
},
{
"withdrawalsCheck14ShanghaiWithRemoteAnnouncingUnknownFork",
Network.MAINNET_WITH_SHANGHAI,

@ -60,8 +60,6 @@ public class ForkIdTestUtil {
"0xd4e56740f876aef8c010b86a40d5f56745a118d0906a34e69aec8c0db1cb8fa3";
public static final String SEPOLIA =
"0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9";
public static final String RINKEBY =
"0x6341fd3daf94b748c72ced5a5b26028f2474f5f00d824504e4fa37a75767e177";
public static final String GOERLI =
"0xbf7e331f7f7c1dd2e05159666b3bf8bc7a8a3a9eb1d518969eab529dd9b88c1a";
public static final String PRIVATE =
@ -78,8 +76,6 @@ public class ForkIdTestUtil {
public static final List<Long> SEPOLIA_TIMESTAMPS = Arrays.asList(1677557088L);
public static final List<Long> RINKEBY =
Arrays.asList(1L, 2L, 3L, 3L, 1035301L, 3660663L, 4321234L, 5435345L);
public static final List<Long> GOERLI = Arrays.asList(0L, 0L, 0L, 0L, 0L, 0L, 0L, 1561651L);
public static final List<Long> PRIVATE = Arrays.asList(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L);
@ -111,16 +107,6 @@ public class ForkIdTestUtil {
new ForkId(Bytes.fromHexString("0xfe3366e7"), 1735371L),
new ForkId(Bytes.fromHexString("0xb96cbd13"), 1677557088L),
new ForkId(Bytes.fromHexString("0xf7f9bc08"), 0L)); // First Shanghai block (timestamp)
public static final List<ForkId> RINKEBY =
Arrays.asList(
new ForkId(Bytes.fromHexString("0x3b8e0691"), 1L),
new ForkId(Bytes.fromHexString("0x60949295"), 2L),
new ForkId(Bytes.fromHexString("0x8bde40dd"), 3L),
new ForkId(Bytes.fromHexString("0xcb3a64bb"), 1035301L),
new ForkId(Bytes.fromHexString("0x8d748b57"), 3660663L),
new ForkId(Bytes.fromHexString("0xe49cab14"), 4321234L),
new ForkId(Bytes.fromHexString("0xafec6b27"), 5435345L),
new ForkId(Bytes.fromHexString("0xcbdb8838"), 0L));
public static final List<ForkId> GOERLI =
Arrays.asList(
new ForkId(Bytes.fromHexString("0xa3f5ab08"), 1561651L),
@ -151,7 +137,6 @@ public class ForkIdTestUtil {
public static final Network MAINNET = network(GenesisHash.MAINNET, Forks.MAINNET, emptyList());
public static final Network SEPOLIA =
network(GenesisHash.SEPOLIA, Forks.SEPOLIA_BLOCKNUMBERS, Forks.SEPOLIA_TIMESTAMPS);
public static final Network RINKEBY = network(GenesisHash.RINKEBY, Forks.RINKEBY, emptyList());
public static final Network GOERLI = network(GenesisHash.GOERLI, Forks.GOERLI, emptyList());
public static final Network PRIVATE = network(GenesisHash.PRIVATE, Forks.PRIVATE, emptyList());

@ -137,37 +137,6 @@ public class MainnetProtocolScheduleTest {
.isEqualTo("London");
}
@Test
public void shouldCreateRinkebyConfig() throws Exception {
final ProtocolSchedule sched =
MainnetProtocolSchedule.fromConfig(
GenesisConfigFile.fromConfig(
Resources.toString(
this.getClass().getResource("/rinkeby.json"), StandardCharsets.UTF_8))
.getConfigOptions(),
EvmConfiguration.DEFAULT);
Assertions.assertThat(sched.getByBlockHeader(blockHeader(0L)).getName()).isEqualTo("Frontier");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(1L)).getName()).isEqualTo("Homestead");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(2L)).getName())
.isEqualTo("TangerineWhistle");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(3L)).getName())
.isEqualTo("SpuriousDragon");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(1_035_301L)).getName())
.isEqualTo("Byzantium");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(3_660_663L)).getName())
.isEqualTo("Constantinople");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(4_321_234L)).getName())
.isEqualTo("Petersburg");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(5_435_345L)).getName())
.isEqualTo("Istanbul");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(8_290_928L)).getName())
.isEqualTo("Berlin");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(8_897_988L)).getName())
.isEqualTo("London");
Assertions.assertThat(sched.getByBlockHeader(blockHeader(Long.MAX_VALUE)).getName())
.isEqualTo("London");
}
private BlockHeader blockHeader(final long number) {
return new BlockHeaderTestFixture().number(number).buildHeader();
}

Loading…
Cancel
Save