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

Renaming --identity to --authority in bench-tps #1435

Merged
merged 3 commits into from
May 28, 2024

Conversation

kubanemil
Copy link

@kubanemil kubanemil commented May 20, 2024

Problem

The keypair in bench-tps is used to fund accounts in benchmarking, so it should be renamed to --authority

Summary of Changes

Deprecated use of --identity. Substituted argument to --authority in tests. Currently, both names are usable.

Fixes solana-labs#30145

@kubanemil
Copy link
Author

@KirillLykov @CriesofCarrots requesting your reviews.

@mergify mergify bot requested a review from a team May 20, 2024 12:06
Copy link

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

In future, please don't tag random contributors asking for review

bench-tps/src/cli.rs Show resolved Hide resolved
bench-tps/src/cli.rs Outdated Show resolved Hide resolved
@CriesofCarrots CriesofCarrots added the CI Pull Request is ready to enter CI label May 21, 2024
@anza-team anza-team removed the CI Pull Request is ready to enter CI label May 21, 2024
CriesofCarrots
CriesofCarrots previously approved these changes May 21, 2024
Copy link

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Lgtm.
@KirillLykov , I'll let you confirm this satisfies what you wanted in your issue, and merge.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.7%. Comparing base (94af1aa) to head (46309b0).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #1435    +/-   ##
========================================
  Coverage    82.7%    82.7%            
========================================
  Files         872      872            
  Lines      370361   370389    +28     
========================================
+ Hits       306478   306592   +114     
+ Misses      63883    63797    -86     

Copy link

@KirillLykov KirillLykov left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this issue! Could you also add a small test to cli.rs checking that identity works?

Probably in the follow up PR, would be nice to rename identity into authority in the scripts that we use to run bench-tps.

@kubanemil
Copy link
Author

is it okay if I add this to test identity:

let keypair = read_keypair_file(&keypair_file_name).unwrap();
let matches = build_args("1.0.0").get_matches_from(vec![
    "solana-bench-tps",
    "--identity",
    &keypair_file_name,
    "-u",
    "http://123.4.5.6:8899",
]);
let actual = parse_args(&matches).unwrap();
assert_eq!(
    actual,
    Config {
        json_rpc_url: "http://123.4.5.6:8899".to_string(),
        websocket_url: "ws://123.4.5.6:8900/".to_string(),
        id: keypair,
        ..Config::default()
    }
);

Also, can you say which scripts are used to run bench-tps?

@KirillLykov
Copy link

KirillLykov commented May 28, 2024

@kubanemil yes, something like that would fit.

Regarding where it is used: in multinode-demo and some other shell scripts. Checkout particular places with grep -nr "\-\-identity" --include "*.sh".

@kubanemil
Copy link
Author

I have checked out each shell script that uses identity as a CLI argument, none of them uses it for solana-bench-tps, they are used mostly as $ validator --identity.

@KirillLykov
Copy link

KirillLykov commented May 28, 2024

I have checked out each shell script that uses identity as a CLI argument, none of them uses it for solana-bench-tps, they are used mostly as $ validator --identity.

You are right. In this case, less work. Please rebase with upstream and add the test if not already and I will approve and merge

@kubanemil
Copy link
Author

done

@KirillLykov KirillLykov added the automerge automerge Merge this Pull Request automatically once CI passes label May 28, 2024
@mergify mergify bot merged commit dfa48eb into anza-xyz:master May 28, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge Merge this Pull Request automatically once CI passes community need:merge-assist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename identity to authority in bench-tps
5 participants