-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
draft(optimism): sendRawTransactionConditional #13926
base: main
Are you sure you want to change the base?
draft(optimism): sendRawTransactionConditional #13926
Conversation
@@ -10,6 +10,10 @@ pub struct RollupArgs { | |||
#[arg(long = "rollup.sequencer-http", value_name = "HTTP_URL")] | |||
pub sequencer_http: Option<String>, | |||
|
|||
/// Enable transaction conditional support on sequencer | |||
#[arg(long = "rollup.sequencer-transaction-conditional-enabled", default_value = "false")] |
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.
let's rename this to enable-transaction-conditional
/// Indiciator if this transaction has been marked as rejected | ||
rejected: AtomicBool // (is AtomicBool appropriate here?) |
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 remove this for now, because we'll handle eviction differently
|
||
/// Optional conditional attached to this transaction. Is this | ||
/// needed if this field is on OpTransactionSigned? | ||
conditional: Option<TransactionConditional>, |
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.
yes we need this field here.
this option is also fine because this tx type is always wrapped in an Arc so it's always on the heap anyway
|
||
/// Can we attach a conditional the moment a transaction is deserialized? | ||
pub conditional: Option<TransactionConditional> |
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 we shouldn't do, because this is a representation fo the actual tx type and shouldn't be annotated with out of protocol data
} | ||
|
||
// TEMPORARY since TransactionConditional does not impl eq |
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.
mind submitting a pr on alloy for this?
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.
yes definitely
Leaving a few comments in the different places that might require changes. Will flesh out an implementation after a soft approval/guidance in the right direction
OpTransactionSigned
/OpPooledTransaction
. References toconditional
and notion ofrejected
OpTransactionSigned
. We need reference to the conditional to validate duringexecute_best_transactions
and a means to invalidate from the pool.L2EthApiExt
&OpTransactionSigned
: Can the conditional be attached as an optional field on the deserialized tx? This waypool::add_transaction
is simply used. Or should a pool wrapper have a separate interface for submission.PoolWrapper -> If we wrap the
Pool
interface, should this filter out the rejected txs and in a background task remove them from the pool?validate_one
which would duplicate the conditional checks