Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ngkuru committed Aug 14, 2023
1 parent d96ccb1 commit d0aef22
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
!aptos-move/aptos-release-builder/data/release.yaml
!aptos-move/aptos-release-builder/data/proposals/*
!aptos-move/framework/
!aptos-move/framework/aptos-framework/
!aptos-move/framework/aptos-stdlib/
!aptos-move/framework/move-stdlib/
!aptos-move/move-examples/hello_blockchain/
!crates/aptos/src/move_tool/*.bpl
!crates/aptos-faucet/doc/
Expand Down
2 changes: 1 addition & 1 deletion crates/aptos-api-tester/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use once_cell::sync::Lazy;
use std::{env, time::Duration};
use url::Url;

// Faucet constants
// Node and faucet constants

pub static DEVNET_NODE_URL: Lazy<Url> =
Lazy::new(|| Url::parse("https://fullnode.devnet.aptoslabs.com").unwrap());
Expand Down
12 changes: 12 additions & 0 deletions crates/aptos-api-tester/src/persistent_check.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// Copyright © Aptos Foundation

// Persistent checking is a mechanism to increase tolerancy to eventual consistency issues. In our
// earlier tests we have observed that parallel runs of the flows returned higher failure rates
// than serial runs, and these extra failures displayed the following pattern: 1) the flow submits
// a transaction to the API (such as account creation), 2) the flow reads the state from the API,
// and gets a result that does not include the transaction. We attribute this to the second call
// ending up on a different node which is not yet up to sync. Therefore, for state checks, we
// repeat the whole check for a period of time until it is successful, and throw a failure only if
// it fails to succeed. Note that every time a check fails we will still get a failure log.

// TODO: The need for having a different persistent check wrapper for each function signature is
// due to a lack of overloading in Rust. Consider using macros to reduce code duplication.

use crate::{
consts::{PERSISTENCY_TIMEOUT, SLEEP_PER_CYCLE},
strings::ERROR_COULD_NOT_CHECK,
Expand Down
4 changes: 2 additions & 2 deletions crates/aptos-rest-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ impl Client {
F: Fn(HashValue) -> Fut,
Fut: Future<Output = AptosResult<WaitForTransactionResult<T>>>,
{
// note: make this configurable
const DEFAULT_DELAY: Duration = Duration::from_millis(100);
// TODO: make this configurable
const DEFAULT_DELAY: Duration = Duration::from_millis(500);
let mut reached_mempool = false;
let start = std::time::Instant::now();
loop {
Expand Down

0 comments on commit d0aef22

Please sign in to comment.