Skip to content

refactor: remove crates moved to magicblock engine - #1394

Closed
bmuddha wants to merge 1 commit into
masterfrom
crate-removal
Closed

refactor: remove crates moved to magicblock engine#1394
bmuddha wants to merge 1 commit into
masterfrom
crate-removal

Conversation

@bmuddha

@bmuddha bmuddha commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Breaking Changes

  • None
  • Yes — migration path described below

Test Plan

Summary by CodeRabbit

  • New Features

    • Added a replication message protocol supporting transactions, blocks, superblocks, and resets.
    • Introduced engine-based account cloning, task scheduling, undelegation, and transaction execution.
    • Added schema support for scheduled/cancel task requests and improved account “mode” handling.
  • Breaking Changes

    • Removed legacy account database, processor/scheduler, and related cloning interfaces.
    • Unsupported account-composition/cloning instruction paths now error instead of executing.
    • Legacy ledger write/maintenance APIs and latest-block features were removed.
  • Compatibility

    • Updated Rust toolchain pin and refreshed Solana/Agave dependency set and feature flags.

bmuddha commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Too many files!

This PR contains 280 files, which is 180 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 136a9176-eaf5-4527-b07b-579e21c8374f

📥 Commits

Reviewing files that changed from the base of the PR and between 5146166 and 7d2dd69.

⛔ Files ignored due to path filters (8)
  • Cargo.lock is excluded by !**/*.lock
  • test-integration/Cargo.lock is excluded by !**/*.lock
  • test-integration/programs/ephemeral-token/ephemeral_token_program.so is excluded by !**/*.so
  • test-integration/programs/memo/memo.so is excluded by !**/*.so
  • test-integration/programs/redline/redline.so is excluded by !**/*.so
  • test-integration/schedulecommit/elfs/dlp.so is excluded by !**/*.so
  • test-integration/schedulecommit/elfs/mdp.so is excluded by !**/*.so
  • test-integration/schedulecommit/elfs/noop.so is excluded by !**/*.so
📒 Files selected for processing (633)
  • .agents/context/architecture.md
  • .agents/context/crate-map.md
  • .agents/context/crates/magicblock-account-cloner.md
  • .agents/context/crates/magicblock-accounts-db.md
  • .agents/context/crates/magicblock-aml.md
  • .agents/context/crates/magicblock-aperture.md
  • .agents/context/crates/magicblock-api.md
  • .agents/context/crates/magicblock-chainlink.md
  • .agents/context/crates/magicblock-committor-program.md
  • .agents/context/crates/magicblock-committor-service.md
  • .agents/context/crates/magicblock-config.md
  • .agents/context/crates/magicblock-core.md
  • .agents/context/crates/magicblock-ledger.md
  • .agents/context/crates/magicblock-magic-program-api.md
  • .agents/context/crates/magicblock-rpc-client.md
  • .agents/context/crates/magicblock-services.md
  • .agents/context/crates/magicblock-table-mania.md
  • .agents/context/crates/magicblock-task-scheduler.md
  • .agents/context/crates/magicblock-validator-admin.md
  • .agents/context/crates/storage-proto.md
  • .agents/context/crates/test-kit.md
  • .agents/rules/testing-and-validation.md
  • .agents/skills/mbv-check/SKILL.md
  • .agents/skills/mbv-engine-integration/SKILL.md
  • .agents/skills/mbv-engine-integration/agents/openai.yaml
  • .agents/skills/mbv-run-single-integration-test/SKILL.md
  • .github/actions/setup-build-env/action.yml
  • .github/workflows/ci-fmt.yml
  • .github/workflows/ci-lint.yml
  • .github/workflows/ci-test-integration.yml
  • .github/workflows/ci-test-unit.yml
  • .gitignore
  • AGENTS.md
  • Cargo.toml
  • Makefile
  • README.md
  • config.example.toml
  • docs/architecture.md
  • docs/sysvars.md
  • magicblock-account-cloner/Cargo.toml
  • magicblock-account-cloner/README.md
  • magicblock-account-cloner/src/lib.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-accounts-db/Cargo.toml
  • magicblock-accounts-db/README.md
  • magicblock-accounts-db/src/error.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/reset.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-accounts/Cargo.toml
  • magicblock-accounts/README.md
  • magicblock-accounts/src/config.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-accounts/src/traits.rs
  • magicblock-aml/src/lib.rs
  • magicblock-aperture/Cargo.toml
  • magicblock-aperture/README.md
  • magicblock-aperture/src/encoder.rs
  • magicblock-aperture/src/engine_types.rs
  • magicblock-aperture/src/error.rs
  • magicblock-aperture/src/geyser.rs
  • magicblock-aperture/src/lib.rs
  • magicblock-aperture/src/processor.rs
  • magicblock-aperture/src/requests/http/get_account_info.rs
  • magicblock-aperture/src/requests/http/get_balance.rs
  • magicblock-aperture/src/requests/http/get_block.rs
  • magicblock-aperture/src/requests/http/get_block_height.rs
  • magicblock-aperture/src/requests/http/get_block_time.rs
  • magicblock-aperture/src/requests/http/get_blocks.rs
  • magicblock-aperture/src/requests/http/get_blocks_with_limit.rs
  • magicblock-aperture/src/requests/http/get_delegation_status.rs
  • magicblock-aperture/src/requests/http/get_fee_for_message.rs
  • magicblock-aperture/src/requests/http/get_latest_blockhash.rs
  • magicblock-aperture/src/requests/http/get_multiple_accounts.rs
  • magicblock-aperture/src/requests/http/get_program_accounts.rs
  • magicblock-aperture/src/requests/http/get_recent_performance_samples.rs
  • magicblock-aperture/src/requests/http/get_signature_statuses.rs
  • magicblock-aperture/src/requests/http/get_signatures_for_address.rs
  • magicblock-aperture/src/requests/http/get_slot.rs
  • magicblock-aperture/src/requests/http/get_token_account_balance.rs
  • magicblock-aperture/src/requests/http/get_token_accounts_by_delegate.rs
  • magicblock-aperture/src/requests/http/get_token_accounts_by_owner.rs
  • magicblock-aperture/src/requests/http/get_transaction.rs
  • magicblock-aperture/src/requests/http/is_blockhash_valid.rs
  • magicblock-aperture/src/requests/http/mocked.rs
  • magicblock-aperture/src/requests/http/mod.rs
  • magicblock-aperture/src/requests/http/send_transaction.rs
  • magicblock-aperture/src/requests/http/simulate_transaction.rs
  • magicblock-aperture/src/requests/http/transaction_validation.rs
  • magicblock-aperture/src/requests/mod.rs
  • magicblock-aperture/src/requests/params.rs
  • magicblock-aperture/src/requests/payload.rs
  • magicblock-aperture/src/requests/websocket/account_subscribe.rs
  • magicblock-aperture/src/requests/websocket/log_subscribe.rs
  • magicblock-aperture/src/requests/websocket/mod.rs
  • magicblock-aperture/src/requests/websocket/program_subscribe.rs
  • magicblock-aperture/src/requests/websocket/signature_subscribe.rs
  • magicblock-aperture/src/requests/websocket/slot_subscribe.rs
  • magicblock-aperture/src/server/http/dispatch.rs
  • magicblock-aperture/src/server/http/mod.rs
  • magicblock-aperture/src/server/websocket/connection.rs
  • magicblock-aperture/src/server/websocket/dispatch.rs
  • magicblock-aperture/src/server/websocket/mod.rs
  • magicblock-aperture/src/state/blocks.rs
  • magicblock-aperture/src/state/cache.rs
  • magicblock-aperture/src/state/mod.rs
  • magicblock-aperture/src/state/signatures.rs
  • magicblock-aperture/src/state/subscriptions.rs
  • magicblock-aperture/src/state/transactions.rs
  • magicblock-aperture/src/tests.rs
  • magicblock-aperture/src/utils.rs
  • magicblock-aperture/tests/accounts.rs
  • magicblock-aperture/tests/blocks.rs
  • magicblock-aperture/tests/mocked.rs
  • magicblock-aperture/tests/node.rs
  • magicblock-aperture/tests/setup.rs
  • magicblock-aperture/tests/setup/mod.rs
  • magicblock-aperture/tests/transaction_primary_mode.rs
  • magicblock-aperture/tests/transactions.rs
  • magicblock-aperture/tests/websocket.rs
  • magicblock-api/Cargo.toml
  • magicblock-api/src/domain_registry_manager.rs
  • magicblock-api/src/errors.rs
  • magicblock-api/src/fund_account.rs
  • magicblock-api/src/genesis_utils.rs
  • magicblock-api/src/ledger.rs
  • magicblock-api/src/lib.rs
  • magicblock-api/src/magic_sys_adapter.rs
  • magicblock-api/src/magic_validator.rs
  • magicblock-api/src/tickers.rs
  • magicblock-chainlink/Cargo.toml
  • magicblock-chainlink/src/accounts_bank.rs
  • magicblock-chainlink/src/chainlink/errors.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/ata_projection.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/delegation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/mod.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pending_operation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pipeline.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/program_loader.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/tests.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/types.rs
  • magicblock-chainlink/src/chainlink/mod.rs
  • magicblock-chainlink/src/cloner/engine_cloner.rs
  • magicblock-chainlink/src/cloner/errors.rs
  • magicblock-chainlink/src/cloner/mod.rs
  • magicblock-chainlink/src/filters/noop_system_transfer.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/actor.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/mock.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/mod.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/stream_factory.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_actor/stream_manager.rs
  • magicblock-chainlink/src/remote_account_provider/chain_laser_client.rs
  • magicblock-chainlink/src/remote_account_provider/chain_pubsub_actor.rs
  • magicblock-chainlink/src/remote_account_provider/chain_pubsub_client.rs
  • magicblock-chainlink/src/remote_account_provider/chain_slot.rs
  • magicblock-chainlink/src/remote_account_provider/chain_updates_client.rs
  • magicblock-chainlink/src/remote_account_provider/errors.rs
  • magicblock-chainlink/src/remote_account_provider/mod.rs
  • magicblock-chainlink/src/remote_account_provider/program_account.rs
  • magicblock-chainlink/src/remote_account_provider/pubsub_connection_pool.rs
  • magicblock-chainlink/src/remote_account_provider/remote_account.rs
  • magicblock-chainlink/src/remote_account_provider/subscription_reconciler.rs
  • magicblock-chainlink/src/remote_account_provider/tests.rs
  • magicblock-chainlink/src/submux/debounce_state.rs
  • magicblock-chainlink/src/submux/mod.rs
  • magicblock-chainlink/src/submux/subscription_task.rs
  • magicblock-chainlink/src/testing/accounts.rs
  • magicblock-chainlink/src/testing/cloner_stub.rs
  • magicblock-chainlink/src/testing/context.rs
  • magicblock-chainlink/src/testing/eatas.rs
  • magicblock-chainlink/src/testing/mod.rs
  • magicblock-chainlink/src/testing/rpc_client_mock.rs
  • magicblock-chainlink/src/testing/utils.rs
  • magicblock-chainlink/tests/01_ensure-accounts.rs
  • magicblock-chainlink/tests/03_deleg_after_sub.rs
  • magicblock-chainlink/tests/04_redeleg_other_separate_slots.rs
  • magicblock-chainlink/tests/05_redeleg_other_same_slot.rs
  • magicblock-chainlink/tests/06_redeleg_us_separate_slots.rs
  • magicblock-chainlink/tests/07_redeleg_us_same_slot.rs
  • magicblock-chainlink/tests/08_subupdate-ordering.rs
  • magicblock-chainlink/tests/09_waiter_reconciliation_race.rs
  • magicblock-chainlink/tests/basics.rs
  • magicblock-chainlink/tests/utils/accounts.rs
  • magicblock-chainlink/tests/utils/logging.rs
  • magicblock-chainlink/tests/utils/mod.rs
  • magicblock-committor-program/Cargo.toml
  • magicblock-committor-program/src/error.rs
  • magicblock-committor-program/src/processor.rs
  • magicblock-committor-service/Cargo.toml
  • magicblock-committor-service/src/committor_processor.rs
  • magicblock-committor-service/src/intent_execution_manager.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_execution_engine.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_scheduler.rs
  • magicblock-committor-service/src/intent_executor/error.rs
  • magicblock-committor-service/src/intent_executor/intent_execution_client.rs
  • magicblock-committor-service/src/intent_executor/intent_executor_factory.rs
  • magicblock-committor-service/src/intent_executor/mod.rs
  • magicblock-committor-service/src/intent_executor/single_stage_executor.rs
  • magicblock-committor-service/src/intent_executor/task_info_fetcher.rs
  • magicblock-committor-service/src/intent_executor/two_stage_executor.rs
  • magicblock-committor-service/src/intent_executor/utils.rs
  • magicblock-committor-service/src/persist/commit_persister.rs
  • magicblock-committor-service/src/persist/db.rs
  • magicblock-committor-service/src/service.rs
  • magicblock-committor-service/src/service/intent_client.rs
  • magicblock-committor-service/src/tasks/commit_finalize_task.rs
  • magicblock-committor-service/src/tasks/commit_stage_task.rs
  • magicblock-committor-service/src/tasks/commit_task.rs
  • magicblock-committor-service/src/tasks/intent_size_validator.rs
  • magicblock-committor-service/src/tasks/mod.rs
  • magicblock-committor-service/src/tasks/task_builder.rs
  • magicblock-committor-service/src/tasks/task_strategist.rs
  • magicblock-committor-service/src/tasks/utils.rs
  • magicblock-committor-service/src/test_utils.rs
  • magicblock-committor-service/src/transaction_preparator/delivery_preparator.rs
  • magicblock-committor-service/src/transaction_preparator/mod.rs
  • magicblock-committor-service/src/transactions.rs
  • magicblock-config/README.md
  • magicblock-config/src/config/cli.rs
  • magicblock-config/src/config/validator.rs
  • magicblock-config/src/consts.rs
  • magicblock-config/src/lib.rs
  • magicblock-config/src/tests.rs
  • magicblock-config/src/types/network.rs
  • magicblock-core/Cargo.toml
  • magicblock-core/src/coordination_mode.rs
  • magicblock-core/src/intent/mod.rs
  • magicblock-core/src/intent/types.rs
  • magicblock-core/src/lib.rs
  • magicblock-core/src/link.rs
  • magicblock-core/src/link/accounts.rs
  • magicblock-core/src/link/blocks.rs
  • magicblock-core/src/link/replication.rs
  • magicblock-core/src/link/transactions.rs
  • magicblock-core/src/logger/mod.rs
  • magicblock-core/src/tls.rs
  • magicblock-core/src/token_programs.rs
  • magicblock-core/src/traits.rs
  • magicblock-ledger/Cargo.toml
  • magicblock-ledger/src/blockstore_processor/mod.rs
  • magicblock-ledger/src/database/cf_descriptors.rs
  • magicblock-ledger/src/database/columns.rs
  • magicblock-ledger/src/database/compaction_filter.rs
  • magicblock-ledger/src/database/db.rs
  • magicblock-ledger/src/database/ledger_column.rs
  • magicblock-ledger/src/database/rocks_db.rs
  • magicblock-ledger/src/database/rocksdb_options.rs
  • magicblock-ledger/src/ledger_truncator.rs
  • magicblock-ledger/src/lib.rs
  • magicblock-ledger/src/metrics.rs
  • magicblock-ledger/src/store/api.rs
  • magicblock-ledger/tests/common.rs
  • magicblock-ledger/tests/get_block.rs
  • magicblock-ledger/tests/test_ledger_truncator.rs
  • magicblock-magic-program-api/Cargo.toml
  • magicblock-magic-program-api/src/args.rs
  • magicblock-magic-program-api/src/compat.rs
  • magicblock-magic-program-api/src/instruction.rs
  • magicblock-magic-program-api/src/lib.rs
  • magicblock-magic-program-api/src/response.rs
  • magicblock-metrics/src/lib.rs
  • magicblock-metrics/src/service.rs
  • magicblock-processor/Cargo.toml
  • magicblock-processor/README.md
  • magicblock-processor/src/builtins.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-processor/src/lib.rs
  • magicblock-processor/src/loader.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-processor/tests/fees.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-processor/tests/replica_ordering.rs
  • magicblock-processor/tests/scheduling.rs
  • magicblock-processor/tests/security.rs
  • magicblock-processor/tests/simulation.rs
  • magicblock-replicator/Cargo.toml
  • magicblock-replicator/README.md
  • magicblock-replicator/src/error.rs
  • magicblock-replicator/src/lib.rs
  • magicblock-replicator/src/nats/broker.rs
  • magicblock-replicator/src/nats/consumer.rs
  • magicblock-replicator/src/nats/lock_watcher.rs
  • magicblock-replicator/src/nats/mod.rs
  • magicblock-replicator/src/nats/producer.rs
  • magicblock-replicator/src/nats/snapshot.rs
  • magicblock-replicator/src/service/context.rs
  • magicblock-replicator/src/service/mod.rs
  • magicblock-replicator/src/service/primary.rs
  • magicblock-replicator/src/service/replica.rs
  • magicblock-replicator/src/tests.rs
  • magicblock-replicator/src/watcher.rs
  • magicblock-rpc-client/Cargo.toml
  • magicblock-rpc-client/src/lib.rs
  • magicblock-rpc-client/src/signature_confirmer.rs
  • magicblock-rpc-client/src/utils.rs
  • magicblock-services/Cargo.toml
  • magicblock-services/src/actions_callback_service.rs
  • magicblock-services/src/undelegation_request_service.rs
  • magicblock-table-mania/src/error.rs
  • magicblock-table-mania/src/lookup_table_rc.rs
  • magicblock-table-mania/src/manager.rs
  • magicblock-task-scheduler/Cargo.toml
  • magicblock-task-scheduler/src/db.rs
  • magicblock-task-scheduler/src/errors.rs
  • magicblock-task-scheduler/src/service.rs
  • magicblock-validator-admin/Cargo.toml
  • magicblock-validator-admin/src/claim_fees.rs
  • magicblock-validator/src/main.rs
  • magicblock-version/build.rs
  • programs/guinea/Cargo.toml
  • programs/guinea/src/lib.rs
  • programs/magicblock/Cargo.toml
  • programs/magicblock/src/clone_account/common.rs
  • programs/magicblock/src/clone_account/mod.rs
  • programs/magicblock/src/clone_account/process_cleanup.rs
  • programs/magicblock/src/clone_account/process_clone.rs
  • programs/magicblock/src/clone_account/process_clone_continue.rs
  • programs/magicblock/src/clone_account/process_clone_init.rs
  • programs/magicblock/src/clone_account/process_evict.rs
  • programs/magicblock/src/clone_account/process_finalize_buffer.rs
  • programs/magicblock/src/clone_account/process_finalize_v1_buffer.rs
  • programs/magicblock/src/clone_account/process_post_delegation_actions.rs
  • programs/magicblock/src/clone_account/process_set_authority.rs
  • programs/magicblock/src/clone_account/tests.rs
  • programs/magicblock/src/ephemeral_accounts/mod.rs
  • programs/magicblock/src/ephemeral_accounts/process_close.rs
  • programs/magicblock/src/ephemeral_accounts/process_create.rs
  • programs/magicblock/src/ephemeral_accounts/process_resize.rs
  • programs/magicblock/src/ephemeral_accounts/validation.rs
  • programs/magicblock/src/errors.rs
  • programs/magicblock/src/lib.rs
  • programs/magicblock/src/magic_context.rs
  • programs/magicblock/src/magic_scheduled_base_intent.rs
  • programs/magicblock/src/magic_sys.rs
  • programs/magicblock/src/magicblock_processor.rs
  • programs/magicblock/src/mutate_accounts/mod.rs
  • programs/magicblock/src/mutate_accounts/process_mutate_accounts.rs
  • programs/magicblock/src/schedule_task/mod.rs
  • programs/magicblock/src/schedule_task/process_cancel_task.rs
  • programs/magicblock/src/schedule_task/process_execute_task.rs
  • programs/magicblock/src/schedule_task/process_schedule_task.rs
  • programs/magicblock/src/schedule_transactions/mod.rs
  • programs/magicblock/src/schedule_transactions/process_accept_scheduled_commits.rs
  • programs/magicblock/src/schedule_transactions/process_add_action_callback.rs
  • programs/magicblock/src/schedule_transactions/process_execute_callback.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_cloned_undelegation.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit_tests.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_intent_bundle.rs
  • programs/magicblock/src/schedule_transactions/process_scheduled_commit_sent.rs
  • programs/magicblock/src/schedule_transactions/transaction_scheduler.rs
  • programs/magicblock/src/test_utils/mod.rs
  • programs/magicblock/src/utils/account_actions.rs
  • programs/magicblock/src/utils/accounts.rs
  • programs/magicblock/src/utils/instruction_context_frames.rs
  • programs/magicblock/src/utils/instruction_sysvar.rs
  • programs/magicblock/src/utils/instruction_utils.rs
  • programs/magicblock/src/utils/mod.rs
  • programs/magicblock/src/utils/validation.rs
  • programs/magicblock/src/validator.rs
  • rust-toolchain.toml
  • storage-proto/Cargo.toml
  • storage-proto/build.rs
  • storage-proto/src/convert.rs
  • storage-proto/src/lib.rs
  • test-integration/Cargo.toml
  • test-integration/Makefile
  • test-integration/README.md
  • test-integration/configs/accounts/luzid-authority.json
  • test-integration/configs/accounts/magic-fee-vault-delegation-record.json
  • test-integration/configs/accounts/magic-fee-vault.json
  • test-integration/configs/accounts/memo_v1.json
  • test-integration/configs/accounts/memo_v2.json
  • test-integration/configs/accounts/non-delegated-cloneable-account1.json
  • test-integration/configs/accounts/non-delegated-cloneable-account2.json
  • test-integration/configs/accounts/non-delegated-cloneable-account3.json
  • test-integration/configs/accounts/non-delegated-cloneable-account4.json
  • test-integration/configs/accounts/old_program_v1.json
  • test-integration/configs/accounts/protocol-fees-vault.json
  • test-integration/configs/accounts/validator-authority.json
  • test-integration/configs/accounts/validator-fees-vault.json
  • test-integration/configs/aml.devnet.toml
  • test-integration/configs/api-conf.ephem.toml
  • test-integration/configs/chainlink-conf.devnet.toml
  • test-integration/configs/claim-fees-test.toml
  • test-integration/configs/cloning-conf.devnet.toml
  • test-integration/configs/cloning-conf.ephem.toml
  • test-integration/configs/committor-conf.devnet.toml
  • test-integration/configs/config-conf.devnet.toml
  • test-integration/configs/restore-ledger-conf.devnet.toml
  • test-integration/configs/run-test-validator.sh
  • test-integration/configs/schedule-task.devnet.toml
  • test-integration/configs/schedule-task.ephem.toml
  • test-integration/configs/schedulecommit-conf-fees.ephem.toml
  • test-integration/configs/schedulecommit-conf.devnet.toml
  • test-integration/configs/schedulecommit-conf.ephem.frequent-commits.toml
  • test-integration/configs/schedulecommit-conf.ephem.toml
  • test-integration/configs/validator-offline.devnet.toml
  • test-integration/programs/flexi-counter/Cargo.toml
  • test-integration/programs/flexi-counter/Xargo.toml
  • test-integration/programs/flexi-counter/keys/f1exzKGtdeVX3d6UXZ89cY7twiNJe9S5uq84RTA4Rq4.json
  • test-integration/programs/flexi-counter/src/instruction.rs
  • test-integration/programs/flexi-counter/src/lib.rs
  • test-integration/programs/flexi-counter/src/processor.rs
  • test-integration/programs/flexi-counter/src/processor/call_handler.rs
  • test-integration/programs/flexi-counter/src/processor/callback.rs
  • test-integration/programs/flexi-counter/src/processor/schedule_intent.rs
  • test-integration/programs/flexi-counter/src/processor/transfer_intent.rs
  • test-integration/programs/flexi-counter/src/state.rs
  • test-integration/programs/flexi-counter/src/utils/asserts.rs
  • test-integration/programs/flexi-counter/src/utils/mod.rs
  • test-integration/programs/mini/Cargo.toml
  • test-integration/programs/mini/README.md
  • test-integration/programs/mini/Xargo.toml
  • test-integration/programs/mini/src/common.rs
  • test-integration/programs/mini/src/instruction.rs
  • test-integration/programs/mini/src/lib.rs
  • test-integration/programs/mini/src/processor.rs
  • test-integration/programs/mini/src/sdk.rs
  • test-integration/programs/mini/src/state.rs
  • test-integration/programs/schedulecommit-security/Cargo.toml
  • test-integration/programs/schedulecommit-security/Xargo.toml
  • test-integration/programs/schedulecommit-security/src/lib.rs
  • test-integration/programs/schedulecommit/Cargo.toml
  • test-integration/programs/schedulecommit/Xargo.toml
  • test-integration/programs/schedulecommit/keys/CTVAe8vsyXkBKDPcJRUYMEoEm7MiZ9wF3iPENBHFtBEH.json
  • test-integration/programs/schedulecommit/src/api.rs
  • test-integration/programs/schedulecommit/src/lib.rs
  • test-integration/programs/schedulecommit/src/magicblock_program.rs
  • test-integration/programs/schedulecommit/src/order_book.rs
  • test-integration/programs/schedulecommit/src/utils/mod.rs
  • test-integration/programs/sysvars/Cargo.toml
  • test-integration/programs/sysvars/README.md
  • test-integration/programs/sysvars/sh/update
  • test-integration/programs/sysvars/src/lib.rs
  • test-integration/rust-toolchain.toml
  • test-integration/rustfmt.toml
  • test-integration/schedulecommit/README.md
  • test-integration/schedulecommit/client/Cargo.toml
  • test-integration/schedulecommit/client/src/lib.rs
  • test-integration/schedulecommit/client/src/schedule_commit_context.rs
  • test-integration/schedulecommit/client/src/services.rs
  • test-integration/schedulecommit/client/src/verify.rs
  • test-integration/schedulecommit/sh/update
  • test-integration/schedulecommit/test-scenarios/Cargo.toml
  • test-integration/schedulecommit/test-scenarios/src/lib.rs
  • test-integration/schedulecommit/test-scenarios/tests/01_commits.rs
  • test-integration/schedulecommit/test-scenarios/tests/02_commit_and_undelegate.rs
  • test-integration/schedulecommit/test-scenarios/tests/03_commit_limit.rs
  • test-integration/schedulecommit/test-scenarios/tests/04_intent_size_limit.rs
  • test-integration/schedulecommit/test-scenarios/tests/utils/mod.rs
  • test-integration/schedulecommit/test-security/Cargo.toml
  • test-integration/schedulecommit/test-security/Xargo.toml
  • test-integration/schedulecommit/test-security/src/lib.rs
  • test-integration/schedulecommit/test-security/tests/01_invocations.rs
  • test-integration/schedulecommit/test-security/tests/results/01_cpi_with_program.ron
  • test-integration/schedulecommit/test-security/tests/results/02_direct_invoke_single_ix.ron
  • test-integration/schedulecommit/test-security/tests/results/03_direct_invoke_sandwiched.ron
  • test-integration/schedulecommit/test-security/tests/results/04_cpi_other_program.ron
  • test-integration/schedulecommit/test-security/tests/results/05_non_cpi_and_cpi_combined.ron
  • test-integration/schedulecommit/test-security/tests/utils/mod.rs
  • test-integration/test-aml/Cargo.toml
  • test-integration/test-aml/src/lib.rs
  • test-integration/test-aml/tests/range_mock.rs
  • test-integration/test-chainlink/Cargo.toml
  • test-integration/test-chainlink/Makefile
  • test-integration/test-chainlink/scripts/miniv2-json-from-so.js
  • test-integration/test-chainlink/src/accounts.rs
  • test-integration/test-chainlink/src/ixtest_context.rs
  • test-integration/test-chainlink/src/lib.rs
  • test-integration/test-chainlink/src/logging.rs
  • test-integration/test-chainlink/src/programs.rs
  • test-integration/test-chainlink/src/test_context.rs
  • test-integration/test-chainlink/tests/chain_pubsub_actor.rs
  • test-integration/test-chainlink/tests/chain_pubsub_client.rs
  • test-integration/test-chainlink/tests/ix_01_ensure-accounts.rs
  • test-integration/test-chainlink/tests/ix_03_deleg_after_sub.rs
  • test-integration/test-chainlink/tests/ix_04_redeleg_other_separate_slots.rs
  • test-integration/test-chainlink/tests/ix_05_redeleg_other_same_slot.rs
  • test-integration/test-chainlink/tests/ix_06_redeleg_us_separate_slots.rs
  • test-integration/test-chainlink/tests/ix_07_redeleg_us_same_slot.rs
  • test-integration/test-chainlink/tests/ix_aml_undelegation.rs
  • test-integration/test-chainlink/tests/ix_ata_eata_replace.rs
  • test-integration/test-chainlink/tests/ix_exceed_capacity.rs
  • test-integration/test-chainlink/tests/ix_feepayer.rs
  • test-integration/test-chainlink/tests/ix_full_scenarios.rs
  • test-integration/test-chainlink/tests/ix_post_delegation_action_undelegation.rs
  • test-integration/test-chainlink/tests/ix_programs.rs
  • test-integration/test-chainlink/tests/ix_remote_account_provider.rs
  • test-integration/test-cloning/Cargo.toml
  • test-integration/test-cloning/src/lib.rs
  • test-integration/test-cloning/tests/01_program-deploy.rs
  • test-integration/test-cloning/tests/02_get_account_info.rs
  • test-integration/test-cloning/tests/03_get_multiple_accounts.rs
  • test-integration/test-cloning/tests/04_escrow_transfer.rs
  • test-integration/test-cloning/tests/05_parallel-cloning.rs
  • test-integration/test-cloning/tests/06_escrows.rs
  • test-integration/test-cloning/tests/07_subscription_limits.rs
  • test-integration/test-cloning/tests/08_multi_program_cloning.rs
  • test-integration/test-cloning/tests/10_post_delegation_token_transfer.rs
  • test-integration/test-cloning/tests/utils/mod.rs
  • test-integration/test-committor-service/Cargo.toml
  • test-integration/test-committor-service/src/lib.rs
  • test-integration/test-committor-service/tests/common.rs
  • test-integration/test-committor-service/tests/test_delivery_preparator.rs
  • test-integration/test-committor-service/tests/test_intent_executor.rs
  • test-integration/test-committor-service/tests/test_ix_commit_local.rs
  • test-integration/test-committor-service/tests/test_transaction_preparator.rs
  • test-integration/test-committor-service/tests/utils/instructions.rs
  • test-integration/test-committor-service/tests/utils/mod.rs
  • test-integration/test-committor-service/tests/utils/transactions.rs
  • test-integration/test-config/Cargo.toml
  • test-integration/test-config/src/lib.rs
  • test-integration/test-config/tests/allowed_programs.rs
  • test-integration/test-config/tests/clone_config.rs
  • test-integration/test-ledger-restore/Cargo.toml
  • test-integration/test-ledger-restore/src/lib.rs
  • test-integration/test-ledger-restore/tests/00_empty_validator.rs
  • test-integration/test-ledger-restore/tests/01_single_transfer.rs
  • test-integration/test-ledger-restore/tests/02_two_transfers.rs
  • test-integration/test-ledger-restore/tests/03_single_block_tx_order.rs
  • test-integration/test-ledger-restore/tests/04_flexi_counter.rs
  • test-integration/test-ledger-restore/tests/05_program_deploy.rs
  • test-integration/test-ledger-restore/tests/06_delegated_account.rs
  • test-integration/test-ledger-restore/tests/07_commit_delegated_account.rs
  • test-integration/test-ledger-restore/tests/08_commit_update.rs
  • test-integration/test-ledger-restore/tests/09_restore_different_accounts_multiple_times.rs
  • test-integration/test-ledger-restore/tests/10_readonly_update_after.rs
  • test-integration/test-ledger-restore/tests/11_undelegate_before_restart.rs
  • test-integration/test-ledger-restore/tests/12_two_airdrops_one_after_account_flush.rs
  • test-integration/test-ledger-restore/tests/13_timestamps_match_during_replay.rs
  • test-integration/test-ledger-restore/tests/14_restore_with_new_keypair.rs
  • test-integration/test-ledger-restore/tests/15_resume_strategies.rs
  • test-integration/test-ledger-restore/tests/16_cranks_persists.rs
  • test-integration/test-magicblock-api/Cargo.toml
  • test-integration/test-magicblock-api/src/lib.rs
  • test-integration/test-magicblock-api/tests/test_claim_fees.rs
  • test-integration/test-magicblock-api/tests/test_clocks_match.rs
  • test-integration/test-magicblock-api/tests/test_domain_registry.rs
  • test-integration/test-magicblock-api/tests/test_get_block_timestamp_stability.rs
  • test-integration/test-pubsub/Cargo.toml
  • test-integration/test-pubsub/src/lib.rs
  • test-integration/test-pubsub/tests/test_account_subscribe.rs
  • test-integration/test-pubsub/tests/test_logs_subscribe.rs
  • test-integration/test-pubsub/tests/test_program_subscribe.rs
  • test-integration/test-pubsub/tests/test_signature_subscribe.rs
  • test-integration/test-pubsub/tests/test_slot_subscribe.rs
  • test-integration/test-runner/Cargo.toml
  • test-integration/test-runner/bin/run_tests.rs
  • test-integration/test-runner/src/cleanup.rs
  • test-integration/test-runner/src/env_config.rs
  • test-integration/test-runner/src/lib.rs
  • test-integration/test-runner/src/signal.rs
  • test-integration/test-schedule-intent/Cargo.toml
  • test-integration/test-schedule-intent/src/main.rs
  • test-integration/test-schedule-intent/tests/test_schedule_intents.rs
  • test-integration/test-table-mania/Cargo.toml
  • test-integration/test-table-mania/src/lib.rs
  • test-integration/test-table-mania/tests/ix_ensure_pubkey_table.rs
  • test-integration/test-table-mania/tests/ix_lookup_table.rs
  • test-integration/test-table-mania/tests/ix_release_pubkeys.rs
  • test-integration/test-table-mania/tests/ix_reserve_pubkeys.rs
  • test-integration/test-table-mania/tests/utils/mod.rs
  • test-integration/test-task-scheduler/Cargo.toml
  • test-integration/test-task-scheduler/src/lib.rs
  • test-integration/test-task-scheduler/tests/test_cancel_ongoing_task.rs
  • test-integration/test-task-scheduler/tests/test_reschedule_task.rs
  • test-integration/test-task-scheduler/tests/test_schedule_error.rs
  • test-integration/test-task-scheduler/tests/test_schedule_magic_cpi_crank.rs
  • test-integration/test-task-scheduler/tests/test_schedule_task.rs
  • test-integration/test-task-scheduler/tests/test_schedule_task_signed.rs
  • test-integration/test-task-scheduler/tests/test_scheduled_commits.rs
  • test-integration/test-task-scheduler/tests/test_unauthorized_reschedule.rs
  • test-integration/test-task-scheduler/tests/test_use_crank_signer.rs
  • test-integration/test-tools/Cargo.toml
  • test-integration/test-tools/src/conversions.rs
  • test-integration/test-tools/src/dlp_interface.rs
  • test-integration/test-tools/src/integration_test_context.rs
  • test-integration/test-tools/src/lib.rs
  • test-integration/test-tools/src/loaded_accounts.rs
  • test-integration/test-tools/src/run_test.rs
  • test-integration/test-tools/src/scheduled_commits.rs
  • test-integration/test-tools/src/tmpdir.rs
  • test-integration/test-tools/src/toml_to_args.rs
  • test-integration/test-tools/src/transactions.rs
  • test-integration/test-tools/src/validator.rs
  • test-integration/test-tools/src/workspace_paths.rs
  • test-kit/Cargo.toml
  • test-kit/src/lib.rs
  • test-kit/src/macros.rs
  • tools/genx/Cargo.toml
  • tools/genx/README.md
  • tools/genx/src/main.rs
  • tools/genx/src/test_validator.rs
  • tools/keypair-base58/Cargo.toml
  • tools/keypair-base58/README.md
  • tools/keypair-base58/src/main.rs
  • tools/ledger-stats/Cargo.toml
  • tools/ledger-stats/README.md
  • tools/ledger-stats/src/account.rs
  • tools/ledger-stats/src/accounts.rs
  • tools/ledger-stats/src/blockhash.rs
  • tools/ledger-stats/src/counts.rs
  • tools/ledger-stats/src/lib.rs
  • tools/ledger-stats/src/main.rs
  • tools/ledger-stats/src/transaction_details.rs
  • tools/ledger-stats/src/transaction_logs.rs
  • tools/ledger-stats/src/utils.rs
  • tools/magicblock-tui-client/src/app.rs
  • tools/magicblock-tui-client/src/events.rs
  • tools/magicblock-tui-client/src/logger.rs
  • tools/magicblock-tui-client/src/main.rs
  • tools/magicblock-tui-client/src/state.rs
  • tools/magicblock-tui-client/src/ui.rs
  • tools/magicblock-tui-client/src/utils.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
