Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (25)
💤 Files with no reviewable changes (7)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe committor service replaces separate ChangesCombined commit-finalize task flow
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant TaskBuilderImpl
participant TaskStrategist
participant DeliveryPreparator
participant SingleStageExecutor
TaskBuilderImpl->>TaskStrategist: provide combined commit-finalize tasks
TaskStrategist->>DeliveryPreparator: provide planned task delivery
DeliveryPreparator->>SingleStageExecutor: provide prepared tasks
Suggested reviewers: Merge Risk: ⚪ Minimal · up to No confirmed issue remains to resolve before merging; proceed with normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Existing authority and ordering controls appear preserved. The main residual risk is compatibility during upgrade and rollback, which is not fully established. No introduced security vulnerability was established. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
9049fc4 to
73be1d7
Compare
All fresh and restart-recovered commit intents now build CommitFinalize instructions. Remove the separate Commit and Finalize implementation, along with branches that only supported those obsolete tasks. - Delete CommitTask, FinalizeTask, their task variants, instruction builders, compute/account budgets, and metric labels. - Move CommitDelivery to its own module, retaining full-state and diff delivery through inline arguments or commit-scoped buffers. - Remove legacy preparation, cleanup, strategy persistence, nonce reset, and transaction-splitting branches while keeping their combined-commit counterparts. - Delete UnfinalizedAccountError and the unreachable recovery handlers that submitted standalone Finalize transactions, including helpers and preparator parameters used only by those handlers. - Share the combined-commit admission estimator and migrate unit and integration fixtures to CommitFinalize. Preserve buffer preparation, cleanup/re-preparation, nonce uniqueness, action ordering, and ALT coverage. Update legacy size assumptions to exercise the combined instruction's oversized-payload and static-key limits. Keep the public scheduled intent variants, persistence formats, and single-stage/two-stage execution behavior unchanged. Stage simplification will follow separately. The existing parent-branch pending-legacy-commit undelegation recovery limitation is unchanged; its integration test is neither weakened nor removed by this cleanup. Validation: - Nightly formatting checks and git diff --check passed. - Clippy for magicblock-committor-service with all targets and warnings denied passed. - Integration package cargo check --tests passed. - 33 targeted task unit tests and three executor regression tests passed. - test_prepare_cleanup_and_reprepare_mixed_tasks passed against Agave 4.2.0 with only the devnet validator running; the validator was stopped afterward. Ref: #1739
73be1d7 to
4572775
Compare
All commit paths now construct CommitFinalize tasks. Remove the remaining unused abstractions and duplicate construction code without changing how intents select transactions or execute their actions. - Replace four nearly identical commit builders with one helper that takes the undelegation flag. Preserve intent ordering, nonce consumption, base account lookup, and the existing placement of actions in each stage. - Remove the single-implementation TasksBuilder trait and expose its two methods directly on TaskBuilderImpl. - Delete unused TaskType and TaskStrategy metadata. Have strategy tests inspect the actual CommitDelivery variants and task ordering instead. - Remove task program-ID getters and count the shared DLP program budget once across all tasks, preserving the empty case and existing headroom. - Delete unused preparation helpers and the nonce-free transaction wrapper, reuse action argument/meta construction, and merge identical inline account-budget calculations. - Construct the two-stage result directly from the existing signatures, removing the terminal Finalized wrapper and its no-op transition. - Remove unused persistence helpers, error variants, integration fixtures, and the unused transaction-log compatibility helper. - Delete serialization-only tests that provided no layout assertions. Replace the artificial action-only two-stage fixture with six commits plus six undelegations that exceed the combined compute budget but fit separately. Keep nonce-error coverage for both instruction layouts and verify that unrelated errors propagate unchanged. Keep executor loops, delivery preparation and cleanup, callbacks, authority checks, RPC work, transaction formats, and persisted values unchanged. Broader stage and executor simplification remains separate work. Validation: - make fmt and make ci-fmt passed in the root and integration workspaces. - test_all_commit_intents_use_combined_tasks passed with cargo test. - The integration package schedulecommit-committor-service passed cargo check --offline --locked --tests. - git diff --check passed. Broader test execution remains for CI.
Summary
Remove the unused separate
CommitandFinalizetasks and their recovery code now that all commit paths useCommitFinalize*.Closes #1765.
Refs #1739.
Breaking Changes
The Rust task API removes
CommitTask,FinalizeTask, and their enum variants. UseCommitFinalizeTask;CommitDeliverymoves totasks::commit_delivery.Test Plan
36 targeted unit tests and the buffer lifecycle integration test passed. Clippy, formatting, and integration compilation passed.