Skip to content

Merge geth v1.17.2#4416

Draft
ganeshvanahalli wants to merge 9 commits intomasterfrom
merge-v1.17.0
Draft

Merge geth v1.17.2#4416
ganeshvanahalli wants to merge 9 commits intomasterfrom
merge-v1.17.0

Conversation

@ganeshvanahalli
Copy link
Copy Markdown
Contributor

@ganeshvanahalli ganeshvanahalli commented Feb 20, 2026

pulls in OffchainLabs/go-ethereum#627 that is up-to-date with upstream go-ethereum version 1.17.2

Resolves NIT-4484
Resolves NIT-4839

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 62.85714% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.76%. Comparing base (6dce8d1) to head (30d58da).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4416      +/-   ##
==========================================
+ Coverage   52.27%   58.76%   +6.48%     
==========================================
  Files         506      506              
  Lines       73739    60407   -13332     
==========================================
- Hits        38548    35496    -3052     
+ Misses      30013    19680   -10333     
- Partials     5178     5231      +53     

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2026

❌ 8 Tests Failed:

Tests completed Failed Passed Skipped
4960 8 4952 0
View the top 3 failed tests by shortest run time
TestEndToEnd_ManyEvilValidators
Stack Traces | -0.000s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
created by github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Act in goroutine 230766
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:357 +0x1125

goroutine 181611 [select]:
github.com/offchainlabs/nitro/bold/testing/e2e.(*simpleHeaderProvider).listenToHeaders(0xc00193cb60, {0x2078620, 0xc005303a40})
	/home/runner/work/nitro/nitro/bold/testing/e2e/headers.go:33 +0x1e5
github.com/offchainlabs/nitro/util/stopwaiter.(*StopWaiterSafe).LaunchThreadSafe.func1()
	/home/runner/work/nitro/nitro/util/stopwaiter/stopwaiter.go:228 +0x82
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.9/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 178419
	/opt/hostedtoolcache/go/1.25.9/x64/src/sync/waitgroup.go:237 +0x73

goroutine 241799 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Subscription[...]).Next(0x2078620, {0x2078620?, 0xc005ac9540?})
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:130 +0xd0
github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Spawn(0xc0082ac0a0, {0x2078620, 0xc005ac9540})
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:204 +0x235
created by github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Act in goroutine 233808
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:356 +0x10bf
TestEndToEnd_ManyEvilValidators/honest_essential_edges_confirmed_by_challenge_win
Stack Traces | -0.000s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
created by github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Act in goroutine 230766
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:357 +0x1125

goroutine 181611 [select]:
github.com/offchainlabs/nitro/bold/testing/e2e.(*simpleHeaderProvider).listenToHeaders(0xc00193cb60, {0x2078620, 0xc005303a40})
	/home/runner/work/nitro/nitro/bold/testing/e2e/headers.go:33 +0x1e5
github.com/offchainlabs/nitro/util/stopwaiter.(*StopWaiterSafe).LaunchThreadSafe.func1()
	/home/runner/work/nitro/nitro/util/stopwaiter/stopwaiter.go:228 +0x82
sync.(*WaitGroup).Go.func1()
	/opt/hostedtoolcache/go/1.25.9/x64/src/sync/waitgroup.go:239 +0x4a
created by sync.(*WaitGroup).Go in goroutine 178419
	/opt/hostedtoolcache/go/1.25.9/x64/src/sync/waitgroup.go:237 +0x73

goroutine 241799 [select]:
github.com/offchainlabs/nitro/bold/containers/events.(*Subscription[...]).Next(0x2078620, {0x2078620?, 0xc005ac9540?})
	/home/runner/work/nitro/nitro/bold/containers/events/producer.go:130 +0xd0
github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Spawn(0xc0082ac0a0, {0x2078620, 0xc005ac9540})
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:204 +0x235
created by github.com/offchainlabs/nitro/bold/challenge/tracker.(*Tracker).Act in goroutine 233808
	/home/runner/work/nitro/nitro/bold/challenge/tracker/tracker.go:356 +0x10bf
TestAnyTrustRekey
Stack Traces | 8.620s run time
... [CONTENT TRUNCATED: Keeping last 20 lines]
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=2008 duration=360ns
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=1693 duration="1.192µs"
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=1691 duration=711ns
DEBUG[04-28|10:49:52.991] Unsolicited RPC response                 reqid=1695
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=1695 duration="5.62µs"
DEBUG[04-28|10:49:52.991] Executing EVM call finished              runtime=1.298867ms
DEBUG[04-28|10:49:52.991] Served eth_call                          reqid=1955 duration=1.345173ms
DEBUG[04-28|10:49:52.989] Served eth_getBlockByNumber              reqid=2062 duration="64.961µs"
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=648  duration=842ns
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=2062 duration="1.122µs"
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=1955 duration=380ns
DEBUG[04-28|10:49:52.991] Executing EVM call finished              runtime=1.210842ms
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=2537 duration=521ns
DEBUG[04-28|10:49:52.991] Served eth_call                          reqid=131  duration=1.250786ms
DEBUG[04-28|10:49:52.991] Pushed sync data from consensus to execution synced=true  maxMessageCount=7   updatedAt=2026-04-28T10:49:52+0000 hasProgressMap=false
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=131  duration=651ns
--- FAIL: TestAnyTrustRekey (8.62s)
TRACE[04-28|10:49:52.991] Handled RPC response                     reqid=2947 duration=471ns
DEBUG[04-28|10:49:52.991] Served eth_unsubscribe                   reqid=1696 duration="21.34µs"
INFO [04-28|10:49:52.991] New Key                                  name=Faucet               Address=0xaF24Ca6c2831f4d4F629418b50C227DF0885613A

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@vjoshi-maker vjoshi-maker added the after-next-version This PR shouldn't be merged until after the next version is released label Mar 10, 2026
MaxAmountOfGasToSkipStateSaving: cachingConfig.MaxAmountOfGasToSkipStateSaving,
StateScheme: cachingConfig.StateScheme,
StateHistory: cachingConfig.StateHistory,
TrienodeHistory: cachingConfig.TrienodeHistory,
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.

