reth
reth copied to clipboard
fix: mandatory `to` for EIP-4844
Closes #7273
Changes TransactionKind to Address
Currently EthApi::send_transaction will throw ConflictingFeeFieldsInRequest not only in case of conflicting fee fields but also when blob transaction is missing blob fields or to, perhaps this error should be more specific?
As it is, it does. At the moment main will only read 20 bytes to decompress an address if TransactionKind is Call.
However, we could replicate this behaviour by manually implementing Compact for Address and replicating the same behaviour. Only read 20 bytes if the address is not 0x0
As it is, it does. At the moment
mainwill only read 20 bytes to decompress an address ifTransactionKindisCall.However, we could replicate this behaviour by manually implementing
Compactfor Address and replicating the same behaviour. Only read 20 bytes if the address is not 0x0
sorry, not following yet, Address is already Compact.
all blob txs have Kind::Call
friendly bump @joshieDo
context:
Compact encodes to <bitflags><buffer>.
TransactionKind occupies 1 bit on the bitflag header of this transaction type.
On decoding, if the bit is set: we read 20 bytes, otherwise we don't.
issue:
If we replace this type by only Address, old transactions will still have that bit. I'm not sure how big is the bitflags header, it may have no impact.
But if in the future we add a new field to this type that uses some bitflag, then old transactions would read that bit even though it's unrelated.
superseded by #8291