rpc: preserve ordinary constructor replay context in overlay_callConstructor
Maintainers usually reply within 1 day
@lupin012 is already working on this.
Since Nov 16, 2026.
Assessment
This issue has not been assessed yet.
Description
Follow-up to #25602, limited to the ordinary creation transaction executed by overlay_callConstructor.
The method replaces the ordinary transaction's gas allowance with the RPC cap and enables internal gas bailout, so its sender pays no gas fees. For a top-level deployment it also replaces the message's initcode before intrinsic gas is calculated. The replacement constructor can therefore observe balances and gas conditions that differ from the original creation context. Frame transactions already retain their signed budgets and normal fee accounting.
A focused reproduction uses a sender with 1,000,000 wei, an ordinary creation transaction with gas limit 100,000 and gas price 2 wei, and replacement initcode returning the sender's balance. With an RPC cap of 1,000,000, both top-level and factory creation return 1,000,000 wei. Replaying the original fee charge would return 800,000 wei. This reproduces with the constructor changes deferred from #25602.
Proposed work:
- Replay the original ordinary transaction, including its fees, intrinsic gas and earlier execution, until the target CREATE or CREATE2.
- Use the existing creation tracer to run the replacement constructor with a separate RPC allowance, without charging that allowance as the original transaction's fee budget.
- Define whether the original transaction must also fit within the RPC cap, and report a cap error directly if that policy is adopted. Preserve cap-zero handling.
- Cover top-level and factory creation, fee-sensitive replacement code, intrinsic gas, and finite/unlimited caps. Document the change in observable overlay behaviour.
The shared block replay and frame-transaction fixes remain in #25602. This issue does not restore the public gasBailOut tracing argument.
- Dominant language
- Go
- Stars
- 3.6k
- Forks
- 1.6k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 820
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from erigontech/erigon
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
erigontech/erigon#26523 ·
Maintainers usually reply within 1 day
-
flaky test
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
erigontech/erigon#26230 ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: pending nonce counts past gaps in the poolPossibly taken @yperbasis claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
erigontech/erigon#26014 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
tracing: expose custom error selector and raw payload in callTracer revertReasonPossibly taken @lupin012 claimed this 9 days ago. OpenRPC
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
erigontech/erigon#25928 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
txnprovider/txpool: remove redundant blob/commitment length checkPossibly taken @yperbasis claimed this 14 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
erigontech/erigon#25432 ·
Maintainers usually reply within 1 day
All issues in erigontech/erigon
Similar issues
-
enhancement exporter/awskinesis needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-collector-contrib#53334 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
SocialGouv/iterion#3376 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
seaweedfs/seaweedfs#12740 · 2 comments ·
Maintainers usually reply within 1 day
-
area:indexer bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
seanb4t/codegraph-go#385 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day