Skip to content

Improve opstack bundle execution #40

@mattsse

Description

@mattsse

the bundle trait provides transactions:

pub trait Bundle<P: Platform>:
Serialize + DeserializeOwned + Clone + Debug + Send + Sync + 'static
{
type PostExecutionError: core::error::Error + Send + Sync + 'static;
/// Access to the transactions that are part of this bundle.
fn transactions(&self) -> &[Recovered<types::Transaction<P>>];

the bundle already contains the 2718 bytes:

inner: EthSendBundle,
recovered: Vec<Recovered<types::Transaction<P>>>,

however when the bundle is executed this is currently recomputed for opstack because this is required by the evm for l1gas etc.

.transact(transaction);

note that this transact fn takes impl IntoTxEnv, so this also supports:

WithEncoded<&Recovered<T>>

currently the Recovered<Tx>::IntoTxEnv -> OpTxEnv computes the 2718 bytes again which can be avoided.

this can be done by adding another helper trait function to bundle for example, or just always operate on WithEncoded<Recovered>

or operate on impl ExecutableTx<Evm>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions