Skip to content

eth: add fillTransaction, drop raw field - #803

Merged
MysticRyuujin merged 3 commits into
ethereum:mainfrom
bomanaps:eth-filltransaction-drop-raw-from-result
Jul 24, 2026
Merged

MysticRyuujin merged 3 commits into
ethereum:mainfrom
bomanaps:eth-filltransaction-drop-raw-from-result

Conversation

@bomanaps

Copy link
Copy Markdown
Contributor

Comment thread src/schemas/transaction.yaml Resolved
FilledTransaction:
oneOf:
- $ref: '#/components/schemas/Transaction4844UnsignedWithSidecar'
- $ref: '#/components/schemas/Transaction4844Unsigned'

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.

Want 7702 tx too

type: array
items:
$ref: '#/components/schemas/bytes'
commitments:

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.

We might need to update these to support the more recent cell proofs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for the post-PeerDAS sidecar shape would you prefer we mirror the engine API pattern with a separate Transaction4844UnsignedWithSidecarV2 cell proofs variant added alongside the existing one in FilledTransaction.oneOf, replace the current proofs field outright since the spec ships through-fork, or keep proofs as bytes[] with a fork conditional description?

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.

Having looked at this again: I think we can just add a comment that for post-PeerDAS the proofs field is expected to contain the cell proofs if provided and its length == 128 * len(blobs).

Comment thread src/eth/sign.yaml
name: Transaction result
schema:
$ref: '#/components/schemas/bytes'
examples:

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.

Example could have been kept btw

@bomanaps
bomanaps requested a review from s1na May 31, 2026 10:21
Comment thread src/eth/sign.yaml Outdated
value: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b'
name: Transaction result
value:
raw: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b'

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.

I generated an example which has also the tx object with a valid signature:

    examples:
      - name: eth_signTransaction example
        params:
          - name: Transaction
            value:
              from: '0x9d8a62f656a8d1615c1294fd71e9cfb3e4855a4f'
              nonce: '0x9'
              to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567'
              gas: '0x76c0'
              gasPrice: '0x9184e72a000'
              value: '0x9184e72a'
              input: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
        result:
          name: Transaction result
          value:
            raw: '0xf892098609184e72a0008276c094d46e8dd67c5d32be8058bb8eb970870f07244567849184e72aa9d46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f07244567526a0839ebaab7774ffdae60d418fc8b4192d2cb861ac31acbb5fef2602
  7d1b8f10aea015396a78493395691c10fccc33ec13f2eeb96a3ba2b4ca1652c91bb2b348d12b'
            tx:
              type: '0x0'
              chainId: '0x1'
              nonce: '0x9'
              to: '0xd46e8dd67c5d32be8058bb8eb970870f07244567'
              gas: '0x76c0'
              gasPrice: '0x9184e72a000'
              value: '0x9184e72a'
              input: '0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675'
              v: '0x26'
              r: '0x839ebaab7774ffdae60d418fc8b4192d2cb861ac31acbb5fef26027d1b8f10ae'
              s: '0x15396a78493395691c10fccc33ec13f2eeb96a3ba2b4ca1652c91bb2b348d12b'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed all comments, added the example and a note on proofs for post-PeerDAS

@bomanaps
bomanaps requested a review from s1na June 2, 2026 14:02

@s1na s1na left a comment

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.

LGTM

@svlachakis svlachakis left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@MysticRyuujin
MysticRyuujin merged commit d24f58b into ethereum:main Jul 24, 2026
5 checks passed
mmv08 added a commit to mmv08/viem that referenced this pull request Nov 2, 2026
…ater

The execution-apis spec has `eth_fillTransaction` return `gasPrice` on
EIP-1559 transactions, set equal to `maxFeePerGas` and marked
deprecated (ethereum/execution-apis#803). It
reports what the transaction would pay. It is not a fee to send back.
Anvil follows the spec. `fillTransaction` kept the field, so
`fillTransaction` and `prepareTransactionRequest` returned both fee
fields together. Geth, reth and Anvil 1.8.5 and later reject a request
that has both, with "both gasPrice and (maxFeePerGas or
maxPriorityFeePerGas) specified". This broke:

- `sendTransaction` with a JSON-RPC account, given a request from
  `prepareTransactionRequest`.
- `estimateGas` with a local account, when called with `gas`, or with a
  `prepare` list and a block or state override.

`fillTransaction` now drops `gasPrice` when the filled transaction has
`maxFeePerGas`. Geth and reth leave the field out today. This change
also covers them once they follow the spec. Anvil ignores `type: 0x0`
and `0x1` in fill requests and returns a type-2 transaction. So on
Anvil, legacy and EIP-2930 requests now take their `gasPrice` from
Viem's own estimate, as they already did on Geth and reth.
jxom pushed a commit to wevm/viem that referenced this pull request Nov 2, 2026
…ater (#5378)

The execution-apis spec has `eth_fillTransaction` return `gasPrice` on
EIP-1559 transactions, set equal to `maxFeePerGas` and marked
deprecated (ethereum/execution-apis#803). It
reports what the transaction would pay. It is not a fee to send back.
Anvil follows the spec. `fillTransaction` kept the field, so
`fillTransaction` and `prepareTransactionRequest` returned both fee
fields together. Geth, reth and Anvil 1.8.5 and later reject a request
that has both, with "both gasPrice and (maxFeePerGas or
maxPriorityFeePerGas) specified". This broke:

- `sendTransaction` with a JSON-RPC account, given a request from
  `prepareTransactionRequest`.
- `estimateGas` with a local account, when called with `gas`, or with a
  `prepare` list and a block or state override.

`fillTransaction` now drops `gasPrice` when the filled transaction has
`maxFeePerGas`. Geth and reth leave the field out today. This change
also covers them once they follow the spec. Anvil ignores `type: 0x0`
and `0x1` in fill requests and returns a type-2 transaction. So on
Anvil, legacy and EIP-2930 requests now take their `gasPrice` from
Viem's own estimate, as they already did on Geth and reth.
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.

4 participants