Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
207 commits
Select commit Hold shift + click to select a range
45bdf72
test: add realloc ix to flexi counter
thlorenz Mar 10, 2025
2e61882
chore: resort workspace depencencies
thlorenz May 7, 2025
6806acf
chore: retire old remote scheduled commits processor and add new one
thlorenz May 7, 2025
8cdc141
feat: initial impl of commits processor based on committor service
thlorenz May 7, 2025
c0d08a4
feat: initializing committor service at startup
thlorenz May 7, 2025
9eed608
test: logging signature of failed init_committees tx
thlorenz May 8, 2025
dae8ea8
test: adapt to expect two signatures when finalizing
thlorenz May 9, 2025
80e6777
feat: ensure ephemeral validator is funded on chain
thlorenz May 9, 2025
3078a1c
test: add single account commit test
thlorenz May 9, 2025
8391124
test: warn when we have issues fetching a transaction
thlorenz May 9, 2025
e5aa347
fix: adding change for validator fund check
thlorenz May 9, 2025
be98740
feat: fully integrating committor service
thlorenz May 9, 2025
5ce7a20
chore: update ix tests cargo
thlorenz May 12, 2025
b54cd3b
chore: comment with requirements for schedule commit tests
thlorenz May 12, 2025
dc2da58
chore: improve test logs
thlorenz May 13, 2025
560fd6b
chore: include compute unit price when initializing committor
thlorenz May 13, 2025
b3445c1
fix: mark accounts to be undelegated
thlorenz May 13, 2025
24bb27a
chore: properly handle some unwraps
thlorenz May 14, 2025
cc389e7
test: general improvements + fixes
thlorenz May 14, 2025
f7304cf
chore: use trait for committor service and create stub to use in tests
thlorenz May 14, 2025
04b0116
chore: update ensure accounts tests to use stub
thlorenz May 14, 2025
d770b95
chore: re-enable account cloner and ensure accounts tests
thlorenz May 14, 2025
88dd40b
chore: move committor repo crates into magicblock monorepo
thlorenz May 14, 2025
e6f1edd
chore: move committor service integration tests
thlorenz May 14, 2025
1c4dd78
chore: noting escrow/fee payer related test requirements
thlorenz May 14, 2025
8c620fe
chore: minor cleanup in test runner
thlorenz May 15, 2025
f3e17d1
ix: load committor program for schedule commits
thlorenz May 15, 2025
6d109f9
ix: allow configuring loaded accounts
thlorenz May 15, 2025
0dceb8b
ix: match ephem validator keypair to the one we use on chain
thlorenz May 15, 2025
7fdc795
ix: ensure we always pass same loaded chain accounts to chain + ephen…
thlorenz May 15, 2025
47ccee4
ix: update dlp binary
thlorenz May 15, 2025
c85b529
ix: add committor tests to run_tests
thlorenz May 15, 2025
cf609d4
ix: move table mania tests to integration
thlorenz May 15, 2025
b968ea5
ix: run table mania as part of test suite
thlorenz May 15, 2025
d3bacca
Merge branch 'master' into thlorenz/committor
thlorenz May 15, 2025
7bde596
chore: fmt
thlorenz May 15, 2025
52fd831
chore: update delegation program reference
thlorenz May 15, 2025
714dd68
chore: opt out of doctests for added crates
thlorenz May 15, 2025
0f94802
ix: add rule to make committor program
thlorenz May 15, 2025
c8ddb16
fix: error misspelling
thlorenz May 15, 2025
b246170
chore: address some greptiles
thlorenz May 15, 2025
d3892d1
ix: check in missing config
thlorenz May 15, 2025
ca5e9f4
chore: more greptiles
thlorenz May 15, 2025
bc48d58
ix: move table mania/committor tests last since they are the slowest
thlorenz May 15, 2025
9fb082a
chore: rollback delegation program version
thlorenz May 15, 2025
ee396da
chore: cleanup stray log
thlorenz May 15, 2025
8635738
ix: give more compile time before expecting validator to listen
thlorenz May 15, 2025
7f3e0eb
chore: greptiles
thlorenz May 15, 2025
28504c1
chore: improved error handling in table mania manager
thlorenz May 16, 2025
bc1324d
fix: greptiles
thlorenz May 16, 2025
644ad1c
chore: demote some no longer urgent TODOs
thlorenz May 16, 2025
4f8ecc8
feat: committor service persists into ledger path
thlorenz May 16, 2025
3cf473d
chore: remove duplicate code in magic validator
thlorenz May 16, 2025
a7b4aa5
feat: limiting stale reallocs until we bail
thlorenz May 16, 2025
776bbf1
tmp: disabling ledger restore tests to isolate issues
thlorenz May 16, 2025
aeeb5ae
tmp: disable all workflows but integration tests while isolating issues
thlorenz May 16, 2025
aedf9a2
fix: ordering of worker startups
thlorenz May 16, 2025
1e9921d
Revert "tmp: disabling ledger restore tests to isolate issues"
thlorenz May 16, 2025
0e0ef0f
Revert "tmp: disable all workflows but integration tests while isolat…
thlorenz May 16, 2025
2bfd49f
chore: address nits
thlorenz Jun 4, 2025
05bbaec
Merge branch 'master' into thlorenz/committor
thlorenz Jun 4, 2025
4d1b44f
chore: update cargo lock files
thlorenz Jun 4, 2025
9e091fc
chore: match mdp version
thlorenz Jun 4, 2025
8870158
Merge branch 'thlorenz/committor' into feat/base-layer-ix/main
taco-paco Jun 5, 2025
b7b6e4b
feat: added construction of ScheduleAction
taco-paco May 15, 2025
0cfda9c
refactor: changed file structure
taco-paco May 16, 2025
f9f0307
feat: replace ScheduledCommit -> SceduledAction in MagicContext
taco-paco May 19, 2025
a2a372b
refactor: namings + some logging
taco-paco May 19, 2025
c0cf401
refactor: separate file for accepted commits
taco-paco May 19, 2025
9775d7d
feat: error on process_schedule_action call until feature fully suppo…
taco-paco May 19, 2025
597435e
feat: until supported converting ScheduledAction to old ScheduledComm…
taco-paco May 19, 2025
a955a12
fix: tests + bug
taco-paco May 19, 2025
39c4fd4
refactor: renamings
taco-paco May 20, 2025
1abe69c
fix: bug
taco-paco May 21, 2025
0073370
fix: rebase
taco-paco Jun 5, 2025
17e0dc1
refactor: renamings
taco-paco Jun 5, 2025
7b0ea9b
feat: remove legacy code, introduce snapshots of account state at the…
taco-paco Jun 18, 2025
cafd31b
refactor: renaming
taco-paco Jun 18, 2025
409dbb0
refactor: file structure changes + separate non program specific erro…
taco-paco Jul 3, 2025
a087223
fix: test compilation
taco-paco Jul 3, 2025
4011e3d
fix: tests
taco-paco Jul 3, 2025
49b99c4
feat: introducing raw tasks, DeliveryStrategist, TransactionPreparato…
taco-paco Jul 7, 2025
18781d5
refactor: code cleanup
taco-paco Jul 8, 2025
b40797d
feat: buffer preparations in DeliveryPreparator
taco-paco Jul 8, 2025
8bb5d58
feat: trait for tasks
taco-paco Jul 9, 2025
4c05ca6
raw
taco-paco Jul 9, 2025
5507bb3
fix: TaskBuilder after L1Task trait introduction
taco-paco Jul 9, 2025
0761774
refactor: TaskBuilder::finalize_tasks
taco-paco Jul 9, 2025
b49882d
fix: some compilation errors
taco-paco Jul 9, 2025
40eb0cd
fix: more compilation fixes
taco-paco Jul 9, 2025
1fde056
fix: more compilation fixes
taco-paco Jul 9, 2025
82b7f53
feat: TransactionUtilities to assemle TX from Tasks
taco-paco Jul 10, 2025
93020a9
refactor: fmt
taco-paco Jul 10, 2025
18c10a5
fix: some compilation errors
taco-paco Jul 10, 2025
d36ef48
feat: initial scheduler
taco-paco Jul 11, 2025
ef9db26
refactor: extract core schuduling logic into CommitSchedulerInner
taco-paco Jul 14, 2025
9623d38
feat: initialize MessageExecutor
taco-paco Jul 14, 2025
7c00710
refactor: move committor out of account manager
taco-paco Jul 15, 2025
1f74fe4
fix: compilation with new RemoteCommitor
taco-paco Jul 15, 2025
ad8f968
feat: added CommitSchedulerWorker that populations Inner Schedule, ha…
taco-paco Jul 16, 2025
a7a0456
refactor: expose result stream from SchedulerWorker
taco-paco Jul 16, 2025
6a63a2c
feat: initialized CommitIdTracker
taco-paco Jul 16, 2025
e18522a
feat: adapting Persister to new implementation
taco-paco Jul 17, 2025
24a6360
feat: Persistor keeps track per Action not per Message
taco-paco Jul 18, 2025
7f6dd79
fix: compilation
taco-paco Jul 18, 2025
be0b2b8
fix: compilation + some code cleaning
taco-paco Jul 18, 2025
8df9db1
refactor: extract tasks into separate module
taco-paco Jul 18, 2025
eba1af5
feat: persister integration into services
taco-paco Jul 18, 2025
c87abac
feat: improving error handling
taco-paco Jul 21, 2025
4013de1
feat: introduced visitor + compilation & persistor fixes
taco-paco Jul 22, 2025
e242e67
feat: added visitor into tasks
taco-paco Jul 22, 2025
a4f9532
feat: expose subscribe method on CommittorService
taco-paco Jul 22, 2025
ff8347f
fix: magicblock-committor-service compiles!
taco-paco Jul 22, 2025
fcefa80
feat: filter accs in L1Message
taco-paco Jul 23, 2025
dde67bc
feat: integrate l2 tx execution on processed commit
taco-paco Jul 23, 2025
d3301a0
refactor: removed unnecessary worker
taco-paco Jul 23, 2025
03a9d98
fix: compilation
taco-paco Jul 23, 2025
1a4889f
feat: Integrated CommittorService into AccountsManager
taco-paco Jul 24, 2025
d43a19c
feat: added & fixed persistor tests
taco-paco Jul 25, 2025
9f1b2a0
feat: scheduler tests
taco-paco Jul 25, 2025
54ff107
fix: scheduler bug in pop_next_scheduled_message + some more tests
taco-paco Jul 25, 2025
1bb4b71
refactor: some docs
taco-paco Jul 25, 2025
2241889
feat: add traits for testing
taco-paco Jul 26, 2025
f8ff5fc
feat: added initial tests to scheduler_worker
taco-paco Jul 26, 2025
4f178ce
fix: replace notify with FuturesUnordered
taco-paco Jul 26, 2025
f40a26d
feat: addedd sleep into MockExecutor to simulate work
taco-paco Jul 28, 2025
8176edc
feat: SchedulerWorker tests
taco-paco Jul 28, 2025
9348ded
refactor: some warning cleanup
taco-paco Jul 28, 2025
c0a8da8
feat: finished implementation of CommitIdTracker
taco-paco Jul 28, 2025
7be6f6b
raw
taco-paco Jul 28, 2025
faa5dd6
refactor: moved CommitIdTracker into executor
taco-paco Jul 28, 2025
e65047f
feat(config): derive merge (#476)
Dodecahedr0x Jul 28, 2025
42bfd23
refactor: rename entrypoint (#481)
Dodecahedr0x Jul 28, 2025
26a4004
refactor: error handling + removed some unwraps
taco-paco Jul 28, 2025
1f509db
refactor: repeating function
taco-paco Jul 28, 2025
cddc9cc
feat: fixes + delivery preparator tests
taco-paco Jul 29, 2025
0e40f41
feat: added delivery preparator test with lookup tables
taco-paco Jul 29, 2025
deb46a5
feat: tests for TaskStrategist
taco-paco Jul 29, 2025
80763eb
feat: tests for Finalize, Undelegate + Action
taco-paco Jul 29, 2025
f54bb6e
refactor: warning cleanup + some file removed
taco-paco Jul 29, 2025
e6b79d2
fix: crash case when data.len() in instruction exceeds u16::MAX
taco-paco Jul 29, 2025
9aac3cf
fix: tests within committor_service fixed
taco-paco Jul 29, 2025
5ca4ae7
fix: tests
taco-paco Jul 29, 2025
e1204b2
fix: cargo test - passed
taco-paco Jul 30, 2025
5935809
fix: escrow commitment
taco-paco Jul 30, 2025
e9a4811
feat: add rent_reimbisement fetching for undelegate
taco-paco Jul 30, 2025
3b4312b
fix: tests
taco-paco Jul 30, 2025
322cbe6
fixed versions of dlp & sdk
taco-paco Jul 30, 2025
972cb0c
refactor: file cleanup
taco-paco Jul 30, 2025
bad27f2
refactor: cleanup
taco-paco Jul 30, 2025
40e9dc5
refactor: cleanup
taco-paco Jul 30, 2025
aed2b89
refactor: renaming of L1Message -> BaseIntent
taco-paco Jul 31, 2025
50b05dd
feat: updated sdk
taco-paco Jul 31, 2025
9ff9009
fix: fixed failing tests due to low specified compute untis
taco-paco Jul 31, 2025
04a33f5
fix: committor tests
taco-paco Jul 31, 2025
1390309
upd .lock
taco-paco Jul 31, 2025
a9390e7
Merge branch 'dev' into feat/base-layer-ix/main
taco-paco Jul 31, 2025
1e5d6a4
feat: option to skip ledger replay (#460)
Dodecahedr0x Aug 1, 2025
c527834
feat: extracted parts from magicblock-program into magicblock-core fo…
taco-paco Aug 4, 2025
706ff3c
fix: integration tests compilation
taco-paco Aug 4, 2025
251b2da
fix: timestamps mismatch (#454)
Dodecahedr0x Aug 4, 2025
dca74ee
feat(ledger): remove requirement to use the same keypair during repla…
Dodecahedr0x Aug 4, 2025
e206540
fix: commit via buffer bug, commit ids + some test fixes
taco-paco Aug 5, 2025
44f535a
feat: fix commits of dlp
taco-paco Aug 5, 2025
40787fe
feat: fixed sdk version on latest commit
taco-paco Aug 5, 2025
ffd211a
Merge branch 'dev' into feat/base-layer-ix/main
taco-paco Aug 5, 2025
f25584d
fix: ledger-restore tests - account for finalize tx
taco-paco Aug 5, 2025
fe67df5
fix: tests failing due to insufficient compute units
taco-paco Aug 5, 2025
cc3653a
fix: make committor optional for !can_clone cases
taco-paco Aug 6, 2025
01685eb
refactor: remove some todos + some struct field cleaning
taco-paco Aug 6, 2025
af871b8
fix: clippy errors
taco-paco Aug 6, 2025
d583682
fix: compilation
taco-paco Aug 6, 2025
31a94ea
fix: unit tests
taco-paco Aug 6, 2025
4bad7a5
feat: Add validator fee claiming (#475)
BretasArthur1 Aug 6, 2025
da87512
fix: test-config
taco-paco Aug 7, 2025
b8caac3
Merge branch 'dev' into feat/base-layer-ix/main
taco-paco Aug 7, 2025
f08144a
feat: fix latest dlp version
taco-paco Aug 7, 2025
1c871f5
feat: fix latest er-sdk version
taco-paco Aug 7, 2025
fbbfc62
Merge branch 'master' into dev
GabrielePicco Aug 7, 2025
adf3428
feat: add action test + fmt integration tests
taco-paco Aug 8, 2025
44bfb2d
feat: change entrypoint to commit multiple accs + actions
taco-paco Aug 8, 2025
3785e7e
refactor: remove todo!()
taco-paco Aug 8, 2025
f126f6b
fix: intent tests
taco-paco Aug 8, 2025
1923bb9
fix: used port during test_validator_claim_fees
taco-paco Aug 11, 2025
642a1ae
Merge branch 'dev' into feat/base-layer-ix/main
taco-paco Aug 11, 2025
5f8d3f6
feat: removed TODOs + moved tests into test-integration. added test-s…
taco-paco Aug 11, 2025
cb511db
feat: addressing comments: more verbose messages, changes to log leve…
taco-paco Aug 13, 2025
89a6d0c
feat: improved error handling in IntentScheduler
taco-paco Aug 14, 2025
14845dd
refactor: avoid unnecessary cloning
taco-paco Aug 14, 2025
73c924d
refactor: more comments, SAFETY comments + some panics removed
taco-paco Aug 15, 2025
60b88c7
fix: race-condition
taco-paco Aug 18, 2025
13cba33
Merge branch 'master' into feat/base-layer-ix/main
taco-paco Aug 18, 2025
f9d735d
feat: remove local script
taco-paco Aug 18, 2025
161ab07
Merge branch 'master' into feat/base-layer-ix/main
taco-paco Aug 18, 2025
cecc12d
feat: returned bundle_signature table
taco-paco Aug 20, 2025
c6db3e7
Merge branch 'master' into feat/base-layer-ix/main
taco-paco Aug 20, 2025
a8ff298
Optimization: executing Commit & Finalize stages in one tx (#510)
taco-paco Aug 20, 2025
46fef4a
fix: revert tests in ix_commit_local. asserting strategies returned
taco-paco Aug 20, 2025
b291458
refactor: Error -> <StructName>Error
taco-paco Aug 20, 2025
99ea5c8
refactor: some comments addressed
taco-paco Aug 21, 2025
e730924
feat: architecture doc of Intent execution flow
taco-paco Aug 21, 2025
f34a1b7
Merge branch 'master' into feat/base-layer-ix/main
taco-paco Aug 26, 2025
8c72b1f
feat: introduce SignerError handling
taco-paco Aug 26, 2025
71d620d
fix: fmt + lint
taco-paco Aug 26, 2025
491d30f
fix: rm local sript
taco-paco Aug 26, 2025
e271454
refactor: remove "l1" menations
taco-paco Aug 28, 2025
5519f28
refactoring: renamings + extra comments and minor fixes
taco-paco Aug 28, 2025
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
56 changes: 49 additions & 7 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ conjunto-transwise = { git = "https://github.com/magicblock-labs/conjunto.git",
console-subscriber = "0.2.0"
crossbeam-channel = "0.5.11"
const_format = "0.2.34"
dyn-clone = "1.0.20"
ed25519-dalek = "1.0.1"
enum-iterator = "1.5.0"
env_logger = "0.11.2"
Expand Down Expand Up @@ -118,7 +119,7 @@ magicblock-config = { path = "./magicblock-config" }
magicblock-config-helpers = { path = "./magicblock-config-helpers" }
magicblock-config-macro = { path = "./magicblock-config-macro" }
magicblock-core = { path = "./magicblock-core" }
magicblock-delegation-program = { git = "https://github.com/magicblock-labs/delegation-program.git", rev = "4af7f1c" }
magicblock-delegation-program = { git = "https://github.com/magicblock-labs/delegation-program.git", rev = "00d720", features = ["no-entrypoint"] }
magic-domain-program = { git = "https://github.com/magicblock-labs/magic-domain-program.git", rev = "ea04d46", default-features = false }
magicblock-geyser-plugin = { path = "./magicblock-geyser-plugin" }
magicblock-ledger = { path = "./magicblock-ledger" }
Expand Down Expand Up @@ -195,6 +196,7 @@ spl-token-2022 = "=6.0"
static_assertions = "1.1.0"
strum = "0.24"
strum_macros = "0.24"
lru = "0.16.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto alphabetical

syn = "2.0"
tempfile = "3.10.1"
test-tools = { path = "./test-tools" }
Expand Down
1 change: 1 addition & 0 deletions magicblock-account-cloner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ magicblock-account-fetcher = { workspace = true }
magicblock-account-updates = { workspace = true }
magicblock-account-dumper = { workspace = true }
magicblock-accounts-api = { workspace = true }
magicblock-rpc-client = { workspace = true }
magicblock-config = { workspace = true }
magicblock-core = { workspace = true }
magicblock-committor-service = { workspace = true }
Expand Down
26 changes: 19 additions & 7 deletions magicblock-account-cloner/src/account_cloner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ use magicblock_account_fetcher::AccountFetcherError;
use magicblock_account_updates::AccountUpdatesError;
use magicblock_committor_service::{
error::{CommittorServiceError, CommittorServiceResult},
ChangesetCommittor,
BaseIntentCommittor,
};
use magicblock_core::magic_program;
use magicblock_rpc_client::MagicblockRpcClient;
use solana_sdk::{clock::Slot, pubkey::Pubkey, signature::Signature};
use thiserror::Error;
use tokio::sync::oneshot::{self, Sender};
Expand Down Expand Up @@ -76,9 +77,9 @@ pub enum AccountClonerUnclonableReason {
DelegatedAccountsNotClonedWhileHydrating,
}

pub async fn map_committor_request_result<T, CC: ChangesetCommittor>(
pub async fn map_committor_request_result<T, CC: BaseIntentCommittor>(
res: oneshot::Receiver<CommittorServiceResult<T>>,
changeset_committor: Arc<CC>,
intent_committor: Arc<CC>,
) -> AccountClonerResult<T> {
match res.await.map_err(|err| {
// Send request error
Expand All @@ -96,10 +97,21 @@ pub async fn map_committor_request_result<T, CC: ChangesetCommittor>(
format!("{:?}", table_mania_err),
));
};
let cus =
changeset_committor.get_transaction_cus(&sig).await;
let logs =
changeset_committor.get_transaction_logs(&sig).await;
let (logs, cus) = if let Ok(Ok(transaction)) =
intent_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)
};

let cus_str = cus
.map(|cus| format!("{:?}", cus))
.unwrap_or("N/A".to_string());
Expand Down
4 changes: 2 additions & 2 deletions magicblock-account-cloner/src/remote_account_cloner_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use magicblock_account_dumper::AccountDumper;
use magicblock_account_fetcher::AccountFetcher;
use magicblock_account_updates::AccountUpdates;
use magicblock_accounts_api::InternalAccountProvider;
use magicblock_committor_service::ChangesetCommittor;
use magicblock_committor_service::BaseIntentCommittor;
use solana_sdk::pubkey::Pubkey;
use tokio::sync::oneshot::channel;

Expand All @@ -34,7 +34,7 @@ impl RemoteAccountClonerClient {
AFE: AccountFetcher,
AUP: AccountUpdates,
ADU: AccountDumper,
CC: ChangesetCommittor,
CC: BaseIntentCommittor,
{
Self {
clone_request_sender: worker.get_clone_request_sender(),
Expand Down
7 changes: 3 additions & 4 deletions magicblock-account-cloner/src/remote_account_cloner_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use magicblock_account_dumper::AccountDumper;
use magicblock_account_fetcher::AccountFetcher;
use magicblock_account_updates::{AccountUpdates, AccountUpdatesResult};
use magicblock_accounts_api::InternalAccountProvider;
use magicblock_committor_service::ChangesetCommittor;
use magicblock_committor_service::BaseIntentCommittor;
use magicblock_config::{
AccountsCloneConfig, LedgerResumeStrategyConfig, PrepareLookupTables,
};
Expand Down Expand Up @@ -137,7 +137,7 @@ where
AFE: AccountFetcher,
AUP: AccountUpdates,
ADU: AccountDumper,
CC: ChangesetCommittor,
CC: BaseIntentCommittor,
{
#[allow(clippy::too_many_arguments)]
pub fn new(
Expand Down Expand Up @@ -716,11 +716,10 @@ where

// Allow the committer service to reserve pubkeys in lookup tables
// that could be needed when we commit this account
if let Some(committor) = self.changeset_committor.as_ref() {
if let Some(committor) = self.changeset_committor.clone() {
if self.clone_config.prepare_lookup_tables
== PrepareLookupTables::Always
{
let committor = Arc::clone(committor);
let pubkey = *pubkey;
let owner = delegation_record.owner;
tokio::spawn(async move {
Expand Down
1 change: 0 additions & 1 deletion magicblock-account-dumper/src/account_dumper_bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ impl AccountDumper for AccountDumperBank {

let mut program_id_modification =
AccountModification::from((program_pubkey, program_account));

// point program account to the derived program data account address
let program_id_state =
bincode::serialize(&UpgradeableLoaderState::Program {
Expand Down
7 changes: 6 additions & 1 deletion magicblock-accounts-api/src/bank_account_provider.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use std::sync::Arc;

use magicblock_bank::bank::Bank;
use solana_sdk::{account::AccountSharedData, clock::Slot, pubkey::Pubkey};
use solana_sdk::{
account::AccountSharedData, clock::Slot, hash::Hash, pubkey::Pubkey,
};

use crate::InternalAccountProvider;

Expand Down Expand Up @@ -33,4 +35,7 @@ impl InternalAccountProvider for BankAccountProvider {
fn get_slot(&self) -> Slot {
self.bank.slot()
}
fn get_blockhash(&self) -> Hash {
self.bank.last_blockhash()
}
}
5 changes: 4 additions & 1 deletion magicblock-accounts-api/src/internal_account_provider.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
use solana_sdk::{account::AccountSharedData, clock::Slot, pubkey::Pubkey};
use solana_sdk::{
account::AccountSharedData, clock::Slot, hash::Hash, pubkey::Pubkey,
};

pub trait InternalAccountProvider: Send + Sync {
fn has_account(&self, pubkey: &Pubkey) -> bool;
fn remove_account(&self, _pubkey: &Pubkey) {}
fn get_account(&self, pubkey: &Pubkey) -> Option<AccountSharedData>;
fn get_all_accounts(&self) -> Vec<(Pubkey, AccountSharedData)>;
fn get_slot(&self) -> Slot;
fn get_blockhash(&self) -> Hash;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ use std::{
sync::{Arc, RwLock},
};

use solana_sdk::{account::AccountSharedData, clock::Slot, pubkey::Pubkey};
use solana_sdk::{
account::AccountSharedData, clock::Slot, hash::Hash, pubkey::Pubkey,
};

use crate::InternalAccountProvider;

#[derive(Debug, Clone, Default)]
pub struct InternalAccountProviderStub {
slot: Slot,
hash: Hash,
accounts: Arc<RwLock<HashMap<Pubkey, AccountSharedData>>>,
}

Expand Down Expand Up @@ -37,4 +40,7 @@ impl InternalAccountProvider for InternalAccountProviderStub {
fn get_slot(&self) -> Slot {
self.slot
}
fn get_blockhash(&self) -> Hash {
self.hash
}
}
2 changes: 2 additions & 0 deletions magicblock-accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ async-trait = { workspace = true }
conjunto-transwise = { workspace = true }
magicblock-delegation-program = { workspace = true }
futures-util = { workspace = true }
itertools = { workspace = true }
log = { workspace = true }
magicblock-account-fetcher = { workspace = true }
magicblock-account-updates = { workspace = true }
Expand All @@ -30,6 +31,7 @@ solana-rpc-client = { workspace = true }
solana-rpc-client-api = { workspace = true }
solana-sdk = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }

Expand Down
5 changes: 1 addition & 4 deletions magicblock-accounts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Implements a `AccountsManager`, which is reponsible for:
- Implemented by a `ExternalAccountsManager`
- depends on an `InternalAccountProvider` (implemented by `BankAccountProvider`)
- depends on an `AccountCloner` (implemented by `RemoteAccountCloner`)
- depends on an `AccountCommitter` (implemented by `RemoteAccountCommitter`)
- depends on a `Transwise`
- denepds on a `CommittorServiceExt` that is used for Manual commits
- Implements `ensure_accounts` function
- Maintains a local cache of accounts already validated and cloned

Expand All @@ -25,9 +25,6 @@ Implements a `AccountsManager`, which is reponsible for:
- `RemoteAccountCloner`
- depends on a `Bank`

- `RemoteAccountCommitter`
- depends on an `RpcClient`

# Notes

*How does `ensure_accounts` work:*
Expand Down
Loading
Loading