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