Skip to content

v2.5.0 candidate#1874

Merged
marcello33 merged 29 commits intomasterfrom
v2.4.0-candidate
Nov 17, 2025
Merged

v2.5.0 candidate#1874
marcello33 merged 29 commits intomasterfrom
v2.4.0-candidate

Conversation

@marcello33
Copy link
Copy Markdown
Collaborator

@marcello33 marcello33 commented Nov 12, 2025

Description

Merge v2.5.0 candidate to master

This PR represents the v2.5.0-candidate for the upcoming MadhugiriPro HF on amoy and the subsequent Madhugiri/MadhugiriPro HFs on mainnet

Raneet10 and others added 23 commits October 27, 2025 15:23
* core: naive first implmenetation of parallel block import in InsertChainStateless

* core: add logic to handle dependency while parallel import

* core: handle unknown ancestor + init some UTs

* core: implement alternative way to check for unknown ancestor

* core: defer ValidateWitnessPreState

* zero commit

* core: do sequential insert if the importing chain is small

* core: fix  error handling

* core: update UTs

* core,eth,internal/cli: add config to enable/disable parallel import + refactor

* core: add metrics for seq and parallel import

* internal/cli: moved parallelstatelessimport flag to the witness config

* core: changed debug import log to info

* core: added 2 new metrics to track the number of blocks processed in sequential and parallel stateless imports

* core: init benchmarks

* core: fix benchmarks

* core: use worker pool for parallel block import

* core: try parallel import for smaller batch

* core: dedup header verification logic

* zero commit

* core,eth,internal/cli: improvements based on comments

* core: add adversarial tests for stateless insert

* core: re-add empty chain insertion case

* zero commit to trigger CI

* core,eth/catalyst: report correct execution stats for stateless insert

* CI: temp update for running stateless tests

* zero commit to trigger CI

* zero commit to trigger CI

* CI: try running on stateless branch

* Revert "CI: try running on stateless branch"

This reverts commit 98b5704.

* zero commit to trigger CI

* core: add log for deferred exec of blocks due to invalid root err in parallel import

* core: changed log to debug

* core,eth,internal/ethapi: suppress error log for state sync when parallel import is enabled

* eth/filters: fix gomock

* eth: add missing configs

* core: retry execution in parallel import for block validator errors

* core: commit block before retrying failed execution

* core: rm redundant witness in execResult

* core: try flushing state db asap post execution

* core: add temp log when committing code

* core: enable retry for first block in batch

* Revert "core: add temp log when committing code"

This reverts commit cf63cc3.

* core: cap workers spun

* Revert "core: cap workers spun"

This reverts commit 96367ee.

* core: ensure statedb cleanup

* core: add temp debug logs

* core: add temp debug logs

* core: add temp log to track sidechain

* core: add temp log for contract code in commitAndFlush

* core: add retry for all processing and internal state db errors

* core: add state db error validation during deferred exec

* core: add TestParallelStateless_ContractDeployedThenCalled

* Revert "core: add temp log for contract code in commitAndFlush"

This reverts commit 174765f.

* Revert "core: add temp log to track sidechain"

This reverts commit 29b3366.

* Revert "core: add temp debug logs"

This reverts commit 2c4f840.

* internal/cli: turn off parallel import by default

* internal/cli: update flag identation

* CI: update comment

* zero commit to trigger CI

* internal/cli: rm witness prune flags

---------

Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
* Address-biased trie cache

* Stop preload early

* Print more stats

* Increase cache size

* Store by depth

* More customizable

* Add metrics

* Fix key format

* Async preload

* Simplify

* Fix linter

* Allow interrupt
Remove this step since the runner has 600G of disk space.
* chore: bump kurtosis-pos

* chore: bump to v1.2.1
* first working version of new state sync tx

* remove logs

* fix lint

* fix integration tests

* test fixes

* lint fix

* fix parallel processor

* type improvement and unit tests

* remove duplicates

* ignore data test output

* fixing method calls and fields

* build fix

* remove bor filter for after hf blocks

* sort logs just when necessary

