-
Notifications
You must be signed in to change notification settings - Fork 461
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
Add holesky configs and chainspec #6034
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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,30 @@ | ||
{ | ||
"Init": { | ||
"ChainSpecPath": "chainspec/holesky.json", | ||
"GenesisHash": "0xff9006519a8ce843ac9c28549d24211420b546e12ce2d170c77a8cca7964f23d", | ||
"BaseDbPath": "nethermind_db/holesky", | ||
"LogFileName": "holesky.logs.txt" | ||
}, | ||
"Sync": { | ||
"FastSync": true | ||
}, | ||
"Metrics": { | ||
"NodeName": "Holesky" | ||
}, | ||
"Blocks": { | ||
"TargetBlockGasLimit": 30000000 | ||
}, | ||
"JsonRpc": { | ||
"Enabled": true, | ||
"Timeout": 20000, | ||
"Host": "127.0.0.1", | ||
"Port": 8545, | ||
"EngineHost": "127.0.0.1", | ||
"EnginePort": 8551, | ||
"EngineEnabledModules": "net;eth;subscribe;engine;web3;client" | ||
}, | ||
"Merge": { | ||
"Enabled": true, | ||
"FinalTotalDifficulty": "0" | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/Nethermind/Nethermind.Runner/configs/holesky_archive.cfg
This file contains 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,33 @@ | ||
{ | ||
"Init": { | ||
"ChainSpecPath": "chainspec/holesky.json", | ||
"GenesisHash": "0xff9006519a8ce843ac9c28549d24211420b546e12ce2d170c77a8cca7964f23d", | ||
"BaseDbPath": "nethermind_db/holesky_archive", | ||
"LogFileName": "holesky_archive.logs.txt" | ||
}, | ||
"Metrics": { | ||
"NodeName": "Holesky Archive" | ||
}, | ||
"Blocks": { | ||
"TargetBlockGasLimit": 30000000 | ||
}, | ||
"Receipt": { | ||
"TxLookupLimit": 0 | ||
}, | ||
"Pruning": { | ||
"Mode": "None" | ||
}, | ||
"JsonRpc": { | ||
"Enabled": true, | ||
"Timeout": 20000, | ||
"Host": "127.0.0.1", | ||
"Port": 8545, | ||
"EngineHost": "127.0.0.1", | ||
"EnginePort": 8551, | ||
"EngineEnabledModules": "net;eth;subscribe;engine;web3;client" | ||
}, | ||
"Merge": { | ||
"Enabled": true, | ||
"FinalTotalDifficulty": "0" | ||
} | ||
} |
This file contains 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 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 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,51 @@ | ||
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
using Nethermind.Core; | ||
using Nethermind.Core.Specs; | ||
using Nethermind.Int256; | ||
using Nethermind.Specs.Forks; | ||
|
||
namespace Nethermind.Specs; | ||
|
||
public class HoleskySpecProvider : ISpecProvider | ||
{ | ||
public const ulong GenesisTimestamp = 0x65046360; | ||
public const ulong ShanghaiTimestamp = 0x65047260; | ||
public const ulong CancunTimestamp = 0x77359400; | ||
|
||
private HoleskySpecProvider() { } | ||
|
||
public IReleaseSpec GetSpec(ForkActivation forkActivation) | ||
{ | ||
return forkActivation.Timestamp switch | ||
{ | ||
null or < ShanghaiTimestamp => GenesisSpec, | ||
< CancunTimestamp => Shanghai.Instance, | ||
_ => Cancun.Instance | ||
}; | ||
} | ||
|
||
public void UpdateMergeTransitionInfo(long? blockNumber, UInt256? terminalTotalDifficulty = null) | ||
{ | ||
if (blockNumber is not null) | ||
MergeBlockNumber = (ForkActivation)blockNumber; | ||
if (terminalTotalDifficulty is not null) | ||
TerminalTotalDifficulty = terminalTotalDifficulty; | ||
} | ||
|
||
public ulong NetworkId => BlockchainIds.Holesky; | ||
public ulong ChainId => NetworkId; | ||
public long? DaoBlockNumber => null; | ||
public ForkActivation? MergeBlockNumber { get; private set; } = (0, GenesisTimestamp); | ||
public ulong TimestampFork => ShanghaiTimestamp; | ||
public UInt256? TerminalTotalDifficulty { get; private set; } = 0; | ||
public IReleaseSpec GenesisSpec { get; } = London.Instance; | ||
public ForkActivation[] TransitionActivations { get; } = | ||
{ | ||
(1, ShanghaiTimestamp), | ||
(2, CancunTimestamp) | ||
}; | ||
|
||
public static readonly HoleskySpecProvider Instance = new(); | ||
} |
This file contains 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
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.
+SnapSync true?
I guess we have to add pivot, probably genesis block in this case. I haven't checked how pivots work with genesis though.
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.
Please check here
#6034 (comment)
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.
Okay, please make sure any network can work without pivots. I am not so sure about it. It would be nice to know not only in holesky context