There's one more config added in 1.17: FullValueCheckpoint that defaults in geth to 8, while leaving this field uninitialized (so zero) disables this storage optimization.

We need to add FullValueCheckpoint config and set it's default to 8.

https://github.com/OffchainLabs/go-ethereum/blob/654d47c9b338b971159c34a77b85c8ff0203f2a8/triedb/pathdb/config.go#L75

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

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

we need to add one more new config

joshuacolvin0 and others added 4 commits March 10, 2026 12:58
Expose geth's NodeFullValueCheckpoint setting through CachingConfig,
defaulting to 8 to match geth's default. Without this, the field
was left at zero which disables the storage optimization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…int-config

Add FullValueCheckpoint config for pathdb trienode history
@ganeshvanahalli ganeshvanahalli marked this pull request as draft March 10, 2026 20:54
@ganeshvanahalli ganeshvanahalli changed the title Merge geth v1.17.0 Merge geth v1.17.2 Apr 28, 2026
@ganeshvanahalli
Copy link
Copy Markdown
Contributor Author

Note: this branch is not consensus-compatible with LatestConsensusRelease

TestBlockValidatorSimpleOnchainWithPublishedMachine fails on this branch with missing requested preimage. This is expected for a feature branch carrying a geth bump and consensus-affecting changes that haven't been packaged into a release yet. It is not a regression in this PR.

What's actually happening. The test downloads the validator binary from github.LatestConsensusRelease() and runs it against blocks produced by this branch. That binary was compiled before the merge and has neither (a) the geth v1.17.2 changes nor (b) the post-merge gas-accounting fixes added in this PR. The branch's sequencer (new code) emits blocks the published validator (old code) can't reproduce, and validation fails on the first state node whose preimage the witness didn't anticipate.

The matching local-build variant TestBlockValidatorSimpleOnchain — same workload, validator built from this branch's source — passes. So the branch is internally consistent; the published-machine test fails purely because the two binaries are different binaries, by construction.

What this PR actually contains

Non-consensus (purely local / API):

  • Build / API renames (new(core.GasPool).AddGas(N) → core.NewGasPool(N), bc.StateCache().X() → bc.X(), witness API updates, package moves like core.ErrMaxInitCodeSizeExceeded → vm.ErrMaxInitCodeSizeExceeded).
  • New BlockChain getters needed because v1.17.2 moved fields off vm.Config: StatelessSelfValidation(), EnableWitnessStats(), WasmStore().
  • NoHistoryIndexDelay: cfg.ArchiveMode plumbed into pathdb so archive mode actually serves historical state on chains with non-realtime block timestamps (e.g. tests). Plus a fix for an initerState race that was making the indexer wait 15 s before its first scan.
  • params.Rules.MaxCodeSize/MaxInitCodeSize plumbing so v1.17.2's new vm.CheckMaxCodeSize/CheckMaxInitCodeSize helpers respect per-chain ArbitrumChainParams.MaxCodeSize instead of hard-coding the protocol default.

Consensus-affecting, restoring pre-merge behaviour (these would diverge from the published validator if omitted; including them re-aligns the new code with the old):

  • header.GasUsed += result.UsedGas per tx in arbos.ProduceBlockAdvanced — replaces the *usedGas pointer that v1.17.2 dropped from ApplyTransaction.
  • In state_transition.execute() endTxNow paths now do gp.SubGas(N) + gp.ReturnGas(N, N) — bumps gp.cumulativeUsed so receipt.CumulativeGasUsed (now derived from gp.CumulativeUsed() post-v1.17.2) matches what the old *usedGas accumulator produced.
  • Gas pool restored from a pre-tx snapshot when ApplyTransactionWithResultFilter returns an error — pre-merge, a rejected tx didn't leak gas into the next receipt's CumulativeGasUsed; v1.17.2 introduced this leak; this fix removes it.
  • Gas pool snapshot/restore extended to the cascading-redeem group rollback path (Nitro-specific feature) for the same reason.

Consensus-affecting from upstream v1.17.2 itself (in the merge, not added on top of it): Amsterdam-fork rules, EIP-7623 calldata floor pricing, the new gp.cumulativeUsed accounting model, multigas WithRefund tracking, pathdb retention and history-indexer rework.

What's needed before a release

For the published-machine validator to accept code from this branch, every consensus-affecting change above (effectively, the entire v1.17.2 delta plus the four "restoring" fixes) needs to be gated behind a new ArbosVersion_* activation. Pre-activation blocks must continue to take the exact old code path so the current published machine can still validate them; only blocks at or after the activation height may use v1.17.2 semantics. This is the same upgrade pattern Nitro already uses for ArbosVersion_30, ArbosVersion_StylusFixes, ArbosVersion_FixRedeemGas, ArbosVersion_60, etc. Once that gating PR lands, a new consensus-* release can be cut from the activation point and LatestConsensusRelease() will return it; the published-machine test starts passing again automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

after-next-version This PR shouldn't be merged until after the next version is released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants