Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
d558f50
exclude permissioning test from default ATs run on PRs (#7327)
macfarla Jul 18, 2024
62cee8a
[minor] Remove redundant info from plugin summary (#7339)
Gabriel-Trintinalia Jul 18, 2024
3327cee
Refactor - eliminate non-constant string concatenation from debug and…
macfarla Jul 18, 2024
ba98608
Update release checklist (#7329)
siladu Jul 18, 2024
e85dd37
Add metrics for trie log pruner (#7352)
siladu Jul 18, 2024
5cdc82c
Optimistic parallelization of transactions to improve performance (#7…
matkt Jul 19, 2024
64e18a7
7732: Remove datagas related stuff in favour of blobgas (#7353)
Matilda-Clerke Jul 21, 2024
3d7ad16
Fix NPE for legacy ForkId with no forks (#7349)
pinges Jul 22, 2024
e3ed95e
Add new PoA network option to use bootnodes during any peer table ref…
matthew1001 Jul 23, 2024
4b31e6e
Disable limit trie logs for trie log subcommand (#7366)
siladu Jul 24, 2024
d5f0364
Add EXTCODE* unit Tests (#7374)
shemnon Jul 24, 2024
260b8f6
add option for ephemery testnet
gconnect Aug 4, 2024
05da951
add ephemery bootnodes to the ephemery.json genesis file
gconnect Aug 4, 2024
dd3ab09
Add test for ephemery
gconnect Aug 4, 2024
4d678a4
Format code with sportlessApply
gconnect Aug 5, 2024
9e875ec
Add setNetworkId method and generateEphemeryGenesis
gconnect Aug 19, 2024
6130d9c
Penalize invalid transient pending transactions in the layered transa…
fab-10 Jul 25, 2024
c378dc9
Update GeneralStateTestCaseEipSpec for use in linea-arithmetization (…
gauravahuja Jul 25, 2024
4c4b60a
bump execution-spec-tests, account for new name for main stable artif…
garyschulte Jul 25, 2024
edace71
Disable bonsai-limit-trie-logs-enabled if sync-mode=FULL (#7357)
siladu Jul 25, 2024
3a742f9
Do not maintain connections to bootnodes (#7358)
matthew1001 Jul 26, 2024
5c82a3f
TrieLogPruner preload with 30 second timeout (#7365)
siladu Jul 26, 2024
5521cb8
Snap server GetTrieNodes to return empty bytes when trienode doesn't …
jframe Jul 28, 2024
a98457e
Rotate changelog for 24.7.1 (#7385)
siladu Jul 28, 2024
4545cba
7288: include WithdrawalRequestPredeployAddress in genesis configurat…
Matilda-Clerke Jul 29, 2024
cffadfd
Move `JsonRpcResponseType` to `RpcResponseType` in the plugin API mod…
fab-10 Jul 29, 2024
f434809
7702 bugfixes for devnet-1 (#7394)
daniellehrner Jul 29, 2024
c933eea
Refactor TrieLogPruner preload timeout to be more testable (#7393)
siladu Jul 30, 2024
2d81735
Change EOF Parsing to be non-recursive (#7396)
shemnon Jul 30, 2024
509323e
Lock evmtool code-validate into runtime mode (#7397)
shemnon Jul 30, 2024
7d60967
5098 Branch 1: Groundwork for coming changes (#7398)
Matilda-Clerke Jul 30, 2024
f9c65c3
5098 branch 2 update invalid accounts params (#7402)
Matilda-Clerke Jul 31, 2024
bfc462e
removed permissioning methods referencing whitelist (#7401)
macfarla Jul 31, 2024
4b0fe96
5098 branch 3 update invalid address hash params (#7403)
Matilda-Clerke Jul 31, 2024
1065078
Update deps for CVEs (#7412)
matthew1001 Jul 31, 2024
9e3e258
feat: Expose set finalized/safe block in plugin-api BlockchainService…
usmansaleem Jul 31, 2024
0a52e35
In process RPC service (#7395)
fab-10 Jul 31, 2024
a5d4193
Add comments to make deprecated trie log pruning option names clear (…
siladu Aug 1, 2024
57a391f
fix(doc): tiny typo (#7388)
letypequividelespoubelles Aug 1, 2024
da6c6c0
Make GeneralStateTestCaseEipSpec constructor public for use in linea-…
gauravahuja Aug 1, 2024
1845215
Add integration tests on block processing (#7378)
ahamlat Aug 1, 2024
75d8aea
Small fuzzing fixes (#7418)
guidovranken Aug 1, 2024
5a50490
5098 branch 4 update invalid address params (#7405)
Matilda-Clerke Aug 2, 2024
a2da625
EOF validation updates (#7419)
shemnon Aug 2, 2024
73cec31
5098: Update already merged RpcErrorTypes to include index in excepti…
Matilda-Clerke Aug 2, 2024
5656b08
5098 branch 5 update invalid auth params (#7406)
Matilda-Clerke Aug 2, 2024
b11d633
5098 branch 6 update invalid blob count (#7407)
Matilda-Clerke Aug 2, 2024
42048e3
Dagger controller tests (#7341)
jflo Aug 2, 2024
a2ac648
redirect the path in readme (#7422)
LeeliRen6 Aug 5, 2024
a9eef5a
Update newling handling in fuzzing CLI tools (#7428)
shemnon Aug 6, 2024
4dba98b
EVMTool Docker Support (#7430)
shemnon Aug 7, 2024
a5d29cb
Restore previous behaviour for preMergeBesuControllerBuilder (#7431)
lucassaldanha Aug 8, 2024
485f068
chore: fix some typos (#7438)
MASDXI Aug 12, 2024
e2dd786
5098 branch 7 update invalid blob gas used params (#7408)
Matilda-Clerke Aug 12, 2024
52d77a6
5098 branch 8 update invalid block params (#7409)
Matilda-Clerke Aug 12, 2024
062a51b
5098 branch 9 update invalid block count params (#7410)
Matilda-Clerke Aug 12, 2024
e65a87e
5098 branch 11 update invalid block hash params (#7421)
Matilda-Clerke Aug 12, 2024
03fc632
Fix protocol schedule for devnets (#7429)
daniellehrner Aug 12, 2024
ccbfcf9
Move creator address warmup from targetContractAddress generation met…
lu-pinto Aug 12, 2024
0487799
Wrapped WorldUpdater into `EVMWorldupdater` (#7434)
daniellehrner Aug 12, 2024
57275ce
5098: Disable txpoolForcePriceBumpToZeroWhenZeroBaseFeeMarket test an…
Matilda-Clerke Aug 13, 2024
c4a87cf
Tracing private transactions feature (#6161)
NickSneo Aug 13, 2024
33dd5e7
5098 branch 12 update invalid block index and number (#7440)
Matilda-Clerke Aug 13, 2024
2ad1917
5098 branch 13 update invalid call consolidation and privacy group (#…
Matilda-Clerke Aug 13, 2024
f11fe90
5098 branch 14 update invalid data deposit and engine exchange (#7442)
Matilda-Clerke Aug 13, 2024
0aab456
Add test coverage for java precompiles (#7446)
shemnon Aug 13, 2024
15c85c7
Snap sync server StorageRange message limit to apply limit hash as po…
jframe Aug 13, 2024
f58d870
EIP-3155 Last Call Nitpicks (#7455)
shemnon Aug 14, 2024
b361a82
Bump besu-native dependency (#7456)
garyschulte Aug 14, 2024
f6b769c
5098 branch 15 update remaining invalid engine params (#7443)
Matilda-Clerke Aug 14, 2024
60955bd
Correct default `--help` values (#7454)
7suyash7 Aug 14, 2024
babf188
Precompile calls were not traced when insuficient gas (#7462)
lu-pinto Aug 14, 2024
f5a1e0e
isolates MetricsOptionGroup for future reusability, minor renaming (#…
jflo Aug 14, 2024
fa259d8
remove vestigial whitelist methods (#7449)
macfarla Aug 14, 2024
e3d20f5
5098 branch 16 update invalid enode and excess blob gas params (#7457)
Matilda-Clerke Aug 15, 2024
d4346a0
5098 branch 17 update extra data and filter params (#7458)
Matilda-Clerke Aug 15, 2024
2795655
5098 branch 18 update more invalid params (#7459)
Matilda-Clerke Aug 15, 2024
b9bcd4a
Add 'inbound' field to admin_peers JSON-RPC Call (#7461)
7suyash7 Aug 16, 2024
6d79817
clarification for release steps (#7400)
macfarla Aug 16, 2024
cea3095
5098 branch 19 update more invalid params (#7460)
Matilda-Clerke Aug 16, 2024
def3620
5098 branch 20 update invalid param count (#7466)
Matilda-Clerke Aug 16, 2024
082d8a5
Reuse HardforkId in EvmSpecVersion (#7448)
shemnon Aug 16, 2024
f797b0d
CLI option for disabling auto-registration of external plugins (#7470)
Gabriel-Trintinalia Aug 16, 2024
b4a420c
5098 branch 21 update more invalid params (#7467)
Matilda-Clerke Aug 16, 2024
56d3df2
Implement getNearest methods (#7258)
matkt Aug 16, 2024
ba6c210
Correctly release txpool save and restore lock in case of exceptions …
fab-10 Aug 16, 2024
2c54bdc
Bump changelog ahead of 24.8.0 (#7476)
garyschulte Aug 17, 2024
7e23eda
Add testGenerateEphemeryGenesisFile
gconnect Aug 19, 2024
fce7eef
5098 branch 22 update more invalid params (#7472)
Matilda-Clerke Aug 19, 2024
2867ae9
Update comments on testGenerateEphemeryGenesisFile
gconnect Aug 19, 2024
53c6298
Create standalone EphemeryGenerateGenesisFile and Test file
gconnect Aug 23, 2024
7b7819e
Update EphemeryGenerateGenesisFile, generate method
gconnect Aug 23, 2024
e8e5dc5
Change default for receipt compaction to be enabled (#7450)
jframe Aug 19, 2024
79f6eda
5098 branch 23 rename is complete transaction (#7479)
Matilda-Clerke Aug 19, 2024
badfd2d
Fix BlockchainQueries::gasPrice when chain head block body still not …
fab-10 Aug 19, 2024
bfe5e75
preprocess release name for release workflow (#7486)
garyschulte Aug 19, 2024
454d04f
Add pending block header to TransactionEvaluationContext (#7483)
fab-10 Aug 19, 2024
c305ec2
fix wiki (#7480)
snazzysam933 Aug 20, 2024
23d9933
Update EOF validation error strings (#7487)
shemnon Aug 20, 2024
185e23b
5098 branch 24 throw checked exception to remove todos (#7481)
Matilda-Clerke Aug 20, 2024
3055f79
update error message in test files (#7493)
macfarla Aug 20, 2024
c142529
Update parameterized acceptance tests so they enumerate with --dry-ru…
fab-10 Aug 20, 2024
bdf21fc
Revert "Dagger controller tests (#7341)" (#7497)
fab-10 Aug 20, 2024
b796ba7
Refactor how genesis file overrides are applied (#7489)
macfarla Aug 20, 2024
ba78746
Add new lodestar bootnode for holesky (#7500)
siladu Aug 21, 2024
87119fe
For test node runners use provided data storage config (#7495)
matthew1001 Aug 21, 2024
55cbb16
BFT soak test - use both db modes (#7496)
matthew1001 Aug 21, 2024
a1051a6
Ran spotlessApply
gconnect Aug 23, 2024
3cf8834
Rename GenerateEphemeryGenesisFile to EphemeryGenesisFile
gconnect Aug 26, 2024
aad58e0
Made changes based on requested changes. Update the conditional state…
gconnect Aug 26, 2024
01a6158
EOF Differential Layout Fuzzer (#7488)
shemnon Aug 21, 2024
608de73
Fix ClassCastException in DebugMetrics nested structures [#7383] (#7499)
cloudspores Aug 23, 2024
aa13cda
Fixed | Initialising the encodedPubKey with empty String in case user…
kesrishubham2510 Aug 23, 2024
c0d237d
update link (#7506)
neowangreal Aug 23, 2024
a8bc0d1
Fleet-mode safe behavior for fcU in SynchronizationService (#7517)
garyschulte Aug 23, 2024
8a79c6d
evmtool was not respecting the --genesis option (#7518)
shemnon Aug 26, 2024
c3b47b0
Fix fuzzing dependencies (#7519)
shemnon Aug 26, 2024
2de736b
Release checklist update (#7494)
cdivitotawela Aug 26, 2024
ef55bed
Format the NetworkName file and update the Ephemery comment
gconnect Aug 26, 2024
58aa97c
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 26, 2024
3dfadc6
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 27, 2024
0a06caf
Use genesisConfig overrides in the EphemeryGenesisFile and update the…
gconnect Aug 28, 2024
d5a29f1
Merge main into branch
gconnect Aug 28, 2024
254f9ab
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 28, 2024
e87b0c9
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 29, 2024
16a3e76
Update setNetworkId method, EphemeryGenesisFile and Update the test
gconnect Aug 30, 2024
7cee24a
Remove check for genesisconfigfile
gconnect Aug 30, 2024
2027ff1
Merge main into branch
gconnect Aug 30, 2024
3c1290b
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 30, 2024
28119c6
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Aug 30, 2024
69c1b83
sign-off for commit 7cee24acad77c4084e56019873eb83e3479237f4
gconnect Aug 30, 2024
1cc3ad3
Merge main intro branch
gconnect Aug 30, 2024
a53b92b
Add comment to EphemeryGenesisFile
gconnect Aug 30, 2024
f45e8c4
Merge branch 'main' into add-network-support-for-ephemery-testnet
gconnect Sep 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ https://github.com/hyperledger/besu/releases/download/24.8.0/besu-24.8.0.zip / s
- `--Xbonsai-parallel-tx-processing-enabled` option enables executing transactions in parallel during block processing for Bonsai nodes
- Reduce default trie log pruning window size from 30,000 to 5,000 [#7365](https://github.com/hyperledger/besu/pull/7365)
- Add option `--poa-discovery-retry-bootnodes` for PoA networks to always use bootnodes during peer refresh, not just on first start [#7314](https://github.com/hyperledger/besu/pull/7314)
- Add network support for Ephemery Testnet [#7471](https://github.com/hyperledger/besu/pull/7471)

### Bug fixes
- Fix `eth_call` deserialization to correctly ignore unknown fields in the transaction object. [#7323](https://github.com/hyperledger/besu/pull/7323)
Expand Down
8 changes: 8 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static java.util.Arrays.asList;
import static java.util.Collections.singletonList;
import static org.hyperledger.besu.cli.DefaultCommandValues.getDefaultBesuDataPath;
import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY;
import static org.hyperledger.besu.cli.config.NetworkName.MAINNET;
import static org.hyperledger.besu.cli.util.CommandLineUtils.DEPENDENCY_WARNING_MSG;
import static org.hyperledger.besu.cli.util.CommandLineUtils.isOptionSet;
Expand Down Expand Up @@ -196,6 +197,7 @@
import org.hyperledger.besu.services.TransactionSelectionServiceImpl;
import org.hyperledger.besu.services.TransactionSimulationServiceImpl;
import org.hyperledger.besu.services.kvstore.InMemoryStoragePlugin;
import org.hyperledger.besu.util.EphemeryGenesisFile;
import org.hyperledger.besu.util.InvalidConfigurationException;
import org.hyperledger.besu.util.LogConfigurator;
import org.hyperledger.besu.util.NetworkUtility;
Expand Down Expand Up @@ -864,6 +866,7 @@ static class PrivacyOptionGroup {
private Collection<EnodeURL> staticNodes;
private BesuController besuController;
private BesuConfigurationImpl pluginCommonConfiguration;
private EphemeryGenesisFile ephemeryGenesisFile;

private BesuComponent besuComponent;
private final Supplier<ObservableMetricsSystem> metricsSystem =
Expand Down Expand Up @@ -1090,6 +1093,11 @@ public void run() {
if (network != null && network.isDeprecated()) {
logger.warn(NetworkDeprecationMessage.generate(network));
}
if (network.equals(EPHEMERY)) {
ephemeryGenesisFile =
new EphemeryGenesisFile(readGenesisConfigFile(), readGenesisConfigOptions());
ephemeryGenesisFile.updateGenesis();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually think lines 1096 - 1100 should be part of readGenesisConfigFile() so that calling readGenesisConfigFile will always give you the effective genesis file, and then maybe you don't need to modify the EPHEMERY networkName object itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving the code to this readGenesisConfigFile() resulted in a recursive error. I placed the code where it is now because I want the check to happen on client start

try {
configureLogging(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public enum NetworkName {
/** LUKSO mainnet network name. */
LUKSO("/lukso.json", BigInteger.valueOf(42)),

/**
* EPHEMERY network name. The networkId is the default networkId that will be used to make update
* to the most recent networkId.
*/
EPHEMERY("/ephemery.json", BigInteger.valueOf(39438135)),
Comment thread
macfarla marked this conversation as resolved.

/** Dev network name. */
DEV("/dev.json", BigInteger.valueOf(2018), false),
/** Future EIPs network name. */
Expand All @@ -43,7 +49,7 @@ public enum NetworkName {
MORDOR("/mordor.json", BigInteger.valueOf(7));

private final String genesisFile;
private final BigInteger networkId;
private BigInteger networkId;
private final boolean canSnapSync;
private final String deprecationDate;

Expand Down Expand Up @@ -77,6 +83,17 @@ public BigInteger getNetworkId() {
return networkId;
}

/**
* This method is called only by the Ephemery network. It is required to update the networkid.
*
* @param networkId Sets network id .
*/
public void setNetworkId(final BigInteger networkId) {
Comment thread
gconnect marked this conversation as resolved.
if (this == EPHEMERY) {
this.networkId = networkId;
}
}

/**
* Can SNAP sync boolean.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright contributors to Hyperledger Besu.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* SPDX-License-Identifier: Apache-2.0
*/
package org.hyperledger.besu.util;

import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY;

import org.hyperledger.besu.config.GenesisConfigFile;
import org.hyperledger.besu.config.GenesisConfigOptions;

import java.io.IOException;
import java.math.BigInteger;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;

/**
* The Generate Ephemery Genesis File. Checks for update based on the set period and update the
* Ephemery genesis file in memory
*/
public class EphemeryGenesisFile {
private final GenesisConfigFile genesisConfigFile;
private final GenesisConfigOptions genesisConfigOptions;
private static final int PERIOD = 28;
private static final long PERIOD_IN_SECONDS = (PERIOD * 24 * 60 * 60);

/**
* Instantiates a new Generate Ephemery genesis file.
*
* @param genesisConfigFile the Genesis Config File
* @param genesisConfigOptions the Genesis Config Options
*/
public EphemeryGenesisFile(
final GenesisConfigFile genesisConfigFile, final GenesisConfigOptions genesisConfigOptions) {
this.genesisConfigFile = genesisConfigFile;
this.genesisConfigOptions = genesisConfigOptions;
}

public void updateGenesis() {
try {
if (EPHEMERY.getGenesisFile() == null || genesisConfigOptions == null) {
throw new IOException("Genesis file or config options are null");
}

long genesisTimestamp = genesisConfigFile.getTimestamp();
Optional<BigInteger> genesisChainId = genesisConfigOptions.getChainId();
long currentTimestamp = Instant.now().getEpochSecond();
long periodsSinceGenesis =
ChronoUnit.DAYS.between(Instant.ofEpochSecond(genesisTimestamp), Instant.now()) / PERIOD;

long updatedTimestamp = genesisTimestamp + (periodsSinceGenesis * PERIOD_IN_SECONDS);
BigInteger updatedChainId =
genesisChainId
.orElseThrow(() -> new IllegalStateException("ChainId not present"))
.add(BigInteger.valueOf(periodsSinceGenesis));

if (currentTimestamp > (genesisTimestamp + PERIOD_IN_SECONDS)) {
EPHEMERY.setNetworkId(updatedChainId);
Map<String, String> overrides = new HashMap<>();
overrides.put("chainId", String.valueOf(updatedChainId));
overrides.put("timestamp", String.valueOf(updatedTimestamp));
genesisConfigFile.withOverrides(overrides);
}
} catch (IOException e) {
throw new RuntimeException("Error updating genesis file: " + e.getMessage(), e);
}
}
}
52 changes: 40 additions & 12 deletions besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static org.hamcrest.Matchers.is;
import static org.hyperledger.besu.cli.config.NetworkName.CLASSIC;
import static org.hyperledger.besu.cli.config.NetworkName.DEV;
import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY;
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.HOLESKY;
Expand Down Expand Up @@ -339,8 +340,9 @@ public void callingWithConfigOptionButInvalidContentTomlFileShouldDisplayHelp()
parseCommand("--config-file", tempConfigFile.toString());

final String expectedOutputStart =
"Invalid TOML configuration: org.apache.tuweni.toml.TomlParseError: Unexpected '.', expected a-z, A-Z, 0-9, ', \", a table key, "
+ "a newline, or end-of-input (line 1, column 1)";
"Invalid TOML configuration: org.apache.tuweni.toml.TomlParseError: Unexpected '.',"
+ " expected a-z, A-Z, 0-9, ', \", a table key, a newline, or end-of-input (line 1,"
+ " column 1)";
assertThat(commandErrorOutput.toString(UTF_8)).startsWith(expectedOutputStart);
assertThat(commandOutput.toString(UTF_8)).isEmpty();
}
Expand All @@ -367,8 +369,9 @@ public void callingWithConfigOptionButInvalidValueTomlFileShouldDisplayHelp() th
parseCommand("--config-file", tempConfigFile.toString());

final String expectedOutputStart =
"Invalid TOML configuration: org.apache.tuweni.toml.TomlParseError: Unexpected '=', expected ', \", ''', \"\"\", a number, "
+ "a boolean, a date/time, an array, or a table (line 1, column 8)";
"Invalid TOML configuration: org.apache.tuweni.toml.TomlParseError: Unexpected '=',"
+ " expected ', \", ''', \"\"\", a number, a boolean, a date/time, an array, or a table"
+ " (line 1, column 8)";
assertThat(commandErrorOutput.toString(UTF_8)).startsWith(expectedOutputStart);
assertThat(commandOutput.toString(UTF_8)).isEmpty();
}
Expand Down Expand Up @@ -1184,7 +1187,8 @@ public void syncMode_invalid() {
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"Invalid value for option '--sync-mode': expected one of [FULL, FAST, SNAP, CHECKPOINT] (case-insensitive) but was 'bogus'");
"Invalid value for option '--sync-mode': expected one of [FULL, FAST, SNAP, CHECKPOINT]"
+ " (case-insensitive) but was 'bogus'");
}

@Test
Expand Down Expand Up @@ -1340,7 +1344,9 @@ public void ethStatsContactOptionCannotBeUsedWithoutEthStatsServerProvided() {
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"The `--ethstats-contact` requires ethstats server URL to be provided. Either remove --ethstats-contact or provide a URL (via --ethstats=nodename:secret@host:port)");
"The `--ethstats-contact` requires ethstats server URL to be provided. Either remove"
+ " --ethstats-contact or provide a URL (via"
+ " --ethstats=nodename:secret@host:port)");
}

@Test
Expand Down Expand Up @@ -1450,7 +1456,8 @@ public void dnsUpdateEnabledOptionCannotBeUsedWithoutDnsEnabled() {
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"The `--Xdns-update-enabled` requires dns to be enabled. Either remove --Xdns-update-enabled or specify dns is enabled (--Xdns-enabled)");
"The `--Xdns-update-enabled` requires dns to be enabled. Either remove"
+ " --Xdns-update-enabled or specify dns is enabled (--Xdns-enabled)");
}

@Test
Expand Down Expand Up @@ -1862,6 +1869,22 @@ public void luksoValuesAreUsed() {
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}

@Test
public void ephemeryValuesAreUsed() {
parseCommand("--network", "ephemery");

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

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

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

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

@Test
public void classicValuesAreUsed() {
parseCommand("--network", "classic");
Expand Down Expand Up @@ -2232,7 +2255,8 @@ public void assertThatCheckPortClashRejectsAsExpectedForEngineApi() throws Excep
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"Port number '8545' has been specified multiple times. Please review the supplied configuration.");
"Port number '8545' has been specified multiple times. Please review the supplied"
+ " configuration.");
}

@Test
Expand Down Expand Up @@ -2337,7 +2361,8 @@ public void logsWarningWhenFailToLoadJemalloc() {
verify(mockLogger)
.warn(
eq(
"BESU_USING_JEMALLOC is present but we failed to load jemalloc library to get the version"),
"BESU_USING_JEMALLOC is present but we failed to load jemalloc library to get the"
+ " version"),
any(Throwable.class));
}

Expand Down Expand Up @@ -2383,7 +2408,8 @@ public void checkpointPostMergeShouldFailWhenGenesisUsesCheckpointFromPreMerge()
assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"PoS checkpoint sync requires a block with total difficulty greater or equal than the TTD");
"PoS checkpoint sync requires a block with total difficulty greater or equal than the"
+ " TTD");
}

@Test
Expand Down Expand Up @@ -2517,7 +2543,8 @@ public void snapsyncForHealingFeaturesShouldFailWhenHealingIsNotEnabled() {
"100");
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"--Xsnapsync-synchronizer-flat option can only be used when --Xbonsai-full-flat-db-enabled is true");
"--Xsnapsync-synchronizer-flat option can only be used when"
+ " --Xbonsai-full-flat-db-enabled is true");

parseCommand(
"--Xbonsai-full-flat-db-enabled",
Expand All @@ -2526,7 +2553,8 @@ public void snapsyncForHealingFeaturesShouldFailWhenHealingIsNotEnabled() {
"100");
assertThat(commandErrorOutput.toString(UTF_8))
.contains(
"--Xsnapsync-synchronizer-flat option can only be used when --Xbonsai-full-flat-db-enabled is true");
"--Xsnapsync-synchronizer-flat option can only be used when"
+ " --Xbonsai-full-flat-db-enabled is true");
}

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