Skip to content

Ci lmdb - reduce memory usage #762

Merged
AskAlexSharov merged 9 commits intomasterfrom
ci_lmdb
Jul 21, 2020
Merged

Ci lmdb - reduce memory usage #762
AskAlexSharov merged 9 commits intomasterfrom
ci_lmdb

Conversation

@AskAlexSharov
Copy link
Copy Markdown
Collaborator

Found problem with memory in tests:
eth/downloader/downloader_test.go in init method reduce some big constants to use less memory, but eth/downloader/testchain_test.go reading constants values before init method run.
Fixed and reduced lmdb in-mem limit from 64mb to 32mb.

@AskAlexSharov AskAlexSharov merged commit 621e3a2 into master Jul 21, 2020
@AlexeyAkhunov AlexeyAkhunov deleted the ci_lmdb branch February 3, 2021 18:57
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant