Skip to content

refactor: remove crates moved to magicblock engine#1394

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

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

  • Chores

    • Updated the workspace to the latest Rust edition and cleaned up dependency declarations.
    • Removed several unused package manifests and tool-specific files.
  • Refactor

    • Simplified the codebase by removing multiple internal modules and public APIs across accounts, processor, and storage components.
    • Streamlined workspace member ordering and dependency patching.
  • Documentation

    • Removed outdated README content for several crates and tools.
  • Tests

    • Deleted outdated test suites and test helpers.

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

Warning

Review limit reached

@bmuddha, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 78fa8762-e7a4-47d3-8185-cefbc94b06da

📥 Commits

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

📒 Files selected for processing (68)
  • 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
  • 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
📝 Walkthrough

Walkthrough

Changes

This PR removes a large set of legacy crates and modules from the workspace, including magicblock-account-cloner, magicblock-accounts-db, magicblock-accounts, magicblock-processor, storage-proto, test-kit, and several tools (genx, keypair-base58, ledger-stats), deleting their manifests, source code, tests, and READMEs entirely. The root Cargo.toml is updated: workspace members are reordered/trimmed (programs/magicblock moved earlier), edition is bumped from 2021 to 2024, several dependency feature declarations are reformatted from multi-line to inline arrays, the rocksdb git dependency override is removed, and the [patch.crates-io] section drops solana-account, solana-program-runtime, and rocksdb patch entries while retaining solana-svm, solana-transaction-context, and libsodium-rs patches.

Sequence Diagram(s)

No sequence diagram generated, as this PR consists of workspace configuration edits and wholesale crate/module deletions rather than new or modified runtime behavior.

Suggested reviewers: 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
Comment on lines 164 to +167
rusqlite = { version = "0.37.0", features = ["bundled"] } # bundled sqlite 3.44
rustc-hash = "2.1"
rustc_version = "0.4"
rustls = { version = "0.23", default-features = false, features = [
"aws_lc_rs",
"std",
] }
rustls = { version = "0.23", default-features = false, features = ["aws_lc_rs", "std"] }

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
echo "Workspace/root rocksdb declarations:"
rg -n '^\s*rocksdb\s*=|package\s*=\s*"rocksdb"' Cargo.toml Cargo.lock

echo "Per-crate rocksdb dependency declarations:"
fd -HI '^Cargo\.toml$' . -x sh -c '
  echo "--- $1"
  rg -n "rocksdb\s*=|package\s*=\s*\"rocksdb\"" "$1" || true
' sh {}

echo "Rust source imports/usages:"
rg -n 'use\s+rocksdb\b|rocksdb::' --glob '*.rs' .

Repository: magicblock-labs/magicblock-validator

Length of output: 3917


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Root Cargo.toml rocksdb-related lines:"
rg -n 'rocksdb|workspace\.dependencies|^\[workspace\]|\[dependencies\]' Cargo.toml

echo
echo "magicblock-ledger/Cargo.toml rocksdb-related lines:"
rg -n 'rocksdb|workspace\.dependencies|^\[dependencies\]' magicblock-ledger/Cargo.toml

echo
echo "test-integration/Cargo.toml rocksdb-related lines:"
rg -n 'rocksdb|workspace\.dependencies|^\[dependencies\]' test-integration/Cargo.toml

Repository: magicblock-labs/magicblock-validator

Length of output: 658


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Root Cargo.toml around workspace dependencies:"
sed -n '43,90p' Cargo.toml | cat -n

echo
echo "Root Cargo.toml around the edited lines:"
sed -n '155,172p' Cargo.toml | cat -n

echo
echo "magicblock-ledger/Cargo.toml around rocksdb dependency:"
sed -n '34,48p' magicblock-ledger/Cargo.toml | cat -n

Repository: magicblock-labs/magicblock-validator

Length of output: 3458


Restore the workspace rocksdb dependency
magicblock-ledger/Cargo.toml still uses rocksdb = { workspace = true }, but Cargo.toml no longer defines rocksdb under [workspace.dependencies]. Re-add the workspace entry or switch this crate to an explicit dependency.

🤖 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 `@Cargo.toml` around lines 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.

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