-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: implement network encoding for blob transactions #4172
Conversation
Codecov Report
... and 8 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
nice, only a few nits
/// - `blobs` | ||
/// - `commitments` | ||
/// - `proofs` | ||
pub fn encode_inner(&self, out: &mut dyn bytes::BufMut) { |
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.
should this be pub?
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.
yeah this needs to be pub because eth-wire
needs to use it
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.
now is not pub any more because the types are in primitives
pub proofs: Vec<Bytes48>, | ||
} | ||
|
||
impl BlobTransactionSidecar { |
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.
we also want a fn size
some of the changes here seem like they'd be useful for #4170 |
0a61033
to
20d8138
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 great,
I want to use what's now called PooledTransactionResponse in txpool directly and suggest we move to primitives and rename
// TODO: remove this! this will be different when we introduce the blobpool | ||
let resp = PooledTransactions(transactions.into_iter().map(Into::into).collect()); |
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.
how it should work is that the pool should have a function that returns a Vec
so it would be useful to have that in primitives
e9f228c
to
cd0bb61
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.
great, some nits and q re regular typed variant
/// non-4844 signed transaction. | ||
// TODO: redo arbitrary for this encoding - the previous encoding was incorrect | ||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
pub enum PooledTransactionsElement { |
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.
I like this and the docs
/// A non-4844 signed transaction. | ||
Transaction(TransactionSigned), |
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.
hmm, this now also has eip4844 as a variant, does it support decoding them without the sidecar?
This should be an invalid response, right?
should we flatten the variants?
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.
opened this
#4238
/// non-4844 signed transaction. | ||
// TODO: redo arbitrary for this encoding - the previous encoding was incorrect | ||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
pub enum PooledTransactionsElement { |
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.
I'd like to move this to pooled.rs
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.
moved
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
9b256dc
to
e1ad9fb
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.
lgtm, we likely need a few followups but this should unblock us now
This implements network encoding and decoding methods for the
BlobTransaction
method. The type is refactored to include aBlobSidecar
type.TODO:
TransactionSigned
inPooledTransaction