Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Fast state revert for single-tx bundles #6

Open

Description

@Ruteri

Rationale

Currently we are copying the state every time we are about to apply a bundle, as multi-tx bundles can't be handled with a revert to snapshort.
It should be beneficial to have a special case for single-tx bundles that avoids the state copy.

Activity

  1. simon-saliba commented on Nov 25, 2022

    @simon-saliba

    Hello !

    I'm looking into this issue, and I hope I can contribute somehow :)

    I have a question please. I can't wrap my head around why it doesn't work to take a snapshot of the state before applying any bundle transactions and then revert to this snapshot if any one of the transactions fail. Why do we copy the state n times, right before applying every transaction?

    Thanks :)

  2. Ruteri commented on Nov 28, 2022

    @Ruteri
    CollaboratorAuthor

    Hello :)

    why it doesn't work to take a snapshot of the state before applying any bundle transactions and then revert to this snapshot if any one of the transactions fail

    It could, but geth only allows reverts before you commit. So you'd have to not commit any of the intermediate transactions, and either revert or commit at the end. I think it's the best way, but there are a couple of corner cases (deleting empty objects in particular).
    Try it out and see where it fails right now!

  3. added a commit that references this issue on Feb 7, 2023
  4. added a commit that references this issue on Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions