Skip to content

Conversation

@manuelmauro
Copy link
Contributor

@manuelmauro manuelmauro commented Dec 17, 2025

⚠️ Breaking Changes ⚠️

The previous implementation was not compliant with the Ethereum specs, thus the new (compliant) behavior might be considered a breaking change with regard to previous assumptions.

In particular, while the current implementation in case of a reorg just returns the new head with a parent hash that was never mentioned within the subscription, the new behavior according to the specs is as follows:

"When a chain reorganization occurs, this subscription will emit an event containing all new headers (blocks) for the new chain. This means that you may see multiple headers emitted with the same height (block number), and when this happens the later (highest) block number should be taken as the correct one after a reorganization."

What does it do?

Guarantees spec compliance of eth_subscribe's newHeads.

More information here:https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB/7a0c1704737ece636aabda1d08d43f96dd1a619f#newheads

Relevant PRs

@manuelmauro manuelmauro self-assigned this Dec 17, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 17, 2025

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • agent-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@manuelmauro manuelmauro added B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D2-notlive PR doesn't change runtime code (so can't be audited) breaking Needs to be mentioned in breaking changes labels Dec 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

WASM runtime size check:

Compared to target branch

Moonbase runtime: 2108 KB (no changes) ✅

Moonbeam runtime: 2232 KB (no changes) ✅

Moonriver runtime: 2232 KB (no changes) ✅

Compared to latest release (runtime-4100)

Moonbase runtime: 2108 KB (+172 KB compared to latest release) ⚠️

Moonbeam runtime: 2232 KB (+200 KB compared to latest release) ⚠️

Moonriver runtime: 2232 KB (+200 KB compared to latest release) ⚠️

@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

Coverage Report

@@                                      Coverage Diff                                      @@
##           master   manuel/test-for-spec-compliance-of-eth-subscribe-new-heads     +/-   ##
=============================================================================================
  Coverage   76.65%                                                       76.65%   0.00%     
  Files         389                                                          389             
  Lines       76440                                                        76440             
=============================================================================================
  Hits        58595                                                        58595             
  Misses      17845                                                        17845             
Files Changed Coverage

Coverage generated Thu Jan 8 10:50:06 UTC 2026

@manuelmauro manuelmauro changed the title Test spec compliance of eth_subzscribe's newHeads Test spec compliance of eth_subscribe's newHeads Dec 18, 2025
@manuelmauro manuelmauro changed the title Test spec compliance of eth_subscribe's newHeads Guarantee spec compliance of eth_subscribe's newHeads Dec 18, 2025
@manuelmauro manuelmauro marked this pull request as ready for review December 19, 2025 14:15
@manuelmauro manuelmauro requested a review from RomarQ January 8, 2026 10:43
@manuelmauro manuelmauro merged commit 00b9844 into master Jan 8, 2026
41 checks passed
@manuelmauro manuelmauro deleted the manuel/test-for-spec-compliance-of-eth-subscribe-new-heads branch January 8, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes breaking Needs to be mentioned in breaking changes D2-notlive PR doesn't change runtime code (so can't be audited)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants