Skip to content

Commit

Permalink
Remove deprecated Goerli testnet (hyperledger#7049)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
  • Loading branch information
fab-10 committed May 6, 2024
1 parent c63f415 commit 45b6c08
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 962 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
### Breaking Changes
- RocksDB database metadata format has changed to be more expressive, the migration of an existing metadata file to the new format is automatic at startup. Before performing a downgrade to a previous version it is mandatory to revert to the original format using the subcommand `besu --data-path=/path/to/besu/datadir storage revert-metadata v2-to-v1`.
- BFT networks won't start with SNAP or CHECKPOINT sync (previously Besu would start with this config but quietly fail to sync, so it's now more obvious that it won't work) [#6625](https://github.com/hyperledger/besu/pull/6625), [#6667](https://github.com/hyperledger/besu/pull/6667)
- Forest pruning has been removed, it was deprecated since 24.1.0. In case you are still using it you must now remove any of the following options: `pruning-enabled`, `pruning-blocks-retained` and `pruning-block-confirmations`, from your configuration, and you may want to consider switching to Bonsai.
- Forest pruning has been removed, it was deprecated since 24.1.0. In case you are still using it you must now remove any of the following options: `pruning-enabled`, `pruning-blocks-retained` and `pruning-block-confirmations`, from your configuration, and you may want to consider switching to Bonsai.
- Deprecated Goerli testnet has been removed.

### Upcoming Breaking Changes
- Receipt compaction will be enabled by default in a future version of Besu. After this change it will not be possible to downgrade to the previous Besu version.
Expand Down Expand Up @@ -45,6 +46,7 @@
- Allow users to specify which plugins are registered [#6700](https://github.com/hyperledger/besu/pull/6700)
- Layered txpool tuning for blob transactions [#6940](https://github.com/hyperledger/besu/pull/6940)
- Update Gradle to 7.6.4 [#7030](https://github.com/hyperledger/besu/pull/7030)
- Remove deprecated Goerli testnet [#7049](https://github.com/hyperledger/besu/pull/7049)
- Default bonsai to use full-flat db and code-storage-by-code-hash [#6984](https://github.com/hyperledger/besu/pull/6894)

### Bug fixes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ public enum NetworkName {
MAINNET("/mainnet.json", BigInteger.valueOf(1)),
/** Sepolia network name. */
SEPOLIA("/sepolia.json", BigInteger.valueOf(11155111)),
/** Goerli network name. */
GOERLI("/goerli.json", BigInteger.valueOf(5)),
/** Holešky network name. */
HOLESKY("/holesky.json", BigInteger.valueOf(17000)),

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,6 @@ public static Collection<Object[]> parameters() {
new ForkId(Bytes.ofUnsignedInt(0x9b192ad0L), 0L),
new ForkId(Bytes.ofUnsignedInt(0x9b192ad0L), 0L))
},
new Object[] {
NetworkName.GOERLI,
List.of(
new ForkId(Bytes.ofUnsignedInt(0xa3f5ab08L), 1561651L),
new ForkId(Bytes.ofUnsignedInt(0xc25efa5cL), 4460644L),
new ForkId(Bytes.ofUnsignedInt(0x757a1c47L), 5062605L),
new ForkId(Bytes.ofUnsignedInt(0xb8c6299dL), 1678832736L),
new ForkId(Bytes.ofUnsignedInt(0xf9843abfL), 1705473120),
new ForkId(Bytes.ofUnsignedInt(0x70cc14e2L), 0L),
new ForkId(Bytes.ofUnsignedInt(0x70cc14e2L), 0L))
},
new Object[] {
NetworkName.MAINNET,
List.of(
Expand Down
37 changes: 9 additions & 28 deletions besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,15 @@
import static org.hyperledger.besu.cli.config.NetworkName.DEV;
import static org.hyperledger.besu.cli.config.NetworkName.EXPERIMENTAL_EIPS;
import static org.hyperledger.besu.cli.config.NetworkName.FUTURE_EIPS;
import static org.hyperledger.besu.cli.config.NetworkName.GOERLI;
import static org.hyperledger.besu.cli.config.NetworkName.HOLESKY;
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.SEPOLIA;
import static org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis.ENGINE;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.GOERLI_BOOTSTRAP_NODES;
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.SEPOLIA_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_DISCOVERY_URL;
import static org.hyperledger.besu.plugin.services.storage.DataStorageFormat.BONSAI;
import static org.junit.Assume.assumeThat;
import static org.mockito.ArgumentMatchers.any;
Expand Down Expand Up @@ -456,19 +455,19 @@ public void testGenesisPathMainnetEthConfig() {
}

@Test
public void testGenesisPathGoerliEthConfig() {
public void testGenesisPathSepoliaEthConfig() {
final ArgumentCaptor<EthNetworkConfig> networkArg =
ArgumentCaptor.forClass(EthNetworkConfig.class);

parseCommand("--network", "goerli");
parseCommand("--network", "sepolia");

verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
verify(mockControllerBuilder).build();

final EthNetworkConfig config = networkArg.getValue();
assertThat(config.bootNodes()).isEqualTo(GOERLI_BOOTSTRAP_NODES);
assertThat(config.dnsDiscoveryUrl()).isEqualTo(GOERLI_DISCOVERY_URL);
assertThat(config.networkId()).isEqualTo(BigInteger.valueOf(5));
assertThat(config.bootNodes()).isEqualTo(SEPOLIA_BOOTSTRAP_NODES);
assertThat(config.dnsDiscoveryUrl()).isEqualTo(SEPOLIA_DISCOVERY_URL);
assertThat(config.networkId()).isEqualTo(BigInteger.valueOf(11155111));
}

@Test
Expand Down Expand Up @@ -1628,24 +1627,6 @@ public void devModeOptionMustBeUsed() {
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}

@Test
public void goerliValuesAreUsed() {
parseCommand("--network", "goerli");

final ArgumentCaptor<EthNetworkConfig> networkArg =
ArgumentCaptor.forClass(EthNetworkConfig.class);

verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
verify(mockControllerBuilder).build();

assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(GOERLI));

assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();

verify(mockLogger, never()).warn(contains("Goerli is deprecated and will be shutdown"));
}

@Test
public void futureEipsValuesAreUsed() {
parseCommand("--network", "future_eips");
Expand Down Expand Up @@ -1748,8 +1729,8 @@ public void mordorValuesAreUsed() {
}

@Test
public void goerliValuesCanBeOverridden() {
networkValuesCanBeOverridden("goerli");
public void sepoliaValuesCanBeOverridden() {
networkValuesCanBeOverridden("sepolia");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void shouldGenerateDeprecationMessageForDeprecatedNetworks(final NetworkName net
@EnumSource(
value = NetworkName.class,
names = {
"MAINNET", "SEPOLIA", "GOERLI", "DEV", "CLASSIC", "MORDOR", "HOLESKY",
"MAINNET", "SEPOLIA", "DEV", "CLASSIC", "MORDOR", "HOLESKY",
})
void shouldThrowErrorForNonDeprecatedNetworks(final NetworkName network) {
assertThatThrownBy(() -> NetworkDeprecationMessage.generate(network))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

import static org.assertj.core.api.Assertions.assertThat;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.GOERLI_BOOTSTRAP_NODES;
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.SEPOLIA_BOOTSTRAP_NODES;
import static org.hyperledger.besu.ethereum.p2p.config.DefaultDiscoveryConfiguration.SEPOLIA_DISCOVERY_URL;

import org.hyperledger.besu.config.GenesisConfigFile;

Expand All @@ -41,11 +41,11 @@ public void testDefaultMainnetConfig() {
}

@Test
public void testDefaultGoerliConfig() {
EthNetworkConfig config = EthNetworkConfig.getNetworkConfig(NetworkName.GOERLI);
assertThat(config.dnsDiscoveryUrl()).isEqualTo(GOERLI_DISCOVERY_URL);
assertThat(config.bootNodes()).isEqualTo(GOERLI_BOOTSTRAP_NODES);
assertThat(config.networkId()).isEqualTo(BigInteger.valueOf(5));
public void testDefaultSepoliaConfig() {
EthNetworkConfig config = EthNetworkConfig.getNetworkConfig(NetworkName.SEPOLIA);
assertThat(config.dnsDiscoveryUrl()).isEqualTo(SEPOLIA_DISCOVERY_URL);
assertThat(config.bootNodes()).isEqualTo(SEPOLIA_BOOTSTRAP_NODES);
assertThat(config.networkId()).isEqualTo(BigInteger.valueOf(11155111));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import java.util.stream.Stream;

public class DefaultDiscoveryConfiguration {
public static final String GOERLI_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net";
public static final String SEPOLIA_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net";
public static final String MAINNET_DISCOVERY_URL =
"enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net";

Expand All @@ -40,22 +40,6 @@ public class DefaultDiscoveryConfiguration {
)
.map(EnodeURLImpl::fromString)
.collect(toList()));
public static final List<EnodeURL> GOERLI_BOOTSTRAP_NODES =
Collections.unmodifiableList(
Stream.of(
"enode://011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a@51.141.78.53:30303",
"enode://176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b@13.93.54.137:30303",
"enode://46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291@94.237.54.114:30313",
"enode://b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949@18.218.250.66:30303",

// Ethereum Foundation bootnode
"enode://a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91@3.11.147.67:30303",

// Goerli Initiative bootnodes
"enode://d4f764a48ec2a8ecf883735776fdefe0a3949eb0ca476bd7bc8d0954a9defe8fea15ae5da7d40b5d2d59ce9524a99daedadf6da6283fca492cc80b53689fb3b3@46.4.99.122:32109",
"enode://d2b720352e8216c9efc470091aa91ddafc53e222b32780f505c817ceef69e01d5b0b0797b69db254c586f493872352f5a022b4d8479a00fc92ec55f9ad46a27e@88.99.70.182:30303")
.map(EnodeURLImpl::fromString)
.collect(toList()));
public static final List<EnodeURL> SEPOLIA_BOOTSTRAP_NODES =
Collections.unmodifiableList(
Stream.of(
Expand Down
Loading

0 comments on commit 45b6c08

Please sign in to comment.