Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore STOP debug frame #202

Merged
merged 5 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading