Merged
Conversation
battlmonstr
pushed a commit
that referenced
this pull request
Sep 14, 2023
cffls
pushed a commit
to cffls/erigon
that referenced
this pull request
Jul 12, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Apr 12, 2026
Summary of changes for compliance (ethereum/execution-apis PR 762) see ethereum/execution-apis#762) The changes fix the EVM tracer JSON output (structLog) to align with the Ethereum JSON-RPC specification. --- 1. Last memory word truncation Before: the loop used i+32 <= len(memData), silently dropping the last chunk when memory size was not an exact multiple of 32 bytes. After: the loop iterates over all bytes; the last partial chunk is zero-padded to 32 bytes, as required by the spec (each memory word is always 32 bytes). --- 2. Missing 0x prefix on storage and memory Before: storage keys/values and memory words were serialized as raw hex (e.g. "0000...0001"). After: all hex values are emitted with the 0x prefix (e.g. "0x0000...0001"), as required by the Ethereum JSON-RPC specification. --- 3. error field always present even without errors Before: the "error" field was serialized as "error": "" even when no error occurred. After: with omitempty the field is omitted entirely when there is no error, making the output cleaner and consistent with the behavior expected by clients and Hive tests. --- Impacted APIs * debug_traceTransaction * debug_traceBlockByNumber * debug_traceBlockByHash * debug_traceCall * debug_traceCallMany All three fixes are covered by unit tests in the new json_stream_test.go file. Out of this PR is keyword to anable/disable and default value for them ### Tracer Configuration Comparison | Field | Erigon | Geth | Spec #762 | Aligned | | :--- | :--- | :--- | :--- | :---: | | **Memory** | `disable=false` (ON) | `Enable=false` (OFF) | `enable=false` (OFF) | ❌ | | **Stack** | `disable=false` (ON) | `Disable=false` (ON) | `disable=false` (ON) | ✅ | | **Storage** | `disable=false` (ON) | `Disable=false` (ON) | `disable=false` (ON) | ✅ | | **Return** | `disable=false` (ON) | `Enable=false` (OFF) | `enable=false` (OFF) | ❌ | --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Found problem with memory in tests:
eth/downloader/downloader_test.goin init method reduce some big constants to use less memory, buteth/downloader/testchain_test.goreading constants values beforeinitmethod run.Fixed and reduced lmdb in-mem limit from 64mb to 32mb.