Skip to content

geth upstream v1.16.4#1839

Merged
marcello33 merged 516 commits intodevelopfrom
mardizzone/upstream-v1.16.4
Jan 29, 2026
Merged

geth upstream v1.16.4#1839
marcello33 merged 516 commits intodevelopfrom
mardizzone/upstream-v1.16.4

Conversation

@marcello33
Copy link
Copy Markdown
Collaborator

@marcello33 marcello33 commented Oct 26, 2025

Description

Merge geth upstream v1.16.4.

Block height for Osaka related code to be enabled and activated (as previously done for Madhugiri), in case we decide to support the remaining EIPs. The only one left requiring a HF is EIP-7939

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on amoy
  • I have created new e2e tests into express-cli

cuiweixie and others added 30 commits September 19, 2025 17:05
before:
go test -run=^$ -bench=. ./log -timeout=1h 12.19s user 2.19s system 89%
cpu 16.025 total
after:
go test -run=^$ -bench=. ./log -timeout=1h 10.64s user 1.53s system 89%
cpu 13.607 total

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
before:
go test -run=^$ -bench=. ./core/vm/... -timeout=1h 1841.87s user 40.96s
system 124% cpu 25:15.76 total
after:
go test -run=^$ -bench=. ./core/vm/... -timeout=1h 1588.65s user 33.79s
system 123% cpu 21:53.25 total

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
before:
go test -run=^$ -bench=. ./core/types 47.80s user 2.18s system 102% cpu
48.936 tota

after:
go test -run=^$ -bench=. ./core/types 42.42s user 2.27s system 112% cpu
39.593 total
before:
go test -run=^$ -bench=. ./crypto/... 94.83s user 2.68s system 138% cpu
1:10.55 tota

after:
go test -run=^$ -bench=. ./crypto/... 75.43s user 2.58s system 123% cpu
1:03.01 total
Fix typo in test error message where "MustParseBig" was incorrectly 
used instead of "MustParseUint64" in the TestMustParseUint64Panic 
function. 

