feat(rpc): add eth_fillTransaction#11552
Draft
0xDevNinja wants to merge 3 commits into
Draft
Conversation
svlachakis
requested changes
May 11, 2026
svlachakis
left a comment
Contributor
There was a problem hiding this comment.
This is on hold and we expect spec changes, see our comments on the issue
Contributor
Author
|
Thanks for the quick heads-up — apologies, I missed the open discussion on the issue before opening this. Should have read the thread first. I've converted this to a Draft so it doesn't sit in the review queue while the team decides direction. Two questions raised on the issue I'd find useful to know:
Let me know what direction works. |
Contributor
|
@0xDevNinja keep it parked for now or close just the PR, whatever you prefer. Issue needs to remain open. |
Mirrors geth's response for eth_fillTransaction / eth_signTransaction: the unsigned-or-signed RLP plus the echoed transaction object.
Fills missing defaults on a partial transaction and returns the unsigned RLP alongside the filled object — matches geth and reth. Field-by-field behaviour: - from defaults to the wallet's first account when omitted; error if no wallet accounts are available. - chainId defaults to the configured network chainId. - nonce defaults to the pending nonce from the tx pool. - For EIP-1559 transactions: maxPriorityFeePerGas defaults to the gas-price oracle's priority-fee estimate; maxFeePerGas defaults to 2 * baseFee + tip. - For legacy / access-list: gasPrice defaults to the gas-price oracle estimate. - gas defaults to the eth_estimateGas result on Latest. Closes NethermindEth#11374.
Three scenarios via TestRpcBlockchain: - Legacy: nonce/gas/chainId filled when omitted; user-supplied gasPrice retained. - EIP-1559: maxFeePerGas and maxPriorityFeePerGas filled when omitted. - Raw RLP round-trips back to the same transaction.
0d124fe to
6e0f92f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11374
Changes
eth_fillTransactionRPC method that fills missing defaults on a partial transaction and returns the unsigned RLP alongside the filled object (geth / reth shape).fromdefaults to the wallet's first account; errors when no wallet accounts are available.chainIddefaults to the network chainId.noncedefaults to the pending nonce from the tx pool.maxPriorityFeePerGasfrom the gas-price oracle,maxFeePerGas=2 * baseFee + tip.gasPricefrom the gas-price oracle.gasfrometh_estimateGasonLatest.FillTransactionResult { raw, tx }data type.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Three integration tests via
TestRpcBlockchain:gasPricehonoured,nonce/gas/chainIdfilled when omitted.maxFeePerGas+maxPriorityFeePerGasfilled when omitted.to/value/gasPriceasserted).Documentation
Requires documentation update
Requires explanation in Release Notes
New JSON-RPC method
eth_fillTransaction— fills the defaults (nonce,gas, gas pricing,chainId,from) of a partial transaction and returns the unsigned RLP plus the echoed object. Matches geth and reth.Remarks
Out of scope for this PR (intentional):
eth_createAccessList).FillTransactionResulthas the same shape asSignTransactionResultfrom #11517. Happy to fold the two into one type once that lands.