Skip to content

Commit 588ec52

Browse files
committed
CI is green, so let's Cleanup
1 parent 9b6786a commit 588ec52

File tree

5 files changed

+13
-19
lines changed

5 files changed

+13
-19
lines changed

magicblock-committor-service/src/tasks/args_task.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ impl BaseTask for ArgsTask {
8989
) -> Result<Box<dyn BaseTask>, Box<dyn BaseTask>> {
9090
match self.task_type {
9191
ArgsTaskType::Commit(mut value) if value.is_commit_diff() => {
92-
//TODO (snawaz): We do not currently support executing CommitDiff as BufferTask, which is why we're forcing CommitTask to use CommitState before converting this task into BufferTask
93-
// Once CommitDiff is supported by BufferTask, we do not have to
94-
// force_commit_state.
92+
// TODO (snawaz): Currently, we do not support executing CommitDiff
93+
// as BufferTask, which is why we're forcing CommitTask to use CommitState
94+
// before converting this task into BufferTask Once CommitDiff is supported
95+
// by BufferTask, we do not have to force_commit_state and we can remove
96+
// force_commit_state stuff, as it's essentially a downgrade.
9597

9698
value.force_commit_state();
9799
Ok(Box::new(BufferTask::new_preparation_required(

magicblock-committor-service/src/tasks/mod.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ pub struct CommitTask {
114114
}
115115

116116
impl CommitTask {
117+
// Accounts larger than COMMIT_STATE_SIZE_THRESHOLD, use CommitDiff to
118+
// reduce instruction size. Below this, commit is sent as CommitState.
117119
const COMMIT_STATE_SIZE_THRESHOLD: usize = 200;
118120

119121
pub fn new(
@@ -124,8 +126,9 @@ impl CommitTask {
124126
let fetched_account = if committed_account.account.data.len()
125127
> CommitTask::COMMIT_STATE_SIZE_THRESHOLD
126128
{
127-
// TODO (snawaz): it is the most ugliest piece of code as it is making network call,
128-
// and I'll soon fix it in a separate PR that will use caching of base-accounts.
129+
// TODO (snawaz): it is the most ugliest piece of code as it is making
130+
// network call and that too, a blocking one, and I'll soon fix it in a
131+
// separate PR that will use caching of base-accounts.
129132
use solana_rpc_client::rpc_client::RpcClient;
130133
use solana_sdk::commitment_config::CommitmentConfig;
131134

@@ -146,8 +149,6 @@ impl CommitTask {
146149
None
147150
};
148151

149-
println!("fetched_account: {:#?}", fetched_account);
150-
151152
Self {
152153
commit_id,
153154
allow_undelegation,
@@ -183,7 +184,6 @@ impl CommitTask {
183184
data: self.committed_account.account.data.clone(),
184185
allow_undelegation: self.allow_undelegation,
185186
};
186-
println!("create_commit_state_ix, data: {}", args.data.len());
187187
dlp::instruction_builder::commit_state(
188188
*validator,
189189
self.committed_account.pubkey,
@@ -198,9 +198,6 @@ impl CommitTask {
198198
fetched_account: &Account,
199199
) -> Instruction {
200200
if self.force_commit_state {
201-
println!(
202-
"force_commit_state is true, so call create_commit_state_ix"
203-
);
204201
return self.create_commit_state_ix(validator);
205202
}
206203

@@ -214,7 +211,6 @@ impl CommitTask {
214211
.to_vec(),
215212
allow_undelegation: self.allow_undelegation,
216213
};
217-
println!("create_commit_diff_ix, diff: {}", args.diff.len());
218214

219215
dlp::instruction_builder::commit_diff(
220216
*validator,

magicblock-committor-service/src/tasks/task_strategist.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ impl TaskStrategist {
9595
lookup_tables_keys,
9696
})
9797
} else {
98-
println!("snawaz: inside build_strategy");
9998
Err(TaskStrategistError::FailedToFitError)
10099
}
101100
}
@@ -166,10 +165,7 @@ impl TaskStrategist {
166165
&[],
167166
) {
168167
Ok(tx) => Ok(serialize_and_encode_base64(&tx).len()),
169-
Err(TaskStrategistError::FailedToFitError) => {
170-
println!("snawaz: inside optimize_strategy");
171-
Ok(usize::MAX)
172-
}
168+
Err(TaskStrategistError::FailedToFitError) => Ok(usize::MAX),
173169
Err(TaskStrategistError::SignerError(err)) => Err(err),
174170
}
175171
};

test-integration/test-committor-service/tests/test_delivery_preparator.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ mod common;
1919
// # see the PR #575 for more context.
2020
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
2121
async fn test_prepare_10kb_buffer() {
22-
println!("TestFixture::new()");
2322
let fixture = TestFixture::new().await;
24-
println!("TestFixture::new() done");
2523
let preparator = fixture.create_delivery_preparator();
2624

2725
let data = generate_random_bytes(10 * 1024);

test-integration/test-tools/src/integration_test_context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ impl IntegrationTestContext {
166166
RpcTransactionConfig {
167167
commitment: Some(self.commitment),
168168
max_supported_transaction_version: if label == "chain" {
169+
// base chain cluster requires explicit v0 support,
170+
// while ephemeral uses default version handling
169171
Some(0)
170172
} else {
171173
None

0 commit comments

Comments
 (0)