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

feat(bench): generate traffic calling MPC contract's sign method #12658

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

mooori
Copy link
Contributor

@mooori mooori commented Dec 20, 2024

Requirements have been discussed in this Zulip thread.

Usage

Assumes the contract has already been deployed and initialized.

  1. Create accounts that send transactions, e.g. with just create_sub_accounts.
  2. Execute the benchmark-mpc-sign command.

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.72%. Comparing base (abe4a60) to head (1b874a9).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12658      +/-   ##
==========================================
- Coverage   70.74%   70.72%   -0.02%     
==========================================
  Files         848      848              
  Lines      174303   174301       -2     
  Branches   174303   174301       -2     
==========================================
- Hits       123303   123273      -30     
- Misses      45857    45883      +26     
- Partials     5143     5145       +2     
Flag Coverage Δ
backward-compatibility 0.16% <ø> (ø)
db-migration 0.16% <ø> (ø)
genesis-check 1.35% <ø> (ø)
linux 69.23% <ø> (+0.02%) ⬆️
linux-nightly 70.29% <ø> (-0.03%) ⬇️
pytests 1.65% <ø> (ø)
sanity-checks 1.46% <ø> (ø)
unittests 70.55% <ø> (-0.02%) ⬇️
upgradability 0.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mooori
Copy link
Contributor Author

mooori commented Jan 15, 2025

Tests against v1.signer-dev.testnet have shown that the benchmark-mpc-sign command added here does its job. When running with num_accounts close to transactions_per_second, nonce conflicts can occourr on testnet [ref]. I suggest to improve the handling of that in a separate PR. For now the workaround is to use a number of accounts sufficiently larger than TPS, for instance 50 accounts for 30 TPS.


let mut payload: [u8; 32] = [0; 32];
rng.fill(&mut payload);
let path = Alphanumeric.sample_string(rng, 16);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saketh-are is 16 a reasonable value for the path length? In case the required path length may change, it can be made an argument (like --key-version above).

@mooori mooori requested review from saketh-are and akhi3030 January 15, 2025 15:57
@mooori mooori marked this pull request as ready for review January 15, 2025 15:58
@mooori mooori requested a review from a team as a code owner January 15, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants