Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
c0cdf5f
refactor: remove unused code
taco-paco May 27, 2026
07d834f
wip
taco-paco May 28, 2026
79464a9
wip: services integrated
taco-paco May 29, 2026
3390601
wip: remove unused files
taco-paco May 29, 2026
4931a62
feat: integration + fixes
taco-paco May 29, 2026
0fbb24a
refactor: remove unused file
taco-paco May 29, 2026
9db0cc3
refactor: renaming and file split
taco-paco May 29, 2026
501741f
feat: renamings
taco-paco May 29, 2026
6039cdd
refactor: cleanup
taco-paco May 29, 2026
641e4bc
refactor: cleanup
taco-paco May 29, 2026
c380be7
refactor: cleanup
taco-paco May 29, 2026
3a3a177
fix: lint
taco-paco May 29, 2026
f5738eb
Merge branch 'master' into refactor/committor-service
taco-paco May 29, 2026
b49c17c
feat: update locks
taco-paco May 29, 2026
01ce24f
fix: remove outdated file
taco-paco May 29, 2026
d292b3e
feat: some docs
taco-paco Jun 1, 2026
6269711
Merge branch 'master' into refactor/committor-service
taco-paco Jun 1, 2026
345f1f1
refactor: fetch of pending commits and refresh
taco-paco Jun 1, 2026
0786627
refactor: unused generic
taco-paco Jun 1, 2026
88216f7
feat: integrate rescheduling of pending commits
taco-paco Jun 1, 2026
6b4c4aa
fix: cleanup intent map if scheduling of intent failed
taco-paco Jun 1, 2026
fff494e
fix: failure path
taco-paco Jun 1, 2026
ef4d3d4
Merge branch 'master' into refactor/committor-service
taco-paco Jun 2, 2026
3cb9ec6
wip: some outbox components
taco-paco Jun 3, 2026
06c918a
Merge branch 'master' into refactor/committor-service
taco-paco Jun 3, 2026
d402c92
fix: compilation
taco-paco Jun 3, 2026
da243aa
fix: tests
taco-paco Jun 3, 2026
d007449
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 3, 2026
0e58720
refactor: change magicblock-program file structure for better separation
taco-paco Jun 3, 2026
a4e4eea
refactor: file structure
taco-paco Jun 3, 2026
bbcc113
refactor: file structure
taco-paco Jun 3, 2026
a0e4da1
wip
taco-paco Jun 3, 2026
9b402bf
wip
taco-paco Jun 4, 2026
7cedafc
Merge branch 'master' into refactor/committor-service
taco-paco Jun 4, 2026
5151c88
Merge branch 'master' into refactor/committor-service
taco-paco Jun 4, 2026
76602c6
fix: bool passing
taco-paco Jun 4, 2026
33ec1ca
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 4, 2026
119e715
fix: accept
taco-paco Jun 4, 2026
558a083
feat: set execution statis
taco-paco Jun 5, 2026
a4689ef
Merge branch 'master' into refactor/committor-service
taco-paco Jun 5, 2026
fb1f86b
feat: simplify query
taco-paco Jun 5, 2026
cab3837
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 5, 2026
f218ed4
wip
taco-paco Jun 8, 2026
c908261
Merge branch 'master' into refactor/committor-service
taco-paco Jun 8, 2026
d326d74
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 8, 2026
f50bb77
wip
taco-paco Jun 8, 2026
4c97135
wip removing persister
taco-paco Jun 9, 2026
08954c8
wip intent executor adoptation
taco-paco Jun 9, 2026
a560353
wip intent executors
taco-paco Jun 10, 2026
75c0244
wip: commit stage adjusted for outbox
taco-paco Jun 10, 2026
c19fc70
wip: add support of pending signature in all execution stages
taco-paco Jun 10, 2026
cb8eea8
wip: extracting commom stage execution loop logic
taco-paco Jun 10, 2026
8a9cf7c
feat: extract common executors logic in single util
taco-paco Jun 10, 2026
e1adceb
wip
taco-paco Jun 10, 2026
f05d9f0
wip
taco-paco Jun 12, 2026
c068a1e
Merge branch 'master' into refactor/committor-service
taco-paco Jun 12, 2026
0887ecd
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 12, 2026
4dfd1d4
wip
taco-paco Jun 15, 2026
9179ffb
Merge branch 'master' into refactor/committor-service
taco-paco Jun 15, 2026
3b73379
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 15, 2026
8f7a4f2
wip single stage utils
taco-paco Jun 15, 2026
7e1608b
feat: integration of executors within committor service
taco-paco Jun 15, 2026
8c8d926
fix: fmt
taco-paco Jun 15, 2026
9513a1a
feat: InternalOutboxIntentBundlesReader
taco-paco Jun 16, 2026
c9225f6
feat: added tests for OutboxReader
taco-paco Jun 16, 2026
898fab2
fix: engine tests
taco-paco Jun 16, 2026
5ca4419
fix: task strategist tests
taco-paco Jun 16, 2026
363c96d
wip
taco-paco Jun 19, 2026
264e929
Merge branch 'master' into refactor/committor-service
taco-paco Jun 19, 2026
f96a9b4
refactor: move TransactionExecutioError into separate fild
taco-paco Jun 19, 2026
61ea357
fix: compilation
taco-paco Jun 22, 2026
7d62d1c
fix: warnings cleanup
taco-paco Jun 22, 2026
efbef30
fix: test-integration compilation
taco-paco Jun 23, 2026
c264990
fix: tests
taco-paco Jun 23, 2026
cf25f6a
fix: tests
taco-paco Jun 23, 2026
9fc7110
feat: init outbox tests
taco-paco Jun 23, 2026
9b149a0
Merge branch 'master' into refactor/committor-service
taco-paco Jun 23, 2026
c227d63
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 23, 2026
bec92c0
fix: tests
taco-paco Jun 24, 2026
e9d2e82
fix: new tests
taco-paco Jun 25, 2026
59f1981
feat: crash-restart test
taco-paco Jun 25, 2026
f968d82
feat: added more tests
taco-paco Jun 26, 2026
bf226e0
fix: fmt
taco-paco Jun 26, 2026
252fc50
fix: if we start from Finalizing that succeded some account could be …
taco-paco Jun 26, 2026
9f93dbd
feat: simplify state and avoid double query request of check_pending_…
taco-paco Jun 26, 2026
ca81cfc
refactor: IntentExecutionManager -> IntentEngineHandle
taco-paco Jun 26, 2026
d68bd00
fix: fmt
taco-paco Jun 26, 2026
d0c9a1e
refactor: mod intent_engine_handle -> intent_engine
taco-paco Jun 26, 2026
701e0c1
refactor: task_info_fetcher moved into tasks module alongside with ta…
taco-paco Jun 26, 2026
c3ced7e
refactor: group outbox machinery together
taco-paco Jun 26, 2026
dd37022
refactor: merge consts & transactions into utils.rs
taco-paco Jun 26, 2026
299cdd1
wip
taco-paco Jun 26, 2026
ab28336
feat: move notify_commit_sent into the IntentExecution flow
taco-paco Jun 29, 2026
2337630
refactor: file structs
taco-paco Jun 29, 2026
ae6e173
refactor: remove unnecessary members of structs + some test cleanup
taco-paco Jun 29, 2026
6d9e3c3
refactor: remove unused
taco-paco Jun 29, 2026
46d44b7
fix: test compilation
taco-paco Jun 29, 2026
2343721
fix: unit tests
taco-paco Jun 29, 2026
e265041
refactor: todo removals
taco-paco Jun 29, 2026
1b5363b
feat: replace DummyDb with more ram friendly one. DummyDb test-only now
taco-paco Jun 29, 2026
a0d5848
fix: some lints
taco-paco Jun 29, 2026
db043d9
fix: lint
taco-paco Jun 29, 2026
e332e29
Merge branch 'master' into refactor/committor-service
taco-paco Jun 30, 2026
1d7ef12
Merge branch 'refactor/committor-service' into feat/mimd-0025/main
taco-paco Jun 30, 2026
7a1c3ba
Merge branch 'master' into feat/mimd-0025/main
taco-paco Jul 1, 2026
e5d20bc
fix: address regression
taco-paco Jul 1, 2026
8b622a5
fix: test lint
taco-paco Jul 1, 2026
69000b7
fix: lint
taco-paco Jul 1, 2026
ce83a85
Merge branch 'master' into feat/mimd-0025/main
taco-paco Jul 6, 2026
966132e
fix: typo
taco-paco Jul 6, 2026
1e17009
fix: cleanup
taco-paco Jul 6, 2026
7e064b8
fix: test
taco-paco Jul 6, 2026
1a5c05a
fix: pubkey reset
taco-paco Jul 6, 2026
7d849f4
fix: execute_finalizing_intent flow to close outbox
taco-paco Jul 6, 2026
ebf8fd4
fix: ambiguity between not sent and maybe awaiting processed state
taco-paco Jul 7, 2026
9dd00f6
fix: docs + visability
taco-paco Jul 7, 2026
75153bb
fix: channel
taco-paco Jul 7, 2026
36fbae1
fix: tests
taco-paco Jul 7, 2026
1a93f67
fix: coderabbit
taco-paco Jul 7, 2026
7e48c57
Merge branch 'master' into feat/mimd-0025/main
taco-paco Jul 8, 2026
5d7a22b
feat: upd .lock
taco-paco Jul 8, 2026
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
37 changes: 32 additions & 5 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ agave-geyser-plugin-interface = { version = "4.0" }
agave-precompiles = { version = "4.0", features = ["agave-unstable-api"] }
agave-syscalls = { version = "=4.0.0", features = ["agave-unstable-api"] }
anyhow = "1.0.86"
backoff = { version = "0.4", features = ["tokio"] }
arc-swap = { version = "1.7" }
assert_matches = "1.5.0"
async-nats = "0.46"
Expand Down Expand Up @@ -137,6 +138,7 @@ num-traits = "0.2"
num_cpus = "1.16.0"
parking_lot = "0.12"
paste = "1.0"
pin-project = "1.1.13"
prometheus = "0.13.4"
# Keep in sync with `solana-storage-proto` codegen.

Expand Down
7 changes: 4 additions & 3 deletions magicblock-api/src/magic_sys_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use std::{collections::HashMap, sync::Arc, time::Duration};

use magicblock_committor_service::{
committor_processor::CommittorProcessor,
intent_executor::task_info_fetcher::TaskInfoFetcherResult,
intent_engine::db::DummyIntentBacklog,
tasks::task_info_fetcher::TaskInfoFetcherResult,
};
use magicblock_core::{intent::CommittedAccount, traits::MagicSys};
use magicblock_metrics::metrics;
Expand All @@ -13,7 +14,7 @@ use tracing::error;
#[derive(Clone)]
pub struct MagicSysAdapter {
handle: tokio::runtime::Handle,
committor_processor: Arc<CommittorProcessor>,
committor_processor: Arc<CommittorProcessor<DummyIntentBacklog>>,
}

impl MagicSysAdapter {
Expand All @@ -28,7 +29,7 @@ impl MagicSysAdapter {

pub fn new(
handle: tokio::runtime::Handle,
committor_processor: Arc<CommittorProcessor>,
committor_processor: Arc<CommittorProcessor<DummyIntentBacklog>>,
) -> Self {
Self {
handle,
Expand Down
92 changes: 49 additions & 43 deletions magicblock-api/src/magic_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ use magicblock_chainlink::{
ProdInnerChainlink,
};
use magicblock_committor_service::{
committor_processor::CommittorProcessor,
config::ChainConfig,
service::{intent_client::InternalIntentRpcClient, IntentExecutionService},
ComputeBudgetConfig, DEFAULT_ACTIONS_TIMEOUT,
committor_processor::CommittorProcessor, config::ChainConfig,
intent_engine::db::DummyIntentBacklog,
outbox::outbox_client::InternalOutboxClient,
service::IntentExecutionService, ComputeBudgetConfig,
DEFAULT_ACTIONS_TIMEOUT,
};
use magicblock_config::{
config::{
Expand Down Expand Up @@ -98,8 +99,12 @@ type InnerChainlinkImpl = ProdInnerChainlink<ChainlinkCloner>;

type ChainlinkImpl = ProdChainlink<ChainlinkCloner>;

type IntentExecutionServiceImpl =
IntentExecutionService<InternalIntentRpcClient<LatestBlock>>;
type CommittorProcessorImpl = CommittorProcessor<DummyIntentBacklog>;

type IntentExecutionServiceImpl = IntentExecutionService<
InternalOutboxClient<LatestBlock>,
DummyIntentBacklog,
>;

// -----------------
// MagicValidator
Expand Down Expand Up @@ -241,22 +246,31 @@ impl MagicValidator {
log_timing("startup", "chainlink_init", step_start);

let step_start = Instant::now();
let outbox_client = {
let val = Self::init_outbox_client(
&config,
&accountsdb,
&dispatch.transaction_scheduler,
ledger.latest_block(),
);
Arc::new(val)
};
let committor_processor = {
let processor = Self::init_committor_processor(
&config,
ledger.latest_block(),
&accountsdb,
&outbox_client,
&shared_chain_slot,
)?;
);
Arc::new(processor)
};
let intent_execution_service = Self::init_intent_execution_service(
&accountsdb,
&chainlink,
&dispatch.transaction_scheduler,
ledger.latest_block(),
&committor_processor,
let intent_execution_service = IntentExecutionServiceImpl::new(
chainlink.clone(),
outbox_client.clone(),
committor_processor.clone(),
config.ledger.block_time,
&token,
token.clone(),
);
log_timing("startup", "committor_service_init", step_start);
init_magic_sys(Arc::new(MagicSysAdapter::new(
Expand Down Expand Up @@ -461,14 +475,29 @@ impl MagicValidator {
})
}

fn init_outbox_client(
config: &ValidatorParams,
accounts_db: &Arc<AccountsDb>,
transaction_scheduler: &TransactionSchedulerHandle,
latest_block: &LatestBlock,
) -> InternalOutboxClient<LatestBlock> {
let rpc_client = RpcClient::new(config.aperture.listen.http());
InternalOutboxClient::new(
accounts_db.clone(),
Arc::new(rpc_client),
transaction_scheduler.clone(),
latest_block.clone(),
)
}

pub fn init_committor_processor(
config: &ValidatorParams,
latest_block: &LatestBlock,
accounts_db: &Arc<AccountsDb>,
outbox_client: &Arc<InternalOutboxClient<LatestBlock>>,
shared_chain_slot: &Option<Arc<AtomicU64>>,
) -> ApiResult<CommittorProcessor> {
) -> CommittorProcessorImpl {
let authority = config.validator.keypair.insecure_clone();
let committor_persist_path =
config.storage.join("committor_service.sqlite");
let base_chain_config = ChainConfig {
rpc_uri: config.rpc_url().to_owned(),
commitment: CommitmentConfig::confirmed(),
Expand All @@ -488,36 +517,13 @@ impl MagicValidator {
config.validator.keypair.insecure_clone(),
latest_block.clone(),
);
Ok(CommittorProcessor::try_new(
CommittorProcessor::new(
authority,
committor_persist_path,
base_chain_config,
shared_chain_slot.clone(),
DummyIntentBacklog::new(accounts_db.clone()),
outbox_client.clone(),
actions_callback_executor,
)?)
}

fn init_intent_execution_service(
accounts_db: &Arc<AccountsDb>,
chainlink: &Arc<ChainlinkImpl>,
transaction_scheduler: &TransactionSchedulerHandle,
latest_block: &LatestBlock,
committor_processor: &Arc<CommittorProcessor>,
slot_interval: Duration,
cancellation_token: &CancellationToken,
) -> IntentExecutionServiceImpl {
let intent_client = InternalIntentRpcClient::new(
accounts_db.clone(),
transaction_scheduler.clone(),
latest_block.clone(),
);

IntentExecutionServiceImpl::new(
chainlink.clone(),
intent_client,
committor_processor.clone(),
slot_interval,
cancellation_token.clone(),
)
}

Expand Down
5 changes: 5 additions & 0 deletions magicblock-committor-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ doctest = false

[dependencies]
async-trait = { workspace = true }
backoff = { workspace = true }
bincode = { workspace = true }
borsh = { workspace = true }
futures-util = { workspace = true }
Expand All @@ -32,6 +33,7 @@ magicblock-metrics = { workspace = true }
magicblock-program = { workspace = true }
magicblock-rpc-client = { workspace = true }
magicblock-table-mania = { workspace = true }
pin-project = { workspace = true }
rusqlite = { workspace = true }
solana-account = { workspace = true }
solana-account-decoder = { workspace = true }
Expand All @@ -54,12 +56,15 @@ solana-transaction-status-client-types = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-util = { workspace = true }
tokio-stream = { workspace = true }

[dev-dependencies]
magicblock-program = { workspace = true, features = ["dev-context-only-utils"] }
solana-signature = { workspace = true, features = ["rand"] }
rand = { workspace = true }
tempfile = { workspace = true }
test-kit = { workspace = true }

[features]
default = []
dev-context-only-utils = []
Loading
Loading