Skip to content

Commit e64bee7

Browse files
smartprogrammer93kamilchodola
authored andcommitted
Sepolia and Holesky Cancun spec and config (#6571)
1 parent 7c6dacd commit e64bee7

File tree

13 files changed

+69
-29
lines changed

13 files changed

+69
-29
lines changed

src/Nethermind/Chains/holesky.json

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
"eip3855TransitionTimestamp": "0x6516eac0",
4040
"eip3860TransitionTimestamp": "0x6516eac0",
4141
"eip4895TransitionTimestamp": "0x6516eac0",
42+
"eip1153TransitionTimestamp": "0x65C36AC0",
43+
"eip4788TransitionTimestamp": "0x65C36AC0",
44+
"eip4844TransitionTimestamp": "0x65C36AC0",
45+
"eip5656TransitionTimestamp": "0x65C36AC0",
46+
"eip6780TransitionTimestamp": "0x65C36AC0",
4247
"terminalTotalDifficulty": "0x0",
4348
"gasLimitBoundDivisor": "0x400",
4449
"maxCodeSize": "0x6000",

src/Nethermind/Chains/sepolia.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@
6060
"eip4895TransitionTimestamp": "0x63FD7D60",
6161
"eip3855TransitionTimestamp": "0x63FD7D60",
6262
"eip3651TransitionTimestamp": "0x63FD7D60",
63-
"eip3860TransitionTimestamp": "0x63FD7D60"
63+
"eip3860TransitionTimestamp": "0x63FD7D60",
64+
"eip1153TransitionTimestamp": "0x65B97D60",
65+
"eip4788TransitionTimestamp": "0x65B97D60",
66+
"eip4844TransitionTimestamp": "0x65B97D60",
67+
"eip5656TransitionTimestamp": "0x65B97D60",
68+
"eip6780TransitionTimestamp": "0x65B97D60"
6469
},
6570
"genesis": {
6671
"seal": {

src/Nethermind/Nethermind.Network.Test/ForkInfoTests.cs

+10-5
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,22 @@ public void Fork_id_and_hash_as_expected_on_goerli(long head, ulong headTimestam
118118

119119
[TestCase(0, 0ul, "0xc61a6098", 1_696_000_704ul, "Unsynced")]
120120
[TestCase(1, 1_696_000_703ul, "0xc61a6098", 1_696_000_704ul, "Last genesis spec block")]
121-
[TestCase(2, 1_696_000_704ul, "0xfd4f016b", 0ul, "First Shanghai block")]
121+
[TestCase(2, 1_696_000_704ul, "0xfd4f016b", 1_707_305_664ul, "First Shanghai block")]
122+
[TestCase(3, 1_707_305_663ul, "0xfd4f016b", 1_707_305_664ul, "Future Shanghai timestamp")]
123+
[TestCase(4, 1_707_305_664ul, "0x9b192ad0", 0ul, "First Cancun timestamp")]
124+
[TestCase(5, 1_717_305_664ul, "0x9b192ad0", 0ul, "Future Cancun timestamp")]
122125
public void Fork_id_and_hash_as_expected_on_holesky(long head, ulong headTimestamp, string forkHashHex, ulong next, string description)
123126
{
124127
Test(head, headTimestamp, KnownHashes.HoleskyGenesis, forkHashHex, next, description, HoleskySpecProvider.Instance, "holesky.json");
125128
}
126129

127130
[TestCase(0, 0ul, "0xFE3366E7", 1735371ul, "Sepolia genesis")]
128-
[TestCase(1735370, 0ul, "0xFE3366E7", 1735371ul, "Sepolia Last block before MergeForkIdTranstion")]
129-
[TestCase(1735371, 0ul, "0xb96cbd13", 1677557088UL, "First block - Sepolia MergeForkIdTransition")]
130-
[TestCase(1735372, 1677557088ul, "0xf7f9bc08", 0ul, "Shanghai")]
131-
[TestCase(1735372, 2677557088ul, "0xf7f9bc08", 0ul, "Future Shanghai")]
131+
[TestCase(1735370, 0ul, "0xFE3366E7", 1_735_371ul, "Sepolia Last block before MergeForkIdTranstion")]
132+
[TestCase(1735371, 0ul, "0xb96cbd13", 1_677_557_088ul, "First block - Sepolia MergeForkIdTransition")]
133+
[TestCase(1735372, 1_677_557_088ul, "0xf7f9bc08", 1_706_655_072ul, "Shanghai")]
134+
[TestCase(1735372, 1_706_655_071ul, "0xf7f9bc08", 1_706_655_072ul, "Future Shanghai")]
135+
[TestCase(1735373, 1_706_655_072ul, "0x88cf81d9", 0ul, "First Cancun timestamp")]
136+
[TestCase(1735374, 1_716_655_072ul, "0x88cf81d9", 0ul, "Future Cancun timestamp")]
132137
public void Fork_id_and_hash_as_expected_on_sepolia(long head, ulong headTimestamp, string forkHashHex, ulong next, string description)
133138
{
134139
Test(head, headTimestamp, KnownHashes.SepoliaGenesis, forkHashHex, next, description, SepoliaSpecProvider.Instance, "sepolia.json");

src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ public void Network_diag_tracer_disabled_by_default(string configWildcard)
189189
}
190190

191191
[TestCase("mainnet", 2048)]
192-
[TestCase("holesky", 2048)]
192+
[TestCase("holesky", 1024)]
193+
[TestCase("sepolia", 1024)]
193194
[TestCase("gnosis", 2048)]
194195
[TestCase("poacore", 2048)]
195196
[TestCase("energy", 2048)]
196-
[TestCase("chiado", 2048)]
197-
[TestCase("^mainnet ^holesky ^spaceneth ^volta ^energy ^poacore ^gnosis ^chiado", 1024)]
197+
[TestCase("chiado", 1024)]
198+
[TestCase("^mainnet ^spaceneth ^volta ^energy ^poacore ^gnosis ^chiado", 1024)]
198199
[TestCase("spaceneth", 128)]
199200
public void Tx_pool_defaults_are_correct(string configWildcard, int poolSize)
200201
{
@@ -327,11 +328,10 @@ public void Basic_configs_are_as_expected(string configWildcard, bool isProducti
327328
}
328329

329330
[TestCase("goerli", BlobsSupportMode.StorageWithReorgs)]
330-
[TestCase("^goerli", BlobsSupportMode.Disabled)]
331-
[TestCase("sepolia", BlobsSupportMode.Disabled)]
332-
[TestCase("holesky", BlobsSupportMode.Disabled)]
331+
[TestCase("sepolia", BlobsSupportMode.StorageWithReorgs)]
332+
[TestCase("holesky", BlobsSupportMode.StorageWithReorgs)]
333+
[TestCase("chiado", BlobsSupportMode.StorageWithReorgs)]
333334
[TestCase("mainnet", BlobsSupportMode.Disabled)]
334-
[TestCase("chiado", BlobsSupportMode.Disabled)]
335335
[TestCase("gnosis", BlobsSupportMode.Disabled)]
336336
public void Blob_txs_support_is_correct(string configWildcard, BlobsSupportMode blobsSupportMode)
337337
{

src/Nethermind/Nethermind.Runner/configs/chiado.cfg

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"BaseDbPath": "nethermind_db/chiado",
66
"LogFileName": "chiado.logs.txt"
77
},
8+
"TxPool": {
9+
"Size": 1024,
10+
"BlobsSupport": "StorageWithReorgs"
11+
},
812
"JsonRpc": {
913
"Enabled": true,
1014
"Port": 8545,
@@ -40,4 +44,4 @@
4044
16
4145
]
4246
}
43-
}
47+
}

src/Nethermind/Nethermind.Runner/configs/chiado_archive.cfg

+6-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
"Init": {
33
"MemoryHint": 768000000,
44
"ChainSpecPath": "chainspec/chiado.json",
5-
"BaseDbPath": "nethermind_db/chiado_archive",
5+
"BaseDbPath": "nethermind_db/chiado_archive",
66
"LogFileName": "chiado_archive.logs.txt"
77
},
8+
"TxPool": {
9+
"Size": 1024,
10+
"BlobsSupport": "StorageWithReorgs"
11+
},
812
"JsonRpc": {
913
"Enabled": true,
1014
"Port": 8545,
@@ -44,6 +48,6 @@
4448
"Mode": "None"
4549
},
4650
"Merge": {
47-
"FinalTotalDifficulty": "231708131825107706987652208063906496124457284"
51+
"FinalTotalDifficulty": "231708131825107706987652208063906496124457284"
4852
}
4953
}

src/Nethermind/Nethermind.Runner/configs/holesky.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"BaseDbPath": "nethermind_db/holesky",
66
"LogFileName": "holesky.logs.txt"
77
},
8+
"TxPool": {
9+
"Size": 1024,
10+
"BlobsSupport": "StorageWithReorgs"
11+
},
812
"Sync": {
913
"FastSync": true,
1014
"SnapSync": true,

src/Nethermind/Nethermind.Runner/configs/holesky_archive.cfg

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
"BaseDbPath": "nethermind_db/holesky_archive",
66
"LogFileName": "holesky_archive.logs.txt"
77
},
8+
"TxPool": {
9+
"Size": 1024,
10+
"BlobsSupport": "StorageWithReorgs"
11+
},
812
"Metrics": {
913
"NodeName": "Holesky Archive"
1014
},

src/Nethermind/Nethermind.Runner/configs/sepolia.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"MemoryHint": 1024000000
99
},
1010
"TxPool": {
11-
"Size": 1024
11+
"Size": 1024,
12+
"BlobsSupport": "StorageWithReorgs"
1213
},
1314
"Metrics": {
1415
"NodeName": "Sepolia"
@@ -38,4 +39,4 @@
3839
"Merge": {
3940
"Enabled": true
4041
}
41-
}
42+
}

src/Nethermind/Nethermind.Runner/configs/sepolia_archive.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"MemoryHint": 1024000000
99
},
1010
"TxPool": {
11-
"Size": 1024
11+
"Size": 1024,
12+
"BlobsSupport": "StorageWithReorgs"
1213
},
1314
"Metrics": {
1415
"NodeName": "Sepolia Archive"

src/Nethermind/Nethermind.Specs.Test/ChainSpecStyle/ChainSpecBasedSpecProviderTests.cs

+6-2
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ public static IEnumerable<TestCaseData> SepoliaActivations
127127
yield return new TestCaseData((ForkActivation)(1735372, 3)) { TestName = "Low timestamp" };
128128
yield return new TestCaseData((ForkActivation)(1735372, 1677557088)) { TestName = "1677557088" };
129129
yield return new TestCaseData((ForkActivation)(1735372, 1677557087)) { TestName = "1677557087" };
130+
yield return new TestCaseData(new ForkActivation(1735372, SepoliaSpecProvider.CancunTimestamp - 1)) { TestName = "Before Cancun" };
131+
yield return new TestCaseData(new ForkActivation(1735372, SepoliaSpecProvider.CancunTimestamp)) { TestName = "Cancun" };
132+
yield return new TestCaseData(new ForkActivation(1735372, SepoliaSpecProvider.CancunTimestamp + 100000000)) { TestName = "Future" };
130133
}
131134
}
132135

@@ -155,8 +158,9 @@ public static IEnumerable<TestCaseData> HoleskyActivations
155158
yield return new TestCaseData(new ForkActivation(0, HoleskySpecProvider.GenesisTimestamp)) { TestName = "Genesis" };
156159
yield return new TestCaseData(new ForkActivation(1, HoleskySpecProvider.ShanghaiTimestamp)) { TestName = "Shanghai" };
157160
yield return new TestCaseData(new ForkActivation(3, HoleskySpecProvider.ShanghaiTimestamp + 24)) { TestName = "Post Shanghai" };
158-
//new ForkActivation(4, HoleskySpecProvider.CancunTimestamp),
159-
//new ForkActivation(5, HoleskySpecProvider.CancunTimestamp + 12),
161+
yield return new TestCaseData(new ForkActivation(4, HoleskySpecProvider.CancunTimestamp - 1)) { TestName = "Before Cancun" };
162+
yield return new TestCaseData(new ForkActivation(5, HoleskySpecProvider.CancunTimestamp)) { TestName = "Cancun" };
163+
yield return new TestCaseData(new ForkActivation(6, HoleskySpecProvider.CancunTimestamp + 100000000)) { TestName = "Future" };
160164
}
161165
}
162166

src/Nethermind/Nethermind.Specs/HoleskySpecProvider.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class HoleskySpecProvider : ISpecProvider
1212
{
1313
public const ulong GenesisTimestamp = 0x65156994;
1414
public const ulong ShanghaiTimestamp = 0x6516eac0;
15-
// public const ulong CancunTimestamp = 0x77359400;
15+
public const ulong CancunTimestamp = 0x65C36AC0;
1616

1717
private HoleskySpecProvider() { }
1818

@@ -21,8 +21,8 @@ public IReleaseSpec GetSpec(ForkActivation forkActivation)
2121
return forkActivation.Timestamp switch
2222
{
2323
null or < ShanghaiTimestamp => GenesisSpec,
24-
// < CancunTimestamp => Shanghai.Instance,
25-
_ => Shanghai.Instance
24+
< CancunTimestamp => Shanghai.Instance,
25+
_ => Cancun.Instance
2626
};
2727
}
2828

@@ -44,7 +44,7 @@ public void UpdateMergeTransitionInfo(long? blockNumber, UInt256? terminalTotalD
4444
public ForkActivation[] TransitionActivations { get; } =
4545
{
4646
(1, ShanghaiTimestamp),
47-
// (2, CancunTimestamp)
47+
(2, CancunTimestamp)
4848
};
4949

5050
public static readonly HoleskySpecProvider Instance = new();

src/Nethermind/Nethermind.Specs/SepoliaSpecProvider.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ namespace Nethermind.Specs;
1010
public class SepoliaSpecProvider : ISpecProvider
1111
{
1212
public const ulong BeaconChainGenesisTimestamp = 0x62b07d60;
13-
public const ulong ShanghaiBlockTimestamp = 0x63fd7d60;
13+
public const ulong ShanghaiTimestamp = 0x63fd7d60;
14+
public const ulong CancunTimestamp = 0x65B97D60;
1415

1516
private SepoliaSpecProvider() { }
1617

1718
public IReleaseSpec GetSpec(ForkActivation forkActivation) =>
1819
forkActivation switch
1920
{
20-
{ Timestamp: null } or { Timestamp: < ShanghaiBlockTimestamp } => London.Instance,
21-
_ => Shanghai.Instance
21+
{ Timestamp: null } or { Timestamp: < ShanghaiTimestamp } => London.Instance,
22+
{ Timestamp: < CancunTimestamp } => Shanghai.Instance,
23+
_ => Cancun.Instance
2224
};
2325

2426
public void UpdateMergeTransitionInfo(long? blockNumber, UInt256? terminalTotalDifficulty = null)
@@ -39,7 +41,8 @@ public void UpdateMergeTransitionInfo(long? blockNumber, UInt256? terminalTotalD
3941
public ForkActivation[] TransitionActivations { get; } =
4042
{
4143
(ForkActivation)1735371,
42-
(1735371, 1677557088)
44+
(1735371, ShanghaiTimestamp),
45+
(1735371, CancunTimestamp),
4346
};
4447

4548
public static SepoliaSpecProvider Instance { get; } = new();

0 commit comments

Comments
 (0)