📝 Walkthrough

Walkthrough

The change migrates account, cloning, scheduling, callback, undelegation, and task execution paths to Engine-backed APIs. Account delegation and slot handling now use AccountMode, AccountFieldPatch, and slot(). Legacy account database, processor, scheduler, cloner, and ledger functionality is removed or reduced. The MagicBlock program rejects removed composition instructions, validator authority uses thread-local engine state, replication message types are added, workspace dependencies are updated, and task request types gain wincode schema derives.

Suggested reviewers: thlorenz, gabrielepicco, taco-paco

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch crate-removal

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@bmuddha
bmuddha force-pushed the crate-removal branch 2 times, most recently from e368004 to 94086c1 Compare July 7, 2026 08:05

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Cargo.toml`:
- Around line 164-167: The workspace is missing the shared rocksdb dependency
entry, while magicblock-ledger still references rocksdb through the workspace.
Update the root Cargo.toml to either restore rocksdb under
[workspace.dependencies] or change the affected crate’s dependency declaration
to an explicit versioned dependency, and verify the crates using rocksdb still
resolve through the intended symbol.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a5aa6499-d803-4b3b-80c6-f6f1ac9d80f6

📥 Commits

Reviewing files that changed from the base of the PR and between a81a5bb and 94086c1.

📒 Files selected for processing (76)
  • Cargo.toml
  • magicblock-account-cloner/Cargo.toml
  • magicblock-account-cloner/README.md
  • magicblock-account-cloner/src/lib.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-accounts-db/Cargo.toml
  • magicblock-accounts-db/README.md
  • magicblock-accounts-db/src/error.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/reset.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-accounts/Cargo.toml
  • magicblock-accounts/README.md
  • magicblock-accounts/src/config.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-accounts/src/traits.rs
  • magicblock-processor/Cargo.toml
  • magicblock-processor/README.md
  • magicblock-processor/src/builtins.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-processor/src/lib.rs
  • magicblock-processor/src/loader.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-processor/tests/fees.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-processor/tests/replica_ordering.rs
  • magicblock-processor/tests/scheduling.rs
  • magicblock-processor/tests/security.rs
  • magicblock-processor/tests/simulation.rs
  • storage-proto/Cargo.toml
  • storage-proto/README.md
  • storage-proto/build.rs
  • storage-proto/proto/confirmed_block.proto
  • storage-proto/proto/entries.proto
  • storage-proto/proto/transaction_by_addr.proto
  • storage-proto/src/convert.rs
  • storage-proto/src/lib.rs
  • test-kit/Cargo.toml
  • test-kit/src/lib.rs
  • test-kit/src/macros.rs
  • tools/genx/Cargo.toml
  • tools/genx/README.md
  • tools/genx/src/main.rs
  • tools/genx/src/test_validator.rs
  • tools/keypair-base58/Cargo.toml
  • tools/keypair-base58/README.md
  • tools/keypair-base58/src/main.rs
  • tools/ledger-stats/Cargo.toml
  • tools/ledger-stats/README.md
  • tools/ledger-stats/src/account.rs
  • tools/ledger-stats/src/accounts.rs
  • tools/ledger-stats/src/blockhash.rs
  • tools/ledger-stats/src/counts.rs
  • tools/ledger-stats/src/lib.rs
  • tools/ledger-stats/src/main.rs
  • tools/ledger-stats/src/transaction_details.rs
  • tools/ledger-stats/src/transaction_logs.rs
  • tools/ledger-stats/src/utils.rs
💤 Files with no reviewable changes (75)
  • magicblock-accounts-db/README.md
  • tools/genx/README.md
  • magicblock-processor/Cargo.toml
  • storage-proto/src/lib.rs
  • tools/genx/Cargo.toml
  • magicblock-accounts/Cargo.toml
  • magicblock-account-cloner/Cargo.toml
  • test-kit/Cargo.toml
  • tools/ledger-stats/src/main.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-processor/tests/fees.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-processor/src/builtins.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-accounts/src/lib.rs
  • tools/ledger-stats/src/counts.rs
  • magicblock-accounts/src/traits.rs
  • tools/ledger-stats/README.md
  • tools/ledger-stats/src/lib.rs
  • magicblock-processor/src/executor/mod.rs
  • test-kit/src/macros.rs
  • magicblock-processor/src/scheduler/state.rs
  • tools/ledger-stats/src/transaction_details.rs
  • tools/ledger-stats/src/transaction_logs.rs
  • magicblock-accounts/README.md
  • tools/ledger-stats/src/account.rs
  • magicblock-accounts-db/src/reset.rs
  • storage-proto/README.md
  • tools/genx/src/main.rs
  • storage-proto/Cargo.toml
  • tools/keypair-base58/Cargo.toml
  • tools/ledger-stats/src/blockhash.rs
  • storage-proto/proto/entries.proto
  • test-kit/src/lib.rs
  • magicblock-account-cloner/src/util.rs
  • storage-proto/proto/transaction_by_addr.proto
  • magicblock-accounts/src/errors.rs
  • tools/ledger-stats/src/utils.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-processor/tests/replica_ordering.rs
  • magicblock-account-cloner/README.md
  • tools/genx/src/test_validator.rs
  • tools/ledger-stats/src/accounts.rs
  • tools/keypair-base58/src/main.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-processor/README.md
  • magicblock-processor/tests/security.rs
  • magicblock-account-cloner/src/lib.rs
  • magicblock-accounts-db/Cargo.toml
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-processor/tests/scheduling.rs
  • magicblock-processor/src/loader.rs
  • magicblock-processor/src/lib.rs
  • magicblock-processor/tests/simulation.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • tools/ledger-stats/Cargo.toml
  • storage-proto/build.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/error.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-accounts-db/src/index/table.rs
  • storage-proto/proto/confirmed_block.proto
  • tools/keypair-base58/README.md
  • magicblock-processor/src/executor/processing.rs
  • storage-proto/src/convert.rs
  • magicblock-accounts/src/config.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-accounts-db/src/index/iterator.rs

Comment thread Cargo.toml Outdated
@bmuddha
bmuddha force-pushed the crate-removal branch 2 times, most recently from d34b5bf to 62e9bc0 Compare July 17, 2026 20:01

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
magicblock-chainlink/src/testing/cloner_stub.rs (1)

193-206: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Keep the stub’s undelegation behavior aligned with ChainlinkCloner.

The stub records the request and succeeds, while production returns UndelegationSchedulingUnavailable. Tests using this stub cannot detect the current production failure. Model the same outcome until scheduling is implemented, then model the restored behavior in both.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-chainlink/src/testing/cloner_stub.rs` around lines 193 - 206,
Update the cloner stub method containing the undelegation handling to return
UndelegationSchedulingUnavailable whenever request.needs_undelegation is true,
matching ChainlinkCloner instead of recording the request and succeeding.
Preserve the existing successful path for requests that do not require
undelegation, and keep both implementations aligned when scheduling is later
implemented.
programs/magicblock/src/magic_scheduled_base_intent.rs (1)

