Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions magicblock-account-cloner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,15 @@ async-trait = { workspace = true }
bincode = { workspace = true }
lru = { workspace = true }
tracing = { workspace = true }
magicblock-accounts-db = { workspace = true }
magicblock-chainlink = { workspace = true }
magicblock-committor-service = { workspace = true }
magicblock-config = { workspace = true }
magicblock-core = { workspace = true }
magicblock-ledger = { workspace = true }
magicblock-magic-program-api = { workspace = true }
magicblock-program = { workspace = true }
magicblock-rpc-client = { workspace = true }
rand = { workspace = true }
solana-account = { workspace = true }
solana-hash = { workspace = true }
solana-instruction = { workspace = true }
solana-loader-v3-interface = { workspace = true }
solana-loader-v4-interface = { workspace = true }
solana-pubkey = { workspace = true }
solana-sdk-ids = { workspace = true }
Expand All @@ -35,8 +30,3 @@ solana-sysvar = { workspace = true }
solana-transaction = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }

[dev-dependencies]
magicblock-committor-service = { workspace = true, features = [
"dev-context-only-utils",
] }
68 changes: 0 additions & 68 deletions magicblock-account-cloner/src/account_cloner.rs

This file was deleted.

2 changes: 0 additions & 2 deletions magicblock-account-cloner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ use tracing::*;
/// Max data that fits in a single transaction (~63KB)
pub const MAX_INLINE_DATA_SIZE: usize = 63 * 1024;

mod account_cloner;
mod util;

pub use account_cloner::*;
pub use util::derive_buffer_pubkey;

/// Keep only a bounded history of sent action tx signatures to avoid
Expand Down
18 changes: 0 additions & 18 deletions magicblock-account-cloner/src/util.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
use std::sync::Arc;

use magicblock_committor_service::BaseIntentCommittor;
use magicblock_program::validator::validator_authority_id;
use magicblock_rpc_client::MagicblockRpcClient;
use solana_pubkey::Pubkey;
use solana_signature::Signature;

/// Seed for deriving buffer account PDA
const BUFFER_SEED: &[u8] = b"buffer";
Expand All @@ -15,16 +10,3 @@ pub fn derive_buffer_pubkey(program_pubkey: &Pubkey) -> (Pubkey, u8) {
let seeds: &[&[u8]] = &[BUFFER_SEED, program_pubkey.as_ref()];
Pubkey::find_program_address(seeds, &validator_authority_id())
}

pub(crate) async fn get_tx_diagnostics<C: BaseIntentCommittor>(
sig: &Signature,
committor: &Arc<C>,
) -> (Option<Vec<String>>, Option<u64>) {
if let Ok(Ok(transaction)) = committor.get_transaction(sig).await {
let cus = MagicblockRpcClient::get_cus_from_transaction(&transaction);
let logs = MagicblockRpcClient::get_logs_from_transaction(&transaction);
(logs, cus)
} else {
(None, None)
}
}
16 changes: 0 additions & 16 deletions magicblock-accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,10 @@ edition.workspace = true

[dependencies]
async-trait = { workspace = true }
tracing = { workspace = true }

magicblock-account-cloner = { workspace = true }
magicblock-accounts-db = { workspace = true }
magicblock-chainlink = { workspace = true }
magicblock-committor-service = { workspace = true }
magicblock-core = { workspace = true }
magicblock-metrics = { workspace = true }
magicblock-program = { workspace = true }
solana-hash = { workspace = true }
solana-pubkey = { workspace = true }
solana-transaction-error = { workspace = true }
solana-transaction = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }

[dev-dependencies]
magicblock-committor-service = { workspace = true, features = [
"dev-context-only-utils",
] }
tokio-util = { workspace = true }
10 changes: 1 addition & 9 deletions magicblock-accounts/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::collections::HashSet;

use magicblock_account_cloner::AccountClonerError;
use magicblock_committor_service::{
error::CommittorServiceError, service_ext::CommittorServiceExtError,
ChangesetMeta,
error::CommittorServiceError, ChangesetMeta,
};
use solana_pubkey::Pubkey;
use solana_transaction_error::TransactionError;
Expand All @@ -23,15 +21,9 @@ pub enum AccountsError {
#[error("CommittorSerivceError: {0}")]
CommittorSerivceError(#[from] CommittorServiceError),

#[error("CommittorServiceExtError: {0}")]
CommittorServiceExtError(#[from] CommittorServiceExtError),

#[error("TokioOneshotRecvError")]
TokioOneshotRecvError(#[from] Box<tokio::sync::oneshot::error::RecvError>),

#[error("AccountClonerError")]
AccountClonerError(#[from] AccountClonerError),

#[error("InvalidRpcUrl '{0}'")]
InvalidRpcUrl(String),

Expand Down
1 change: 0 additions & 1 deletion magicblock-accounts/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
mod config;
pub mod errors;
pub mod scheduled_commits_processor;
mod traits;

pub use config::*;
Expand Down
Loading
Loading