mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-22 07:59:29 +00:00
rename(wallet_crypto_bench): rename to crypto_primitives_bench
This commit is contained in:
parent
891b23c18a
commit
ba65b168dd
12
Cargo.lock
generated
12
Cargo.lock
generated
@ -1934,6 +1934,18 @@ dependencies = [
|
|||||||
"hybrid-array",
|
"hybrid-array",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crypto_primitives_bench"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"key_protocol",
|
||||||
|
"nssa_core",
|
||||||
|
"rand 0.8.5",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ctr"
|
name = "ctr"
|
||||||
version = "0.9.2"
|
version = "0.9.2"
|
||||||
|
|||||||
@ -38,7 +38,7 @@ members = [
|
|||||||
"examples/program_deployment/methods/guest",
|
"examples/program_deployment/methods/guest",
|
||||||
"testnet_initial_state",
|
"testnet_initial_state",
|
||||||
"indexer/ffi",
|
"indexer/ffi",
|
||||||
"tools/wallet_crypto_bench",
|
"tools/crypto_primitives_bench",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
|||||||
@ -5,6 +5,6 @@ Bench tools live under `tools/` with READMEs for how to run each one. This direc
|
|||||||
| Bench | Doc |
|
| Bench | Doc |
|
||||||
|---|---|
|
|---|---|
|
||||||
| cycle_bench | [cycle_bench.md](cycle_bench.md) |
|
| cycle_bench | [cycle_bench.md](cycle_bench.md) |
|
||||||
| wallet_crypto_bench | [wallet_crypto_bench.md](wallet_crypto_bench.md) |
|
| crypto_primitives_bench | [crypto_primitives_bench.md](crypto_primitives_bench.md) |
|
||||||
|
|
||||||
All numbers are from a single M2 Pro dev box unless noted otherwise.
|
All numbers are from a single M2 Pro dev box unless noted otherwise.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# wallet_crypto_bench
|
# crypto_primitives_bench
|
||||||
|
|
||||||
Wallet-side cryptographic primitives. Measures the per-call cost of key derivation, sender-side DH for note encryption, and Account note symmetric encrypt/decrypt. Standalone host binary, no live stack required.
|
Cryptographic primitives used by client/wallet code. Measures the per-call cost of key derivation, sender-side DH for note encryption, and Account note symmetric encrypt/decrypt. Standalone host binary, no live stack required.
|
||||||
|
|
||||||
## Machine
|
## Machine
|
||||||
|
|
||||||
@ -33,10 +33,10 @@ Wallet-side cryptographic primitives. Measures the per-call cost of key derivati
|
|||||||
## Reproduce
|
## Reproduce
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo run --release -p wallet_crypto_bench
|
cargo run --release -p crypto_primitives_bench
|
||||||
```
|
```
|
||||||
|
|
||||||
JSON output: `target/wallet_crypto_bench.json`.
|
JSON output: `target/crypto_primitives_bench.json`.
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "wallet_crypto_bench"
|
name = "crypto_primitives_bench"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
license = { workspace = true }
|
license = { workspace = true }
|
||||||
@ -1,11 +1,11 @@
|
|||||||
# wallet_crypto_bench
|
# crypto_primitives_bench
|
||||||
|
|
||||||
Wallet-side cryptographic microbenchmarks. Single host binary, no live sequencer or Bedrock needed.
|
Cryptographic primitive microbenchmarks used by client/wallet code. Single host binary, no live sequencer or Bedrock needed.
|
||||||
|
|
||||||
## Run
|
## Run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo run --release -p wallet_crypto_bench
|
cargo run --release -p crypto_primitives_bench
|
||||||
```
|
```
|
||||||
|
|
||||||
## What you'll see
|
## What you'll see
|
||||||
@ -17,4 +17,4 @@ Per-operation `best_us`, `mean_us`, and `stdev_us` over 100 iterations (plus 2 w
|
|||||||
- `SharedSecretKey::new (sender DH)` — secp256k1 ECDH per recipient.
|
- `SharedSecretKey::new (sender DH)` — secp256k1 ECDH per recipient.
|
||||||
- `EncryptionScheme::encrypt` / `decrypt` — ChaCha20 over an Account note.
|
- `EncryptionScheme::encrypt` / `decrypt` — ChaCha20 over an Account note.
|
||||||
|
|
||||||
JSON output is written to `target/wallet_crypto_bench.json`.
|
JSON output is written to `target/crypto_primitives_bench.json`.
|
||||||
@ -169,7 +169,7 @@ fn write_json(results: &[OpResult]) -> Result<()> {
|
|||||||
.canonicalize()?;
|
.canonicalize()?;
|
||||||
let out_path = workspace_root
|
let out_path = workspace_root
|
||||||
.join("target")
|
.join("target")
|
||||||
.join("wallet_crypto_bench.json");
|
.join("crypto_primitives_bench.json");
|
||||||
if let Some(parent) = out_path.parent() {
|
if let Some(parent) = out_path.parent() {
|
||||||
std::fs::create_dir_all(parent)?;
|
std::fs::create_dir_all(parent)?;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user