Repository navigation
eth: add fillTransaction, drop raw field - #803
MysticRyuujin merged 3 commits into
Conversation
| FilledTransaction: | ||
| oneOf: | ||
| - $ref: '#/components/schemas/Transaction4844UnsignedWithSidecar' | ||
| - $ref: '#/components/schemas/Transaction4844Unsigned' |
| type: array | ||
| items: | ||
| $ref: '#/components/schemas/bytes' | ||
| commitments: |
There was a problem hiding this comment.
We might need to update these to support the more recent cell proofs
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
| name: Transaction result | ||
| schema: | ||
| $ref: '#/components/schemas/bytes' | ||
| examples: |
There was a problem hiding this comment.
Example could have been kept btw
| value: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b' | ||
| name: Transaction result | ||
| value: | ||
| raw: '0xa3f20717a250c2b0b729b7e5becbff67fdaef7e0699da4de7ca5895b02a170a12d887fd3b17bfdce3481f10bea41f45ba9f709d39ce8325427b57afcfc994cee1b' |
There was a problem hiding this comment.
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'
There was a problem hiding this comment.
Addressed all comments, added the example and a note on proofs for post-PeerDAS
…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.
…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.
#512