Skip to content

Decomposition of the execute_best_transactions method #171

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

therustmonk
Copy link
Collaborator

📝 Summary

I've prepared a fairly significant structural revision: I turned execute_best_transactions into a BestTransactionsExecutor struct, and instead of a scoped method, we now have access to all contextual data between method calls of this struct.

💡 Motivation and Context

I'm pursuing several important goals:

  • Reduce the execution method size (split it into parts) to make it more readable

  • Turning the build process into an explicit finite state machine (FSM)

    • easier to debug
    • allows changing or combining steps depending on configuration
    • potential for increased performance by skipping groups of calls under certain conditions
  • Additionally, BestTransactionsExecutor can be turned into an Iterator 🔥

  • Since the decomposition is based on method calls, it's:

    • faster than an FSM built on dynamic states and traits
    • easier to maintain than combinators
  • This change will enable deeper decomposition of the build process and simplify runtime control, or conversely, the emission of useful data at any stage of the build, for example: we could create an iterator that yields events we can respond to - sending various data or metrics, interrupting the build, etc.


✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant