Commit 975ae76a authored by George Hotz's avatar George Hotz

running 100k steps

parent 53ef934e
...@@ -162,7 +162,7 @@ func runMinigeth(fn string, interpreter *vm.EVMInterpreter, bytecode []byte) { ...@@ -162,7 +162,7 @@ func runMinigeth(fn string, interpreter *vm.EVMInterpreter, bytecode []byte) {
uint32(dat[i+3])<<0 uint32(dat[i+3])<<0
} }
steps := 10000 steps := 100000
gas := 10000 * uint64(steps) gas := 10000 * uint64(steps)
// 0xdb7df598 // 0xdb7df598
......
...@@ -86,7 +86,7 @@ mu.hook_add(UC_HOOK_MEM_FETCH_UNMAPPED, hook_mem_invalid) ...@@ -86,7 +86,7 @@ mu.hook_add(UC_HOOK_MEM_FETCH_UNMAPPED, hook_mem_invalid)
gt = open("/tmp/gethtrace").read().split("\n") gt = open("/tmp/gethtrace").read().split("\n")
# tracer # tracer
STEP_COUNT = 10000 STEP_COUNT = 100000
step = 0 step = 0
is_bds = False is_bds = False
def hook_code_simple(uc, address, size, user_data): def hook_code_simple(uc, address, size, user_data):
...@@ -99,8 +99,9 @@ def hook_code_simple(uc, address, size, user_data): ...@@ -99,8 +99,9 @@ def hook_code_simple(uc, address, size, user_data):
assert size == 4 assert size == 4
# check for BDS # check for BDS
# UGH! there should be a better way to do this
dat = next(md.disasm(uc.mem_read(address, size), address)) dat = next(md.disasm(uc.mem_read(address, size), address))
if dat.insn_name() in ['jr', 'j', 'beqz', 'jal', 'bnez', 'b', 'bltz', 'bne']: if dat.insn_name() in ['jr', 'j', 'beqz', 'jal', 'bnez', 'b', 'bltz', 'bne', 'blez', 'bgez', 'beq', 'jalr']:
is_bds = True is_bds = True
inst = struct.unpack(">I", uc.mem_read(pc, 4))[0] inst = struct.unpack(">I", uc.mem_read(pc, 4))[0]
......
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