Skip to content

Commit

Permalink
ignore STOP debug frame (#202)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Eldar Gabdullin <[email protected]>
  • Loading branch information
tmcgroul and eldargab authored Sep 28, 2023
1 parent 6c4aacc commit d7767c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@subsquid/evm-processor",
"comment": "ignore STOP debug frame",
"type": "patch"
}
],
"packageName": "@subsquid/evm-processor"
}
5 changes: 4 additions & 1 deletion evm/evm-processor/src/ds-rpc/mapping.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {addErrorContext, assertNotNull, unexpectedCase} from '@subsquid/util-internal'
import {HashAndHeight} from '@subsquid/util-internal-processor-tools'
import assert from 'assert'
import {AllFields, BlockData, BlockHeader, FieldSelection, Transaction} from '../interfaces/data'
import {DataRequest} from '../interfaces/data-request'
Expand Down Expand Up @@ -338,6 +337,10 @@ function mapTraceStateDiff(transactionIndex: number, address: Bytes20, key: stri


function* mapDebugFrame(transactionIndex: number, debugFrameResult: rpc.DebugFrameResult): Iterable<EvmTrace> {
if (debugFrameResult.result.type == 'STOP') {
assert(!debugFrameResult.result.calls?.length)
return
}
for (let rec of traverseDebugFrame(debugFrameResult.result, [])) {
let base: EvmTraceBase = {
transactionIndex,
Expand Down
2 changes: 1 addition & 1 deletion evm/evm-processor/src/ds-rpc/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export type TraceTracers = 'trace' | 'stateDiff'


export interface DebugFrame {
type: 'CALL' | 'STATICCALL' | 'DELEGATECALL' | 'CREATE' | 'CREATE2' | 'SELFDESTRUCT' | 'INVALID'
type: 'CALL' | 'STATICCALL' | 'DELEGATECALL' | 'CREATE' | 'CREATE2' | 'SELFDESTRUCT' | 'INVALID' | 'STOP'
from: Bytes20
to: Bytes20
value?: Qty
Expand Down

0 comments on commit d7767c7

Please sign in to comment.