-
Notifications
You must be signed in to change notification settings - Fork 18
fix: periodic committer attempts to commit undelegated accounts & sqlite INTEGER overflow #556
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
fix: periodic committer attempts to commit undelegated accounts & sqlite INTEGER overflow #556
Conversation
Manual Deploy AvailableYou can trigger a manual deploy of this PR branch to testnet: Alternative: Comment
Comment updated automatically when the PR is synchronized. |
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.
2 files reviewed, no comments
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.
Looks good except for the delegation flag changes.
magicblock-committor-service/src/intent_execution_manager/intent_execution_engine.rs
Show resolved
Hide resolved
|
@thlorenz Could you take a look? |
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.
LGTM
In
ExternalAccountsManagerignore nondelegated accounts during periodic commitsAdditionally fixes sqlite INTEGER overflow
Greptile Overview
Updated On: 2025-09-25 12:32:37 UTC
Summary
This PR fixes a critical issue in the periodic commit process by preventing attempts to commit undelegated accounts, which was causing failures in the
ExternalAccountsManager.Key Changes:
u64::MAX - 1to(i64::MAX - 1) as u64to prevent potential overflow issues.filter(|(_, _, _, acc)| acc.is_delegated())in the periodic commit pipeline to only process accounts that are actually delegated to the validatorConfidence Score: 4/5
Important Files Changed
File Analysis
Sequence Diagram
sequenceDiagram participant EAM as ExternalAccountsManager participant IAP as InternalAccountProvider participant Filter as DelegationFilter participant Committer as CommitService Note over EAM: Periodic commit cycle begins EAM->>EAM: create_scheduled_base_intents() EAM->>EAM: Initialize MESSAGE_ID with (i64::MAX - 1) as u64 loop For each account to be committed EAM->>IAP: get_account(pubkey) IAP-->>EAM: AccountSharedData Note over EAM,Filter: NEW: Check delegation status EAM->>Filter: acc.is_delegated() Filter-->>EAM: true/false alt Account is delegated EAM->>EAM: Check if account hash changed alt Hash changed EAM->>EAM: Create AccountCommittee EAM->>Committer: Schedule for commit end else Account not delegated Note over EAM: Skip account (prevents undelegated commit attempts) end end EAM-->>Committer: List of delegated accounts to commit