Skip to content

Commit

Permalink
Merge branch 'master' into workflow/add-single-node-run-url
Browse files Browse the repository at this point in the history
  • Loading branch information
cbermudez97 committed Jul 14, 2023
2 parents 45faae7 + 4670b4b commit bfea373
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public void Update_known_chain_sizes()
{
// Pruning size have to be updated frequently
ChainSizes.CreateChainSizeInfo(BlockchainIds.Mainnet).PruningSize.Should().BeLessThan(200.GB());
ChainSizes.CreateChainSizeInfo(BlockchainIds.Goerli).PruningSize.Should().BeLessThan(58.GB());
ChainSizes.CreateChainSizeInfo(BlockchainIds.Goerli).PruningSize.Should().BeLessThan(70.GB());
ChainSizes.CreateChainSizeInfo(BlockchainIds.Sepolia).PruningSize.Should().BeLessThan(8.GB());

ChainSizes.CreateChainSizeInfo(BlockchainIds.Chiado).PruningSize.Should().Be(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,10 @@ public static IEnumerable<TestCase> opcodes_with_2_arg()
Instruction.AND,
Instruction.OR,
Instruction.XOR,
Instruction.SHA3,
Instruction.KECCAK256,
Instruction.SHL,
Instruction.SHR,
Instruction.SAR,
Instruction.SHA3,
Instruction.RETURN,
Instruction.REVERT,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void Keccak_gas_cost_assumption_is_correct()
.Op(Instruction.CALLDATACOPY)
.PushData("0x0200")
.PushData(0)
.Op(Instruction.SHA3)
.Op(Instruction.KECCAK256)
.Done;

(Block block, Transaction transaction) = PrepareTx(
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Evm.Test/InvalidOpcodeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class InvalidOpcodeTests : VirtualMachineTestsBase
Instruction.MOD, Instruction.SMOD, Instruction.ADDMOD, Instruction.MULMOD, Instruction.EXP,
Instruction.SIGNEXTEND, Instruction.LT, Instruction.GT, Instruction.SLT, Instruction.SGT,
Instruction.EQ, Instruction.ISZERO, Instruction.AND, Instruction.OR, Instruction.XOR, Instruction.NOT,
Instruction.BYTE, Instruction.SHA3, Instruction.ADDRESS, Instruction.BALANCE, Instruction.ORIGIN,
Instruction.BYTE, Instruction.KECCAK256, Instruction.ADDRESS, Instruction.BALANCE, Instruction.ORIGIN,
Instruction.CALLER, Instruction.CALLVALUE, Instruction.CALLDATALOAD, Instruction.CALLDATASIZE,
Instruction.CALLDATACOPY, Instruction.CODESIZE, Instruction.CODECOPY, Instruction.GASPRICE,
Instruction.EXTCODESIZE, Instruction.EXTCODECOPY, Instruction.BLOCKHASH, Instruction.COINBASE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Nethermind.Evm.Test
{
[TestFixture]
[Parallelizable(ParallelScope.All)]
public class Sha3Tests : VirtualMachineTestsBase
public class Keccak256Tests : VirtualMachineTestsBase
{
protected override long BlockNumber => RinkebySpecProvider.ConstantinopleFixBlockNumber;

Expand All @@ -33,7 +33,7 @@ public void Spin_sha3()
.Op(Instruction.JUMPDEST)
.PushData(32)
.PushData(0)
.Op(Instruction.SHA3)
.Op(Instruction.KECCAK256)
.Op(Instruction.POP)
.PushData(0)
.Op(Instruction.JUMP)
Expand Down
4 changes: 2 additions & 2 deletions src/Nethermind/Nethermind.Evm/ByteCodeBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ public static Prepare BYTE(this Prepare @this, UInt256? pos, byte[] bytes = null
=> @this.PushSingle(bytes)
.PushSingle(pos)
.Op(Instruction.BYTE);
public static Prepare SHA3(this Prepare @this, UInt256? pos = null, UInt256? len = null)
public static Prepare KECCAK256(this Prepare @this, UInt256? pos = null, UInt256? len = null)
=> @this.PushSequence(len, pos)
.Op(Instruction.SHA3);
.Op(Instruction.KECCAK256);
public static Prepare SHL(this Prepare @this, UInt256? lhs = null, UInt256? rhs = null)
=> @this.PushSequence(rhs, lhs)
.Op(Instruction.SHL);
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Evm/Instruction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public enum Instruction : byte
SHR = 0x1c, // EIP-145
SAR = 0x1d, // EIP-145

SHA3 = 0x20,
KECCAK256 = 0x20,

ADDRESS = 0x30,
BALANCE = 0x31,
Expand Down
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Evm/VirtualMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ private CallResult ExecuteCode<TTracingInstructions, TTracingRefunds, TTracingSt

break;
}
case Instruction.SHA3:
case Instruction.KECCAK256:
{
stack.PopUInt256(out a);
stack.PopUInt256(out b);
Expand Down

0 comments on commit bfea373

Please sign in to comment.