Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
maqi committed Dec 15, 2024
1 parent 87f2f70 commit c8193b1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
cp ./the-test-data.zip ./the-test-data_1.zip
./target/release/ant --log-output-dest data-dir file_TYPE upload "" > ./second_upload 2>&1
./target/release/ant --log-output-dest data-dir file upload "./the-test-data_1.zip" > ./second_upload 2>&1
enrelease-candidatev:
ANT_LOG: "all"
timeout-minutes: 25
Expand All @@ -115,7 +115,7 @@ jobs:
- name: Start the restart node again
run: |
./target/release/antnode \
--root-dir-type PARESTART_TEST_NODE_DATA_PATH \
--root-dir-type $RESTART_TEST_NODE_DATA_PATH \
--log-output-dest $RESTART_TEST_NODE_DATA_PATH \
--local \
--rewards-address "0x03B770D9cD32077cC0bF330c13C114a87643B124" &
Expand Down
4 changes: 4 additions & 0 deletions ant-networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ impl Network {
let mut close_nodes = self
.client_get_all_close_peers_in_range_or_close_group(&record_address)
.await?;
info!(
"Going to quoting {} nodes. ignore_peers is {ignore_peers:?}",
close_nodes.len()
);
// Filter out results from the ignored peers.
close_nodes.retain(|peer_id| !ignore_peers.contains(peer_id));

Expand Down
10 changes: 9 additions & 1 deletion autonomi/src/client/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::client::rate_limiter::RateLimiter;
use ant_evm::payment_vault::get_market_price;
use ant_evm::{Amount, EvmNetwork, PaymentQuote, QuotePayment, QuotingMetrics};
use ant_networking::{Network, NetworkError};
use ant_protocol::{storage::ChunkAddress, NetworkAddress};
use ant_protocol::{storage::ChunkAddress, NetworkAddress, CLOSE_GROUP_SIZE};
use libp2p::PeerId;
use std::collections::HashMap;
use xor_name::XorName;
Expand Down Expand Up @@ -159,6 +159,14 @@ async fn fetch_store_quote_with_retries(
loop {
match fetch_store_quote(network, content_addr).await {
Ok(quote) => {
if quote.len() < CLOSE_GROUP_SIZE {
retries += 1;
error!("Error while fetching store quote: not enough quotes ({}/{CLOSE_GROUP_SIZE}), retry #{retries}, quotes {quote:?}",
quote.len());
if retries > 2 {
break Err(CostError::CouldNotGetStoreQuote(content_addr));
}
}
break Ok((content_addr, quote));
}
Err(err) if retries < 2 => {
Expand Down

0 comments on commit c8193b1

Please sign in to comment.