diff --git a/CHANGELOG.md b/CHANGELOG.md index f118aa503b9..762f8ca39fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index 00ea6e1efdb..8cdaf9b68aa 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -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; @@ -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; @@ -864,6 +866,7 @@ static class PrivacyOptionGroup { private Collection staticNodes; private BesuController besuController; private BesuConfigurationImpl pluginCommonConfiguration; + private EphemeryGenesisFile ephemeryGenesisFile; private BesuComponent besuComponent; private final Supplier metricsSystem = @@ -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(); + } try { configureLogging(true); diff --git a/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java b/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java index f864068bb4e..27cb673bb7b 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/config/NetworkName.java @@ -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)), + /** Dev network name. */ DEV("/dev.json", BigInteger.valueOf(2018), false), /** Future EIPs network name. */ @@ -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; @@ -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) { + if (this == EPHEMERY) { + this.networkId = networkId; + } + } + /** * Can SNAP sync boolean. * diff --git a/besu/src/main/java/org/hyperledger/besu/util/EphemeryGenesisFile.java b/besu/src/main/java/org/hyperledger/besu/util/EphemeryGenesisFile.java new file mode 100644 index 00000000000..4f1c77006ba --- /dev/null +++ b/besu/src/main/java/org/hyperledger/besu/util/EphemeryGenesisFile.java @@ -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 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 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); + } + } +} diff --git a/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java b/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java index e6e0e859517..fd68a6a3ff0 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java @@ -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; @@ -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(); } @@ -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(); } @@ -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 @@ -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 @@ -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 @@ -1862,6 +1869,22 @@ public void luksoValuesAreUsed() { assertThat(commandErrorOutput.toString(UTF_8)).isEmpty(); } + @Test + public void ephemeryValuesAreUsed() { + parseCommand("--network", "ephemery"); + + final ArgumentCaptor 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"); @@ -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 @@ -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)); } @@ -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 @@ -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", @@ -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 diff --git a/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java b/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java index 87be2a699e3..649560d1119 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java @@ -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); diff --git a/besu/src/test/java/org/hyperledger/besu/util/EphemeryGenesisFileTest.java b/besu/src/test/java/org/hyperledger/besu/util/EphemeryGenesisFileTest.java new file mode 100644 index 00000000000..334e82ff090 --- /dev/null +++ b/besu/src/test/java/org/hyperledger/besu/util/EphemeryGenesisFileTest.java @@ -0,0 +1,187 @@ +/* + * 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.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.hyperledger.besu.cli.config.NetworkName.EPHEMERY; +import static org.hyperledger.besu.config.GenesisConfigFile.fromConfig; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import org.hyperledger.besu.config.GenesisConfigFile; +import org.hyperledger.besu.config.GenesisConfigOptions; + +import java.io.IOException; +import java.math.BigInteger; +import java.util.Map; +import java.util.Optional; +import java.util.TreeMap; + +import io.vertx.core.json.JsonObject; +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +public class EphemeryGenesisFileTest { + private GenesisConfigFile genesisConfigFile; + private GenesisConfigOptions genesisConfigOptions; + private EphemeryGenesisFile ephemeryGenesisFile; + private static final int GENESIS_CONFIG_TEST_CHAINID = 39438135; + private static final long GENESIS_TEST_TIMESTAMP = 1720119600; + private static final long CURRENT_TIMESTAMP = 1712041200; + private static final long CURRENT_TIMESTAMP_HIGHER = 1922041200; + private static final long PERIOD_IN_SECONDS = 28 * 24 * 60 * 60; + private static final long PERIOD_SINCE_GENESIS = 3; + + private static final JsonObject VALID_GENESIS_JSON = + (new JsonObject()) + .put("config", (new JsonObject()).put("chainId", GENESIS_CONFIG_TEST_CHAINID)) + .put("timestamp", GENESIS_TEST_TIMESTAMP); + + private static final GenesisConfigFile INVALID_GENESIS_JSON = fromConfig("{}"); + private static final JsonObject INVALID_GENESIS_JSON_WITHOUT_CHAINID = + (new JsonObject()).put("timestamp", GENESIS_TEST_TIMESTAMP); + + private static final JsonObject INVALID_GENESIS_JSON_WITHOUT_TIMESTAMP = + new JsonObject() + .put("config", (new JsonObject()).put("chainId", GENESIS_CONFIG_TEST_CHAINID)); + + @BeforeEach + void setUp() throws IOException { + genesisConfigFile = mock(GenesisConfigFile.class); + genesisConfigOptions = mock(GenesisConfigOptions.class); + ephemeryGenesisFile = new EphemeryGenesisFile(genesisConfigFile, genesisConfigOptions); + } + + @Test + public void testEphemeryWhenChainIdIsAbsent() { + final GenesisConfigFile config = + GenesisConfigFile.fromConfig(INVALID_GENESIS_JSON_WITHOUT_CHAINID.toString()); + Optional chainId = config.getConfigOptions().getChainId(); + assertThat(chainId).isNotPresent(); + } + + @Test + public void testShouldDefaultTimestampToZero() { + final GenesisConfigFile config = + GenesisConfigFile.fromConfig(INVALID_GENESIS_JSON_WITHOUT_TIMESTAMP.toString()); + assertThat(config.getTimestamp()).isZero(); + } + + @Test + public void testEphemeryWhenGenesisJsonIsInvalid() { + Assertions.assertThatThrownBy(INVALID_GENESIS_JSON::getDifficulty) + .isInstanceOf(IllegalArgumentException.class) + .hasMessageContaining("Invalid genesis block configuration"); + } + + @Test + public void testEphemeryWhenGenesisJsonIsValid() { + final GenesisConfigFile config = GenesisConfigFile.fromConfig(VALID_GENESIS_JSON.toString()); + assertThat(String.valueOf(config.getTimestamp())).isNotNull(); + assertThat(String.valueOf(config.getTimestamp())).isNotEmpty(); + assertThat(String.valueOf(config.getConfigOptions().getChainId())).isNotNull(); + assertThat(String.valueOf(config.getConfigOptions().getChainId())).isNotEmpty(); + } + + @Test + public void testEphemeryNotYetDueForUpdate() { + final GenesisConfigFile config = GenesisConfigFile.fromConfig(VALID_GENESIS_JSON.toString()); + assertThat(CURRENT_TIMESTAMP).isLessThan(config.getTimestamp() + PERIOD_IN_SECONDS); + } + + @Test + void testOverrideWithUpdatedChainIdAndTimeStamp() { + BigInteger expectedChainId = + BigInteger.valueOf(GENESIS_CONFIG_TEST_CHAINID) + .add(BigInteger.valueOf(PERIOD_SINCE_GENESIS)); + + long expectedGenesisTimestamp = + GENESIS_TEST_TIMESTAMP + (PERIOD_SINCE_GENESIS * PERIOD_IN_SECONDS); + + final GenesisConfigFile config = GenesisConfigFile.fromResource("/ephemery.json"); + + final Map override = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + override.put("chainId", String.valueOf(expectedChainId)); + override.put("timestamp", String.valueOf(expectedGenesisTimestamp)); + + assertThat(config.withOverrides(override).getConfigOptions().getChainId()).isPresent(); + assertThat(config.withOverrides(override).getTimestamp()).isNotNull(); + } + + @Test + public void testEphemeryWhenSuccessful() { + final GenesisConfigFile config = GenesisConfigFile.fromConfig(VALID_GENESIS_JSON.toString()); + + BigInteger expectedChainId = + BigInteger.valueOf(GENESIS_CONFIG_TEST_CHAINID) + .add(BigInteger.valueOf(PERIOD_SINCE_GENESIS)); + + long expectedGenesisTimestamp = + GENESIS_TEST_TIMESTAMP + (PERIOD_SINCE_GENESIS * PERIOD_IN_SECONDS); + + EPHEMERY.setNetworkId(expectedChainId); + + final Map override = new TreeMap<>(String.CASE_INSENSITIVE_ORDER); + override.put("chainId", String.valueOf(expectedChainId)); + override.put("timestamp", String.valueOf(expectedGenesisTimestamp)); + config.withOverrides(override); + + assertThat(CURRENT_TIMESTAMP_HIGHER) + .isGreaterThan(Long.parseLong(String.valueOf(GENESIS_TEST_TIMESTAMP + PERIOD_IN_SECONDS))); + + assertThat(override.get("timestamp")).isEqualTo(String.valueOf(expectedGenesisTimestamp)); + assertThat(override.get("chainId")).isEqualTo(expectedChainId.toString()); + } + + @Test + public void testEphemeryWhenChainIdAndTimestampIsPresent() { + final GenesisConfigFile config = GenesisConfigFile.fromResource("/ephemery.json"); + Optional chainId = config.getConfigOptions().getChainId(); + long timestamp = config.getTimestamp(); + when(genesisConfigFile.getTimestamp()).thenReturn(GENESIS_TEST_TIMESTAMP); + when(genesisConfigOptions.getChainId()) + .thenReturn(Optional.of(BigInteger.valueOf(GENESIS_CONFIG_TEST_CHAINID))); + ephemeryGenesisFile.updateGenesis(); + verify(genesisConfigFile).getTimestamp(); + verify(genesisConfigOptions).getChainId(); + + assertThat(chainId).isPresent(); + assertThat(chainId).isNotEmpty(); + assertThat(String.valueOf(timestamp)).isNotNull(); + assertThat(String.valueOf(timestamp)).isNotEmpty(); + } + + @Test + public void testEphemeryThrowIOException() { + EphemeryGenesisFile spyEphemeryGenesisFile = spy(ephemeryGenesisFile); + + doThrow(new RuntimeException("Unable to update ephemery genesis file.")) + .when(spyEphemeryGenesisFile) + .updateGenesis(); + + assertThatThrownBy(spyEphemeryGenesisFile::updateGenesis) + .isInstanceOf(RuntimeException.class) + .hasMessage("Unable to update ephemery genesis file."); + verify(spyEphemeryGenesisFile).updateGenesis(); + } +} diff --git a/config/src/main/resources/ephemery.json b/config/src/main/resources/ephemery.json new file mode 100644 index 00000000000..7fda79626b7 --- /dev/null +++ b/config/src/main/resources/ephemery.json @@ -0,0 +1,914 @@ +{ + "config" : { + "chainId" : "39438135", + "homesteadBlock" : 0, + "eip150Block" : 0, + "eip155Block" : 0, + "eip158Block" : 0, + "byzantiumBlock" : 0, + "constantinopleBlock" : 0, + "petersburgBlock" : 0, + "istanbulBlock" : 0, + "berlinBlock" : 0, + "londonBlock" : 0, + "preMergeForkBlock" : 0, + "terminalTotalDifficulty" : 0, + "shanghaiTime" : 0, + "cancunTime" : 0, + "depositContractAddress" : "0x4242424242424242424242424242424242424242", + "ethash" : { }, + "discovery" : { + "bootnodes" : [ "enode://50a54ecbd2175497640bcf46a25bbe9bb4fae51d7cc2a29ef4947a7ee17496cf39a699b7fe6b703ed0feb9dbaae7e44fc3827fcb7435ca9ac6de4daa4d983b3d@137.74.203.240:30303", "enode://0f2c301a9a3f9fa2ccfa362b79552c052905d8c2982f707f46cd29ece5a9e1c14ecd06f4ac951b228f059a43c6284a1a14fce709e8976cac93b50345218bf2e9@135.181.140.168:30343" ] + } + }, + "alloc" : { + "0x0000000000000000000000000000000000000000" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000001" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000002" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000003" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000004" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000005" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000006" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000007" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000008" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000009" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000000f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000010" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000011" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000012" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000013" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000014" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000015" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000016" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000017" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000018" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000019" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000001f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000020" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000021" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000022" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000023" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000024" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000025" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000026" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000027" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000028" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000029" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000002f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000030" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000031" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000032" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000033" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000034" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000035" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000036" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000037" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000038" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000039" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000003f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000040" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000041" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000042" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000043" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000044" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000045" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000046" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000047" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000048" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000049" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000004f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000050" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000051" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000052" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000053" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000054" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000055" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000056" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000057" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000058" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000059" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000005f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000060" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000061" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000062" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000063" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000064" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000065" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000066" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000067" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000068" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000069" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000006f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000070" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000071" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000072" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000073" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000074" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000075" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000076" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000077" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000078" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000079" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000007f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000080" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000081" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000082" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000083" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000084" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000085" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000086" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000087" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000088" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000089" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000008f" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000090" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000091" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000092" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000093" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000094" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000095" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000096" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000097" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000098" : { + "balance" : "1" + }, + "0x0000000000000000000000000000000000000099" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009a" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009b" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009c" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009d" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009e" : { + "balance" : "1" + }, + "0x000000000000000000000000000000000000009f" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000a9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000aa" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ab" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ac" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ad" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ae" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000af" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000b9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ba" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000bb" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000bc" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000bd" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000be" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000bf" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000c9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ca" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000cb" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000cc" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000cd" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ce" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000cf" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000d9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000da" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000db" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000dc" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000dd" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000de" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000df" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000e9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ea" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000eb" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ec" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ed" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ee" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ef" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f0" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f1" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f2" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f3" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f4" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f5" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f6" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f7" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f8" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000f9" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000fa" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000fb" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000fc" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000fd" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000fe" : { + "balance" : "1" + }, + "0x00000000000000000000000000000000000000ff" : { + "balance" : "1" + }, + "0x4242424242424242424242424242424242424242" : { + "balance" : "0", + "code" : "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100a4578063621fd130146101ba578063c5f2892f14610244575b600080fd5b34801561005057600080fd5b506100906004803603602081101561006757600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661026b565b604080519115158252519081900360200190f35b6101b8600480360360808110156100ba57600080fd5b8101906020810181356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91939092909160208101903564010000000081111561012757600080fd5b82018360208201111561013957600080fd5b8035906020019184600183028401116401000000008311171561015b57600080fd5b91939092909160208101903564010000000081111561017957600080fd5b82018360208201111561018b57600080fd5b803590602001918460018302840111640100000000831117156101ad57600080fd5b919350915035610304565b005b3480156101c657600080fd5b506101cf6110b5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102095781810151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561025057600080fd5b506102596110c7565b60408051918252519081900360200190f35b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806102fe57507fffffffff0000000000000000000000000000000000000000000000000000000082167f8564090700000000000000000000000000000000000000000000000000000000145b92915050565b6030861461035d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118056026913960400191505060405180910390fd5b602084146103b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061179c6036913960400191505060405180910390fd5b6060821461040f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806118786029913960400191505060405180910390fd5b670de0b6b3a7640000341015610470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118526026913960400191505060405180910390fd5b633b9aca003406156104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806117d26033913960400191505060405180910390fd5b633b9aca00340467ffffffffffffffff811115610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061182b6027913960400191505060405180910390fd5b6060610540826114ba565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a6105756020546114ba565b6040805160a0808252810189905290819060208201908201606083016080840160c085018e8e80828437600083820152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690910187810386528c815260200190508c8c808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690920188810386528c5181528c51602091820193918e019250908190849084905b83811015610648578181015183820152602001610630565b50505050905090810190601f1680156106755780820380516001836020036101000a031916815260200191505b5086810383528881526020018989808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169092018881038452895181528951602091820193918b019250908190849084905b838110156106ef5781810151838201526020016106d7565b50505050905090810190601f16801561071c5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b604051602001808484808284377fffffffffffffffffffffffffffffffff0000000000000000000000000000000090941691909301908152604080517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0818403018152601090920190819052815191955093508392506020850191508083835b602083106107fc57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107bf565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610859573d6000803e3d6000fd5b5050506040513d602081101561086e57600080fd5b5051905060006002806108846040848a8c6116fe565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108f857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016108bb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610955573d6000803e3d6000fd5b5050506040513d602081101561096a57600080fd5b5051600261097b896040818d6116fe565b60405160009060200180848480828437919091019283525050604080518083038152602092830191829052805190945090925082918401908083835b602083106109f457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016109b7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610a51573d6000803e3d6000fd5b5050506040513d6020811015610a6657600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610ada57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a9d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610b37573d6000803e3d6000fd5b5050506040513d6020811015610b4c57600080fd5b50516040805160208101858152929350600092600292839287928f928f92018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610bd957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b9c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610c36573d6000803e3d6000fd5b5050506040513d6020811015610c4b57600080fd5b50516040518651600291889160009188916020918201918291908601908083835b60208310610ca957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610c6c565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610d4e57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610d11565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610dab573d6000803e3d6000fd5b5050506040513d6020811015610dc057600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610e3457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610df7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610e91573d6000803e3d6000fd5b5050506040513d6020811015610ea657600080fd5b50519050858114610f02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260548152602001806117486054913960600191505060405180910390fd5b60205463ffffffff11610f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806117276021913960400191505060405180910390fd5b602080546001019081905560005b60208110156110a9578160011660011415610fa0578260008260208110610f9157fe5b0155506110ac95505050505050565b600260008260208110610faf57fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061102557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610fe8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015611082573d6000803e3d6000fd5b5050506040513d602081101561109757600080fd5b50519250600282049150600101610f6e565b50fe5b50505050505050565b60606110c26020546114ba565b905090565b6020546000908190815b60208110156112f05781600116600114156111e6576002600082602081106110f557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061116b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161112e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156111c8573d6000803e3d6000fd5b5050506040513d60208110156111dd57600080fd5b505192506112e2565b600283602183602081106111f657fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061126b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161122e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156112c8573d6000803e3d6000fd5b5050506040513d60208110156112dd57600080fd5b505192505b6002820491506001016110d1565b506002826112ff6020546114ba565b600060401b6040516020018084815260200183805190602001908083835b6020831061135a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161131d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790527fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000095909516920191825250604080518083037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8018152601890920190819052815191955093508392850191508083835b6020831061143f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611402565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa15801561149c573d6000803e3d6000fd5b5050506040513d60208110156114b157600080fd5b50519250505090565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106114f457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b8260018151811061153757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b8260028151811061157a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106115bd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b8260048151811061160057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b8260058151811061164357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061168657fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106116c957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b6000808585111561170d578182fd5b83861115611719578182fd5b505082019391909203915056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220dceca8706b29e917dacf25fceef95acac8d90d765ac926663ce4096195952b6164736f6c634300060b0033", + "storage" : { + "0x0000000000000000000000000000000000000000000000000000000000000022" : "0xf5a5fd42d16a20302798ef6ed309979b43003d2320d9f0e8ea9831a92759fb4b", + "0x0000000000000000000000000000000000000000000000000000000000000023" : "0xdb56114e00fdd4c1f85c892bf35ac9a89289aaecb1ebd0a96cde606a748b5d71", + "0x0000000000000000000000000000000000000000000000000000000000000024" : "0xc78009fdf07fc56a11f122370658a353aaa542ed63e44c4bc15ff4cd105ab33c", + "0x0000000000000000000000000000000000000000000000000000000000000025" : "0x536d98837f2dd165a55d5eeae91485954472d56f246df256bf3cae19352a123c", + "0x0000000000000000000000000000000000000000000000000000000000000026" : "0x9efde052aa15429fae05bad4d0b1d7c64da64d03d7a1854a588c2cb8430c0d30", + "0x0000000000000000000000000000000000000000000000000000000000000027" : "0xd88ddfeed400a8755596b21942c1497e114c302e6118290f91e6772976041fa1", + "0x0000000000000000000000000000000000000000000000000000000000000028" : "0x87eb0ddba57e35f6d286673802a4af5975e22506c7cf4c64bb6be5ee11527f2c", + "0x0000000000000000000000000000000000000000000000000000000000000029" : "0x26846476fd5fc54a5d43385167c95144f2643f533cc85bb9d16b782f8d7db193", + "0x000000000000000000000000000000000000000000000000000000000000002a" : "0x506d86582d252405b840018792cad2bf1259f1ef5aa5f887e13cb2f0094f51e1", + "0x000000000000000000000000000000000000000000000000000000000000002b" : "0xffff0ad7e659772f9534c195c815efc4014ef1e1daed4404c06385d11192e92b", + "0x000000000000000000000000000000000000000000000000000000000000002c" : "0x6cf04127db05441cd833107a52be852868890e4317e6a02ab47683aa75964220", + "0x000000000000000000000000000000000000000000000000000000000000002d" : "0xb7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5f", + "0x000000000000000000000000000000000000000000000000000000000000002e" : "0xdf6af5f5bbdb6be9ef8aa618e4bf8073960867171e29676f8b284dea6a08a85e", + "0x000000000000000000000000000000000000000000000000000000000000002f" : "0xb58d900f5e182e3c50ef74969ea16c7726c549757cc23523c369587da7293784", + "0x0000000000000000000000000000000000000000000000000000000000000030" : "0xd49a7502ffcfb0340b1d7885688500ca308161a7f96b62df9d083b71fcc8f2bb", + "0x0000000000000000000000000000000000000000000000000000000000000031" : "0x8fe6b1689256c0d385f42f5bbe2027a22c1996e110ba97c171d3e5948de92beb", + "0x0000000000000000000000000000000000000000000000000000000000000032" : "0x8d0d63c39ebade8509e0ae3c9c3876fb5fa112be18f905ecacfecb92057603ab", + "0x0000000000000000000000000000000000000000000000000000000000000033" : "0x95eec8b2e541cad4e91de38385f2e046619f54496c2382cb6cacd5b98c26f5a4", + "0x0000000000000000000000000000000000000000000000000000000000000034" : "0xf893e908917775b62bff23294dbbe3a1cd8e6cc1c35b4801887b646a6f81f17f", + "0x0000000000000000000000000000000000000000000000000000000000000035" : "0xcddba7b592e3133393c16194fac7431abf2f5485ed711db282183c819e08ebaa", + "0x0000000000000000000000000000000000000000000000000000000000000036" : "0x8a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9c", + "0x0000000000000000000000000000000000000000000000000000000000000037" : "0xfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167", + "0x0000000000000000000000000000000000000000000000000000000000000038" : "0xe71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d7", + "0x0000000000000000000000000000000000000000000000000000000000000039" : "0x31206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc0", + "0x000000000000000000000000000000000000000000000000000000000000003a" : "0x21352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544", + "0x000000000000000000000000000000000000000000000000000000000000003b" : "0x619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a46765", + "0x000000000000000000000000000000000000000000000000000000000000003c" : "0x7cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4", + "0x000000000000000000000000000000000000000000000000000000000000003d" : "0x848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe1", + "0x000000000000000000000000000000000000000000000000000000000000003e" : "0x8869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636", + "0x000000000000000000000000000000000000000000000000000000000000003f" : "0xb5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c", + "0x0000000000000000000000000000000000000000000000000000000000000040" : "0x985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7" + } + }, + "0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02" : { + "balance" : "0", + "nonce" : "1", + "code" : "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500" + }, + "0xa2A6d93439144FFE4D27c9E088dCD8b783946263" : { + "balance" : "1000000000000000000000000" + }, + "0xBc11295936Aa79d594139de1B2e12629414F3BDB" : { + "balance" : "1000000000000000000000000" + }, + "0x7cF5b79bfe291A67AB02b393E456cCc4c266F753" : { + "balance" : "1000000000000000000000000" + }, + "0xaaec86394441f915bce3e6ab399977e9906f3b69" : { + "balance" : "1000000000000000000000000" + }, + "0xF47CaE1CF79ca6758Bfc787dbD21E6bdBe7112B8" : { + "balance" : "1000000000000000000000000" + }, + "0xd7eDDB78ED295B3C9629240E8924fb8D8874ddD8" : { + "balance" : "1000000000000000000000000" + }, + "0x8b7F0977Bb4f0fBE7076FA22bC24acA043583F5e" : { + "balance" : "1000000000000000000000000" + }, + "0xe2e2659028143784d557bcec6ff3a0721048880a" : { + "balance" : "1000000000000000000000000" + }, + "0xd9a5179f091d85051d3c982785efd1455cec8699" : { + "balance" : "1000000000000000000000000" + }, + "0xbeef32ca5b9a198d27B4e02F4c70439fE60356Cf" : { + "balance" : "1000000000000000000000000" + }, + "0x0000006916a87b82333f4245046623b23794c65c" : { + "balance" : "10000000000000000000000000" + }, + "0xb21c33de1fab3fa15499c62b59fe0cc3250020d1" : { + "balance" : "100000000000000000000000000" + }, + "0x10F5d45854e038071485AC9e402308cF80D2d2fE" : { + "balance" : "100000000000000000000000000" + }, + "0xd7d76c58b3a519e9fA6Cc4D22dC017259BC49F1E" : { + "balance" : "100000000000000000000000000" + }, + "0x799D329e5f583419167cD722962485926E338F4a" : { + "balance" : "1000000000000000000" + }, + "0x4c2ae482593505f0163cdefc073e81c63cda4107" : { + "balance" : "1000000000000000000000000" + }, + "0xa8e8f14732658e4b51e8711931053a8a69baf2b1" : { + "balance" : "1000000000000000000000000" + }, + "0xe0a2bd4258d2768837baa26a28fe71dc079f84c7" : { + "balance" : "100000000000000000000000000" + }, + "0x1eA692E68a7765dE26FC03A6D74EE5B56A7e2b4d" : { + "balance" : "100000000000000000000000000" + }, + "0x57c3dfd40A86628B67721115d7A03C9F341d7718" : { + "balance" : "100000000000000000000000000" + }, + "0xc90E920F4DCfd4954230edCaB168D0C5B9561e03" : { + "balance" : "1000000000000000000000000000" + }, + "0x6Cc9397c3B38739daCbfaA68EaD5F5D77Ba5F455" : { + "balance" : "10000000000000000000000000" + }, + "0x992775d32fd0ec76b95C5E76CeEA92ED5a4bE1F9" : { + "balance" : "10000000000000000000000000" + } + }, + "coinbase" : "0x0000000000000000000000000000000000000000", + "baseFeePerGas" : "0x3B9ACA00", + "difficulty" : "0x01", + "extraData" : "", + "gasLimit" : "0x1c9c380", + "nonce" : "0x1234", + "mixhash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "parentHash" : "0x0000000000000000000000000000000000000000000000000000000000000000", + "timestamp" : "1720119600" +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 93f56e01379..b707e599df2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ org.gradle.jvmargs=-Xmx4g \ --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \ --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED # Could be moved to sonar properties after https://sonarsource.atlassian.net/browse/SONARGRADL-134 -systemProp.sonar.gradle.skipCompile=true \ No newline at end of file +systemProp.sonar.gradle.skipCompile=true