Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@
"axios": "^0.19.0",
"bn.js": "^5.0.0",
"ethereumjs-account": "^3.0.0",
"ethereumjs-common": "^1.5.0",
"ethereumjs-testing": "git+https://github.com/ethereumjs/ethereumjs-testing.git#v1.2.7",
"ethereumjs-util": "^6.1.0",
"ethereumjs-vm": "^4.1.0",
"ethereumjs-vm": "^4.1.3",
"ethereumjs-wallet": "^0.6.3",
"merkle-patricia-tree": "^3.0.0",
"rlp": "^2.2.3"
Expand Down
4 changes: 3 additions & 1 deletion src/relayer/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const assert = require('assert')
const { promisify } = require('util')
const Wallet = require('ethereumjs-wallet')
const Trie = require('merkle-patricia-tree/secure')
const Common = require('ethereumjs-common')

export interface TestSuite {
preStateRoot: Buffer
Expand Down Expand Up @@ -401,8 +402,9 @@ export function rawMultiproof(proof: Multiproof, flatInstructions: boolean = fal
}

export function getBasicBlockIndices(code: Buffer): number[][] {
const hfIstanbul = new Common('istanbul')
const TERMINATING_OPS = ['JUMP', 'JUMPI', 'STOP', 'RETURN', 'REVERT', 'SELFDESTRUCT']
const opcodes = getOpcodesForHF('istanbul')
const opcodes = getOpcodesForHF(hfIstanbul)
const getOp = (i: number) => (opcodes[code[i]] ? opcodes[code[i]].name : 'INVALID')

// [start, end) indices
Expand Down