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

feat(ethexe-tx-pool): Introduce basic tx-pool #4366

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

techraed
Copy link
Member

This PR introduces a basic logic for the ethexe tx pool which works as following:

  • Tx pool itself has a service part and a core part. The service part handles communications from outside to the core and from inside (core) to the outer "world". The core part basically performs main tx pool ops (adding a tx for now).
  • The InputTask is a task that is requested to be executed by the tx pool. The task is sent via TxPoolInputTaskSender sending end of the channel between the sender and the tx pool service. The sendind end is supplied to the main service and the rpc.
  • Basic flow:
    1. Rpc receives a request for sending a tx. It sends the tx via the channel to the tx pool service.
    2. Tx pool service receives the InputTask and calls corresponding tx pool core method to handle the task.
    3. InputTask::AddTransaction task triggers tx pool core to 1) validate the transaction, 2) store it in db
    4. When the InputTask::AddTransaction is executed successfully the tx pool services sends OutputTask::PropogateTransaction to the main service.
    5. The main service handles the OutputTask::PropogateTransaction by gossiping it to other nodes.
    6. When a node receives a transaction, it creates InputTask::AddTransaction task and sends it to the tx pool. If tx exists, it's not added to the storage.

Here you can also find a tiny refactoring of the ethexe-signer which is all about clarifying comments, simplified API and moving types to their own modules.

@techraed techraed added the A0-pleasereview PR is ready to be reviewed by the team label Nov 28, 2024
@techraed techraed self-assigned this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview PR is ready to be reviewed by the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant