-
Notifications
You must be signed in to change notification settings - Fork 238
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
Problem: key import,export not working correctly (fix #26) #27
Conversation
Codecov Report
@@ Coverage Diff @@
## main #27 +/- ##
======================================
Coverage ? 3.75%
======================================
Files ? 12
Lines ? 1145
Branches ? 0
======================================
Hits ? 43
Misses ? 1101
Partials ? 1 Continue to review full report at Codecov.
|
@@ -95,7 +95,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { | |||
initRootCmd(rootCmd, encodingConfig) | |||
overwriteFlagDefaults(rootCmd, map[string]string{ | |||
flags.FlagChainID: ChainID, | |||
flags.FlagKeyringBackend: "test", | |||
flags.FlagKeyringBackend: "os", |
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.
is it the same for all operating system?
Do we need to overwrite this flag?
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'll check again.
without this code, file
is used for default
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.
we might just remove this line.
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'll check again.
without this code,file
is used for default
I think the default value is os
?
EDIT: it's default to os
in cosmos-sdk, but default to file
in ethermint commands. So change to os
here seems indeed keep the code from different places consistent.
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.
evmos/ethermint#511
similar issue in ethermint side.
The reason of setting |
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 think the root cause of this issue is, in the default generated client.toml
, the keyring-backend
is set to os
, and some commands will read the default value in the command line flag, but some commands will read the client.toml
when no command line flag is passed.
@@ -95,7 +95,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { | |||
initRootCmd(rootCmd, encodingConfig) | |||
overwriteFlagDefaults(rootCmd, map[string]string{ | |||
flags.FlagChainID: ChainID, | |||
flags.FlagKeyringBackend: "test", | |||
flags.FlagKeyringBackend: "os", |
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.
we might just remove this line.
…n#26) (crypto-org-chain#27) add scripts pear makefile add my.nix working works OK works work chainmain works tidy up 1 node
…n#26) (crypto-org-chain#27) add scripts pear makefile add my.nix working works OK works work chainmain works tidy up 1 node
…n#26) (crypto-org-chain#27) add scripts pear makefile add my.nix working works OK works work chainmain works tidy up 1 node
…n#26) (crypto-org-chain#27) add scripts pear makefile add my.nix working works OK works work chainmain works tidy up 1 node
add c source fix ok Problem: key import,export not working correctly (fix crypto-org-chain#26) (crypto-org-chain#27) add scripts pear makefile add my.nix working works OK works work chainmain works tidy up 1 node mac ok go2go2 test
Solution: make default keyring-backend as os
for consistency
without this pr, adding default is
test
, and others areos
,so user cannot find the key correctly without specifying
keyring-backend
after applying this pr, when keyring-backend is not specified, default will be
os
, consistent