Commit 669ed02c authored by Kevin Ho's avatar Kevin Ho Committed by GitHub

Add Safety Checker (#7)

* Made StateManager usage authenticated

* add safety checker contract

* update safety checker: blacklist revert, KALL + KOPY checks

* lint

* update testrunner: smock safety check, add EM params

* add safety checker constants python script

* set mock targetMessenger to internal
Co-authored-by: default avatarKelvin Fichter <kelvinfichter@gmail.com>
parent 2844d194
#!/usr/bin/env python3
# pip3 install pyevmasm
from pyevmasm import instruction_tables
#print(instruction_tables.keys())
def asm(x):
return [instruction_tables['istanbul'][i].opcode for i in x]
push_opcodes = asm(["PUSH%d" % i for i in range(1,33)])
stop_opcodes = asm(["STOP", "JUMP", "RETURN", "INVALID"])
caller_opcodes = asm(["CALLER"])
blacklist_ops = set([
"ADDRESS", "BALANCE", "BLOCKHASH",
"CALL", "CALLCODE", "CHAINID", "COINBASE",
"CREATE", "CREATE2", "DELEGATECALL", "DIFFICULTY",
"EXTCODESIZE", "EXTCODECOPY", "EXTCODEHASH",
"GASLIMIT", "GASPRICE", "NUMBER",
"ORIGIN", "REVERT", "SELFBALANCE", "SELFDESTRUCT",
"SLOAD", "SSTORE", "STATICCALL", "TIMESTAMP"])
whitelist_opcodes = []
for x in instruction_tables['istanbul']:
if x.name not in blacklist_ops:
whitelist_opcodes.append(x.opcode)
pushmask = 0
for x in push_opcodes:
pushmask |= 1 << x
stopmask = 0
for x in stop_opcodes:
stopmask |= 1 << x
stoplist = [0]*256
procmask = 0
for i in range(256):
if i in whitelist_opcodes and \
i not in push_opcodes and \
i not in stop_opcodes and \
i not in caller_opcodes:
# can skip this opcode
stoplist[i] = 1
else:
procmask |= 1 << i
# PUSH1 through PUSH4, can't skip in slow
for i in range(0x60, 0x64):
stoplist[i] = i-0x5e
rr = "uint256[8] memory opcodeSkippableBytes = [\n"
for i in range(0, 0x100, 0x20):
ret = "uint256(0x"
for j in range(i, i+0x20, 1):
ret += ("%02X" % stoplist[j])
rr += ret+"),\n"
rr = rr[:-2] + "];"
print(rr)
print("// Mask to gate opcode specific cases")
print("uint256 opcodeGateMask = ~uint256(0x%x);" % procmask)
print("// Halting opcodes")
print("uint256 opcodeHaltingMask = ~uint256(0x%x);" % stopmask)
print("// PUSH opcodes")
print("uint256 opcodePushMask = ~uint256(0x%x);" % pushmask)
......@@ -27,8 +27,8 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
* External Contract References *
********************************/
iOVM_SafetyChecker public ovmSafetyChecker;
iOVM_StateManager public ovmStateManager;
iOVM_SafetyChecker internal ovmSafetyChecker;
iOVM_StateManager internal ovmStateManager;
/*******************************
......@@ -124,10 +124,18 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
override
public
{
// Store our OVM_StateManager instance (significantly easier than attempting to pass the address
// around in calldata).
// Store our OVM_StateManager instance (significantly easier than attempting to pass the
// address around in calldata).
ovmStateManager = iOVM_StateManager(_ovmStateManager);
// Make sure this function can't be called by anyone except the owner of the
// OVM_StateManager (expected to be an OVM_StateTransitioner). We can revert here because
// this would make the `run` itself invalid.
require(
msg.sender == ovmStateManager.owner(),
"Only the owner of the ovmStateManager can call this function"
);
// Check whether we need to start a new epoch, do so if necessary.
_checkNeedsNewEpoch(_transaction.timestamp);
......@@ -154,6 +162,9 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
// Wipe the execution context.
_resetContext();
// Reset the ovmStateManager.
ovmStateManager = iOVM_StateManager(address(0));
}
......
......@@ -12,22 +12,124 @@ contract OVM_SafetyChecker is iOVM_SafetyChecker {
/********************
* Public Functions *
********************/
/**
* Checks that a given bytecode string is considered safe.
* @param _bytecode Bytecode string to check.
* @return _safe Whether or not the bytecode is safe.
* Returns whether or not all of the provided bytecode is safe.
* @param _bytecode The bytecode to safety check.
* @return `true` if the bytecode is safe, `false` otherwise.
*/
function isBytecodeSafe(
bytes memory _bytecode
)
override
public
external
view
returns (
bool _safe
)
returns (bool)
{
// autogenerated by gen_safety_checker_constants.py
// number of bytes to skip for each opcode
uint256[8] memory opcodeSkippableBytes = [
uint256(0x0001010101010101010101010000000001010101010101010101010101010000),
uint256(0x0100000000000000000000000000000000000000010101010101000000010100),
uint256(0x0000000000000000000000000000000001010101000000010101010100000000),
uint256(0x0203040500000000000000000000000000000000000000000000000000000000),
uint256(0x0101010101010101010101010101010101010101010101010101010101010101),
uint256(0x0101010101000000000000000000000000000000000000000000000000000000),
uint256(0x0000000000000000000000000000000000000000000000000000000000000000),
uint256(0x0000000000000000000000000000000000000000000000000000000000000000)
];
// Mask to gate opcode specific cases
uint256 opcodeGateMask = ~uint256(0xffffffffffffffffffffffe000000000fffffffff070ffff9c0ffffec000f001);
// Halting opcodes
uint256 opcodeHaltingMask = ~uint256(0x4008000000000000000000000000000000000000004000000000000000000001);
// PUSH opcodes
uint256 opcodePushMask = ~uint256(0xffffffff000000000000000000000000);
uint256 codeLength;
uint256 _pc;
assembly {
_pc := add(_bytecode, 0x20)
}
codeLength = _pc + _bytecode.length;
do {
// current opcode: 0x00...0xff
uint256 opNum;
// inline assembly removes the extra add + bounds check
assembly {
let word := mload(_pc) //load the next 32 bytes at pc into word
// Look up number of bytes to skip from opcodeSkippableBytes and then update indexInWord
// E.g. the 02030405 in opcodeSkippableBytes is the number of bytes to skip for PUSH1->4
// We repeat this 6 times, thus we can only skip bytes for up to PUSH4 ((1+4) * 6 = 30 < 32).
// If we see an opcode that is listed as 0 skippable bytes e.g. PUSH5,
// then we will get stuck on that indexInWord and then opNum will be set to the PUSH5 opcode.
let indexInWord := byte(0, mload(add(opcodeSkippableBytes, byte(0, word))))
indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))
indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))
indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))
indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))
indexInWord := add(indexInWord, byte(0, mload(add(opcodeSkippableBytes, byte(indexInWord, word)))))
_pc := add(_pc, indexInWord)
opNum := byte(indexInWord, word)
}
// + push opcodes
// + stop opcodes [STOP(0x00),JUMP(0x56),RETURN(0xf3),INVALID(0xfe)]
// + caller opcode CALLER(0x33)
// + blacklisted opcodes
uint256 opBit = 1 << opNum;
if (opBit & opcodeGateMask == 0) {
if (opBit & opcodePushMask == 0) {
// all pushes are valid opcodes
// subsequent bytes are not opcodes. Skip them.
_pc += (opNum - 0x5e); // PUSH1 is 0x60, so opNum-0x5f = PUSHed bytes and we +1 to
// skip the _pc++; line below in order to save gas ((-0x5f + 1) = -0x5e)
continue;
} else if (opBit & opcodeHaltingMask == 0) {
// STOP or JUMP or RETURN or INVALID (Note: REVERT is blacklisted, so not included here)
// We are now inside unreachable code until we hit a JUMPDEST!
do {
_pc++;
assembly {
opNum := byte(0, mload(_pc))
}
// encountered a JUMPDEST
if (opNum == 0x5b) break;
// skip PUSHed bytes
if ((1 << opNum) & opcodePushMask == 0) _pc += (opNum - 0x5f); // opNum-0x5f = PUSHed bytes (PUSH1 is 0x60)
} while (_pc < codeLength);
// opNum is 0x5b, so we don't continue here since the pc++ is fine
} else if (opNum == 0x33) { // Caller opcode
uint256 firstOps; // next 32 bytes of bytecode
uint256 secondOps; // following 32 bytes of bytecode
assembly {
firstOps := mload(_pc)
// 32 - 4 bytes = 28 bytes = 224 bits
secondOps := shr(224, mload(add(_pc, 0x20)))
}
// Call identity precompile
// CALLER POP PUSH1 0x00 PUSH1 0x04 GAS CALL
// 32 - 8 bytes = 24 bytes = 192
if ((firstOps >> 192) == 0x3350600060045af1) {
_pc += 8;
// Call EM and abort execution if instructed
// CALLER PUSH1 0x00 SWAP1 GAS CALL PC PUSH1 0x1d ADD EQ JUMPI RETURNDATASIZE PUSH1 0x00 DUP1 RETURNDATACOPY PUSH1 0x00 REVERT JUMPDEST PUSH1 0x01 PUSH1 0x00 RETURN JUMPDEST
} else if (firstOps == 0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b6001 && secondOps == 0x6000f35b) {
_pc += 36;
} else {
return false;
}
continue;
} else {
// encountered a non-whitelisted opcode!
return false;
}
}
_pc++;
} while (_pc < codeLength);
return true;
}
}
......@@ -25,8 +25,8 @@ contract OVM_StateManager is iOVM_StateManager {
* Contract Variables: Contract References *
*******************************************/
address public owner;
address public ovmExecutionManager;
address override public owner;
address override public ovmExecutionManager;
/****************************************
......
......@@ -304,6 +304,7 @@ contract OVM_StateTransitioner is iOVM_StateTransitioner, Lib_AddressResolver {
)
override
public
onlyDuringPhase(TransitionPhase.PRE_EXECUTION)
{
require(
Lib_OVMCodec.hashTransaction(_transaction) == transactionHash,
......
......@@ -10,5 +10,5 @@ interface iOVM_SafetyChecker {
* Public Functions *
********************/
function isBytecodeSafe(bytes memory _bytecode) external view returns (bool _safe);
function isBytecodeSafe(bytes memory _bytecode) external view returns (bool);
}
......@@ -26,6 +26,8 @@ interface iOVM_StateManager {
* Public Functions: Setup *
***************************/
function owner() external view returns (address _owner);
function ovmExecutionManager() external view returns (address _ovmExecutionManager);
function setExecutionManager(address _ovmExecutionManager) external;
......
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;
/* Contract Imports */
import { Ownable } from "./Lib_Ownable.sol";
/**
* @title Lib_AddressManager
*/
contract Lib_AddressManager {
contract Lib_AddressManager is Ownable {
/*******************************************
* Contract Variables: Internal Accounting *
......@@ -22,6 +25,7 @@ contract Lib_AddressManager {
address _address
)
public
onlyOwner
{
addresses[_getNameHash(_name)] = _address;
}
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
/**
* @title Ownable
* @dev Adapted from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
*/
abstract contract Ownable {
/*************
* Variables *
*************/
address public owner;
/**********
* Events *
**********/
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/***************
* Constructor *
***************/
constructor()
internal
{
owner = msg.sender;
emit OwnershipTransferred(address(0), owner);
}
/**********************
* Function Modifiers *
**********************/
modifier onlyOwner() {
require(
owner == msg.sender,
"Ownable: caller is not the owner"
);
_;
}
/********************
* Public Functions *
********************/
function renounceOwnership()
public
virtual
onlyOwner
{
emit OwnershipTransferred(owner, address(0));
owner = address(0);
}
function transferOwnership(address _newOwner)
public
virtual
onlyOwner
{
require(
_newOwner != address(0),
"Ownable: new owner cannot be the zero address"
);
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
}
......@@ -29,7 +29,7 @@ contract mockOVM_CrossDomainMessenger is OVM_BaseCrossDomainMessenger {
**********************/
ReceivedMessage[] internal fullReceivedMessages;
address public targetMessengerAddress;
address internal targetMessengerAddress;
uint256 internal lastRelayedMessage;
uint256 internal delay;
......
......@@ -17,7 +17,7 @@ describe('OVM_SafetyChecker', () => {
OVM_SafetyChecker = await Factory__OVM_SafetyChecker.deploy()
})
describe.skip('isBytecodeSafe()', () => {
describe('isBytecodeSafe()', () => {
for (const testName of Object.keys(SAFETY_CHECKER_TEST_JSON)) {
const test = SAFETY_CHECKER_TEST_JSON[testName]
it(`should correctly classify: ${testName}`, async () => {
......
......@@ -72,6 +72,10 @@
"in": "0x32",
"out": false
},
"single opcode blacklisted: REVERT": {
"in": "0xfd",
"out": false
},
"single opcode blacklisted: SELFBALANCE": {
"in": "0x47",
"out": false
......@@ -748,6 +752,10 @@
"in": "0x0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b60306130306230303063303030306430303030306530303030303066303030303030306730303030303030306830303030303030303069303030303030303030306a30303030303030303030306b3030303030303030303030306c303030303030303030303030306d30303030303030303030303030306e3030303030303030303030303030306f303030303030303030303030303030307030303030303030303030303030303030307130303030303030303030303030303030303072303030303030303030303030303030303030307330303030303030303030303030303030303030307430303030303030303030303030303030303030303075303030303030303030303030303030303030303030307630303030303030303030303030303030303030303030307730303030303030303030303030303030303030303030303078303030303030303030303030303030303030303030303030307930303030303030303030303030303030303030303030303030307a3030303030303030303030303030303030303030303030303030307b303030303030303030303030303030303030303030303030303030307c30303030303030303030303030303030303030303030303030303030307d3030303030303030303030303030303030303030303030303030303030307e303030303030303030303030303030303030303030303030303030303030307f3030303030303030303030303030303030303030303030303030303030303030808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a432",
"out": false
},
"multiple opcodes blacklisted end: REVERT": {
"in": "0x0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b60306130306230303063303030306430303030306530303030303066303030303030306730303030303030306830303030303030303069303030303030303030306a30303030303030303030306b3030303030303030303030306c303030303030303030303030306d30303030303030303030303030306e3030303030303030303030303030306f303030303030303030303030303030307030303030303030303030303030303030307130303030303030303030303030303030303072303030303030303030303030303030303030307330303030303030303030303030303030303030307430303030303030303030303030303030303030303075303030303030303030303030303030303030303030307630303030303030303030303030303030303030303030307730303030303030303030303030303030303030303030303078303030303030303030303030303030303030303030303030307930303030303030303030303030303030303030303030303030307a3030303030303030303030303030303030303030303030303030307b303030303030303030303030303030303030303030303030303030307c30303030303030303030303030303030303030303030303030303030307d3030303030303030303030303030303030303030303030303030303030307e303030303030303030303030303030303030303030303030303030303030307f3030303030303030303030303030303030303030303030303030303030303030808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fd",
"out": false
},
"multiple opcodes blacklisted end: SELFBALANCE": {
"in": "0x0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b60306130306230303063303030306430303030306530303030303066303030303030306730303030303030306830303030303030303069303030303030303030306a30303030303030303030306b3030303030303030303030306c303030303030303030303030306d30303030303030303030303030306e3030303030303030303030303030306f303030303030303030303030303030307030303030303030303030303030303030307130303030303030303030303030303030303072303030303030303030303030303030303030307330303030303030303030303030303030303030307430303030303030303030303030303030303030303075303030303030303030303030303030303030303030307630303030303030303030303030303030303030303030307730303030303030303030303030303030303030303030303078303030303030303030303030303030303030303030303030307930303030303030303030303030303030303030303030303030307a3030303030303030303030303030303030303030303030303030307b303030303030303030303030303030303030303030303030303030307c30303030303030303030303030303030303030303030303030303030307d3030303030303030303030303030303030303030303030303030303030307e303030303030303030303030303030303030303030303030303030303030307f3030303030303030303030303030303030303030303030303030303030303030808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a447",
"out": false
......@@ -1048,10 +1056,6 @@
"in": "0x565bf3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4f3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4f3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4",
"out": true
},
"valid alternating reachable/unreachable with REVERT": {
"in": "0x565bfd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4",
"out": true
},
"valid alternating reachable/unreachable with INVALID": {
"in": "0x565bfe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4",
"out": true
......@@ -1064,1364 +1068,44 @@
"in": "0x575bf3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4f3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4f3303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a430",
"out": false
},
"invalid alternating reachable/unreachable with REVERT": {
"in": "0x575bfd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fd303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a430",
"out": false
},
"invalid alternating reachable/unreachable with INVALID": {
"in": "0x575bfe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4fe303140f1f24641f0f5f4443b3c3f453a433247ff5455fa425b0102030405060708090a0b101112131415161718191a1b1c1d203435363738393d3e505152535758595a5b606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a430",
"out": false
},
"valid call": {
"in": "0x336000905af1",
"valid EM call": {
"in": "0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b60016000f35b",
"out": true
},
"invalid CALL with gas setter: ADD": {
"in": "0x3360009001f1",
"out": false
},
"invalid CALL with gas setter: MUL": {
"in": "0x3360009002f1",
"out": false
},
"invalid CALL with gas setter: SUB": {
"in": "0x3360009003f1",
"out": false
},
"invalid CALL with gas setter: DIV": {
"in": "0x3360009004f1",
"out": false
},
"invalid CALL with gas setter: SDIV": {
"in": "0x3360009005f1",
"out": false
},
"invalid CALL with gas setter: MOD": {
"in": "0x3360009006f1",
"out": false
},
"invalid CALL with gas setter: SMOD": {
"in": "0x3360009007f1",
"out": false
},
"invalid CALL with gas setter: ADDMOD": {
"in": "0x3360009008f1",
"out": false
},
"invalid CALL with gas setter: MULMOD": {
"in": "0x3360009009f1",
"out": false
},
"invalid CALL with gas setter: EXP": {
"in": "0x336000900af1",
"out": false
},
"invalid CALL with gas setter: SIGNEXTEND": {
"in": "0x336000900bf1",
"out": false
},
"invalid CALL with gas setter: LT": {
"in": "0x3360009010f1",
"out": false
},
"invalid CALL with gas setter: GT": {
"in": "0x3360009011f1",
"out": false
},
"invalid CALL with gas setter: SLT": {
"in": "0x3360009012f1",
"out": false
},
"invalid CALL with gas setter: SGT": {
"in": "0x3360009013f1",
"out": false
},
"invalid CALL with gas setter: EQ": {
"in": "0x3360009014f1",
"out": false
},
"invalid CALL with gas setter: ISZERO": {
"in": "0x3360009015f1",
"out": false
},
"invalid CALL with gas setter: AND": {
"in": "0x3360009016f1",
"out": false
},
"invalid CALL with gas setter: OR": {
"in": "0x3360009017f1",
"out": false
},
"invalid CALL with gas setter: XOR": {
"in": "0x3360009018f1",
"out": false
},
"invalid CALL with gas setter: NOT": {
"in": "0x3360009019f1",
"out": false
},
"invalid CALL with gas setter: BYTE": {
"in": "0x336000901af1",
"out": false
},
"invalid CALL with gas setter: SHL": {
"in": "0x336000901bf1",
"out": false
},
"invalid CALL with gas setter: SHR": {
"in": "0x336000901cf1",
"out": false
},
"invalid CALL with gas setter: SAR": {
"in": "0x336000901df1",
"out": false
},
"invalid CALL with gas setter: SHA3": {
"in": "0x3360009020f1",
"out": false
},
"invalid CALL with gas setter: CALLVALUE": {
"in": "0x3360009034f1",
"out": false
},
"invalid CALL with gas setter: CALLDATALOAD": {
"in": "0x3360009035f1",
"out": false
},
"invalid CALL with gas setter: CALLDATASIZE": {
"in": "0x3360009036f1",
"out": false
},
"invalid CALL with gas setter: CALLDATACOPY": {
"in": "0x3360009037f1",
"out": false
},
"invalid CALL with gas setter: CODESIZE": {
"in": "0x3360009038f1",
"out": false
},
"invalid CALL with gas setter: CODECOPY": {
"in": "0x3360009039f1",
"out": false
},
"invalid CALL with gas setter: RETURNDATASIZE": {
"in": "0x336000903df1",
"out": false
},
"invalid CALL with gas setter: RETURNDATACOPY": {
"in": "0x336000903ef1",
"out": false
},
"invalid CALL with gas setter: POP": {
"in": "0x3360009050f1",
"out": false
},
"invalid CALL with gas setter: MLOAD": {
"in": "0x3360009051f1",
"out": false
},
"invalid CALL with gas setter: MSTORE": {
"in": "0x3360009052f1",
"out": false
},
"invalid CALL with gas setter: MSTORE8": {
"in": "0x3360009053f1",
"out": false
},
"invalid CALL with gas setter: JUMPI": {
"in": "0x3360009057f1",
"out": false
},
"invalid CALL with gas setter: PC": {
"in": "0x3360009058f1",
"out": false
},
"invalid CALL with gas setter: MSIZE": {
"in": "0x3360009059f1",
"out": false
},
"invalid CALL with gas setter: JUMPDEST": {
"in": "0x336000905bf1",
"out": false
},
"invalid CALL with gas setter: PUSH1": {
"in": "0x336000906000f1",
"out": false
},
"invalid CALL with gas setter: PUSH2": {
"in": "0x33600090610000f1",
"out": false
},
"invalid CALL with gas setter: PUSH3": {
"in": "0x3360009062000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH4": {
"in": "0x336000906300000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH5": {
"in": "0x33600090640000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH6": {
"in": "0x3360009065000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH7": {
"in": "0x336000906600000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH8": {
"in": "0x33600090670000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH9": {
"in": "0x3360009068000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH10": {
"in": "0x336000906900000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH11": {
"in": "0x336000906a0000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH12": {
"in": "0x336000906b000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH13": {
"in": "0x336000906c00000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH14": {
"in": "0x336000906d0000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH15": {
"in": "0x336000906e000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH16": {
"in": "0x336000906f00000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH17": {
"in": "0x33600090700000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH18": {
"in": "0x3360009071000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH19": {
"in": "0x336000907200000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH20": {
"in": "0x33600090730000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH21": {
"in": "0x3360009074000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH22": {
"in": "0x336000907500000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH23": {
"in": "0x33600090760000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH24": {
"in": "0x3360009077000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH25": {
"in": "0x336000907800000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH26": {
"in": "0x33600090790000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH27": {
"in": "0x336000907a000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH28": {
"in": "0x336000907b00000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH29": {
"in": "0x336000907c0000000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH30": {
"in": "0x336000907d000000000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH31": {
"in": "0x336000907e00000000000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: PUSH32": {
"in": "0x336000907f0000000000000000000000000000000000000000000000000000000000000000f1",
"out": false
},
"invalid CALL with gas setter: DUP1": {
"in": "0x3360009080f1",
"out": false
},
"invalid CALL with gas setter: DUP2": {
"in": "0x3360009081f1",
"out": false
},
"invalid CALL with gas setter: DUP3": {
"in": "0x3360009082f1",
"out": false
},
"invalid CALL with gas setter: DUP4": {
"in": "0x3360009083f1",
"out": false
},
"invalid CALL with gas setter: DUP5": {
"in": "0x3360009084f1",
"out": false
},
"invalid CALL with gas setter: DUP6": {
"in": "0x3360009085f1",
"out": false
},
"invalid CALL with gas setter: DUP7": {
"in": "0x3360009086f1",
"out": false
},
"invalid CALL with gas setter: DUP8": {
"in": "0x3360009087f1",
"out": false
},
"invalid CALL with gas setter: DUP9": {
"in": "0x3360009088f1",
"out": false
},
"invalid CALL with gas setter: DUP10": {
"in": "0x3360009089f1",
"out": false
},
"invalid CALL with gas setter: DUP11": {
"in": "0x336000908af1",
"out": false
},
"invalid CALL with gas setter: DUP12": {
"in": "0x336000908bf1",
"out": false
},
"invalid CALL with gas setter: DUP13": {
"in": "0x336000908cf1",
"out": false
},
"invalid CALL with gas setter: DUP14": {
"in": "0x336000908df1",
"out": false
},
"invalid CALL with gas setter: DUP15": {
"in": "0x336000908ef1",
"out": false
},
"invalid CALL with gas setter: DUP16": {
"in": "0x336000908ff1",
"out": false
},
"invalid CALL with gas setter: SWAP1": {
"in": "0x3360009090f1",
"out": false
},
"invalid CALL with gas setter: SWAP2": {
"in": "0x3360009091f1",
"out": false
},
"invalid CALL with gas setter: SWAP3": {
"in": "0x3360009092f1",
"out": false
},
"invalid CALL with gas setter: SWAP4": {
"in": "0x3360009093f1",
"out": false
},
"invalid CALL with gas setter: SWAP5": {
"in": "0x3360009094f1",
"out": false
},
"invalid CALL with gas setter: SWAP6": {
"in": "0x3360009095f1",
"out": false
},
"invalid CALL with gas setter: SWAP7": {
"in": "0x3360009096f1",
"out": false
},
"invalid CALL with gas setter: SWAP8": {
"in": "0x3360009097f1",
"out": false
},
"invalid CALL with gas setter: SWAP9": {
"in": "0x3360009098f1",
"out": false
},
"invalid CALL with gas setter: SWAP10": {
"in": "0x3360009099f1",
"out": false
},
"invalid CALL with gas setter: SWAP11": {
"in": "0x336000909af1",
"out": false
},
"invalid CALL with gas setter: SWAP12": {
"in": "0x336000909bf1",
"out": false
},
"invalid CALL with gas setter: SWAP13": {
"in": "0x336000909cf1",
"out": false
},
"invalid CALL with gas setter: SWAP14": {
"in": "0x336000909df1",
"out": false
},
"invalid CALL with gas setter: SWAP15": {
"in": "0x336000909ef1",
"out": false
},
"invalid CALL with gas setter: SWAP16": {
"in": "0x336000909ff1",
"out": false
},
"invalid CALL with gas setter: LOG0": {
"in": "0x33600090a0f1",
"out": false
},
"invalid CALL with gas setter: LOG1": {
"in": "0x33600090a1f1",
"out": false
},
"invalid CALL with gas setter: LOG2": {
"in": "0x33600090a2f1",
"out": false
},
"invalid CALL with gas setter: LOG3": {
"in": "0x33600090a3f1",
"out": false
},
"invalid CALL with gas setter: LOG4": {
"in": "0x33600090a4f1",
"out": false
},
"invalid CALL with value setter: ADD": {
"in": "0x3301905af1",
"out": false
},
"invalid CALL with value setter: MUL": {
"in": "0x3302905af1",
"out": false
},
"invalid CALL with value setter: SUB": {
"in": "0x3303905af1",
"out": false
},
"invalid CALL with value setter: DIV": {
"in": "0x3304905af1",
"out": false
},
"invalid CALL with value setter: SDIV": {
"in": "0x3305905af1",
"out": false
},
"invalid CALL with value setter: MOD": {
"in": "0x3306905af1",
"out": false
},
"invalid CALL with value setter: SMOD": {
"in": "0x3307905af1",
"out": false
},
"invalid CALL with value setter: ADDMOD": {
"in": "0x3308905af1",
"out": false
},
"invalid CALL with value setter: MULMOD": {
"in": "0x3309905af1",
"out": false
},
"invalid CALL with value setter: EXP": {
"in": "0x330a905af1",
"out": false
},
"invalid CALL with value setter: SIGNEXTEND": {
"in": "0x330b905af1",
"out": false
},
"invalid CALL with value setter: LT": {
"in": "0x3310905af1",
"out": false
},
"invalid CALL with value setter: GT": {
"in": "0x3311905af1",
"out": false
"valid identity precompile call": {
"in": "0x3350600060045af1",
"out": true
},
"invalid CALL with value setter: SLT": {
"in": "0x3312905af1",
"out": false
},
"invalid CALL with value setter: SGT": {
"in": "0x3313905af1",
"out": false
},
"invalid CALL with value setter: EQ": {
"in": "0x3314905af1",
"out": false
},
"invalid CALL with value setter: ISZERO": {
"in": "0x3315905af1",
"out": false
},
"invalid CALL with value setter: AND": {
"in": "0x3316905af1",
"out": false
},
"invalid CALL with value setter: OR": {
"in": "0x3317905af1",
"out": false
},
"invalid CALL with value setter: XOR": {
"in": "0x3318905af1",
"out": false
},
"invalid CALL with value setter: NOT": {
"in": "0x3319905af1",
"out": false
},
"invalid CALL with value setter: BYTE": {
"in": "0x331a905af1",
"out": false
},
"invalid CALL with value setter: SHL": {
"in": "0x331b905af1",
"out": false
},
"invalid CALL with value setter: SHR": {
"in": "0x331c905af1",
"out": false
},
"invalid CALL with value setter: SAR": {
"in": "0x331d905af1",
"out": false
},
"invalid CALL with value setter: SHA3": {
"in": "0x3320905af1",
"out": false
},
"invalid CALL with value setter: CALLVALUE": {
"in": "0x3334905af1",
"out": false
},
"invalid CALL with value setter: CALLDATALOAD": {
"in": "0x3335905af1",
"out": false
},
"invalid CALL with value setter: CALLDATASIZE": {
"in": "0x3336905af1",
"out": false
},
"invalid CALL with value setter: CALLDATACOPY": {
"in": "0x3337905af1",
"out": false
},
"invalid CALL with value setter: CODESIZE": {
"in": "0x3338905af1",
"out": false
},
"invalid CALL with value setter: CODECOPY": {
"in": "0x3339905af1",
"out": false
},
"invalid CALL with value setter: RETURNDATASIZE": {
"in": "0x333d905af1",
"out": false
},
"invalid CALL with value setter: RETURNDATACOPY": {
"in": "0x333e905af1",
"out": false
},
"invalid CALL with value setter: POP": {
"in": "0x3350905af1",
"out": false
},
"invalid CALL with value setter: MLOAD": {
"in": "0x3351905af1",
"out": false
},
"invalid CALL with value setter: MSTORE": {
"in": "0x3352905af1",
"out": false
},
"invalid CALL with value setter: MSTORE8": {
"in": "0x3353905af1",
"out": false
},
"invalid CALL with value setter: JUMPI": {
"in": "0x3357905af1",
"out": false
},
"invalid CALL with value setter: PC": {
"in": "0x3358905af1",
"out": false
},
"invalid CALL with value setter: MSIZE": {
"in": "0x3359905af1",
"out": false
},
"invalid CALL with value setter: GAS": {
"in": "0x335a905af1",
"out": false
},
"invalid CALL with value setter: JUMPDEST": {
"in": "0x335b905af1",
"out": false
},
"invalid CALL with value setter: PUSH2": {
"in": "0x33610000905af1",
"out": false
},
"invalid CALL with value setter: PUSH3": {
"in": "0x3362000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH4": {
"in": "0x336300000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH5": {
"in": "0x33640000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH6": {
"in": "0x3365000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH7": {
"in": "0x336600000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH8": {
"in": "0x33670000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH9": {
"in": "0x3368000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH10": {
"in": "0x336900000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH11": {
"in": "0x336a0000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH12": {
"in": "0x336b000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH13": {
"in": "0x336c00000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH14": {
"in": "0x336d0000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH15": {
"in": "0x336e000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH16": {
"in": "0x336f00000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH17": {
"in": "0x33700000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH18": {
"in": "0x3371000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH19": {
"in": "0x337200000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH20": {
"in": "0x33730000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH21": {
"in": "0x3374000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH22": {
"in": "0x337500000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH23": {
"in": "0x33760000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH24": {
"in": "0x3377000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH25": {
"in": "0x337800000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH26": {
"in": "0x33790000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH27": {
"in": "0x337a000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH28": {
"in": "0x337b00000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH29": {
"in": "0x337c0000000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH30": {
"in": "0x337d000000000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH31": {
"in": "0x337e00000000000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: PUSH32": {
"in": "0x337f0000000000000000000000000000000000000000000000000000000000000000905af1",
"out": false
},
"invalid CALL with value setter: DUP1": {
"in": "0x3380905af1",
"out": false
},
"invalid CALL with value setter: DUP2": {
"in": "0x3381905af1",
"out": false
},
"invalid CALL with value setter: DUP3": {
"in": "0x3382905af1",
"out": false
},
"invalid CALL with value setter: DUP4": {
"in": "0x3383905af1",
"out": false
},
"invalid CALL with value setter: DUP5": {
"in": "0x3384905af1",
"out": false
},
"invalid CALL with value setter: DUP6": {
"in": "0x3385905af1",
"out": false
},
"invalid CALL with value setter: DUP7": {
"in": "0x3386905af1",
"out": false
},
"invalid CALL with value setter: DUP8": {
"in": "0x3387905af1",
"out": false
},
"invalid CALL with value setter: DUP9": {
"in": "0x3388905af1",
"out": false
},
"invalid CALL with value setter: DUP10": {
"in": "0x3389905af1",
"out": false
},
"invalid CALL with value setter: DUP11": {
"in": "0x338a905af1",
"out": false
},
"invalid CALL with value setter: DUP12": {
"in": "0x338b905af1",
"out": false
},
"invalid CALL with value setter: DUP13": {
"in": "0x338c905af1",
"out": false
},
"invalid CALL with value setter: DUP14": {
"in": "0x338d905af1",
"out": false
},
"invalid CALL with value setter: DUP15": {
"in": "0x338e905af1",
"out": false
},
"invalid CALL with value setter: DUP16": {
"in": "0x338f905af1",
"out": false
},
"invalid CALL with value setter: SWAP1": {
"in": "0x3390905af1",
"out": false
},
"invalid CALL with value setter: SWAP2": {
"in": "0x3391905af1",
"out": false
},
"invalid CALL with value setter: SWAP3": {
"in": "0x3392905af1",
"out": false
},
"invalid CALL with value setter: SWAP4": {
"in": "0x3393905af1",
"out": false
},
"invalid CALL with value setter: SWAP5": {
"in": "0x3394905af1",
"out": false
},
"invalid CALL with value setter: SWAP6": {
"in": "0x3395905af1",
"out": false
},
"invalid CALL with value setter: SWAP7": {
"in": "0x3396905af1",
"out": false
},
"invalid CALL with value setter: SWAP8": {
"in": "0x3397905af1",
"out": false
},
"invalid CALL with value setter: SWAP9": {
"in": "0x3398905af1",
"out": false
},
"invalid CALL with value setter: SWAP10": {
"in": "0x3399905af1",
"out": false
},
"invalid CALL with value setter: SWAP11": {
"in": "0x339a905af1",
"out": false
},
"invalid CALL with value setter: SWAP12": {
"in": "0x339b905af1",
"out": false
},
"invalid CALL with value setter: SWAP13": {
"in": "0x339c905af1",
"out": false
},
"invalid CALL with value setter: SWAP14": {
"in": "0x339d905af1",
"out": false
},
"invalid CALL with value setter: SWAP15": {
"in": "0x339e905af1",
"out": false
},
"invalid CALL with value setter: SWAP16": {
"in": "0x339f905af1",
"out": false
},
"invalid CALL with value setter: LOG0": {
"in": "0x33a0905af1",
"out": false
},
"invalid CALL with value setter: LOG1": {
"in": "0x33a1905af1",
"out": false
},
"invalid CALL with value setter: LOG2": {
"in": "0x33a2905af1",
"out": false
},
"invalid CALL with value setter: LOG3": {
"in": "0x33a3905af1",
"out": false
},
"invalid CALL with value setter: LOG4": {
"in": "0x33a4905af1",
"out": false
},
"invalid CALL with caller setter: ADD": {
"in": "0x016000905af1",
"out": false
},
"invalid CALL with caller setter: MUL": {
"in": "0x026000905af1",
"out": false
},
"invalid CALL with caller setter: SUB": {
"in": "0x036000905af1",
"out": false
},
"invalid CALL with caller setter: DIV": {
"in": "0x046000905af1",
"out": false
},
"invalid CALL with caller setter: SDIV": {
"in": "0x056000905af1",
"out": false
},
"invalid CALL with caller setter: MOD": {
"in": "0x066000905af1",
"out": false
},
"invalid CALL with caller setter: SMOD": {
"in": "0x076000905af1",
"out": false
},
"invalid CALL with caller setter: ADDMOD": {
"in": "0x086000905af1",
"out": false
},
"invalid CALL with caller setter: MULMOD": {
"in": "0x096000905af1",
"out": false
},
"invalid CALL with caller setter: EXP": {
"in": "0x0a6000905af1",
"out": false
},
"invalid CALL with caller setter: SIGNEXTEND": {
"in": "0x0b6000905af1",
"out": false
},
"invalid CALL with caller setter: LT": {
"in": "0x106000905af1",
"out": false
},
"invalid CALL with caller setter: GT": {
"in": "0x116000905af1",
"out": false
},
"invalid CALL with caller setter: SLT": {
"in": "0x126000905af1",
"out": false
},
"invalid CALL with caller setter: SGT": {
"in": "0x136000905af1",
"out": false
},
"invalid CALL with caller setter: EQ": {
"in": "0x146000905af1",
"out": false
},
"invalid CALL with caller setter: ISZERO": {
"in": "0x156000905af1",
"out": false
},
"invalid CALL with caller setter: AND": {
"in": "0x166000905af1",
"out": false
},
"invalid CALL with caller setter: OR": {
"in": "0x176000905af1",
"out": false
},
"invalid CALL with caller setter: XOR": {
"in": "0x186000905af1",
"out": false
},
"invalid CALL with caller setter: NOT": {
"in": "0x196000905af1",
"out": false
},
"invalid CALL with caller setter: BYTE": {
"in": "0x1a6000905af1",
"out": false
},
"invalid CALL with caller setter: SHL": {
"in": "0x1b6000905af1",
"out": false
},
"invalid CALL with caller setter: SHR": {
"in": "0x1c6000905af1",
"out": false
},
"invalid CALL with caller setter: SAR": {
"in": "0x1d6000905af1",
"out": false
},
"invalid CALL with caller setter: SHA3": {
"in": "0x206000905af1",
"out": false
},
"invalid CALL with caller setter: CALLVALUE": {
"in": "0x346000905af1",
"out": false
},
"invalid CALL with caller setter: CALLDATALOAD": {
"in": "0x356000905af1",
"out": false
},
"invalid CALL with caller setter: CALLDATASIZE": {
"in": "0x366000905af1",
"out": false
},
"invalid CALL with caller setter: CALLDATACOPY": {
"in": "0x376000905af1",
"out": false
},
"invalid CALL with caller setter: CODESIZE": {
"in": "0x386000905af1",
"out": false
},
"invalid CALL with caller setter: CODECOPY": {
"in": "0x396000905af1",
"out": false
},
"invalid CALL with caller setter: RETURNDATASIZE": {
"in": "0x3d6000905af1",
"out": false
},
"invalid CALL with caller setter: RETURNDATACOPY": {
"in": "0x3e6000905af1",
"out": false
},
"invalid CALL with caller setter: POP": {
"in": "0x506000905af1",
"out": false
},
"invalid CALL with caller setter: MLOAD": {
"in": "0x516000905af1",
"out": false
},
"invalid CALL with caller setter: MSTORE": {
"in": "0x526000905af1",
"out": false
},
"invalid CALL with caller setter: MSTORE8": {
"in": "0x536000905af1",
"out": false
},
"invalid CALL with caller setter: JUMPI": {
"in": "0x576000905af1",
"out": false
},
"invalid CALL with caller setter: PC": {
"in": "0x586000905af1",
"out": false
},
"invalid CALL with caller setter: MSIZE": {
"in": "0x596000905af1",
"out": false
},
"invalid CALL with caller setter: GAS": {
"in": "0x5a6000905af1",
"out": false
},
"invalid CALL with caller setter: JUMPDEST": {
"in": "0x5b6000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH1": {
"in": "0x60006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH2": {
"in": "0x6100006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH3": {
"in": "0x620000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH4": {
"in": "0x63000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH5": {
"in": "0x6400000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH6": {
"in": "0x650000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH7": {
"in": "0x66000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH8": {
"in": "0x6700000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH9": {
"in": "0x680000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH10": {
"in": "0x69000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH11": {
"in": "0x6a00000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH12": {
"in": "0x6b0000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH13": {
"in": "0x6c000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH14": {
"in": "0x6d00000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH15": {
"in": "0x6e0000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH16": {
"in": "0x6f000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH17": {
"in": "0x7000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH18": {
"in": "0x710000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH19": {
"in": "0x72000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH20": {
"in": "0x7300000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH21": {
"in": "0x740000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH22": {
"in": "0x75000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH23": {
"in": "0x7600000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH24": {
"in": "0x770000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH25": {
"in": "0x78000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH26": {
"in": "0x7900000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH27": {
"in": "0x7a0000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH28": {
"in": "0x7b000000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH29": {
"in": "0x7c00000000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH30": {
"in": "0x7d0000000000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH31": {
"in": "0x7e000000000000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: PUSH32": {
"in": "0x7f00000000000000000000000000000000000000000000000000000000000000006000905af1",
"out": false
},
"invalid CALL with caller setter: DUP1": {
"in": "0x806000905af1",
"out": false
},
"invalid CALL with caller setter: DUP2": {
"in": "0x816000905af1",
"out": false
},
"invalid CALL with caller setter: DUP3": {
"in": "0x826000905af1",
"out": false
},
"invalid CALL with caller setter: DUP4": {
"in": "0x836000905af1",
"out": false
},
"invalid CALL with caller setter: DUP5": {
"in": "0x846000905af1",
"out": false
},
"invalid CALL with caller setter: DUP6": {
"in": "0x856000905af1",
"out": false
},
"invalid CALL with caller setter: DUP7": {
"in": "0x866000905af1",
"out": false
},
"invalid CALL with caller setter: DUP8": {
"in": "0x876000905af1",
"out": false
},
"invalid CALL with caller setter: DUP9": {
"in": "0x886000905af1",
"out": false
},
"invalid CALL with caller setter: DUP10": {
"in": "0x896000905af1",
"out": false
},
"invalid CALL with caller setter: DUP11": {
"in": "0x8a6000905af1",
"out": false
},
"invalid CALL with caller setter: DUP12": {
"in": "0x8b6000905af1",
"out": false
},
"invalid CALL with caller setter: DUP13": {
"in": "0x8c6000905af1",
"out": false
},
"invalid CALL with caller setter: DUP14": {
"in": "0x8d6000905af1",
"out": false
},
"invalid CALL with caller setter: DUP15": {
"in": "0x8e6000905af1",
"out": false
},
"invalid CALL with caller setter: DUP16": {
"in": "0x8f6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP1": {
"in": "0x906000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP2": {
"in": "0x916000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP3": {
"in": "0x926000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP4": {
"in": "0x936000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP5": {
"in": "0x946000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP6": {
"in": "0x956000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP7": {
"in": "0x966000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP8": {
"in": "0x976000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP9": {
"in": "0x986000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP10": {
"in": "0x996000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP11": {
"in": "0x9a6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP12": {
"in": "0x9b6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP13": {
"in": "0x9c6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP14": {
"in": "0x9d6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP15": {
"in": "0x9e6000905af1",
"out": false
},
"invalid CALL with caller setter: SWAP16": {
"in": "0x9f6000905af1",
"out": false
},
"invalid CALL with caller setter: LOG0": {
"in": "0xa06000905af1",
"out": false
},
"invalid CALL with caller setter: LOG1": {
"in": "0xa16000905af1",
"out": false
"valid EM call, then valid identity precompile call": {
"in": "0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b60016000f35b3350600060045af1",
"out": true
},
"invalid CALL with caller setter: LOG2": {
"in": "0xa26000905af1",
"valid EM call, then invalid identity precompile call": {
"in": "0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b60016000f35b3350600060035af1",
"out": false
},
"invalid CALL with caller setter: LOG3": {
"in": "0xa36000905af1",
"valid EM call, then invalid opcode (SLOAD)": {
"in": "0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b60016000f35b54",
"out": false
},
"invalid CALL with caller setter: LOG4": {
"in": "0xa46000905af1",
"valid identity precompile call, then invalid opcode (SLOAD)": {
"in": "0x3350600060045af154",
"out": false
},
"invalid CALL with non-zero value": {
"in": "0x336001905af1",
"invalid EM call (missing final byte)": {
"in": "0x336000905af158601d0157586012013d600114573d6000803e3d6000fd5b60016000f3",
"out": false
},
"invalid call to non-ExecutionManager address": {
"in": "0x73ffffffffffffffffffffffffffffffffffffffff6000905af1",
"invalid identity precompile call (missing final byte)": {
"in": "0x3350600060045a",
"out": false
},
"invalid CALL without SWAP1": {
"in": "0x6000335af1",
"invalid identity precompile call (First 2 bytes are PUSH2ed)": {
"in": "0x613350600060045af1",
"out": false
}
}
......
......@@ -4,7 +4,7 @@ import { expect } from '../../setup'
import { ethers } from '@nomiclabs/buidler'
import { Contract, BigNumber, ContractFactory } from 'ethers'
import { cloneDeep, merge } from 'lodash'
import { smoddit, ModifiableContract } from '@eth-optimism/smock'
import { smoddit, smockit, ModifiableContract } from '@eth-optimism/smock'
/* Internal Imports */
import {
......@@ -148,10 +148,15 @@ export class ExecutionManagerTestRunner {
await ethers.getContractFactory('Lib_AddressManager')
).deploy()
this.contracts.OVM_SafetyChecker = await (
const SafetyChecker = await (
await ethers.getContractFactory('OVM_SafetyChecker')
).deploy()
const MockSafetyChecker = smockit(SafetyChecker)
MockSafetyChecker.smocked.isBytecodeSafe.will.return.with(true)
this.contracts.OVM_SafetyChecker = MockSafetyChecker
await AddressManager.setAddress(
'OVM_SafetyChecker',
this.contracts.OVM_SafetyChecker.address
......@@ -174,7 +179,10 @@ export class ExecutionManagerTestRunner {
this.contracts.OVM_StateManager = await (
await smoddit('OVM_StateManager')
).deploy(this.contracts.OVM_ExecutionManager.address)
).deploy(await this.contracts.OVM_ExecutionManager.signer.getAddress())
await this.contracts.OVM_StateManager.setExecutionManager(
this.contracts.OVM_ExecutionManager.address
)
this.contracts.Helper_TestRunner = await (
await ethers.getContractFactory('Helper_TestRunner')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment