Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tune LT parameters #791

Merged
merged 2 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions load-tests/src/fastauth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,23 @@ use utils::build_send_and_check_request;
pub async fn prepare_user_credentials(user: &mut GooseUser) -> TransactionResult {
tracing::info!("prepare_user_credentials");

// Config
let account_creator = "dev-1660670387515-45063246810397".to_string();
let sk = "ed25519:4hc3qA3nTE8M63DB8jEZx9ZbHVUPdkMjUAoa11m4xtET7F6w4bk51TwQ3RzEcFhBtXvF6NYzFdiJduaGdJUvynAi";
let sub_account_init_balance = NearToken::from_near(1);

let worker = near_workspaces::testnet().await.unwrap();

let root_account = Account::from_secret_key(
near_workspaces::types::AccountId::try_from("dev-1660670387515-45063246810397".to_string()).unwrap(),
near_workspaces::types::SecretKey::from_str(
"ed25519:4hc3qA3nTE8M63DB8jEZx9ZbHVUPdkMjUAoa11m4xtET7F6w4bk51TwQ3RzEcFhBtXvF6NYzFdiJduaGdJUvynAi"
).unwrap(),
&worker
near_workspaces::types::AccountId::try_from(account_creator).unwrap(),
near_workspaces::types::SecretKey::from_str(sk).unwrap(),
&worker,
);

let subaccount = root_account
.create_subaccount(&format!("user-{}", rand::random::<u64>()))
// Balance this values depending on how many users you want to create and available balance
.initial_balance(NearToken::from_near(10))
.initial_balance(sub_account_init_balance)
.transact()
.await
.unwrap()
Expand Down
13 changes: 7 additions & 6 deletions load-tests/src/multichain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@ pub struct SignRequest {
pub async fn multichain_sign(user: &mut GooseUser) -> TransactionResult {
tracing::info!("multichain_sign");

// Config
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 deposit = 1; // attach more if you are ok with going above "CHEAP_REQUESTS" limit
let expected_log = "Signature is ready."; // This is a log that we are expecting to see in the successful response

let session = user
.get_session_data::<UserSession>()
.expect("Session Data must be set");

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 {
account_id: session.near_account_id.clone(),
public_key: session.fa_sk.public_key(),
Expand Down Expand Up @@ -68,7 +71,7 @@ pub async fn multichain_sign(user: &mut GooseUser) -> TransactionResult {
}))
.unwrap(),
gas: 300_000_000_000_000,
deposit: 1, // attach more if you are ok with going above "CHEAP_REQUESTS" limit
deposit,
})],
};

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

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

let expected_log = "Signature is ready.";

let validate = &Validate::builder()
.status(200)
.text(expected_log) // Naive check if the request is successful
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;1,30s;1,10m;0,0s
0,0s;1,2m;0,0s
Loading