Welcome to the next crypto level
← Nexorena

Ethereum

Reth adjusts connection handling and rejected-block diagnostics

Two changes merged into the Ethereum client’s repository on November 8 adjust the order of network event processing and allow a rejected block’s transactions to be replayed up to the first invalid one.

Nexorena Editorial Team

Reth adjusts connection handling and rejected-block diagnostics

New connections get a turn under load

The Reth Ethereum execution client merged a change to its network loop on November 8. Active session events still take priority. After 16 consecutive active events, however, the session manager checks pending sessions once before resuming its normal priority. This rule addresses the case in which messages from established connections keep arriving and leave few opportunities for a new session to progress. The change affects the order in which the node polls events.

The same threshold of 16 events applies at another level of the loop. After a run of session events, the code gives the incoming connection listener priority once. If the listener has no event, the loop can continue handling sessions. The threshold is a count of events. It does not set a time limit in seconds, and the code still checks whether the node has the capacity to accept an incoming peer.

The debugger can replay a rejected block

Another change merged the same day concerns the `debug_intermediateRoots` debugging method. It replays a block’s transactions and returns intermediate state roots, fingerprints that represent the state after each processed transaction. When the normal lookup by block identifier returns no result, the client now checks its local store of rejected blocks. A block held there can therefore be analyzed even though the execution engine rejected it.

Replay stops at the first transaction that raises a validation error. The response can thus contain the roots calculated before that transaction and have fewer entries than the block has transactions. The code distinguishes this case from other execution errors, which still return an error. If the lookup also fails in the node’s rejected-block store, the method still returns an error saying that the header was not found.

The two changes affect different parts of the client

The first affects exchanges between the node and its peers, where connection requests and messages from active sessions share the processing loop. The second concerns an interface used to analyze the execution of a block. When investigating a discrepancy, a partial list of roots makes it possible to compare the states obtained before the point of rejection. The method remains a diagnostic tool that depends on the blocks and state available to the node being queried.

Both changes are on the main branch of the Reth repository. The merged pull requests describe the code changes and the expected behavior. They do not identify which operators already run them. Relating an observation in production to either change therefore requires identifying the client version or commit that handled the connection or answered the debug request.

Written with love byRyan MitchellMeet this editorial pen name ↗

Explorer Nexorena