Skip to content

Commit

Permalink
remove cancun timestamp temporarily (#6052)
Browse files Browse the repository at this point in the history
  • Loading branch information
smartprogrammer93 authored and kamilchodola committed Aug 30, 2023
1 parent f356206 commit 62f034e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/Nethermind/Chains/holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
"eip3855TransitionTimestamp": "0x6505e360",
"eip3860TransitionTimestamp": "0x6505e360",
"eip4895TransitionTimestamp": "0x6505e360",
"eip4844TransitionTimestamp": "0x77359400",
"eip4788TransitionTimestamp": "0x77359400",
"eip4788ContractAddress": "0x000000000000000000000000000000000000000b",
"eip1153TransitionTimestamp": "0x77359400",
"eip5656TransitionTimestamp": "0x77359400",
"eip6780TransitionTimestamp": "0x77359400",
"terminalTotalDifficulty": "0x0",
"gasLimitBoundDivisor": "0x400",
"maxCodeSize": "0x6000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public void Holesky_loads_properly()
new ForkActivation(0, HoleskySpecProvider.GenesisTimestamp),
new ForkActivation(1, HoleskySpecProvider.ShanghaiTimestamp),
new ForkActivation(3, HoleskySpecProvider.ShanghaiTimestamp + 24),
new ForkActivation(4, HoleskySpecProvider.CancunTimestamp),
new ForkActivation(5, HoleskySpecProvider.CancunTimestamp + 12),
//new ForkActivation(4, HoleskySpecProvider.CancunTimestamp),
//new ForkActivation(5, HoleskySpecProvider.CancunTimestamp + 12),
};

CompareSpecProviders(hardCodedSpec, provider, forkActivationsToTest);
Expand All @@ -166,9 +166,8 @@ public void Holesky_loads_properly()
Assert.That(provider.ChainId, Is.EqualTo(BlockchainIds.Holesky));
Assert.That(provider.NetworkId, Is.EqualTo(BlockchainIds.Holesky));

// Still commented since Cancun timestamp is set to be very far but not a 256 slot multiple
//GetTransitionTimestamps(chainSpec.Parameters).Should().AllSatisfy(
// t => ValidateSlotByTimestamp(t, HoleskySpecProvider.GenesisTimestamp).Should().BeTrue());
GetTransitionTimestamps(chainSpec.Parameters).Should().AllSatisfy(
t => ValidateSlotByTimestamp(t, HoleskySpecProvider.GenesisTimestamp).Should().BeTrue());
}

[Test]
Expand Down
8 changes: 4 additions & 4 deletions src/Nethermind/Nethermind.Specs/HoleskySpecProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class HoleskySpecProvider : ISpecProvider
{
public const ulong GenesisTimestamp = 0x65046360;
public const ulong ShanghaiTimestamp = 0x6505e360;
public const ulong CancunTimestamp = 0x77359400;
// public const ulong CancunTimestamp = 0x77359400;

private HoleskySpecProvider() { }

Expand All @@ -21,8 +21,8 @@ public IReleaseSpec GetSpec(ForkActivation forkActivation)
return forkActivation.Timestamp switch
{
null or < ShanghaiTimestamp => GenesisSpec,
< CancunTimestamp => Shanghai.Instance,
_ => Cancun.Instance
// < CancunTimestamp => Shanghai.Instance,
_ => Shanghai.Instance
};
}

Expand All @@ -44,7 +44,7 @@ public void UpdateMergeTransitionInfo(long? blockNumber, UInt256? terminalTotalD
public ForkActivation[] TransitionActivations { get; } =
{
(1, ShanghaiTimestamp),
(2, CancunTimestamp)
// (2, CancunTimestamp)
};

public static readonly HoleskySpecProvider Instance = new();
Expand Down

0 comments on commit 62f034e

Please sign in to comment.