fix(evm): accept PascalCase debug call-frame types (zkSync-era nodes) - #562
Open
SQD-Trevor-Agent wants to merge 1 commit into
Open
fix(evm): accept PascalCase debug call-frame types (zkSync-era nodes)#562SQD-Trevor-Agent wants to merge 1 commit into
SQD-Trevor-Agent wants to merge 1 commit into
Conversation
zkSync-era nodes (e.g. zklink-nova) serialize debug callTracer frame
types in PascalCase ('Call', 'Create', 'DelegateCall'). The frame
verification (checkDebugFrameStructure/checkCallFrameTree) and the
normalization mapper only matched UPPER/camelCase, so every zklink block
was rejected with 'root frame has unsupported type Call' and, after 5
retries, crashed the dump into a restart loop.
Match frame types case-insensitively in both the verifier and the
mapper so any casing (CALL/call/Call) is handled uniformly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause (proven)
The
dump-zklink-nova-mainnet-0pod has been crash-looping since ~20:21 UTC on 2026-09-05 (alertArchiveDumpRestarting). Pod logs:zklink-nova is a zkSync-Era-based L3. Its
debug_traceTransaction/debug_traceBlockByNumbercallTracer returns frame types in PascalCase ("type": "Call"), verified live againsthttps://rpc.zklink.io/:{"type":"Call","from":"0x00..00","to":"0x00..8001", "calls":[{"type":"Call", ...}]}The debug-frame verification introduced in #548 (
checkDebugFrameStructure/checkCallFrameTreeinevm-rpc/src/verification.ts) matches frame types against sets containing onlyCALL/call(and camelCase variants), notCall. SocheckDebugFrameStructurereturnsroot frame has unsupported type Call, the block is marked_isInvalid, and after 5 retriesgetBlocksthrows → the dump process crashes → restart loop → no data written.This shipped to production when the
evm-dump:ac90a36dimage (which contains the #548 verification) was deployed to zklink-nova at ~20:21 UTC on 2026-09-05; the code has been onmastersince 26f7703, and the casing has always been zklink's format, so the trigger was the deploy, not a chain change. The normalization mapper (evm-normalization/src/mapping.ts) switches on the same exact strings and would throwUnexpected case: Callon the same data.This is a legitimate on-chain format our own code fails to recognize — the fix is to support it, not to skip/disable the check.
Fix
Match debug call-frame types case-insensitively in both the verifier and the mapper, so
CALL/call/Callare all handled uniformly. This also folds the previously ad-hoc lowercase/camelCase entries into a single canonical (upper-cased) comparison.Tests (red → green)
evm/evm-rpc/src/verification.call-frame-tree.test.ts: addedaccepts PascalCase frame typesandaccepts a PascalCase root call frame.Pre-fix:
expected 'root frame has unsupported type Call' to be undefined. Post-fix: pass.evm/evm-normalization/src/mapping.debug-frame.test.ts: addedmaps a Call frame.Pre-fix:
Error: Unexpected case: Call. Post-fix: pass.Verified locally:
rush buildgreen (both packages compile), both package suites green (the one unrelated failure intest/verification.test.ts > transaction sender recoveryis a 5s-timeout on slow ECDSA recovery in the sandbox and passes with--testTimeout=60000).Falsification
If zklink's dump still logs
unsupported type <X>for a type<X>that is not a casing variant of CALL/CALLCODE/DELEGATECALL/STATICCALL/INVALID/CREATE/CREATE2/SELFDESTRUCT/STOP, then it is a genuinely new frame kind and this fix is insufficient.Related to #548 (introduced the frame verification); this is a follow-up casing bug in that feature, not a duplicate.