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

Fast state revert for single-tx bundles #6

Open
Ruteri opened this issue Nov 22, 2022 · 2 comments
Open

Fast state revert for single-tx bundles #6

Ruteri opened this issue Nov 22, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Ruteri
Copy link
Collaborator

Ruteri commented Nov 22, 2022

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.

@Ruteri Ruteri added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Nov 22, 2022
@simon-saliba
Copy link

simon-saliba commented Nov 25, 2022

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 :)

@Ruteri
Copy link
Collaborator Author

Ruteri commented Nov 28, 2022

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!

avalonche pushed a commit that referenced this issue Feb 7, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
avalonche pushed a commit that referenced this issue Mar 9, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
avalonche pushed a commit that referenced this issue Mar 15, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
avalonche pushed a commit that referenced this issue Mar 17, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
avalonche pushed a commit that referenced this issue Mar 22, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
avalonche pushed a commit that referenced this issue Jul 6, 2023
* Implement block validation API

* Validate proposer payment assuming its the last transaction in the block (#4)

* Validate that the coinbase and feeRecipient are not blacklisted (#5)

* Validate that the proposer payment has no calldata and its gas usage (#6)

* Validate gas limit is set correctly wrt registered (#8)

* Pass validation-specific config (#9)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants