-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simulator network configuration and stress test (#4677)
* Update msim pointer * Every test invocation gets a fresh TMPDIR * Make sui-macros more self-contained * Basic network configurations * Run stress test in simulator * Increase default gas amount to support stress test * ctrl_c not supported in simulator * Assert 0 errors during stress test
- Loading branch information
1 parent
79cc151
commit bbaafa2
Showing
19 changed files
with
391 additions
and
170 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
pub mod drivers; | ||
pub mod util; | ||
pub mod workloads; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (c) 2022, Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
use anyhow::Result; | ||
use sui_sdk::crypto::FileBasedKeystore; | ||
use sui_types::{ | ||
base_types::SuiAddress, | ||
crypto::{AccountKeyPair, EncodeDecodeBase64, SuiKeyPair}, | ||
}; | ||
|
||
use std::path::PathBuf; | ||
|
||
pub fn get_ed25519_keypair_from_keystore( | ||
keystore_path: PathBuf, | ||
requested_address: &SuiAddress, | ||
) -> Result<AccountKeyPair> { | ||
let keystore = FileBasedKeystore::load_or_create(&keystore_path)?; | ||
let keypair = keystore | ||
.key_pairs() | ||
.iter() | ||
.find(|x| { | ||
let address: SuiAddress = Into::<SuiAddress>::into(&x.public()); | ||
address == *requested_address | ||
}) | ||
.map(|x| x.encode_base64()) | ||
.unwrap(); | ||
// TODO(joyqvq): This is a hack to decode base64 keypair with added flag, ok for now since it is for benchmark use. | ||
// Rework to get the typed keypair directly from above. | ||
Ok(match SuiKeyPair::decode_base64(&keypair).unwrap() { | ||
SuiKeyPair::Ed25519SuiKeyPair(x) => x, | ||
_ => panic!("Unexpected keypair type"), | ||
}) | ||
} |
Oops, something went wrong.