Skip to content

Commit

Permalink
Load test fixes (#765)
Browse files Browse the repository at this point in the history
* update acc for load tests

* fmt

* tune load tests balance

* fmt

* load test log check fixed

* fmt
  • Loading branch information
volovyks authored Jul 30, 2024
1 parent 3ebca41 commit 3d280d1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion chain-signatures/contract/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,10 @@ impl VersionedMpcContract {
) -> Result<SignatureResponse, MpcContractError> {
match self {
Self::V0(_) => match signature {
SignatureResult::Ok(signature) => Ok(signature),
SignatureResult::Ok(signature) => {
log!("Signature is ready.");
Ok(signature)
}
SignatureResult::Err(_) => Err(MpcContractError::SignError(SignError::Timeout)),
},
}
Expand Down
3 changes: 2 additions & 1 deletion load-tests/src/fastauth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ pub async fn prepare_user_credentials(user: &mut GooseUser) -> TransactionResult

let subaccount = root_account
.create_subaccount(&format!("user-{}", rand::random::<u64>()))
.initial_balance(NearToken::from_yoctonear(200000000000000000000000u128))
// Balance this values depending on how many users you want to create and available balance
.initial_balance(NearToken::from_near(10))
.transact()
.await
.unwrap()
Expand Down
7 changes: 3 additions & 4 deletions load-tests/src/multichain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ pub async fn multichain_sign(user: &mut GooseUser) -> TransactionResult {
.get_session_data::<UserSession>()
.expect("Session Data must be set");

let multichain_contract_id =
AccountId::try_from("v5.multichain-mpc-dev.testnet".to_string()).unwrap();
let multichain_contract_id = AccountId::try_from("v1.signer-dev.testnet".to_string()).unwrap();
let testnet_rpc_url = "https://rpc.testnet.near.org".to_string();

let signer = InMemorySigner {
Expand Down Expand Up @@ -69,7 +68,7 @@ pub async fn multichain_sign(user: &mut GooseUser) -> TransactionResult {
}))
.unwrap(),
gas: 300_000_000_000_000,
deposit: 1,
deposit: 1, // attach more if you are ok with going above "CHEAP_REQUESTS" limit
})],
};

Expand Down Expand Up @@ -107,7 +106,7 @@ pub async fn multichain_sign(user: &mut GooseUser) -> TransactionResult {

tracing::info!("goose_response: {:?}", rsp);

let expected_log = "sign_helper: signature ready";
let expected_log = "Signature is ready.";

let validate = &Validate::builder()
.status(200)
Expand Down
2 changes: 1 addition & 1 deletion load-tests/src/multichain/test_plans/short.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0,0s;5,30s;5,20m;0,0s
0,0s;1,30s;1,10m;0,0s

0 comments on commit 3d280d1

Please sign in to comment.