Skip to content

Stream debug_traceBlock* responses directly to avoid OOM on large blocks#9848

Merged
daniellehrner merged 31 commits intobesu-eth:mainfrom
daniellehrner:feat/trace-streaming
Apr 8, 2026
Merged

Stream debug_traceBlock* responses directly to avoid OOM on large blocks#9848
daniellehrner merged 31 commits intobesu-eth:mainfrom
daniellehrner:feat/trace-streaming

Conversation

@daniellehrner
Copy link
Copy Markdown
Contributor

@daniellehrner daniellehrner commented Feb 19, 2026

PR description

Converts debug_traceBlockByNumber, debug_traceBlockByHash, and `debug_traceBlock from accumulate-then-serialize to stream-as-you-go. Previously, these methods built the entire JSON response in memory (via TransactionTrace + DebugTraceTransactionResult), which OOMs on blocks with many transactions or complex traces. Now, structLogs are written directly to the HTTP/WebSocket output stream during EVM execution.

Infrastructure changes:

  • New StreamingJsonRpcMethod interface: streaming methods implement streamResponse(request, outputStream, mapper) instead of response(request)
  • JsonRpcMethod.isStreaming() marker allows the HTTP/WS handlers to dispatch to the streaming path
  • streamProcess() added to the JsonRpcProcessor chain (Base, Timed, Traced, Authenticated) so streaming requests get the same metrics, tracing, and auth as regular requests
  • JsonRpcObjectExecutor and WebSocketMessageHandler detect streaming methods and write directly to the response stream
  • JsonRpcExecutor shared preamble extracted into prepareExecution() to eliminate duplication between execute() and executeStreaming()

Trace-specific changes

  • AbstractDebugTraceBlock base class with shared option parsing and response writing
  • DebugTraceBlockStreamer — the core streaming engine. For OPCODE_TRACER, writes structLogs during execution via a frame callback. For other tracers (callTracer, etc.), accumulates per-transaction then serializes
  • DebugOperationTracer.StreamingFrameWriter — zero-allocation callback that passes raw trace data + live MessageFrame reference, bypassing TraceFrame/Builder/Optional construction entirely
  • Reusable StringBuilder for hex conversion (StructLog.toCompactHex overload), memory read via readMutableMemory() (view, no copy), storage read directly from getUpdatedStorage() — eliminates ~130+ transient objects per
    opcode step
  • EthScheduler dependency removed from debug trace method constructors (no longer needed without async dispatch)

Breaking changes

JSON field ordering changed for debug_traceBlock* with OPCODE_TRACER (default tracer):

Before:

  {"txHash": "0x...", "result": {"gas": 21000, "failed": false, "returnValue": "", "structLogs": [...]}}

After:

  {"txHash": "0x...", "result": {"structLogs": [...], "gas": 21000, "failed": false, "returnValue": ""}}

gas, failed, and returnValue now appear after structLogs because they're only known after execution completes. JSON-RPC clients that parse by key name (standard) are unaffected. Clients that depend on field ordering will
break.

Batch requests containing streaming methods now return {"error": {"code": -32600, "message": "Invalid request"}} for those methods instead of crashing the batch. This is new behavior but I am unsure if tracing more than one block in parallel would have been possible without OOM anyways. Batch requests fall back to the normal OperationTracer which accumulates the results in memory

Performance tests

I ran the following script to trace 10 recent blocks in a row to compare the current implementation against this PR. The script was:

#!/bin/bash
RPC_URL="http://localhost:8545"

if [ -z "$1" ]; then
  echo "Usage: $0 <start_block>" >&2
  exit 1
fi

START="$1"

echo "Testing debug_traceBlockByNumber streaming (10 blocks starting at $START)"
echo "RPC: $RPC_URL"
echo "---"
printf "%-12s %10s %10s %12s\n" "Block" "Total(s)" "TTFB(s)" "Size(MB)"
echo "---"

total_time=0
total_size=0

for i in $(seq 0 9); do
  block=$(printf "0x%X" $(( START + i )))
  result=$(curl -o /dev/null -w "%{time_total} %{time_starttransfer} %{size_download}" \
    -s -X POST "$RPC_URL" \
    -H 'Content-Type: application/json' \
    -d "{\"jsonrpc\":\"2.0\",\"method\":\"debug_traceBlockByNumber\",\"params\":[\"$block\"],\"id\":1}")
  time=$(echo "$result" | awk '{print $1}')
  ttfb=$(echo "$result" | awk '{print $2}')
  size=$(echo "$result" | awk '{print $3}')
  mb=$(echo "scale=2; $size/1048576" | bc)
  printf "%-12s %10.3f %10.3f %10.2fMB\n" "$block" "$time" "$ttfb" "$mb"
  total_time=$(echo "$total_time + $time" | bc)
  total_size=$(echo "$total_size + $size" | bc)
done

avg_time=$(echo "scale=3; $total_time/10" | bc)
avg_mb=$(echo "scale=2; $total_size/10/1048576" | bc)
echo "---"
printf "%-12s %10.3f %10s %10.2fMB\n" "Average" "$avg_time" "" "$avg_mb"
printf "%-12s %10.3f %10s %10.2fMB\n" "Total" "$total_time" "" "$(echo "scale=2; $total_size/1048576" | bc)"

On the feature node, which includes this PR we got:

./test_trace_block.sh 24496058
Testing debug_traceBlockByNumber streaming (10 blocks starting at 24496058)
RPC: http://localhost:8545
---
Block          Total(s)    TTFB(s)     Size(MB)
---
0x175C7BA         6.602      0.020     942.23MB
0x175C7BB        12.770      0.004    1860.28MB
0x175C7BC         4.399      0.003     524.80MB
0x175C7BD         5.358      0.003     643.87MB
0x175C7BE        13.290      0.003    2283.97MB
0x175C7BF        15.382      0.003    2586.28MB
0x175C7C0         2.897      0.002     349.54MB
0x175C7C1         4.722      0.002     615.65MB
0x175C7C2         4.555      0.002     604.91MB
0x175C7C3        16.937      0.004    2753.11MB
---
Average           8.691               1316.46MB
Total            86.913              13164.68MB

On the control node, which is main we got:

./test_trace_block.sh 24496058
Testing debug_traceBlockByNumber streaming (10 blocks starting at 24496058)
RPC: http://localhost:8545
---
Block          Total(s)    TTFB(s)     Size(MB)
---
0x175C7BA         9.488      6.427     942.23MB
0x175C7BB        11.434      4.777    1860.28MB
0x175C7BC         4.623      2.952     524.80MB
0x175C7BD         5.753      3.696     643.87MB
0x175C7BE        13.923      5.766    2283.97MB
0x175C7BF        30.170     30.170       0.00MB
0x175C7C0        39.813     39.813       0.00MB
0x175C7C1        38.678     38.678       0.00MB
^C

The control node crashed during the execution, as can be seen by retruning 0 bytes on the bottom 3 blocks.

TTFB (time to first byte) is only a few ms on the feature node and several seconds on the control node, showing that the streaming works correctly and starts to send data almost immediately.

The total response time varies between the two without a clear winner.

During the tests we saw the following memory consumption:

Screenshot 2026-02-20 at 06 56 35

We see the expected spikes on the control node in GC time and general memory consumption. As the memory consumption increases by several GBs we eventually run into a OOM error which crahes the node.

On the feature node GC time increases a bit, but the general memory consumption stays relatively flat, as expected because the streaming only keeps very little data in memory before writing it to the socket and deleting it right away.

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests
  • hive tests: Engine or other RPCs modified?

@ahamlat
Copy link
Copy Markdown
Contributor

ahamlat commented Feb 26, 2026

@daniellehrner is this PR ready for review ?

* StringBuilder is cleared before use but retains its internal buffer.
*/
public static void toCompactHex(
final Bytes abytes, final boolean prefix, final StringBuilder buf) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting 👍 , not very important/urgent, but it would be great to see JMH benchmarks on both methods.

Copy link
Copy Markdown
Contributor

@ahamlat ahamlat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sens to have two different DebugOperationTracer, one that uses streaming and one that doesn't use streaming. It is a bit misleading to have traceFrames object where it is not needed anymore for the streaming version.
Also, fix unit tests as some of them are failing related to this PR.

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
…to accumulation in memory, adddress pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
@daniellehrner daniellehrner marked this pull request as ready for review March 17, 2026 11:13
Copilot AI review requested due to automatic review settings March 17, 2026 11:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for streaming JSON-RPC responses, then migrates debug_traceBlock* (especially opcode tracing) to stream structLogs as they are produced to avoid OOM on large blocks.

Changes:

  • Introduces a streaming execution path (StreamingJsonRpcMethod, executor/processor support) for HTTP and WebSocket handlers.
  • Adds streaming-capable debug tracers and a DebugTraceBlockStreamer that writes opcode struct logs during EVM execution.
  • Updates debug trace block golden files and rewrites debug trace tests to validate the streamed JSON output.

Reviewed changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/StreamingDebugOperationTracer.java New operation tracer that emits per-opcode data via a callback instead of accumulating frames.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/DebugOperationTracer.java Refactors to share logic via AbstractDebugOperationTracer and optionally stream frames via a consumer.
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/vm/AbstractDebugOperationTracer.java New base class for shared opcode filtering, stack capture, and gas-cost computation.
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/trace/chain-data/genesis-osaka.json Adds a genesis config for updated trace tests.
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/trace-block/debug_traceBlock_disableStorage.json Updates expected JSON ordering for streamed results.
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/trace-block/debug_traceBlock_disableStack.json Updates expected JSON ordering for streamed results.
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/trace-block/debug_traceBlock_disableMemory.json Updates expected JSON ordering for streamed results.
ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/debug/trace-block/debug_traceBlock_default.json Updates expected JSON ordering for streamed results.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockTest.java Rewrites tests to invoke streamResponse and validate streamed JSON content.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockByNumberTest.java Rewrites tests to invoke streamResponse and validate streamed JSON content.
ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockByHashTest.java Rewrites tests to invoke streamResponse and validate streamed JSON content.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/websocket/WebSocketMessageHandler.java Detects streaming methods and writes directly to the WebSocket output stream.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/JsonRpcMethodsFactory.java Updates debug method construction after removing EthScheduler dependency.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/DebugJsonRpcMethods.java Removes EthScheduler usage and wires new streaming debug trace methods.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/StructLog.java Adds toCompactHex(..., StringBuilder) overload to reduce allocations.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/StreamingJsonRpcMethod.java New interface for methods that stream directly to an OutputStream.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/JsonRpcMethod.java Adds an isStreaming() marker method.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockStreamer.java New streaming engine that writes opcode structLogs while executing transactions.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockByNumber.java Implements streaming for debug_traceBlockByNumber with a fallback batch path.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlockByHash.java Implements streaming for debug_traceBlockByHash.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/DebugTraceBlock.java Implements streaming for debug_traceBlock and adjusts invalid/parent-missing handling.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AbstractDebugTraceBlock.java Shared streaming/batch logic for debug trace block methods and response writing.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/TracedJsonRpcProcessor.java Adds streamProcess() support while preserving metrics/tracing behavior.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/TimedJsonRpcProcessor.java Adds timing support for streamed execution.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/JsonRpcProcessor.java Adds streamProcess() hook to processor chain.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/JsonRpcExecutor.java Adds streaming dispatch and refactors shared execution preparation.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/BaseJsonRpcProcessor.java Implements streamed execution including error mapping for invalid params/runtime errors.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/execution/AuthenticatedJsonRpcProcessor.java Adds auth checks for streamed execution.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/handlers/JsonRpcObjectExecutor.java Routes streaming methods to executeStreaming() and writes directly to response stream.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/handlers/AbstractJsonRpcExecutor.java Makes SPAN_CONTEXT available to subclasses for streaming execution.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +141 to +143
gen.writeEndArray();
gen.flush();
}
Comment on lines +86 to +95
@Override
public JsonRpcResponse response(final JsonRpcRequestContext request) {
final Optional<Block> maybeBlock = findBlock(request);
if (maybeBlock.isEmpty()) {
return new JsonRpcSuccessResponse(request.getRequest().getId(), null);
}
final TraceOptions traceOptions = getTraceOptions(request);
final DebugTraceBlockStreamer streamer = createStreamer(traceOptions, maybeBlock);
return new JsonRpcSuccessResponse(request.getRequest().getId(), streamer.accumulateAll());
}
Comment on lines +38 to +46
/**
* Streaming methods do not support the synchronous response path (used by batch requests).
* Returns an error response instead of throwing, so batch requests degrade gracefully.
*/
@Override
default JsonRpcResponse response(final JsonRpcRequestContext request) {
return new JsonRpcErrorResponse(
new JsonRpcRequestId(request.getRequest().getId()), RpcErrorType.INVALID_REQUEST);
}
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
.apply(transactionTrace);
}

private void writeStreamingStructLog(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

writeStreamingStructLog creates new TreeMap<>(updatedStorage) on every traced opcode. The class already has private final TreeMap<UInt256, UInt256> sortedStorage — that field should be cleared and re-used (sortedStorage.clear(); sortedStorage.putAll(updatedStorage)) instead of allocating a new one each time. For a block with thousands of transactions and complex storage access this dominates GC pressure.

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
… size to work better with netty's default buffer size

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
… is available, allows to send the proper error codes during setup

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
…corrected error format, reason encoding, returnValue prefix, and precompile gasCost, with equivalence tests between both

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
if (prepared == null) {
return Optional.of(new JsonRpcNoResponse());
}
if (prepared instanceof JsonRpcResponse response) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is this happens only when there're errors : JsonRpcErrorResponse with Invalid request. When reading the code, it seems weird for me that preparing a request returned a response instead of the PreparedRequest.
I would make prepareExecution return only PreparedRequest and throw IllegalArgumentException to be handled by executeStreaming, and return optional.of(JsonRpcErrorResponse(id, INVALID_REQUEST))

// Sized to stay below Netty's default high watermark (64 KB). This ensures each
// flush does not overshoot the backpressure threshold in JsonResponseStreamer, allowing
// the drain/resume cycle to regulate direct-memory usage smoothly.
private static final int BUF_SIZE = 32 * 1024;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing bigger buffer size 256 KiB with 1 MiB max queue size showed slightly better latency numbers but was less stable then this configuration. I suggest to keep existing configuration re-evaluate later if needed.

Copy link
Copy Markdown
Contributor

@ahamlat ahamlat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I tested different blocks on mainnet and noticed big improvements in terms of performance. The most interesting ones are when existing besu nodes (before this PR) couldn't reply because of OOO errors where this PR is able to reply with very small memory overhead.
There are small comments but nothing blocking. We can re-evaluate in future PRs.

@daniellehrner daniellehrner enabled auto-merge (squash) April 8, 2026 10:08
@daniellehrner daniellehrner merged commit b2cbdea into besu-eth:main Apr 8, 2026
37 of 39 checks passed
@daniellehrner daniellehrner deleted the feat/trace-streaming branch April 8, 2026 10:40
daniellehrner added a commit that referenced this pull request Apr 8, 2026
* Add SHL, SHR and SAR shift operations for EVM v2 (#10154)

* Add SHL, SHR and SAR implementations and benchmarks for EVM v2

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Upgrade RocksDB version from 9.7.3 to 10.6.2 (#9767)

* Upgrade RocksDB version from 9.7.3 to 10.6.2
* Fix JNI SIGSEGV crashes

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

* Add missing verification metadata (#10198)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Stream debug_traceBlock* responses directly to avoid OOM on large blocks (#9848)

* stream block traces on op code level

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* correctly parse default setting for memory tracing

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* fix initcode capture for failed create op codes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* created separate streaming debug tracer, for batch request fall back to accumulation in memory, adddress pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* execute tests from genesis and verify full trace

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* addressed pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* optimize trace streaming and struct log handling

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* spotless

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Fix remaining issues and add unit tests

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* added back pressure when writing to the socket and reduced the buffer size to work better with netty's default buffer size

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* improve error handling by deferring to send the header only when data is available, allows to send the proper error codes during setup

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* compactHex candidate comparison

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* wire in more performant hex writer

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* introduce separate timeout for streaming calls, defaults to 10 minutes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* Fix streamin/accumulating output parity, added missing refund field, corrected error format, reason encoding, returnValue prefix, and precompile gasCost, with equivalence tests between both

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* revert accidental removal of 0x prefix

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* pad memory bytes to 32 bytes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Ameziane H. <ameziane.hamlat@consensys.net>

---------

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
daniellehrner added a commit that referenced this pull request Apr 9, 2026
* Add SHL, SHR and SAR shift operations for EVM v2 (#10154)

* Add SHL, SHR and SAR implementations and benchmarks for EVM v2

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Upgrade RocksDB version from 9.7.3 to 10.6.2 (#9767)

* Upgrade RocksDB version from 9.7.3 to 10.6.2
* Fix JNI SIGSEGV crashes

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

* Add missing verification metadata (#10198)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Stream debug_traceBlock* responses directly to avoid OOM on large blocks (#9848)

* stream block traces on op code level

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* correctly parse default setting for memory tracing

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* fix initcode capture for failed create op codes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* created separate streaming debug tracer, for batch request fall back to accumulation in memory, adddress pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* execute tests from genesis and verify full trace

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* addressed pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* optimize trace streaming and struct log handling

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* spotless

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Fix remaining issues and add unit tests

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* added back pressure when writing to the socket and reduced the buffer size to work better with netty's default buffer size

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* improve error handling by deferring to send the header only when data is available, allows to send the proper error codes during setup

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* compactHex candidate comparison

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* wire in more performant hex writer

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* introduce separate timeout for streaming calls, defaults to 10 minutes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* Fix streamin/accumulating output parity, added missing refund field, corrected error format, reason encoding, returnValue prefix, and precompile gasCost, with equivalence tests between both

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* revert accidental removal of 0x prefix

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* pad memory bytes to 32 bytes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Optimize performance and reduce memory when creating Quantity from scalar (#10134)

* Optimize performance and reduce memory when creating Quantity from scalar

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Benchmark other implementations

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* snap sync - apply BALs before flat db heal (#10151)

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

* Remove dryRunDetector workaround methods from unit tests (#10201)

* Remove dryRunDetector workaround methods from unit tests

The dryRunDetector methods were added as a workaround for a Gradle issue
that prevented @ParameterizedTest classes from being selected when running
with --dry-run. Since the issue is fixed and --dry-run is no longer used,
these methods are no longer needed.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove dryRunDetector workaround from acceptance tests too

The Gradle issue is confirmed fixed, so the workaround is no longer
needed anywhere, including acceptance tests.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* preserve state gas reservoir for the top level frame in case of OOG (#10205)

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Miroslav Kovář <miroslavkovar@protonmail.com>
daniellehrner added a commit that referenced this pull request Apr 10, 2026
* Add SHL, SHR and SAR shift operations for EVM v2 (#10154)

* Add SHL, SHR and SAR implementations and benchmarks for EVM v2

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Upgrade RocksDB version from 9.7.3 to 10.6.2 (#9767)

* Upgrade RocksDB version from 9.7.3 to 10.6.2
* Fix JNI SIGSEGV crashes

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>

* Add missing verification metadata (#10198)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Stream debug_traceBlock* responses directly to avoid OOM on large blocks (#9848)

* stream block traces on op code level

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* correctly parse default setting for memory tracing

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* fix initcode capture for failed create op codes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* created separate streaming debug tracer, for batch request fall back to accumulation in memory, adddress pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* execute tests from genesis and verify full trace

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* addressed pr comments

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* optimize trace streaming and struct log handling

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* spotless

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Fix remaining issues and add unit tests

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>

* added back pressure when writing to the socket and reduced the buffer size to work better with netty's default buffer size

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* improve error handling by deferring to send the header only when data is available, allows to send the proper error codes during setup

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* compactHex candidate comparison

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* wire in more performant hex writer

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* introduce separate timeout for streaming calls, defaults to 10 minutes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* spotless

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* Fix streamin/accumulating output parity, added missing refund field, corrected error format, reason encoding, returnValue prefix, and precompile gasCost, with equivalence tests between both

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* revert accidental removal of 0x prefix

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* pad memory bytes to 32 bytes

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

---------

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Co-authored-by: Ameziane H. <ameziane.hamlat@consensys.net>

* Optimize performance and reduce memory when creating Quantity from scalar (#10134)

* Optimize performance and reduce memory when creating Quantity from scalar

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Benchmark other implementations

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* snap sync - apply BALs before flat db heal (#10151)

Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>

* Remove dryRunDetector workaround methods from unit tests (#10201)

* Remove dryRunDetector workaround methods from unit tests

The dryRunDetector methods were added as a workaround for a Gradle issue
that prevented @ParameterizedTest classes from being selected when running
with --dry-run. Since the issue is fixed and --dry-run is no longer used,
these methods are no longer needed.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove dryRunDetector workaround from acceptance tests too

The Gradle issue is confirmed fixed, so the workaround is no longer
needed anywhere, including acceptance tests.

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* preserve state gas reservoir for the top level frame in case of OOG (#10205)

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* Enable execution processor on PoA networks with system contract addresses (#10196)

* enable the prague execution processor for poa networks that have the systems contract addresses set in their genesis file

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>

* Fix engine_getPayloadV1 to return -38001 instead of -32001 for unknown payloadId (#10179)

The Engine API spec requires error code -38001 (Unknown payload) when
engine_getPayloadV1 is called with an unrecognized payloadId. Besu was
incorrectly returning -32001 (Resource not found), which is a non-standard
error code that may cause interoperability issues with consensus layer clients.

Fixes #10174

Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>

* Exclude IntelliJ bin/default output from Spotless shell script check (#10210)

When IntelliJ syncs a Gradle project without build delegation, it copies
processed resources (including reference test shell scripts from the
submodule) into bin/default/. Spotless then finds these copies and
incorrectly flags them for missing license headers, while CI never sees
bin/default/ since it runs bare Gradle.

Add '**/bin/default/**' to the ShellScripts targetExclude, matching the
existing pattern used for other generated/external content.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Missing memory presence check (#10213)

* Call lastFrame.getMemory().isPresent() before calling lastFrame.getMemory().get().length to avoid NPE

Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Ameziane H. <ameziane.hamlat@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: daniellehrner <daniel.lehrner@consensys.net>
Signed-off-by: Miroslav Kovar <miroslavkovar@protonmail.com>
Signed-off-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: ahamlat <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Miroslav Kovář <miroslavkovar@protonmail.com>
Co-authored-by: Vivek Singh Solanki <viveksolanki0509@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants