-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
eth_sendRawTransactionConditional L2 RPC endpoint #13762
Open
oac1771
wants to merge
3
commits into
paradigmxyz:main
Choose a base branch
from
oac1771:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 can't implement this default like this because we need to actually handle the conditionals.
can we start with a new helper type in
reth/crates/optimism/rpc/Cargo.toml
Line 2 in 5db0129
instead, that wraps
P: Pool
?like
struct L2TransactionConditional<P>{ pool: P}
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.
Based on the impl in op-geth, we don't check the conditional in the pool since that means repeated state checks as transactions are reinserted in the pool.
Instead we check the conditional at the rpc layer preemptively to the pool and at the block building process. The transaction has a mutable
rejected
field, set by the that is used to drive eviction in the mempool (also being used in the interop feature)still wrapping my head around the different modules integrate with each other in this code. If a similar mutable approach is possible with
OpTransactionSigned
or if there is a nicer idiomatic way for the payload builder to better surface a list of non-included tx that should be evicted the mempoolThere 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.
let's start with my suggestion and I'll leave more instructions once we have that placeholder
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.
oh nice I didn't see #13806, I was making the same exact change to
OpPooledTransaction
to manage some external state. Let me pull that in.I'll create a separate PR (hopefully tomorrow) so we can discuss from there separately from there. Can you briefly elaborate on why we'd need
L2TransactionConditional<P> { pool: P }
? I'm not fully following a change to the api. In the draft I have I simply have anOption<TransactionConditional>
field onOpTransactionSigned
so afaik pool api should have to be wrapped at all since the pool transactions are already typed.Unless you were thinking
OpSignedTransaction
is untouched and the pool has a separate submission api for these txs.I think a draft a small diff in the optimism crate will help clarify. Will get this out super soon!
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.
hey @mattsse, I opened this brief draft PR #13926 with a few comments/questions.
Would appreciate your thoughts and I can dig into an implementation from there