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

Modular ideas: split bundler, mempool and rpc into 3 crates. #88

Closed
zsluedem opened this issue Mar 27, 2023 · 4 comments · Fixed by #110
Closed

Modular ideas: split bundler, mempool and rpc into 3 crates. #88

zsluedem opened this issue Mar 27, 2023 · 4 comments · Fixed by #110
Assignees
Labels
high priority This should be done soon

Comments

@zsluedem
Copy link
Collaborator

Currently, we got everything in the aa-bundler crate.

Maybe we could separate these bundler, mempool and rpc into 3 crates and publish it for other rust developers to depend on.

Generally I am talking to change Cargo.toml into

[workspace]
members = [
    "bundler",
    "mempool",
    "rpc",
]

@Vid201 It is more like a discussion now and I am curious how you think about it.

Shortcoming:
A lot of code changes.

@zsluedem
Copy link
Collaborator Author

@Vid201 Another idea about implementing reusable modular components. This is related to #78 (comment).

I think we should have an orchestor which manage the UoPool, Bundler. The idea is instead of having UoPool support multiple pool internally, we should keep UoPool simple and it should work with single pool and this orchestor could compose serveral UoPool and several Bundlers and even several rpc inside. IMO, putting several MemPool in one big UoPool struct doesn't provide flexible modular reusable crate.

@Vid201
Copy link
Member

Vid201 commented Mar 27, 2023

I think that's a great idea, it makes the bundler much more modular and easier to mess around with different components in other projects.

As we talked about, I think the best approach would be to start small, with first moving some pieces to primitives crate and then building out bundler, mempool, and rpc crates. We can also add some more if it makes sense.

@Vid201 Vid201 added the high priority This should be done soon label Apr 2, 2023
@Vid201
Copy link
Member

Vid201 commented Apr 14, 2023

I think this project structure would make sense. What do you think @zsluedem ? Am I missing something?

bin

  • bundler

crates

  • contracts
  • primitives
  • bundler
  • mempool
    -- canonical (sanity checks and simulation for canonical mempool)
    -- memory
    -- database
  • proto
  • rpc

@zsluedem
Copy link
Collaborator Author

Looks good to me.

@Vid201 Vid201 self-assigned this Apr 23, 2023
@Vid201 Vid201 linked a pull request Apr 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority This should be done soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants