-
Notifications
You must be signed in to change notification settings - Fork 5
feat: committor service #366
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
thlorenz
wants to merge
59
commits into
master
Choose a base branch
from
thlorenz/committor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- at this point schedule commit tests pass with maximum concurrency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
113 file(s) reviewed, 128 comment(s)
Edit PR Review Bot Settings | Greptile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adding a full fledged committor service to support the following kind of commits:
easy to manually retry them or do this automatically (next committor version will support this)
Details
The following crates were developed
here and integrated
into the validator:
magicblock-rpc-client
signature status checking (including sane retries)
magicblock-table-mania
used in a transaction the needed table addresses are provided
all its pubkeys are released
magicblock-committor-program
(out of order is ok)
magicblock-committor-service
available
Sample Flow
service
lookup tables which we might need as fast as possible
is provided to the user via logs in a transaction (as we did before, just now we have to wait
for the commit to complete)
For those commits the committor service ensures that accounts with the same commit (bundle) id
are always processed atomically.
The committor service also picks the best possible strategy to commit each changeset,
preferring speed and then cost.
It also inserts configurable (via code) compute budget instructions to each transaction.
The outcome of each commit is persisted to a database which allows manual (and in the next
version) automated retries of failed commits.
Succeessful commits are also persisted to the database and can be used for diagnostics. In the
future they should be removed since no retry is necessary.
On chain signatures for process-commit/finaliz/undelegate transactions are also persisted to
the database in a separate table.
This table is queried by the validator to log those signatures as part of a transaction that
the user waits for.
Greptile Summary
This PR introduces a comprehensive committor service to the MagicBlock validator for managing account changes and transactions. The implementation includes a new Solana program for handling commits, a service layer for managing commit operations, and integration with lookup tables for transaction optimization.
magicblock-committor-program
that handles chunked account data commits with proper buffer management and security checksmagicblock-committor-service
that orchestrates commit operations with support for bundling, lookup tables, and persistent status tracking via SQLitemagicblock-table-mania
for managing address lookup tables to optimize transaction sizesmagicblock-rpc-client
with enhanced transaction handling and batched account fetching