-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add support for keyfiles with -ethKeystorePath, update flag descriptions, flagset output to stdout #2713
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2713 +/- ##
===================================================
- Coverage 56.34825% 56.32232% -0.02593%
===================================================
Files 88 88
Lines 19147 19186 +39
===================================================
+ Hits 10789 10806 +17
- Misses 7767 7788 +21
- Partials 591 592 +1
Continue to review full report at Codecov.
|
Thanks for fixing my 3 issues in batch 👍 |
@eliteprox Thanks for the PR. Mark as ready when you think you finalized it. Then, we'll review and comment on this. |
605ef64
to
9b72aa0
Compare
@leszko This PR is ready for review. |
Perfect. Thank you. I'll review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few comments. Most of them are minor.
From the more important ones, I think we should fail-fast in the following scenarios:
EthKeystorePath
points to a non-existing fileEthAcctAddr
andEthKeystorePath
are both defined but they point different ETH addresses
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
…match from ParseEthKeystorePath, updated tests
ab3c2c4
to
653a085
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some super minor comments. Please take a look and address and think it's ready for the merge. Good work 👍
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
Co-authored-by: Rafał Leszko <rafal@livepeer.org>
@eliteprox when you address all comments, please click "Re-request review" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one more comment, could you check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all the changes @eliteprox
I'll merge as soon as the CI build is completed.
What does this pull request do? Explain your changes. (required)
os.StdOut
. This has the effect of enabling users to grep --help output,-ethKeystorePath
. This can be used alternatively toethAcctAddr
-ethAcctAddr
is optional, but if provided the address must match with the one found in the keyfile.Specific updates (required)
OrchSecret
,EthAcctAddr
,EthPassword
,EthKeystorePath
andPricePerBroadcaster
-ethKeystorePath
How did you test each of these updates (required)
I tested the
ethKeystorePath
andethAcctAddr
flags in the following ways:keystoreDir
was set to same path andethAcctAddr
flag still works for selecting eth account.keystoreDir
was set to parent directory of the file and ETH address is parsed. If-ethAcctAddr
flag is also provided, the address parsed from keyfile must match the ethAcctAddr, otherwise error:-ethKeystorePath and -ethAcctAddr were both provided, but ethAcctAddr does not match the address found in keystore
provided -ethKeystorePath was not found
error opening keystore
Does this pull request close any open issues?
fix #2689 cli help is printed to stderr instead of stdout
fix #2690 cli help didn't mention -ethPassword and -orchSecret can be file path
fix #2691 Usage for -ethKeystorePath option is confusing
Checklist:
make
runs successfully./test.sh
pass