The test still functions correctly, but now the error message 
accurately reflects the function being tested.
Remove redundant duplicate test vectors. The two entries were identical
and back-to-back, providing no additional coverage while adding noise.
Keeping a single instance maintains test intent and clarity without
altering behavior.
… correctly (#32627)

Fix the t.Fatalf format arguments in TestBadBlockStorage to match the
intended #index output. Previously, the left number used i+1 and the
right index used the block number, producing misleading diagnostics.
Correct mapping improves test failure clarity and debuggability.
A PR in the specs repo broke our existing links:
ethereum/execution-specs#1416

This PR fixes it and adds the Prague and Osaka specs.
…ansactions (#32656)

This pull request introduces a queue for legacy sidecar conversion to
handle transactions that persist after the Osaka fork. Simply dropping 
these transactions would significantly harm the user experience.

To balance usability with system complexity, we have introduced a
conversion time window of two hours post Osaka fork. During this period, 
the system will accept legacy blob transactions and convert them in a 
background process.

After the window, all legacy transactions will be rejected. Notably, all
the blob transactions will be validated statically before the conversion, 
and also all conversion are performed in a single thread, minimize the risk 
of being DoS.

We believe this two hour window provides sufficient time to process
in-flight legacy transactions and allows submitters to migrate to the 
new format.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Print the `Truncating from head` log only if head truncation is needed.
https://go.dev/ref/mod#go-work-file advises against checking `go.work`
files because they can interfere with local development. We added the
workspace file in order to make `go test` and other tools work across
multiple modules. But it seems to cause weird issues with the
`go.work.sum` file being modified, etc.

So with this PR, we instead run all the `ci.go` commands for all modules
in the workspace manually.
This change replaces wrapping a stale outer err with the iterator’s own
error after Next(), and switches the post-BlockAndReceipts() check to
use the returned err. According to internal/era iterator contract,
Error() should be consulted immediately after Next() to surface
iteration errors, while decoding errors from Block/Receipts are returned
directly. The previous code could hide the real failure (using nil or
unrelated err), leading to misleading diagnostics and missed iteration
errors.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
…as calculation (#32714)

The parent header was missing the BaseFee field when calculating the
reserve price for EIP-7918 in the Osaka fork, causing a nil pointer
dereference. This fix ensures BaseFee is properly set from ParentBaseFee
in the environment.

Added regression test case 34 to verify Osaka fork blob gas calculation
works correctly with parent base fee.
This adds the conversion for the legacy sidecar if these
transactions are reorged out after the osaka.
This PR fixes the fork detection of `eth_simulateV1`, particularly
for networks that are post-merge since genesis, like Hoodi.
This fixes `go run build/ci.go install`. It was failing because we
resolved all main packages by parsing sources, which fails when the
source directory contains multiple modules.
This implements the conversion of existing blob transactions to the new proof 
version. Conversion is triggered at the Osaka fork boundary. The conversion is 
designed to be idempotent, and may be triggered multiple times in case of a reorg 
around the fork boundary. 

This change is the last missing piece that completes our strategy for the blobpool 
conversion. After the Osaka fork,

- new transactions will be converted on-the-fly upon entry to the pool
- reorged transactions will be converted while being reinjected
- (this change) existing transactions will be converted in the background

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
- Correct the error message in TestOneElementProof to expect 'v' instead
of 'k'.
- The trie is updated with key "k" and value "v"; on mismatch the
expected value must be 'v'.
- Aligns the message with the actual test logic and other similar checks
in this file, reducing confusion during test failures. No behavioral
changes.
Replace time.After with a long‑lived time.Ticker in KeyStore.updater, preventing per‑iteration timer allocations and potential timer buildup.

Co-authored-by: lightclient <lightclient@protonmail.com>
Fixes race in WaitDeploy test where the backend is closed before goroutine using it wraps up.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
This adds overrides to the cli for BPO1 and BPO2.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This is a small improvement on #32656 in case Add was called with
multiple type 3 transactions, adding transactions to the pool one-by-one
as they are converted.

Announcement to peers is still done in a batch.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
@claude
Copy link
Copy Markdown

claude bot commented Jan 27, 2026

Claude finished @marcello33's task in 25s —— View job


Acknowledging Review Feedback

  • Review and acknowledge responses to each safety concern
  • Provide final assessment

Thank you for the clarifications on each of the safety concerns:

# Concern Response Status
1 Binary Trie Implementation Will be tested before enabling ✅ Accepted
2 Blob Transaction V0→V1 Conversion Bor doesn't use blobs ✅ Not applicable
3 PathDB History Refactoring Ported from upstream ✅ Accepted
4 Witness Format Change Green light from @lucca30 ✅ Resolved
5 Future Blocks Removal Acknowledged as OK ✅ Accepted
6 Precompile Interface Change Handled in PR ✅ Addressed
7 Missing CLI Flag Port Ported TrieJournalDirectory and EnableStateSizeTracking ✅ Fixed

Final Assessment

All safety concerns have been addressed:

The PR looks good to merge from a safety perspective. The positive performance improvements (database inspection parallelization, BigModExp optimization, atomic pointers for blob pool) remain as benefits.

--- | Branch: mardizzone/upstream-v1.16.4

@marcello33 marcello33 requested a review from a team January 27, 2026 10:30
Copy link
Copy Markdown
Member

@kamuikatsurgi kamuikatsurgi left a comment

Choose a reason for hiding this comment

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

LGTM, left a que, and also would be great if we could enable witness stats, seems like something we could benefit in the long run, wdyt?

Copy link
Copy Markdown
Member

@manav2401 manav2401 left a comment

Choose a reason for hiding this comment

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

LGTM at a high level.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
12 Security Hotspots

See analysis details on SonarQube Cloud

@marcello33
Copy link
Copy Markdown
Collaborator Author

LGTM, left a que, and also would be great if we could enable witness stats, seems like something we could benefit in the long run, wdyt?

I agree. I'd just won't do it straight away. Maybe we can release this and enable it on some nodes in amoy to test it out.

@marcello33 marcello33 merged commit 0caee33 into develop Jan 29, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not squash and merge This PR will be NOT be squashed and merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.