* ssTxs: fix receiptsHash mismatch (#1829)

* ssTxs: fix receiptsHash mismatch

* chore: remove block hash and number

* revert: add block number

* core(tx): fix Hash method for StateSyncTxType (#1830)

* eth: fixes in receipt handling via p2p post HF (#1825)

* eth: include bor receipts in ReceiptHash post HF

* eth: rename to receiptListHash

* eth: extrat typecasting logic for better testing, fix type matching issue

* eth: add e2e tests for receipt delivery

* eth/protocols/eth: apply HF logic while handling receipt query over eth69

* core: skip split receipts post HF

* tests/bor: extend e2e test to check presence of state-sync in block

* core/types: return nil for chainID() call over state-sync tx

* internal/ethapi: handle bor txs and receipts post HF (#1834)

* fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835)

* fix: sort logs and remove duplicate append in Finalize (#1836)

* fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState

* consensus/bor: sort logs before extracting state-sync logs

* chore: revert statedb changes

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* chore: nit (#1838)

* chore: typos

* fix: lint

* Renaming to Madhugiri HF

* chore: nits

* (fix): handle pointers to receipt list received via p2p

* (chore): rename tests with HF name

* chore: more nits

* core: add blocktime in bor receipt logs (#1848)

* core/types: derive bloom for bor receipts

---------

Co-authored-by: kamuikatsurgi <shahkrishang11@gmail.com>
Co-authored-by: Krishang Shah <109511742+kamuikatsurgi@users.noreply.github.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
…1842)

* first working version of new state sync tx

* remove logs

* fix lint

* fix integration tests

* test fixes

* lint fix

* fix parallel processor

* type improvement and unit tests

* remove duplicates

* ignore data test output

* fixing method calls and fields

* build fix

* remove bor filter for after hf blocks

* sort logs just when necessary

* ssTxs: fix receiptsHash mismatch (#1829)

* ssTxs: fix receiptsHash mismatch

* chore: remove block hash and number

* revert: add block number

* core(tx): fix Hash method for StateSyncTxType (#1830)

* eth: fixes in receipt handling via p2p post HF (#1825)

* eth: include bor receipts in ReceiptHash post HF

* eth: rename to receiptListHash

* eth: extrat typecasting logic for better testing, fix type matching issue

* eth: add e2e tests for receipt delivery

* eth/protocols/eth: apply HF logic while handling receipt query over eth69

* core: skip split receipts post HF

* tests/bor: extend e2e test to check presence of state-sync in block

* core/types: return nil for chainID() call over state-sync tx

* internal/ethapi: handle bor txs and receipts post HF (#1834)

* fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835)

* fix: sort logs and remove duplicate append in Finalize (#1836)

* fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState

* consensus/bor: sort logs before extracting state-sync logs

* chore: revert statedb changes

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* chore: nit (#1838)

* chore: typos

* fix: lint

* Renaming to Madhugiri HF

* chore: nits

* (fix): handle pointers to receipt list received via p2p

* (chore): rename tests with HF name

* chore: more nits

* core: implement eip7883

* core: implement eip7825

* fix lint

* fix isOsaka condition

* fix lint and add comment for int test failing

* fix failing test / address comments

* core: add blocktime in bor receipt logs (#1848)

* core/types: derive bloom for bor receipts

* prioritize ss hf / remove todo

* fix lint

* split precompiled contracts and addresses for madhugiri HF from osaka

* revert err msg to align with geth

* eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348)

This PR makes 2 changes to how
[EIP-7825](ethereum/go-ethereum#31824) behaves.

When `eth_estimateGas` or `eth_createAccessList` is called without any
gas limit in the payload, geth will choose the block's gas limit or the
`RPCGasCap`, which can be larger than the `maxTxGas`.

When this happens for `estimateGas`, the gas estimation just errors out
and ends, when it should continue doing binary search to find the lowest
possible gas limit.

This PR will: 
- Add a check to see if `hi` is larger than `maxTxGas` and cap it to
`maxTxGas` if it's larger. And add a special case handling for gas
estimation execute when it errs with `ErrGasLimitTooHigh`

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>

* internal/ethapi: skip tx gas limit check for calls (#32641)

This disables the tx gaslimit cap for eth_call and related RPC operations.

I don't like how this fix works. Ideally we'd be checking the tx
gaslimit somewhere else, like in the block validator, or any other place
that considers block transactions. Doing the check in StateTransition
means it affects all possible ways of executing a message.

The challenge is finding a place for this check that also triggers
correctly in tests where it is wanted. So for now, we are just combining
this with the EOA sender check for transactions. Both are disabled for
call-type messages.

* internal/ethapi: use gas from gaspool for call defaults

* eth/gasestimator: check for madhugiri HF

* consensus/bor: honour MaxTxGas for system calls

---------

Co-authored-by: Lucca Martins <lucca_martins30@yahoo.com.br>
Co-authored-by: kamuikatsurgi <shahkrishang11@gmail.com>
Co-authored-by: Krishang Shah <109511742+kamuikatsurgi@users.noreply.github.com>
Co-authored-by: Manav Darji <manavdarji.india@gmail.com>
Co-authored-by: Minhyuk Kim <kimminhyuk1004@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
…block time (#1851)

* first working version of new state sync tx

* remove logs

* fix lint

* fix integration tests

* test fixes

* lint fix

* fix parallel processor

* type improvement and unit tests

* remove duplicates

* ignore data test output

* fixing method calls and fields

* build fix

* remove bor filter for after hf blocks

* sort logs just when necessary

* ssTxs: fix receiptsHash mismatch (#1829)

* ssTxs: fix receiptsHash mismatch

* chore: remove block hash and number

* revert: add block number

* core(tx): fix Hash method for StateSyncTxType (#1830)

* eth: fixes in receipt handling via p2p post HF (#1825)

* eth: include bor receipts in ReceiptHash post HF

* eth: rename to receiptListHash

* eth: extrat typecasting logic for better testing, fix type matching issue

* eth: add e2e tests for receipt delivery

* eth/protocols/eth: apply HF logic while handling receipt query over eth69

* core: skip split receipts post HF

* tests/bor: extend e2e test to check presence of state-sync in block

* core/types: return nil for chainID() call over state-sync tx

* internal/ethapi: handle bor txs and receipts post HF (#1834)

* fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835)

* fix: sort logs and remove duplicate append in Finalize (#1836)

* fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState

* consensus/bor: sort logs before extracting state-sync logs

* chore: revert statedb changes

---------

Co-authored-by: Manav Darji <manavdarji.india@gmail.com>

* chore: nit (#1838)

* chore: typos

* fix: lint

* Renaming to Madhugiri HF

* chore: nits

* (fix): handle pointers to receipt list received via p2p

* (chore): rename tests with HF name

* chore: more nits

* core: add blocktime in bor receipt logs (#1848)

* core/types: derive bloom for bor receipts

* (chore): update madhugiri block for amoy

* Change consensus block time to 1s at Madhugiri HF (#1852)

---------

Co-authored-by: Lucca Martins <lucca_martins30@yahoo.com.br>
Co-authored-by: kamuikatsurgi <shahkrishang11@gmail.com>
Co-authored-by: Krishang Shah <109511742+kamuikatsurgi@users.noreply.github.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
* Restore original RPC gas cap

* Fix test
Signed-off-by: reddaisyy <reddaisy@outlook.jp>
* chore: set madhugiri block for amoy and consensus block time

* params: bump version
Since stateless nodes are using a different pruner from the regular pruner in geth, the transaction indexer will have problem with pruned blocks, resulting hanging goroutines in memory. This change prevents stateless node from running indexer on pruned blocks.
@marcello33 marcello33 requested a review from a team November 12, 2025 09:06
Copy link
Copy Markdown
Member

@pratikspatil024 pratikspatil024 left a comment

Choose a reason for hiding this comment

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

Should we also set the HF block number before merging? Or you want to create a separate release to schedule the HF?

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 39.42857% with 848 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.91%. Comparing base (7026677) to head (a86a137).
⚠️ Report is 42 commits behind head on master.

Files with missing lines Patch % Lines
eth/filters/IBackend.go 4.46% 171 Missing ⚠️
core/blockchain.go 51.80% 129 Missing and 18 partials ⚠️
eth/ethconfig/gen_config.go 0.00% 146 Missing ⚠️
consensus/bor/bor.go 9.09% 69 Missing and 1 partial ⚠️
eth/protocols/eth/handlers.go 43.75% 34 Missing and 2 partials ⚠️
internal/cli/server/config.go 23.91% 34 Missing and 1 partial ⚠️
core/types/tx_state_sync.go 51.61% 26 Missing and 4 partials ⚠️
internal/ethapi/api.go 40.00% 21 Missing and 6 partials ⚠️
core/txpool/legacypool/legacypool.go 0.00% 22 Missing and 2 partials ⚠️
triedb/pathdb/biased_fastcache.go 88.46% 20 Missing and 4 partials ⚠️
... and 27 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1874      +/-   ##
==========================================
+ Coverage   47.69%   47.91%   +0.21%     
==========================================
  Files         839      844       +5     
  Lines      142398   143635    +1237     
==========================================
+ Hits        67915    68817     +902     
- Misses      70061    70323     +262     
- Partials     4422     4495      +73     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marcello33
Copy link
Copy Markdown
Collaborator Author

Should we also set the HF block number before merging? Or you want to create a separate release to schedule the HF?

The thing is that we haven't decided it yet
The idea was to merge this, then create a PR to master to update version and HF block height for mainnet, then release the stable version as usual. WDYT?

marcello33 and others added 3 commits November 13, 2025 11:48
* checks p256 instruction

* lint fix
* chore: MadhugiriPro hf

* params: use stable tag

* chore: set new HF heights

* Reinforce Precompile Check on any new HF (#1881)

* Include missing check of P256 on Amoy (#1877)

* checks p256 instruction

* lint fix

* reinforce precompilers check

---------

Co-authored-by: Lucca Martins <lucca_martins30@yahoo.com.br>
@marcello33 marcello33 changed the title v2.4.0 candidate v2.5.0 candidate Nov 17, 2025
@marcello33 marcello33 requested a review from a team November 17, 2025 08:43
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
4.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@marcello33 marcello33 merged commit b365efe into master Nov 17, 2025
9 of 12 checks passed
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.

9 participants