504-521: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove redundant account mode validation.

The checks for "confined" and "ephemeral" accounts have both been migrated to AccountMode::Ephemeral, resulting in two identical validation conditions executed back-to-back. The first check will always catch it, rendering the second block dead code and unnecessarily duplicating the to_account_shared_data()? conversion.

♻️ Proposed refactor
-        if account.to_account_shared_data()?.is(AccountMode::Ephemeral) {
-            ic_msg!(
-                context.invoke_context,
-                "ScheduleCommit ERR: account {} is confined and cannot be committed",
-                pubkey
-            );
-            return Err(InstructionError::InvalidAccountData);
-        }
-
         // Prevent ephemeral accounts from being committed to base chain
         if account.to_account_shared_data()?.is(AccountMode::Ephemeral) {
             ic_msg!(
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@programs/magicblock/src/magic_scheduled_base_intent.rs` around lines 504 -
521, Remove the second redundant AccountMode::Ephemeral validation block,
including its duplicate log message and error return. Keep the first check in
the surrounding schedule-commit flow as the sole validation using
account.to_account_shared_data().
programs/magicblock/src/schedule_transactions/process_schedule_commit.rs (1)

152-198: 🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win

Cache AccountSharedData to avoid redundant cloning and borrows.

Calling acc.to_account_shared_data()? invokes a clone operation on AccountSharedData. Currently, this is called up to three times per committee account inside this loop (along with an additional acc.borrow()?.owner() call), which consumes unnecessary Compute Units and memory on a hot execution path.

You can consolidate these by performing the clone once at the start of the loop block and reusing it.

⚡ Proposed refactor
-        // Prevent accounts that exist only inside the ER from being committed
-        // to base chain. This covers what used to be two separate checks, for
-        // ephemeral and for confined accounts, which are now the same mode.
-        if acc.to_account_shared_data()?.is(AccountMode::Ephemeral) {
+        let account = acc.to_account_shared_data()?;
+
+        // Prevent accounts that exist only inside the ER from being committed
+        // to base chain. This covers what used to be two separate checks, for
+        // ephemeral and for confined accounts, which are now the same mode.
+        if account.is(AccountMode::Ephemeral) {
             ic_msg!(
                 invoke_context,
                 "ScheduleCommit ERR: account {} is ephemeral and cannot be committed to base chain",
                 acc_pubkey
             );
             return Err(InstructionError::InvalidAccountData);
         }
 
         {
-            let is_delegated = acc.to_account_shared_data()?.is(AccountMode::Delegated);
+            let is_delegated = account.is(AccountMode::Delegated);
 
             if opts.request_undelegation {
                 // Must be writable and delegated to avoid double-undelegation
                 let is_writable =
                     get_writable_with_idx(transaction_context, idx as u16)?;
                 if !is_writable || !is_delegated {
                     ic_msg!(
                         invoke_context,
                         "ScheduleCommit ERR: account {} is required to be writable and delegated in order to be undelegated",
                         acc_pubkey
                     );
                     return Err(InstructionError::ReadonlyDataModified);
                 }
             } else if !is_delegated {
                 ic_msg!(
                     invoke_context,
                     "ScheduleCommit ERR: account {} is required to be delegated to the current validator, in order to be committed",
                     acc_pubkey
                 );
                 return Err(InstructionError::IllegalOwner);
             }
 
             // Validate committed account was scheduled by valid authority
-            let acc_owner = *acc.borrow()?.owner();
+            let acc_owner = *account.owner();
             validate_commit_schedule_permissions(
                 &invoke_context,
                 &acc_owner,
                 acc_pubkey,
                 parent_program_id,
                 &signers,
             )?;
 
-            let account = acc.to_account_shared_data()?;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@programs/magicblock/src/schedule_transactions/process_schedule_commit.rs`
around lines 152 - 198, Cache the result of acc.to_account_shared_data()? once
at the start of the committee-account processing block, then reuse it for the
AccountMode checks and as the committed account value. Replace the separate
acc.borrow()?.owner() access with the cached AccountSharedData’s owner, while
preserving the existing validation and error behavior.
magicblock-chainlink/src/chainlink/mod.rs (2)

310-319: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Connect InnerChainlink to the FetchCloner’s notification channel.

FetchCloner::new creates one sender, while this constructor creates another. Consequently, subscribe_undelegation_requests() listens on a channel that the supplied fetch_cloner never publishes to. Require a shared sender or expose subscription through FetchCloner.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-chainlink/src/chainlink/mod.rs` around lines 310 - 319, Update
Chainlink::try_new and the related initialization flow so the supplied
FetchCloner and InnerChainlink share the same undelegation-request broadcast
sender; do not create an independent channel in try_new. Reuse the sender
created by FetchCloner::new, or expose FetchCloner’s subscription/sender through
its API, and ensure subscribe_undelegation_requests listens to that shared
channel.

672-680: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not classify Transient accounts as delegated on ER.

Modes are exclusive, but the owner fallback marks every DLP-owned account as delegated. A Transient account commonly remains DLP-owned, so this reports undelegating state as AccountStatusOnEr::Delegated. Classify strictly by mode, with explicit handling for Transient if callers need that distinction.

Proposed fix
-                    Some(account) => {
-                        if account.is(AccountMode::Delegated)
-                            || account.owner().eq(&dlp_api::id())
-                        {
+                    Some(account) => {
+                        if account.is(AccountMode::Delegated) {
                             AccountStatusOnEr::Delegated
                         } else {
                             AccountStatusOnEr::NotDelegated
                         }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-chainlink/src/chainlink/mod.rs` around lines 672 - 680, Update the
account classification match around accounts_bank.get_account and
AccountStatusOnEr so delegation is determined strictly from
AccountMode::Delegated; remove the owner().eq(&dlp_api::id()) fallback, and add
explicit AccountMode::Transient handling using the appropriate non-delegated
status if callers distinguish it. Preserve Missing handling and avoid
classifying DLP-owned transient accounts as Delegated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@magicblock-aperture/src/requests/http/mod.rs`:
- Around line 123-126: Wire the Engine’s active role into all coordination-gated
paths: in magicblock-aperture/src/requests/http/mod.rs lines 123-126, update
needs_onchain_interactions to allow primary-only RPCs only when the Engine is
primary; in magicblock-aperture/src/server/http/dispatch.rs lines 241-244, make
/health/primary return 503 unless the Engine is primary; and in
magicblock-api/src/magic_validator.rs lines 1111-1135, run task execution only
while primary and handle role transitions safely.

In `@magicblock-chainlink/src/accounts_bank.rs`:
- Around line 10-17: Update the AccountsBank::get_account contract and the
Engine implementation to return Result<Option<AccountSharedData>, _> instead of
collapsing lookup errors into None. Propagate the error from
self.accounts().get(pubkey) while retaining None only for genuinely missing
accounts, and update all trait callers to handle the Result.

In `@magicblock-chainlink/src/cloner/engine_cloner.rs`:
- Around line 57-64: The undelegation-required clone path is inconsistent:
production rejects it while the test stub succeeds. In
magicblock-chainlink/src/cloner/engine_cloner.rs lines 57-64, implement
Engine-backed undelegation scheduling before releasing the clone; in
magicblock-chainlink/src/testing/cloner_stub.rs lines 193-206, mirror the
production rejection behavior until scheduling is restored, then update tests to
cover the restored path.
- Around line 84-89: Update the LoaderV4Status::Retracted branch in the cloner
flow to delete program_id through the Engine before returning. Propagate any
deletion failure instead of unconditionally returning Ok(()), while preserving
the existing debug logging.

In `@magicblock-committor-service/src/service/intent_client.rs`:
- Around line 146-149: Update the flow around register_scheduled_commit_sent and
self.execute so the scheduled-commit notification is not left in the global
registry when execution fails: either register it only after successful
execution or explicitly remove/restore the entry on error. Preserve the existing
notification behavior on successful execution and ensure the caller’s
ScheduledBaseIntentMeta state remains consistent.
- Around line 115-123: Update the MagicContext lookup in the intent client to
avoid expect-based panicking and preserve account-store failures. Map lookup
errors into the service’s dedicated missing-account error, explicitly handle an
absent account with the same error, and propagate the result from the enclosing
method instead of terminating the validator.

In `@magicblock-task-scheduler/src/service.rs`:
- Around line 223-242: The Lagged branch in the service_messages receive loop
currently skips permanently lost task requests. Update this handling to recover
by replaying the missing messages from a persistent/replayable outbox or by
stopping and resynchronizing from an authoritative source, rather than merely
logging and continuing; preserve the existing Closed behavior and normal
TaskRequest deserialization flow.

---

Outside diff comments:
In `@magicblock-chainlink/src/chainlink/mod.rs`:
- Around line 310-319: Update Chainlink::try_new and the related initialization
flow so the supplied FetchCloner and InnerChainlink share the same
undelegation-request broadcast sender; do not create an independent channel in
try_new. Reuse the sender created by FetchCloner::new, or expose FetchCloner’s
subscription/sender through its API, and ensure subscribe_undelegation_requests
listens to that shared channel.
- Around line 672-680: Update the account classification match around
accounts_bank.get_account and AccountStatusOnEr so delegation is determined
strictly from AccountMode::Delegated; remove the owner().eq(&dlp_api::id())
fallback, and add explicit AccountMode::Transient handling using the appropriate
non-delegated status if callers distinguish it. Preserve Missing handling and
avoid classifying DLP-owned transient accounts as Delegated.

In `@magicblock-chainlink/src/testing/cloner_stub.rs`:
- Around line 193-206: Update the cloner stub method containing the undelegation
handling to return UndelegationSchedulingUnavailable whenever
request.needs_undelegation is true, matching ChainlinkCloner instead of
recording the request and succeeding. Preserve the existing successful path for
requests that do not require undelegation, and keep both implementations aligned
when scheduling is later implemented.

In `@programs/magicblock/src/magic_scheduled_base_intent.rs`:
- Around line 504-521: Remove the second redundant AccountMode::Ephemeral
validation block, including its duplicate log message and error return. Keep the
first check in the surrounding schedule-commit flow as the sole validation using
account.to_account_shared_data().

In `@programs/magicblock/src/schedule_transactions/process_schedule_commit.rs`:
- Around line 152-198: Cache the result of acc.to_account_shared_data()? once at
the start of the committee-account processing block, then reuse it for the
AccountMode checks and as the committed account value. Replace the separate
acc.borrow()?.owner() access with the cached AccountSharedData’s owner, while
preserving the existing validation and error behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9ea8b2bb-ccc7-4051-8bae-9b3b86ea40ee

📥 Commits

Reviewing files that changed from the base of the PR and between 94086c1 and 62e9bc0.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (196)
  • .gitignore
  • Cargo.toml
  • magicblock-account-cloner/Cargo.toml
  • magicblock-account-cloner/README.md
  • magicblock-account-cloner/src/lib.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-accounts-db/Cargo.toml
  • magicblock-accounts-db/README.md
  • magicblock-accounts-db/src/error.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/reset.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-accounts/Cargo.toml
  • magicblock-accounts/README.md
  • magicblock-accounts/src/config.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-accounts/src/traits.rs
  • magicblock-aperture/Cargo.toml
  • magicblock-aperture/src/requests/http/mod.rs
  • magicblock-aperture/src/server/http/dispatch.rs
  • magicblock-aperture/tests/transaction_primary_mode.rs
  • magicblock-api/Cargo.toml
  • magicblock-api/src/magic_validator.rs
  • magicblock-chainlink/Cargo.toml
  • magicblock-chainlink/src/accounts_bank.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/ata_projection.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/delegation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/mod.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pending_operation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pipeline.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/program_loader.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/tests.rs
  • magicblock-chainlink/src/chainlink/mod.rs
  • magicblock-chainlink/src/cloner/engine_cloner.rs
  • magicblock-chainlink/src/cloner/errors.rs
  • magicblock-chainlink/src/cloner/mod.rs
  • magicblock-chainlink/src/remote_account_provider/program_account.rs
  • magicblock-chainlink/src/remote_account_provider/pubsub_connection_pool.rs
  • magicblock-chainlink/src/remote_account_provider/remote_account.rs
  • magicblock-chainlink/src/submux/debounce_state.rs
  • magicblock-chainlink/src/testing/accounts.rs
  • magicblock-chainlink/src/testing/cloner_stub.rs
  • magicblock-chainlink/src/testing/mod.rs
  • magicblock-chainlink/tests/01_ensure-accounts.rs
  • magicblock-chainlink/tests/utils/accounts.rs
  • magicblock-committor-service/Cargo.toml
  • magicblock-committor-service/src/committor_processor.rs
  • magicblock-committor-service/src/intent_execution_manager.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_execution_engine.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_scheduler.rs
  • magicblock-committor-service/src/intent_executor/intent_execution_client.rs
  • magicblock-committor-service/src/intent_executor/intent_executor_factory.rs
  • magicblock-committor-service/src/intent_executor/mod.rs
  • magicblock-committor-service/src/persist/commit_persister.rs
  • magicblock-committor-service/src/service.rs
  • magicblock-committor-service/src/service/intent_client.rs
  • magicblock-committor-service/src/tasks/task_builder.rs
  • magicblock-committor-service/src/test_utils.rs
  • magicblock-core/src/coordination_mode.rs
  • magicblock-core/src/intent/mod.rs
  • magicblock-core/src/intent/types.rs
  • magicblock-core/src/lib.rs
  • magicblock-core/src/link.rs
  • magicblock-core/src/link/accounts.rs
  • magicblock-core/src/link/blocks.rs
  • magicblock-core/src/link/transactions.rs
  • magicblock-core/src/replication.rs
  • magicblock-core/src/tls.rs
  • magicblock-core/src/token_programs.rs
  • magicblock-core/src/traits.rs
  • magicblock-ledger/Cargo.toml
  • magicblock-ledger/src/blockstore_processor/mod.rs
  • magicblock-ledger/src/database/rocks_db.rs
  • magicblock-ledger/src/ledger_truncator.rs
  • magicblock-ledger/src/lib.rs
  • magicblock-ledger/src/store/api.rs
  • magicblock-ledger/tests/common.rs
  • magicblock-ledger/tests/get_block.rs
  • magicblock-ledger/tests/test_ledger_truncator.rs
  • magicblock-magic-program-api/Cargo.toml
  • magicblock-magic-program-api/src/args.rs
  • magicblock-processor/Cargo.toml
  • magicblock-processor/README.md
  • magicblock-processor/src/builtins.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-processor/src/lib.rs
  • magicblock-processor/src/loader.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-processor/tests/fees.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-processor/tests/replica_ordering.rs
  • magicblock-processor/tests/scheduling.rs
  • magicblock-processor/tests/security.rs
  • magicblock-processor/tests/simulation.rs
  • magicblock-replicator/Cargo.toml
  • magicblock-replicator/README.md
  • magicblock-replicator/src/error.rs
  • magicblock-replicator/src/lib.rs
  • magicblock-replicator/src/nats/broker.rs
  • magicblock-replicator/src/nats/consumer.rs
  • magicblock-replicator/src/nats/lock_watcher.rs
  • magicblock-replicator/src/nats/mod.rs
  • magicblock-replicator/src/nats/producer.rs
  • magicblock-replicator/src/nats/snapshot.rs
  • magicblock-replicator/src/service/context.rs
  • magicblock-replicator/src/service/mod.rs
  • magicblock-replicator/src/service/primary.rs
  • magicblock-replicator/src/service/replica.rs
  • magicblock-replicator/src/tests.rs
  • magicblock-replicator/src/watcher.rs
  • magicblock-services/Cargo.toml
  • magicblock-services/src/actions_callback_service.rs
  • magicblock-services/src/undelegation_request_service.rs
  • magicblock-task-scheduler/Cargo.toml
  • magicblock-task-scheduler/src/errors.rs
  • magicblock-task-scheduler/src/service.rs
  • programs/magicblock/Cargo.toml
  • programs/magicblock/src/clone_account/common.rs
  • programs/magicblock/src/clone_account/mod.rs
  • programs/magicblock/src/clone_account/process_cleanup.rs
  • programs/magicblock/src/clone_account/process_clone.rs
  • programs/magicblock/src/clone_account/process_clone_continue.rs
  • programs/magicblock/src/clone_account/process_clone_init.rs
  • programs/magicblock/src/clone_account/process_evict.rs
  • programs/magicblock/src/clone_account/process_finalize_buffer.rs
  • programs/magicblock/src/clone_account/process_finalize_v1_buffer.rs
  • programs/magicblock/src/clone_account/process_post_delegation_actions.rs
  • programs/magicblock/src/clone_account/process_set_authority.rs
  • programs/magicblock/src/clone_account/tests.rs
  • programs/magicblock/src/ephemeral_accounts/mod.rs
  • programs/magicblock/src/ephemeral_accounts/process_close.rs
  • programs/magicblock/src/ephemeral_accounts/process_create.rs
  • programs/magicblock/src/ephemeral_accounts/process_resize.rs
  • programs/magicblock/src/ephemeral_accounts/validation.rs
  • programs/magicblock/src/errors.rs
  • programs/magicblock/src/lib.rs
  • programs/magicblock/src/magic_scheduled_base_intent.rs
  • programs/magicblock/src/magicblock_processor.rs
  • programs/magicblock/src/mutate_accounts/mod.rs
  • programs/magicblock/src/mutate_accounts/process_mutate_accounts.rs
  • programs/magicblock/src/schedule_task/mod.rs
  • programs/magicblock/src/schedule_task/process_cancel_task.rs
  • programs/magicblock/src/schedule_task/process_execute_task.rs
  • programs/magicblock/src/schedule_task/process_schedule_task.rs
  • programs/magicblock/src/schedule_transactions/mod.rs
  • programs/magicblock/src/schedule_transactions/process_accept_scheduled_commits.rs
  • programs/magicblock/src/schedule_transactions/process_execute_callback.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_cloned_undelegation.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit_tests.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_intent_bundle.rs
  • programs/magicblock/src/schedule_transactions/process_scheduled_commit_sent.rs
  • programs/magicblock/src/test_utils/mod.rs
  • programs/magicblock/src/utils/account_actions.rs
  • programs/magicblock/src/utils/accounts.rs
  • programs/magicblock/src/utils/instruction_context_frames.rs
  • programs/magicblock/src/utils/instruction_sysvar.rs
  • programs/magicblock/src/utils/instruction_utils.rs
  • programs/magicblock/src/utils/mod.rs
  • programs/magicblock/src/utils/validation.rs
  • programs/magicblock/src/validator.rs
  • rust-toolchain.toml
  • storage-proto/Cargo.toml
  • storage-proto/build.rs
  • storage-proto/src/convert.rs
  • test-kit/Cargo.toml
  • test-kit/src/lib.rs
  • test-kit/src/macros.rs
  • tools/genx/Cargo.toml
  • tools/genx/README.md
  • tools/genx/src/main.rs
  • tools/genx/src/test_validator.rs
  • tools/keypair-base58/Cargo.toml
  • tools/keypair-base58/README.md
  • tools/keypair-base58/src/main.rs
  • tools/ledger-stats/Cargo.toml
  • tools/ledger-stats/README.md
  • tools/ledger-stats/src/account.rs
💤 Files with no reviewable changes (61)
  • magicblock-accounts-db/README.md
  • magicblock-accounts/Cargo.toml
  • magicblock-accounts/README.md
  • magicblock-ledger/tests/test_ledger_truncator.rs
  • magicblock-account-cloner/Cargo.toml
  • magicblock-processor/Cargo.toml
  • magicblock-processor/tests/execution.rs
  • magicblock-accounts-db/src/reset.rs
  • magicblock-ledger/tests/get_block.rs
  • .gitignore
  • magicblock-accounts-db/Cargo.toml
  • magicblock-processor/tests/fees.rs
  • magicblock-accounts-db/src/error.rs
  • magicblock-account-cloner/src/lib.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-processor/src/builtins.rs
  • programs/magicblock/src/utils/mod.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-core/src/coordination_mode.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-ledger/src/blockstore_processor/mod.rs
  • magicblock-account-cloner/README.md
  • magicblock-accounts/src/traits.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-core/src/link/blocks.rs
  • magicblock-processor/README.md
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-accounts/src/config.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-core/src/tls.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-ledger/tests/common.rs
  • magicblock-processor/tests/replica_ordering.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_intent_bundle.rs
  • magicblock-aperture/tests/transaction_primary_mode.rs
  • magicblock-processor/src/lib.rs
  • magicblock-core/src/link/accounts.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-ledger/src/ledger_truncator.rs
  • magicblock-processor/src/loader.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-ledger/src/database/rocks_db.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-core/src/link.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-core/src/link/transactions.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-core/src/replication.rs
  • programs/magicblock/src/lib.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-processor/src/scheduler/tests.rs

Comment thread magicblock-aperture/src/requests/http/mod.rs Outdated
Comment on lines +10 to +17
pub trait AccountsBank: Send + Sync + 'static {
fn get_account(&self, pubkey: &Pubkey) -> Option<AccountSharedData>;
}

impl AccountsBank for Engine {
fn get_account(&self, pubkey: &Pubkey) -> Option<AccountSharedData> {
self.accounts().get(pubkey).ok().flatten()
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Preserve Engine lookup failures instead of reporting missing accounts.

Line 16 converts every Engine read error into None. Downstream code treats None as an absent account and may fetch, clone, or evict based on a storage failure. Make the trait return a Result<Option<AccountSharedData>, _> and propagate the failure.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-chainlink/src/accounts_bank.rs` around lines 10 - 17, Update the
AccountsBank::get_account contract and the Engine implementation to return
Result<Option<AccountSharedData>, _> instead of collapsing lookup errors into
None. Propagate the error from self.accounts().get(pubkey) while retaining None
only for genuinely missing accounts, and update all trait callers to handle the
Result.

Comment thread magicblock-chainlink/src/cloner/engine_cloner.rs
Comment on lines +84 to +89
// A program retracted on chain is not deployed there, so it is not
// materialized here either.
if matches!(program.loader_status, LoaderV4Status::Retracted) {
debug!(program_id = %program_id, "Program is retracted on chain");
return Ok(());
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Delete previously cloned programs when they become retracted.

Returning Ok(()) leaves any existing local executable live after its on-chain program becomes retracted. Delete program_id through the Engine and propagate deletion failures.

Proposed fix
 if matches!(program.loader_status, LoaderV4Status::Retracted) {
     debug!(program_id = %program_id, "Program is retracted on chain");
-    return Ok(());
+    return self.evict_account(program_id).await;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// A program retracted on chain is not deployed there, so it is not
// materialized here either.
if matches!(program.loader_status, LoaderV4Status::Retracted) {
debug!(program_id = %program_id, "Program is retracted on chain");
return Ok(());
}
// A program retracted on chain is not deployed there, so it is not
// materialized here either.
if matches!(program.loader_status, LoaderV4Status::Retracted) {
debug!(program_id = %program_id, "Program is retracted on chain");
return self.evict_account(program_id).await;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-chainlink/src/cloner/engine_cloner.rs` around lines 84 - 89,
Update the LoaderV4Status::Retracted branch in the cloner flow to delete
program_id through the Engine before returning. Propagate any deletion failure
instead of unconditionally returning Ok(()), while preserving the existing debug
logging.

Comment on lines +115 to 123
let magic_context_acc = self
.engine
.accounts()
.get(&MAGIC_CONTEXT_PUBKEY)
.ok()
.flatten()
.expect(
"Validator found to be running without MagicContext account!",
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Propagate the MagicContext lookup failure instead of panicking.

.ok() also erases the underlying account-store error. Map that error and return a dedicated missing-account error rather than terminating the validator.

As per path instructions, “Treat any usage of .unwrap() or .expect() in production Rust code as a MAJOR issue.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-committor-service/src/service/intent_client.rs` around lines 115 -
123, Update the MagicContext lookup in the intent client to avoid expect-based
panicking and preserve account-store failures. Map lookup errors into the
service’s dedicated missing-account error, explicitly handle an absent account
with the same error, and propagate the result from the enclosing method instead
of terminating the validator.

Source: Path instructions

Comment on lines 146 to 149
let sent_commit = build_sent_commit(meta, &result);
register_scheduled_commit_sent(sent_commit);
let txn = with_encoded(tx).inspect_err(|err| {
// Unreachable case, all intent transactions are smaller than 64KB by construction
error!(error = ?err, "Failed to bincode intent transaction");
})?;
self.transaction_scheduler
.execute(txn)
self.execute(message)
.await

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Roll back or retain the notification when execution fails.

register_scheduled_commit_sent mutates the global registry before the fallible Engine execution. On failure, the entry remains while the caller has already removed ScheduledBaseIntentMeta, so the notification is neither cleaned up nor retried until external recovery.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-committor-service/src/service/intent_client.rs` around lines 146 -
149, Update the flow around register_scheduled_commit_sent and self.execute so
the scheduled-commit notification is not left in the global registry when
execution fails: either register it only after successful execution or
explicitly remove/restore the entry on error. Preserve the existing notification
behavior on successful execution and ensure the caller’s ScheduledBaseIntentMeta
state remains consistent.

Comment on lines +223 to +242
message = self.service_messages.recv() => {
let encoded = match message {
Ok(encoded) => encoded,
// Slow consumers drop the oldest messages; a lagged task
// request would be lost, so surface it rather than hide it.
Err(broadcast::error::RecvError::Lagged(skipped)) => {
warn!("Task scheduler lagged, {skipped} service messages skipped");
continue;
}
Err(broadcast::error::RecvError::Closed) => {
info!("Service message stream closed, stopping task scheduler");
break;
}
};
// The stream carries every service message, not only task
// requests; anything that is not a `TaskRequest` is ignored.
let Ok(task) = wincode::deserialize::<TaskRequest>(&encoded)
else {
continue;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Recover lagged task requests instead of dropping them.

A broadcast lag permanently discards committed schedule/cancel messages, yet this branch only logs and continues. Use a replayable sequence/persistent outbox or stop and resynchronize from an authoritative source when Lagged occurs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-task-scheduler/src/service.rs` around lines 223 - 242, The Lagged
branch in the service_messages receive loop currently skips permanently lost
task requests. Update this handling to recover by replaying the missing messages
from a persistent/replayable outbox or by stopping and resynchronizing from an
authoritative source, rather than merely logging and continuing; preserve the
existing Closed behavior and normal TaskRequest deserialization flow.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
programs/magicblock/src/magic_scheduled_base_intent.rs (1)

504-521: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Remove the duplicated ephemeral-mode check.

Line 504 already rejects AccountMode::Ephemeral, so the identical check at Line 514 is unreachable and its accurate diagnostic is never emitted. Keep only the second block.

Proposed fix
-        if account.to_account_shared_data()?.is(AccountMode::Ephemeral) {
-            ic_msg!(
-                context.invoke_context,
-                "ScheduleCommit ERR: account {} is confined and cannot be committed",
-                pubkey
-            );
-            return Err(InstructionError::InvalidAccountData);
-        }
-
         // Prevent ephemeral accounts from being committed to base chain
         if account.to_account_shared_data()?.is(AccountMode::Ephemeral) {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@programs/magicblock/src/magic_scheduled_base_intent.rs` around lines 504 -
521, Remove the first duplicate AccountMode::Ephemeral validation block in the
schedule commit flow, including its “confined” diagnostic and error return. Keep
the later check and its “ephemeral and cannot be committed to base chain”
diagnostic unchanged.
magicblock-aperture/src/server/http/dispatch.rs (1)

222-225: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Restore primary-state gating for /health/primary.

This endpoint now returns HTTP 200 for replicas and nodes not yet promoted to primary. Primary-aware load balancers can consequently route writes to an ineligible node. Consult the Engine’s current role/readiness state and return 503 Service Unavailable unless primary.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-aperture/src/server/http/dispatch.rs` around lines 222 - 225,
Update the `/health/primary` branch in the HTTP dispatch logic to consult the
Engine’s current role/readiness state and return `503 Service Unavailable` for
replicas or nodes not yet promoted to primary. Preserve the existing successful
response and access-control headers only when the node is primary.
magicblock-api/src/magic_validator.rs (1)

746-757: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Gate unregistration on the Engine’s active role.

Static ReplicationMode::Primary does not prove this node is currently primary after a runtime role transition. A standby shutting down can therefore unregister the active validator’s on-chain record. Wire the active Engine role into this check.

This extends the previously reported missing Engine role-state wiring.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-api/src/magic_validator.rs` around lines 746 - 757, Update
start_unregister_validator_on_chain to require the Engine’s current active role
to be Primary in addition to the existing replication-mode and lifecycle checks.
Use the runtime role-state source already exposed by the Engine rather than
relying on config.validator.replication_mode, so a standby after a role
transition cannot unregister the active validator’s on-chain record.
♻️ Duplicate comments (2)
magicblock-committor-service/src/service/intent_client.rs (2)

115-123: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Propagate the MagicContext lookup failure instead of panicking.

.ok() also erases the underlying account-store error. Map that error and return a dedicated missing-account error rather than terminating the validator.

As per path instructions, "Treat any usage of .unwrap() or .expect() in production Rust code as a MAJOR issue."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-committor-service/src/service/intent_client.rs` around lines 115 -
123, Replace the panic in the MagicContext lookup within the intent client flow
with propagated error handling: preserve account-store failures by mapping them
into the service’s dedicated missing-account error, and return that error
instead of using `.ok().flatten().expect(...)`. Remove the `.expect()` and
ensure the surrounding function’s error return type carries both lookup and
missing-account cases.

Source: Path instructions


146-154: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Roll back or retain the notification when execution fails.

register_scheduled_commit_sent mutates the global registry before the fallible Engine execution. On failure, the entry remains while the caller has already removed ScheduledBaseIntentMeta, so the notification is neither cleaned up nor retried until external recovery.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-committor-service/src/service/intent_client.rs` around lines 146 -
154, Update the flow around register_scheduled_commit_sent and self.execute so a
failed execution does not leave an orphaned global notification: either register
the sent commit only after self.execute succeeds, or explicitly remove/restore
the registration in the inspect_err failure path. Preserve the existing success
logging and error propagation behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Cargo.toml`:
- Around line 56-60: Update the project setup and CI workflows to ensure the
sibling ../engine checkout is provisioned before Cargo resolves the path
dependencies magicblock-engine, magicblock-engine-nucleus, and ledger. Apply
this consistently to all affected workflow/local setup paths, or replace those
cross-repository path dependencies with available non-path dependencies while
preserving the existing crate usage.

In `@magicblock-committor-service/Cargo.toml`:
- Around line 21-23: Correct the comment typos in Cargo.toml by changing “TDOO”
to “TODO” and “behinf” to “behind,” without modifying the comments’ meaning.

In `@magicblock-task-scheduler/src/service.rs`:
- Around line 440-452: Update submit_crank’s transaction error mapping so
compose/await/commit failures retain distinct error categories instead of all
becoming TransactionExecution. Ensure is_retryable_task_execution_error marks
only transient engine or RPC failures as retryable, while deterministic program
or instruction failures remain permanent.
- Around line 213-217: Update the crank batch task around send_crank_batch and
the corresponding flow near line 431 to drain spawned workers with join_next
instead of join_all. Handle each JoinError individually so one worker panic does
not abort processing, and ensure crank_tx.send(...) is always called with the
batch result regardless of individual worker failures.

---

Outside diff comments:
In `@magicblock-aperture/src/server/http/dispatch.rs`:
- Around line 222-225: Update the `/health/primary` branch in the HTTP dispatch
logic to consult the Engine’s current role/readiness state and return `503
Service Unavailable` for replicas or nodes not yet promoted to primary. Preserve
the existing successful response and access-control headers only when the node
is primary.

In `@magicblock-api/src/magic_validator.rs`:
- Around line 746-757: Update start_unregister_validator_on_chain to require the
Engine’s current active role to be Primary in addition to the existing
replication-mode and lifecycle checks. Use the runtime role-state source already
exposed by the Engine rather than relying on config.validator.replication_mode,
so a standby after a role transition cannot unregister the active validator’s
on-chain record.

In `@programs/magicblock/src/magic_scheduled_base_intent.rs`:
- Around line 504-521: Remove the first duplicate AccountMode::Ephemeral
validation block in the schedule commit flow, including its “confined”
diagnostic and error return. Keep the later check and its “ephemeral and cannot
be committed to base chain” diagnostic unchanged.

---

Duplicate comments:
In `@magicblock-committor-service/src/service/intent_client.rs`:
- Around line 115-123: Replace the panic in the MagicContext lookup within the
intent client flow with propagated error handling: preserve account-store
failures by mapping them into the service’s dedicated missing-account error, and
return that error instead of using `.ok().flatten().expect(...)`. Remove the
`.expect()` and ensure the surrounding function’s error return type carries both
lookup and missing-account cases.
- Around line 146-154: Update the flow around register_scheduled_commit_sent and
self.execute so a failed execution does not leave an orphaned global
notification: either register the sent commit only after self.execute succeeds,
or explicitly remove/restore the registration in the inspect_err failure path.
Preserve the existing success logging and error propagation behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5e761615-5a67-4199-85f8-863d691ef3d6

📥 Commits

Reviewing files that changed from the base of the PR and between 62e9bc0 and 5146166.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (214)
  • .gitignore
  • Cargo.toml
  • magicblock-account-cloner/Cargo.toml
  • magicblock-account-cloner/README.md
  • magicblock-account-cloner/src/lib.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-accounts-db/Cargo.toml
  • magicblock-accounts-db/README.md
  • magicblock-accounts-db/src/error.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-accounts-db/src/reset.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-accounts/Cargo.toml
  • magicblock-accounts/README.md
  • magicblock-accounts/src/config.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-accounts/src/traits.rs
  • magicblock-aperture/Cargo.toml
  • magicblock-aperture/src/encoder.rs
  • magicblock-aperture/src/processor.rs
  • magicblock-aperture/src/requests/http/mod.rs
  • magicblock-aperture/src/server/http/dispatch.rs
  • magicblock-aperture/src/server/http/mod.rs
  • magicblock-aperture/src/state/blocks.rs
  • magicblock-aperture/src/state/cache.rs
  • magicblock-aperture/src/state/mod.rs
  • magicblock-aperture/src/state/signatures.rs
  • magicblock-aperture/src/state/subscriptions.rs
  • magicblock-aperture/src/state/transactions.rs
  • magicblock-aperture/src/utils.rs
  • magicblock-aperture/tests/transaction_primary_mode.rs
  • magicblock-api/Cargo.toml
  • magicblock-api/src/magic_validator.rs
  • magicblock-chainlink/Cargo.toml
  • magicblock-chainlink/src/accounts_bank.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/ata_projection.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/delegation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/mod.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pending_operation.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/pipeline.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/program_loader.rs
  • magicblock-chainlink/src/chainlink/fetch_cloner/tests.rs
  • magicblock-chainlink/src/chainlink/mod.rs
  • magicblock-chainlink/src/cloner/engine_cloner.rs
  • magicblock-chainlink/src/cloner/errors.rs
  • magicblock-chainlink/src/cloner/mod.rs
  • magicblock-chainlink/src/remote_account_provider/program_account.rs
  • magicblock-chainlink/src/remote_account_provider/pubsub_connection_pool.rs
  • magicblock-chainlink/src/remote_account_provider/remote_account.rs
  • magicblock-chainlink/src/submux/debounce_state.rs
  • magicblock-chainlink/src/testing/accounts.rs
  • magicblock-chainlink/src/testing/cloner_stub.rs
  • magicblock-chainlink/src/testing/mod.rs
  • magicblock-chainlink/tests/01_ensure-accounts.rs
  • magicblock-chainlink/tests/utils/accounts.rs
  • magicblock-committor-service/Cargo.toml
  • magicblock-committor-service/src/committor_processor.rs
  • magicblock-committor-service/src/intent_execution_manager.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_execution_engine.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_scheduler.rs
  • magicblock-committor-service/src/intent_executor/intent_execution_client.rs
  • magicblock-committor-service/src/intent_executor/intent_executor_factory.rs
  • magicblock-committor-service/src/intent_executor/mod.rs
  • magicblock-committor-service/src/persist/commit_persister.rs
  • magicblock-committor-service/src/service.rs
  • magicblock-committor-service/src/service/intent_client.rs
  • magicblock-committor-service/src/tasks/task_builder.rs
  • magicblock-committor-service/src/test_utils.rs
  • magicblock-core/src/coordination_mode.rs
  • magicblock-core/src/intent/mod.rs
  • magicblock-core/src/intent/types.rs
  • magicblock-core/src/lib.rs
  • magicblock-core/src/link.rs
  • magicblock-core/src/link/accounts.rs
  • magicblock-core/src/link/blocks.rs
  • magicblock-core/src/link/transactions.rs
  • magicblock-core/src/replication.rs
  • magicblock-core/src/tls.rs
  • magicblock-core/src/token_programs.rs
  • magicblock-core/src/traits.rs
  • magicblock-ledger/Cargo.toml
  • magicblock-ledger/src/blockstore_processor/mod.rs
  • magicblock-ledger/src/database/rocks_db.rs
  • magicblock-ledger/src/ledger_truncator.rs
  • magicblock-ledger/src/lib.rs
  • magicblock-ledger/src/store/api.rs
  • magicblock-ledger/tests/common.rs
  • magicblock-ledger/tests/get_block.rs
  • magicblock-ledger/tests/test_ledger_truncator.rs
  • magicblock-magic-program-api/Cargo.toml
  • magicblock-magic-program-api/src/args.rs
  • magicblock-processor/Cargo.toml
  • magicblock-processor/README.md
  • magicblock-processor/src/builtins.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-processor/src/lib.rs
  • magicblock-processor/src/loader.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-processor/src/scheduler/locks.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-processor/tests/fees.rs
  • magicblock-processor/tests/post_delegation_actions.rs
  • magicblock-processor/tests/replay.rs
  • magicblock-processor/tests/replica_ordering.rs
  • magicblock-processor/tests/scheduling.rs
  • magicblock-processor/tests/security.rs
  • magicblock-processor/tests/simulation.rs
  • magicblock-replicator/Cargo.toml
  • magicblock-replicator/README.md
  • magicblock-replicator/src/error.rs
  • magicblock-replicator/src/lib.rs
  • magicblock-replicator/src/nats/broker.rs
  • magicblock-replicator/src/nats/consumer.rs
  • magicblock-replicator/src/nats/lock_watcher.rs
  • magicblock-replicator/src/nats/mod.rs
  • magicblock-replicator/src/nats/producer.rs
  • magicblock-replicator/src/nats/snapshot.rs
  • magicblock-replicator/src/service/context.rs
  • magicblock-replicator/src/service/mod.rs
  • magicblock-replicator/src/service/primary.rs
  • magicblock-replicator/src/service/replica.rs
  • magicblock-replicator/src/tests.rs
  • magicblock-replicator/src/watcher.rs
  • magicblock-services/Cargo.toml
  • magicblock-services/src/actions_callback_service.rs
  • magicblock-services/src/undelegation_request_service.rs
  • magicblock-task-scheduler/Cargo.toml
  • magicblock-task-scheduler/src/errors.rs
  • magicblock-task-scheduler/src/service.rs
  • programs/magicblock/Cargo.toml
  • programs/magicblock/src/clone_account/common.rs
  • programs/magicblock/src/clone_account/mod.rs
  • programs/magicblock/src/clone_account/process_cleanup.rs
  • programs/magicblock/src/clone_account/process_clone.rs
  • programs/magicblock/src/clone_account/process_clone_continue.rs
  • programs/magicblock/src/clone_account/process_clone_init.rs
  • programs/magicblock/src/clone_account/process_evict.rs
  • programs/magicblock/src/clone_account/process_finalize_buffer.rs
  • programs/magicblock/src/clone_account/process_finalize_v1_buffer.rs
  • programs/magicblock/src/clone_account/process_post_delegation_actions.rs
  • programs/magicblock/src/clone_account/process_set_authority.rs
  • programs/magicblock/src/clone_account/tests.rs
  • programs/magicblock/src/ephemeral_accounts/mod.rs
  • programs/magicblock/src/ephemeral_accounts/process_close.rs
  • programs/magicblock/src/ephemeral_accounts/process_create.rs
  • programs/magicblock/src/ephemeral_accounts/process_resize.rs
  • programs/magicblock/src/ephemeral_accounts/validation.rs
  • programs/magicblock/src/errors.rs
  • programs/magicblock/src/lib.rs
  • programs/magicblock/src/magic_scheduled_base_intent.rs
  • programs/magicblock/src/magicblock_processor.rs
  • programs/magicblock/src/mutate_accounts/mod.rs
  • programs/magicblock/src/mutate_accounts/process_mutate_accounts.rs
  • programs/magicblock/src/schedule_task/mod.rs
  • programs/magicblock/src/schedule_task/process_cancel_task.rs
  • programs/magicblock/src/schedule_task/process_execute_task.rs
  • programs/magicblock/src/schedule_task/process_schedule_task.rs
  • programs/magicblock/src/schedule_transactions/mod.rs
  • programs/magicblock/src/schedule_transactions/process_accept_scheduled_commits.rs
  • programs/magicblock/src/schedule_transactions/process_execute_callback.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_cloned_undelegation.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_commit_tests.rs
  • programs/magicblock/src/schedule_transactions/process_schedule_intent_bundle.rs
  • programs/magicblock/src/schedule_transactions/process_scheduled_commit_sent.rs
  • programs/magicblock/src/test_utils/mod.rs
  • programs/magicblock/src/utils/account_actions.rs
  • programs/magicblock/src/utils/accounts.rs
  • programs/magicblock/src/utils/instruction_context_frames.rs
  • programs/magicblock/src/utils/instruction_sysvar.rs
  • programs/magicblock/src/utils/instruction_utils.rs
  • programs/magicblock/src/utils/mod.rs
  • programs/magicblock/src/utils/validation.rs
  • programs/magicblock/src/validator.rs
  • rust-toolchain.toml
  • storage-proto/Cargo.toml
  • storage-proto/build.rs
  • storage-proto/src/convert.rs
  • test-kit/Cargo.toml
  • test-kit/src/lib.rs
  • test-kit/src/macros.rs
  • tools/genx/Cargo.toml
  • tools/genx/README.md
  • tools/genx/src/main.rs
  • tools/genx/src/test_validator.rs
  • tools/keypair-base58/Cargo.toml
  • tools/keypair-base58/README.md
  • tools/keypair-base58/src/main.rs
  • tools/ledger-stats/Cargo.toml
  • tools/ledger-stats/README.md
  • tools/ledger-stats/src/account.rs
  • tools/ledger-stats/src/accounts.rs
  • tools/ledger-stats/src/blockhash.rs
  • tools/ledger-stats/src/counts.rs
  • tools/ledger-stats/src/lib.rs
  • tools/ledger-stats/src/main.rs
  • tools/ledger-stats/src/transaction_details.rs
  • tools/ledger-stats/src/transaction_logs.rs
  • tools/ledger-stats/src/utils.rs
💤 Files with no reviewable changes (63)
  • magicblock-accounts/README.md
  • magicblock-account-cloner/Cargo.toml
  • magicblock-accounts/src/traits.rs
  • magicblock-accounts-db/README.md
  • magicblock-accounts-db/Cargo.toml
  • magicblock-processor/Cargo.toml
  • magicblock-ledger/tests/common.rs
  • magicblock-accounts/src/lib.rs
  • magicblock-account-cloner/README.md
  • programs/magicblock/src/schedule_transactions/process_schedule_intent_bundle.rs
  • magicblock-accounts/Cargo.toml
  • magicblock-processor/src/lib.rs
  • magicblock-processor/src/scheduler/state.rs
  • magicblock-accounts-db/src/traits.rs
  • magicblock-processor/src/builtins.rs
  • programs/magicblock/src/utils/mod.rs
  • magicblock-core/src/link.rs
  • magicblock-aperture/tests/transaction_primary_mode.rs
  • magicblock-processor/src/executor/callback.rs
  • magicblock-core/src/link/blocks.rs
  • magicblock-aperture/src/state/signatures.rs
  • magicblock-core/src/tls.rs
  • magicblock-processor/tests/ephemeral_accounts.rs
  • magicblock-accounts/src/errors.rs
  • magicblock-accounts-db/src/index/iterator.rs
  • magicblock-ledger/tests/test_ledger_truncator.rs
  • magicblock-accounts-db/src/index/tests.rs
  • magicblock-processor/src/scheduler/mod.rs
  • magicblock-ledger/src/blockstore_processor/mod.rs
  • magicblock-processor/src/scheduler/tests.rs
  • magicblock-aperture/src/state/cache.rs
  • magicblock-aperture/src/state/transactions.rs
  • magicblock-accounts/src/config.rs
  • magicblock-accounts-db/src/error.rs
  • magicblock-accounts-db/src/storage.rs
  • magicblock-account-cloner/src/lib.rs
  • magicblock-committor-service/src/intent_execution_manager/intent_scheduler.rs
  • magicblock-processor/src/loader.rs
  • magicblock-ledger/src/database/rocks_db.rs
  • magicblock-ledger/tests/get_block.rs
  • magicblock-processor/src/executor/mod.rs
  • magicblock-committor-service/src/persist/commit_persister.rs
  • magicblock-account-cloner/src/util.rs
  • magicblock-accounts-db/src/index/utils.rs
  • magicblock-aperture/src/state/blocks.rs
  • magicblock-processor/src/scheduler/coordinator.rs
  • magicblock-accounts-db/src/snapshot.rs
  • magicblock-processor/README.md
  • .gitignore
  • magicblock-processor/src/scheduler/locks.rs
  • programs/magicblock/src/lib.rs
  • magicblock-aperture/src/processor.rs
  • magicblock-processor/tests/execution.rs
  • magicblock-accounts-db/src/index.rs
  • magicblock-core/src/link/accounts.rs
  • magicblock-accounts-db/src/tests.rs
  • magicblock-ledger/src/ledger_truncator.rs
  • magicblock-processor/src/executor/processing.rs
  • magicblock-accounts-db/src/index/table.rs
  • magicblock-accounts-db/src/lib.rs
  • magicblock-core/src/coordination_mode.rs
  • magicblock-core/src/link/transactions.rs
  • magicblock-accounts-db/src/reset.rs

Comment thread Cargo.toml
Comment thread magicblock-committor-service/Cargo.toml
Comment on lines 213 to 217
tokio::spawn(async move {
let result =
Self::send_crank_batch(rpc_client, &block, tx_counter, &batch).await;
Self::send_crank_batch(&engine, tx_counter, &batch).await;
let _ = crank_tx.send((batch, result));
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
version=$(awk '
  $0 == "name = \"tokio\"" { found=1 }
  found && /^version = / { gsub(/[" ]/, "", $3); print $3; exit }
' Cargo.lock)
curl -Ls "https://docs.rs/tokio/${version}/tokio/task/struct.JoinSet.html" |
  grep -i -C2 'join_all.*panic\|panics'

Repository: magicblock-labs/magicblock-validator

Length of output: 4742


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant section of the file with line numbers.
sed -n '180,250p' magicblock-task-scheduler/src/service.rs | cat -n

echo
echo "----"
echo "Search for JoinSet usage in the file."
rg -n "JoinSet|join_all|join_next|spawn\\(" magicblock-task-scheduler/src/service.rs

Repository: magicblock-labs/magicblock-validator

Length of output: 4402


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '180,250p' magicblock-task-scheduler/src/service.rs | cat -n

echo
echo "----"
rg -n "JoinSet|join_all|join_next|spawn\\(" magicblock-task-scheduler/src/service.rs

Repository: magicblock-labs/magicblock-validator

Length of output: 4364


🏁 Script executed:

#!/bin/bash
set -euo pipefail

sed -n '395,440p' magicblock-task-scheduler/src/service.rs | cat -n

Repository: magicblock-labs/magicblock-validator

Length of output: 2182


Handle crank task joins individually join_all panics on a child JoinError, so a single worker panic can abort the detached batch task before crank_tx.send(...) runs. Drain with join_next and always emit a batch result; same issue at line 431.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@magicblock-task-scheduler/src/service.rs` around lines 213 - 217, Update the
crank batch task around send_crank_batch and the corresponding flow near line
431 to drain spawned workers with join_next instead of join_all. Handle each
JoinError individually so one worker panic does not abort processing, and ensure
crank_tx.send(...) is always called with the batch result regardless of
individual worker failures.

Comment thread magicblock-task-scheduler/src/service.rs
@bmuddha
bmuddha force-pushed the crate-removal branch 6 times, most recently from 824fc98 to 53b12b1 Compare July 20, 2026 14:37
@bmuddha

bmuddha commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

superseeded by #1452

@bmuddha bmuddha closed this Jul 21, 2026
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