Skip to content
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

Refactor: move mempool to blockchain struct #2072

Closed
mpaulucci opened this issue Feb 25, 2025 · 0 comments · Fixed by #2089
Closed

Refactor: move mempool to blockchain struct #2072

mpaulucci opened this issue Feb 25, 2025 · 0 comments · Fixed by #2089
Assignees
Labels
L1 Ethereum client mempool Issues related to mempool tech debt Refactors, cleanups, etc

Comments

@mpaulucci
Copy link
Collaborator

mpaulucci commented Feb 25, 2025

we store the mempool in memory, so it doesn't make sense to have it as part of storage. Instead, is should be encapsulated inside the blockchain object.

We should probably wait for a few prs to go in to avoid merge conflicts, like:
#1990

@mpaulucci mpaulucci added L1 Ethereum client tech debt Refactors, cleanups, etc labels Feb 25, 2025
@mpaulucci mpaulucci added the mempool Issues related to mempool label Feb 25, 2025
@LeanSerra LeanSerra self-assigned this Feb 25, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 27, 2025
**Motivation**

The `mempool` is currently stored in the `Store` struct, it makes more
sense to have it in the `Blockchain` struct

**Description**

- Move all the functions related to mempool to a new struct called
`Mempool` that implements all the functions related to the mempool.
- To add new transactions to the mempool we need to do some validations,
for this we need access to the store so some mempool functions are
exposed by the blockchain struct
   - `Blockchain::add_transaction_to_pool`, 
   - `Blockchain::add_blob_transaction_to_pool`
   - `Blockchain::remove_transaction_from_pool`

Closes #2072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L1 Ethereum client mempool Issues related to mempool tech debt Refactors, cleanups, etc
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants