-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: prevent CREATE tx for EIP-4844 types #8291
fix: prevent CREATE tx for EIP-4844 types #8291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty, pending @joshieDo
I believe this should be okay.
/// The 160-bit address of the message call’s recipient. | ||
pub to: Address, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshieDo please check if this is sound:
ref #7276 (comment)
this is most likely not sound. Changing this to Note the cargo expansion below
#[allow(clippy::identity_op)]
pub struct TxEip4844Flags {
bytes: [::core::primitive::u8; {
((({
0usize + <B4 as ::modular_bitfield::Specifier>::BITS
+ <B4 as ::modular_bitfield::Specifier>::BITS
+ <B4 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B1 as ::modular_bitfield::Specifier>::BITS
+ <B6 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B6 as ::modular_bitfield::Specifier>::BITS
} - 1) / 8) + 1) * 8
} / 8usize], this branch: #[allow(clippy::identity_op)]
pub struct TxEip4844Flags {
bytes: [::core::primitive::u8; {
((({
0usize + <B4 as ::modular_bitfield::Specifier>::BITS
+ <B4 as ::modular_bitfield::Specifier>::BITS
+ <B4 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B6 as ::modular_bitfield::Specifier>::BITS
+ <B5 as ::modular_bitfield::Specifier>::BITS
+ <B7 as ::modular_bitfield::Specifier>::BITS
} - 1) / 8) + 1) * 8
} / 8usize], Note the missing bit on this branch macro expansion. |
Co-authored-by: joshieDo <[email protected]>
d7fc72c
to
20e587d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a bit ugly,
I wonder if we could actually replace the tx types with alloy now and add some compact glue code?
Co-authored-by: joshieDo <[email protected]>
EIP-4844 transactions have a restriction that they should not allow CREATE transactions.
In this PR the
to
field inTxEip4844
is changed fromTxKind
toAddress
, so that it can't be decoded intoTxKind::Create
.