Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit 9886a99

Browse files
authored
Merge pull request #607 from PrimeIntellect-ai/develop
Release 0.3.10
2 parents 84dc151 + 20380a5 commit 9886a99

4 files changed

Lines changed: 28 additions & 15 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ iroh = "0.34.1"
4040
rand_v8 = { package = "rand", version = "0.8.5", features = ["std"] }
4141
rand_core_v6 = { package = "rand_core", version = "0.6.4", features = ["std"] }
4242
[workspace.package]
43-
version = "0.3.9"
43+
version = "0.3.10"
4444
edition = "2021"
4545

4646
[workspace.features]

crates/orchestrator/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ use crate::status_update::NodeStatusUpdater;
1919
use crate::store::core::RedisStore;
2020
use crate::store::core::StoreContext;
2121
use crate::utils::loop_heartbeats::LoopHeartbeats;
22-
use alloy::primitives::U256;
2322
use anyhow::Result;
2423
use clap::Parser;
2524
use clap::ValueEnum;
@@ -38,7 +37,6 @@ use plugins::SchedulerPlugin;
3837
use plugins::StatusUpdatePlugin;
3938
use shared::utils::google_cloud::GcsStorageProvider;
4039
use shared::web3::contracts::core::builder::ContractBuilder;
41-
use shared::web3::contracts::structs::compute_pool::PoolStatus;
4240
use shared::web3::wallet::Wallet;
4341
use std::sync::Arc;
4442
use tokio::task::JoinSet;
@@ -186,7 +184,7 @@ async fn main() -> Result<()> {
186184
.build()
187185
.unwrap();
188186

189-
match contracts
187+
/* match contracts
190188
.compute_pool
191189
.get_pool_info(U256::from(compute_pool_id))
192190
.await
@@ -200,7 +198,7 @@ async fn main() -> Result<()> {
200198
error!("Failed to get pool info: {e}");
201199
return Ok(());
202200
}
203-
};
201+
}; */
204202
let group_store_context = store_context.clone();
205203
let mut scheduler_plugins: Vec<Box<dyn SchedulerPlugin>> = Vec::new();
206204
let mut status_update_plugins: Vec<Box<dyn StatusUpdatePlugin>> = vec![];

crates/shared/src/web3/contracts/helpers/utils.rs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use alloy::{
99
};
1010
use anyhow::Result;
1111
use log::{debug, info, warn};
12-
use tokio::time::{timeout, Duration};
12+
use tokio::time::Duration;
1313

1414
use crate::web3::wallet::WalletProvider;
1515

@@ -30,13 +30,23 @@ where
3030
N: Network,
3131
D: CallDecoder + Clone,
3232
{
33+
const PENDING_TRANSACTION_TIMEOUT: Duration = Duration::from_secs(60);
34+
3335
let mut tries = 0;
3436
let retry_delay = retry_delay.unwrap_or(2);
37+
let mut tx_hash = None;
3538

3639
while tries < max_tries {
3740
if tries > 0 {
3841
tokio::time::sleep(Duration::from_secs(retry_delay)).await;
3942

43+
if let Some(tx_hash) = tx_hash {
44+
let receipt = provider.get_transaction_receipt(tx_hash).await?;
45+
if receipt.is_some() {
46+
return Ok(tx_hash);
47+
}
48+
}
49+
4050
// On retry, always fetch fresh fee estimates from the provider.
4151
let priority_fee_res = provider.get_max_priority_fee_per_gas().await;
4252
let gas_price_res = provider.get_gas_price().await;
@@ -54,7 +64,7 @@ where
5464
call = call
5565
.clone()
5666
.max_fee_per_gas(new_gas_price)
57-
.max_priority_fee_per_gas(new_priority_fee);
67+
.max_priority_fee_per_gas(new_priority_fee)
5868
} else {
5969
warn!("Could not get new gas fees, retrying with old settings.");
6070
}
@@ -63,10 +73,15 @@ where
6373
match call.clone().send().await {
6474
Ok(result) => {
6575
debug!("Transaction sent, waiting for confirmation...");
66-
match timeout(Duration::from_secs(30), result.watch()).await {
67-
Ok(Ok(hash)) => return Ok(hash),
68-
Ok(Err(err)) => warn!("Transaction watch failed: {err:?}"),
69-
Err(_) => warn!("Watch timed out, retrying transaction..."),
76+
tx_hash = Some(*result.tx_hash());
77+
78+
match result
79+
.with_timeout(Some(PENDING_TRANSACTION_TIMEOUT))
80+
.watch()
81+
.await
82+
{
83+
Ok(hash) => return Ok(hash),
84+
Err(err) => warn!("Transaction watch failed: {err:?}"),
7085
}
7186
}
7287
Err(err) => {

0 commit comments

Comments
 (0)