Skip to content

Commit

Permalink
finish adding to release spec and chainspec
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchhill committed Jan 2, 2025
1 parent ab94815 commit e882d19
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Nethermind/Nethermind.Core/Specs/IReleaseSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,8 @@ public interface IReleaseSpec : IEip1559Spec, IReceiptSpec

public bool SlotEnabled => IsEip7843Enabled;

public bool TxIndexEnabled => IsEip7793Enabled;

public bool ChargeForTopLevelCreate => IsEip2Enabled;

public bool FailOnOutOfGasCodeDeposit => IsEip2Enabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public class ReleaseSpecDecorator(IReleaseSpec spec) : IReleaseSpec
public virtual bool BlakeEnabled => spec.BlakeEnabled;
public virtual bool Bls381Enabled => spec.Bls381Enabled;
public virtual bool SlotEnabled => spec.SlotEnabled;
public virtual bool TxIndexEnabled => spec.TxIndexEnabled;
public virtual bool ChargeForTopLevelCreate => spec.ChargeForTopLevelCreate;
public virtual bool FailOnOutOfGasCodeDeposit => spec.FailOnOutOfGasCodeDeposit;
public virtual bool UseShanghaiDDosProtection => spec.UseShanghaiDDosProtection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static bool IsPrecompile(this Address address, IReleaseSpec releaseSpec)
0x12 => releaseSpec.Bls381Enabled,
0x13 => releaseSpec.Bls381Enabled,
0x14 => releaseSpec.SlotEnabled,
0x15 => releaseSpec.TxIndexEnabled,
_ => false
},
0x01 => (data[4] >>> 24) switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public class ChainParameters
public ulong? Rip7212TransitionTimestamp { get; set; }
public ulong? Eip7702TransitionTimestamp { get; set; }
public ulong? Eip7843TransitionTimestamp { get; set; }
public ulong? Eip7793TransitionTimestamp { get; set; }
public ulong? OpGraniteTransitionTimestamp { get; set; }
public ulong? OpHoloceneTransitionTimestamp { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ private ReleaseSpec CreateReleaseSpec(ChainSpec chainSpec, long releaseStartBloc

releaseSpec.IsEip7843Enabled = (chainSpec.Parameters.Eip7843TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;

releaseSpec.IsEip7793Enabled = (chainSpec.Parameters.Eip7793TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;

releaseSpec.IsOntakeEnabled = (chainSpec.Parameters.OntakeTransition ?? long.MaxValue) <= releaseStartBlock;

foreach (IChainSpecEngineParameters item in _chainSpec.EngineChainSpecParametersProvider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ bool GetForInnerPathExistence(KeyValuePair<string, JsonElement> o) =>
Eip7251TransitionTimestamp = chainSpecJson.Params.Eip7251TransitionTimestamp,
Eip7251ContractAddress = chainSpecJson.Params.Eip7251ContractAddress ?? Eip7251Constants.ConsolidationRequestPredeployAddress,
Eip7843TransitionTimestamp = chainSpecJson.Params.Eip7843TransitionTimestamp,
Eip7793TransitionTimestamp = chainSpecJson.Params.Eip7793TransitionTimestamp,
FeeCollector = chainSpecJson.Params.FeeCollector,
Eip1559FeeCollectorTransition = chainSpecJson.Params.Eip1559FeeCollectorTransition,
Eip1559BaseFeeMinValueTransition = chainSpecJson.Params.Eip1559BaseFeeMinValueTransition,
Expand Down
1 change: 1 addition & 0 deletions src/Nethermind/Nethermind.Specs/ReleaseSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,5 @@ public Address Eip2935ContractAddress

public bool IsEip7843Enabled { get; set; }
public bool IsEip7793Enabled { get; set; }
}
}

0 comments on commit e882d19

Please sign in to comment.