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

Example of bundler with single entry point running in single process #78

Open
Vid201 opened this issue Mar 20, 2023 · 8 comments
Open
Labels
A-examples Area: Examples good first issue Good for newcomers high priority This should be done soon

Comments

@Vid201
Copy link
Member

Vid201 commented Mar 20, 2023

As discussed some time ago, showcase a minimal example of bundler with single entry point running in one process.

@zsluedem
Copy link
Collaborator

In order to finish this task, I have an idea to refactor some of the mapping structures in our data type. Like the below https://github.com/Vid201/aa-bundler/blob/540c0de4faa0b2a8bbc0b2819350ef2d2cacf783/src/uopool/services/uopool.rs#L37-L45

We should refactor the structure to

pub struct UoPoolService<M: Middleware> {
    pub entry_point: EntryPoint<M>,
    pub mempools: MempoolBox<Vec<UserOperation>>,
    pub reputations: ReputationBox<Vec<ReputationEntry>>,
    pub eth_provider: Arc<M>,
    pub max_verification_gas: U256,
    pub min_priority_fee_per_gas: U256,
    pub chain_id: U256,
}

And we build another routeing service which could route the service to the corresponding UoPoolService based on the mempool_id. In that case, we could save a lot of dupicate mempool validation codes.

What do you think?

@Vid201
Copy link
Member Author

Vid201 commented Mar 22, 2023

In order to finish this task, I have an idea to refactor some of the mapping structures in our data type. Like the below

https://github.com/Vid201/aa-bundler/blob/540c0de4faa0b2a8bbc0b2819350ef2d2cacf783/src/uopool/services/uopool.rs#L37-L45

We should refactor the structure to

pub struct UoPoolService<M: Middleware> {
    pub entry_point: EntryPoint<M>,
    pub mempools: MempoolBox<Vec<UserOperation>>,
    pub reputations: ReputationBox<Vec<ReputationEntry>>,
    pub eth_provider: Arc<M>,
    pub max_verification_gas: U256,
    pub min_priority_fee_per_gas: U256,
    pub chain_id: U256,
}

And we build another routeing service which could route the service to the corresponding UoPoolService based on the mempool_id. In that case, we could save a lot of dupicate mempool validation codes.

What do you think?

Sounds good. What do you have exactly in mind when you say another routing service?

@zsluedem
Copy link
Collaborator

zsluedem commented Mar 26, 2023

What do you have exactly in mind when you say another routing service?

It is just simple route which is based on the MempoolId. Map<MempoolId, UoPoolService>

@Vid201
Copy link
Member Author

Vid201 commented Apr 2, 2023

Are you working on this one? @zsluedem

@zsluedem
Copy link
Collaborator

zsluedem commented Apr 3, 2023

Are you working on this one? @zsluedem

not really

@Vid201
Copy link
Member Author

Vid201 commented Apr 3, 2023

Are you working on this one? @zsluedem

not really

Then I will take new routing for uopool/mempools.

@zsluedem
Copy link
Collaborator

zsluedem commented Apr 3, 2023

In my assumption of the finished line of this issue, it would take several small tasks and some refactoring.

@Vid201
Copy link
Member Author

Vid201 commented Apr 3, 2023

In my assumption of the finished line of this issue, it would take several small tasks and some refactoring.

Yeah I agree, I will create another issue for the routing only.

@Vid201 Vid201 added the good first issue Good for newcomers label Sep 26, 2023
@Vid201 Vid201 added the A-examples Area: Examples label Dec 11, 2023
@Vid201 Vid201 changed the title Minimal example with single entry point and one process Example of bundler with single entry point running in single process Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-examples Area: Examples good first issue Good for newcomers high priority This should be done soon
Projects
None yet
Development

No branches or pull requests

2 participants