Skip to content

Commit

Permalink
Rename EIP7212 -> RIP7212
Browse files Browse the repository at this point in the history
  • Loading branch information
alexb5dh committed Jun 11, 2024
1 parent 9830ab3 commit 23b5892
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Nethermind/Chains/op-sepolia.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"eip4844TransitionTimestamp": "0x65D62C10",
"eip5656TransitionTimestamp": "0x65D62C10",
"eip6780TransitionTimestamp": "0x65D62C10",
"eip7212TransitionTimestamp": "0x66575100",
"rip7212TransitionTimestamp": "0x66575100",
"terminalTotalDifficulty": "0"
},
"genesis": {
Expand Down
5 changes: 4 additions & 1 deletion src/Nethermind/Nethermind.Core/Specs/IReleaseSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ public interface IReleaseSpec : IEip1559Spec, IReceiptSpec
/// </summary>
bool IsEip6780Enabled { get; }

bool IsEip7212Enabled { get; }
/// <summary>
/// Secp256r1 precompile
/// </summary>
bool IsRip7212Enabled { get; }

/// <summary>
/// Should transactions be validated against chainId.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static bool IsPrecompile(this Address address, IReleaseSpec releaseSpec)
},
0x01 => (data[4] >>> 24) switch
{
0x00 => releaseSpec.IsEip7212Enabled,
0x00 => releaseSpec.IsRip7212Enabled,
_ => false
},
_ => false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public OverridableReleaseSpec(IReleaseSpec spec)

public bool IsEip3541Enabled => _spec.IsEip3541Enabled;
public bool IsEip4844Enabled => _spec.IsEip4844Enabled;
public bool IsEip7212Enabled => _spec.IsEip7212Enabled;
public bool IsRip7212Enabled => _spec.IsRip7212Enabled;
public bool IsEip3607Enabled { get; set; }

public bool IsEip158IgnoredAccount(Address address)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class ChainParameters
public Address Eip4788ContractAddress { get; set; }
public ulong? Eip2935TransitionTimestamp { get; set; }
public Address Eip2935ContractAddress { get; set; }
public ulong? Eip7212TransitionTimestamp { get; set; }
public ulong? Rip7212TransitionTimestamp { get; set; }

#region EIP-4844 parameters
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private static ReleaseSpec CreateReleaseSpec(ChainSpec chainSpec, long releaseSt
releaseSpec.WithdrawalTimestamp = chainSpec.Parameters.Eip4895TransitionTimestamp ?? ulong.MaxValue;

releaseSpec.IsEip4844Enabled = (chainSpec.Parameters.Eip4844TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;
releaseSpec.IsEip7212Enabled = (chainSpec.Parameters.Eip7212TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;
releaseSpec.IsRip7212Enabled = (chainSpec.Parameters.Rip7212TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;
releaseSpec.Eip4844TransitionTimestamp = chainSpec.Parameters.Eip4844TransitionTimestamp ?? ulong.MaxValue;
releaseSpec.IsEip5656Enabled = (chainSpec.Parameters.Eip5656TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;
releaseSpec.IsEip6780Enabled = (chainSpec.Parameters.Eip6780TransitionTimestamp ?? ulong.MaxValue) <= releaseStartTimestamp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ bool GetForInnerPathExistence(KeyValuePair<string, JsonElement> o) =>
Eip2537TransitionTimestamp = chainSpecJson.Params.Eip2537TransitionTimestamp,
Eip5656TransitionTimestamp = chainSpecJson.Params.Eip5656TransitionTimestamp,
Eip6780TransitionTimestamp = chainSpecJson.Params.Eip6780TransitionTimestamp,
Eip7212TransitionTimestamp = chainSpecJson.Params.Eip7212TransitionTimestamp,
Rip7212TransitionTimestamp = chainSpecJson.Params.Rip7212TransitionTimestamp,
Eip4788TransitionTimestamp = chainSpecJson.Params.Eip4788TransitionTimestamp,
Eip4788ContractAddress = chainSpecJson.Params.Eip4788ContractAddress ?? Eip4788Constants.BeaconRootsAddress,
Eip2935TransitionTimestamp = chainSpecJson.Params.Eip2935TransitionTimestamp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,5 @@ internal class ChainSpecParamsJson
public ulong? Eip4844MaxBlobGasPerBlock { get; set; }
public UInt256? Eip4844MinBlobGasPrice { get; set; }
public ulong? Eip4844TargetBlobGasPerBlock { get; set; }
public ulong? Eip7212TransitionTimestamp { get; set; }
public ulong? Rip7212TransitionTimestamp { get; set; }
}
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Specs/Forks/18_Prague.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected Prague()
Name = "Prague";
IsEip2537Enabled = true;
IsEip2935Enabled = true;
IsEip7212Enabled = true;
IsRip7212Enabled = true;
Eip2935ContractAddress = Eip2935Constants.BlockHashHistoryAddress;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Specs/ReleaseSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ReleaseSpec Clone()
public bool IsEip3860Enabled { get; set; }
public bool IsEip4895Enabled { get; set; }
public bool IsEip4844Enabled { get; set; }
public bool IsEip7212Enabled { get; set; }
public bool IsRip7212Enabled { get; set; }
public bool IsEip5656Enabled { get; set; }
public bool IsEip6780Enabled { get; set; }
public bool IsEip4788Enabled { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public SystemTransactionReleaseSpec(IReleaseSpec spec)
_spec = spec;
}
public bool IsEip4844Enabled => _spec.IsEip4844Enabled;
public bool IsEip7212Enabled => _spec.IsEip7212Enabled;
public bool IsRip7212Enabled => _spec.IsRip7212Enabled;

public string Name => "System";

Expand Down

0 comments on commit 23b5892

Please sign in to comment.