-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
stdin redirection does not work when recovering accounts #9566
Comments
Thanks @helder-moreira! Did you try and debug to see where in the code this comes from (e.g. which PR)? |
@AmauryM No, I did try but not extensively. |
I've now tried to reproduce this behavior on various versions and two machines. MacOS Catalina version 10.15.7 (works fine) > go version
go version go1.16 darwin/amd64
> simd version
0.43.0-beta1-109-g1c7776671
> simd keys add test --recover < test.txt
- name: test
type: local
address: cosmos1rmtrsh8y4nmx864h4rw2hryy6yjk30lajx5xzl
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A8pi/kYASd2ZREdJ2v08mxyiJV3C1vydAVpqnmHBCD/r"}'
mnemonic: ""
> simd version
0.42.6
> simd keys add test --recover < test.txt
- name: test
type: local
address: cosmos1rmtrsh8y4nmx864h4rw2hryy6yjk30lajx5xzl
pubkey: cosmospub1addwnpepq09x9ljxqpyamx2ygaya4lfunvw2yf2actt0e8gptf4fucwppql7kyjeff9
mnemonic: ""
threshold: 0
pubkeys: []
> simd version
0.42.5
> simd keys add test --recover < test.txt
- name: test
type: local
address: cosmos1rmtrsh8y4nmx864h4rw2hryy6yjk30lajx5xzl
pubkey: cosmospub1addwnpepq09x9ljxqpyamx2ygaya4lfunvw2yf2actt0e8gptf4fucwppql7kyjeff9
mnemonic: ""
threshold: 0
pubkeys: [] Ubuntu 20.04 (LTS) x64 (here is the issue) user@simd-test:~$ go version
go version go1.16.5 linux/amd64
user@simd-test:~$ simd version
0.43.0-beta1-109-g1c7776671
user@simd-test:~$ simd keys add test --recover < test.txt
EOF
EOF
EOF
Error: too many failed passphrase attempts
user@simd-test:~$ simd version
0.42.6
user@simd-test:~$ simd keys add test --recover < test.txt
EOF
EOF
EOF
Error: too many failed passphrase attempts
user@simd-test:~$ simd version
0.42.5
user@simd-test:~$ simd keys add test --recover < test.txt
EOF
EOF
EOF
Error: too many failed passphrase attempts Worked fine with version 0.42.4 user@simd-test:~$ simd version
0.42.4
user@simd-test:~$ simd keys add test --recover < test.txt
- name: test
type: local
address: cosmos1rmtrsh8y4nmx864h4rw2hryy6yjk30lajx5xzl
pubkey: cosmospub1addwnpepq09x9ljxqpyamx2ygaya4lfunvw2yf2actt0e8gptf4fucwppql7kyjeff9
mnemonic: ""
threshold: 0
pubkeys: [] |
Worked fine with
Worked fine with
|
Everything seems to be working fine. Maybe we don't need to work actively. Wdyt @helder-moreira ? |
@likhita-809 maybe its with go 1.16? Can you try on your end? @toschdev was also using go 1.16. Just checked on my linux setup and its go 1.16 too: $ go version
go version go1.16.5 linux/amd64 |
Working fine with Ubuntu 20.04.1 (LTS), go 1.16 version
Seems like everything is good with go 1.16 too. Can you confirm if we can close this issue @helder-moreira ? |
I keep getting the same error. To be sure, I have just launched a fresh VM on digital ocean and here is the result: $ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
$ cat test.txt
sibling pride cross win vacuum exhaust oxygen social pioneer buffalo enlist world tube high boil profit tobacco valley awake sort model hour rebel will
12345678
12345678
$ go version
go version go1.16.5 linux/amd64
$ simd version
0.42.5
$ simd keys add test --recover < test.txt
EOF
EOF
EOF
Error: too many failed passphrase attempts
Usage:
simd keys add <name> [flags]
Flags:
--account uint32 Account number for HD derivation
--algo string Key signing algorithm to generate keys for (default "secp256k1")
--coin-type uint32 coin type number for HD derivation (default 118)
--dry-run Perform action, but don't add key to local keystore
--hd-path string Manual HD Path derivation (overrides BIP44 config)
-h, --help help for add
--index uint32 Address index number for HD derivation
-i, --interactive Interactively prompt user for BIP39 passphrase and mnemonic
--ledger Store a local reference to a private key on a Ledger device
--multisig strings Construct and store a multisig public key (implies --pubkey)
--multisig-threshold int K out of N required signatures. For use in conjunction with --multisig (default 1)
--no-backup Don't print out seed phrase (if others are watching the terminal)
--nosort Keys passed to --multisig are taken in the order they're supplied
--pubkey string Parse a public key in bech32 format and save it to disk
--recover Provide seed phrase to recover existing key instead of creating
Global Flags:
--home string The application home directory (default "/home/helder/.simapp")
--keyring-backend string Select keyring's backend (os|file|test) (default "os")
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--output string Output format (text|json) (default "text")
--trace print out full stack trace on errors
$ simd version
0.42.6
$ simd keys add test --recover < test.txt
EOF
EOF
EOF
Error: too many failed passphrase attempts
Usage:
simd keys add <name> [flags]
Flags:
--account uint32 Account number for HD derivation
--algo string Key signing algorithm to generate keys for (default "secp256k1")
--coin-type uint32 coin type number for HD derivation (default 118)
--dry-run Perform action, but don't add key to local keystore
--hd-path string Manual HD Path derivation (overrides BIP44 config)
-h, --help help for add
--index uint32 Address index number for HD derivation
-i, --interactive Interactively prompt user for BIP39 passphrase and mnemonic
--ledger Store a local reference to a private key on a Ledger device
--multisig strings Construct and store a multisig public key (implies --pubkey)
--multisig-threshold int K out of N required signatures. For use in conjunction with --multisig (default 1)
--no-backup Don't print out seed phrase (if others are watching the terminal)
--nosort Keys passed to --multisig are taken in the order they're supplied
--pubkey string Parse a public key in bech32 format and save it to disk
--recover Provide seed phrase to recover existing key instead of creating
Global Flags:
--home string The application home directory (default "/home/helder/.simapp")
--keyring-backend string Select keyring's backend (os|file|test) (default "os")
--keyring-dir string The client Keyring directory; if omitted, the default 'home' directory will be used
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--output string Output format (text|json) (default "text")
--trace print out full stack trace on errors |
It seems like the regression was introduced in 9fe61a7 |
Hi, I was hitting the same issue and managed to understand what's going on. I've only hit the issue using "file" backend, "os" works fine.
So at this point, we have: inBuf:
Now I'll need some feedback for the fix, the only option I've had so far is exploiting a "feature" of ie, from simapp/simd/cmd/root.go: func NewRootCmd() (*cobra.Command, params.EncodingConfig) {
encodingConfig := simapp.MakeTestEncodingConfig()
initClientCtx := client.Context{}.
WithJSONMarshaler(encodingConfig.Marshaler).
WithInterfaceRegistry(encodingConfig.InterfaceRegistry).
WithTxConfig(encodingConfig.TxConfig).
WithLegacyAmino(encodingConfig.Amino).
- WithInput(os.Stdin).
+ WithInput(bufio.NewReader(os.Stdin)).
WithAccountRetriever(types.AccountRetriever{}).
WithHomeDir(simapp.DefaultNodeHome).
WithViper("") // In simapp, we don't use any prefix for env variables. And also making sure the client/keys/add.go command func runAddCmdPrepare(cmd *cobra.Command, args []string) error {
- buf := bufio.NewReader(cmd.InOrStdin())
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
+ buf := bufio.NewReader(clientCtx.Input)
return RunAddCmd(clientCtx, cmd, args, buf)
} With those changes, the key recovery from piped file works again. I still don't really like my solution as it requires the client app to provide the right kind of buffer and I'm pretty sure we can do better. If anyone could give me some pointers I'd happily provide PR and tests. |
…tdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over #9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go
…tdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over #9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51)
…tdin (fix #9566) (backport #9821) (#9880) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over #9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go * fix: merge conflict backporting pr-9821 (#9888) Co-authored-by: daeMOn <[email protected]>
…tdin (fix #9566) (#9821) (#9881) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over #9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) Co-authored-by: daeMOn <[email protected]>
…tdin (fix #9566) (backport #9821) (#9880) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over cosmos/cosmos-sdk#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go * fix: merge conflict backporting pr-9821 (#9888) Co-authored-by: daeMOn <[email protected]>
* fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (backport #9821) (#9880) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over cosmos/cosmos-sdk#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go * fix: merge conflict backporting pr-9821 (#9888) Co-authored-by: daeMOn <[email protected]> * fix: Fix CLI query tx docs for acc/seq (#9942) (#9951) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: user from #validators-verfied channel on Cosmos Discord <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * build(deps): bump TM to v0.34.12 (backport #9956) (#9961) * perf: Remove telemetry from wrappings of store (backport #10077) (#10084) * docs: update to v0.44 version tag (#10069) (#10097) (cherry picked from commit d6c3017) # Conflicts: # docs/.vuepress/enhanceApp.js Co-authored-by: Ryan Christoffersen <[email protected]> * fix!: update ABCI query to use request height (backport #9879) (#10144) * fix: use keyring in config for add-genesis-account cmd (backport #9969) (#10065) * fix: use keyring in config for add-genesis-account cmd (#9969) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: #9644 +use the keyring backend (if specified) in the binary config for the add-genesis-account command +update existing test to check for the case of keyring in config * build(deps): bump github.com/tendermint/tendermint from 0.34.12 to 0.34.13 (backport #10106) (#10107) * build(deps): bump github.com/tendermint/tendermint (#10106) (cherry picked from commit 8ee5e50) * fix go.sum Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (backport #10026) (#10114) * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (#10026) (cherry picked from commit 28bf2c1) # Conflicts: # CHANGELOG.md # store/cachekv/store.go * Fix merge conflict * fix changelog Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Robert Zaremba <[email protected]> * chore: bump IAVL version (backport #10040) (#10186) * chore: bump IAVL version (#10040) * chore: bump IAVL version * test master * update IAVL version * adding missing go.sum entry * adding missing entries * fix go.sum * clear go.sum * fixing go.sum Co-authored-by: marbar3778 <[email protected]> (cherry picked from commit 693ffb1) * add changelog update * tidy go.mod Co-authored-by: Robert Zaremba <[email protected]> * feat: backport reject redundant transactions from ibc-go (#10211) * backport refund of redundant packets from ibc-go * update changelog * address review comments and lint errors * added nolint Co-authored-by: Carlos Rodriguez <[email protected]> * chore: Changelog and Release Notes for 0.42.10 (#10242) * chores: bump tendermint version * fix: add required helper for group module Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Amaury <[email protected]>
* fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (backport #9821) (#9880) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over cosmos/cosmos-sdk#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go * fix: merge conflict backporting pr-9821 (#9888) Co-authored-by: daeMOn <[email protected]> * fix: Fix CLI query tx docs for acc/seq (#9942) (#9951) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: user from #validators-verfied channel on Cosmos Discord <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * build(deps): bump TM to v0.34.12 (backport #9956) (#9961) * perf: Remove telemetry from wrappings of store (backport #10077) (#10084) * docs: update to v0.44 version tag (#10069) (#10097) (cherry picked from commit d6c3017) # Conflicts: # docs/.vuepress/enhanceApp.js Co-authored-by: Ryan Christoffersen <[email protected]> * fix!: update ABCI query to use request height (backport #9879) (#10144) * fix: use keyring in config for add-genesis-account cmd (backport #9969) (#10065) * fix: use keyring in config for add-genesis-account cmd (#9969) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: #9644 +use the keyring backend (if specified) in the binary config for the add-genesis-account command +update existing test to check for the case of keyring in config * build(deps): bump github.com/tendermint/tendermint from 0.34.12 to 0.34.13 (backport #10106) (#10107) * build(deps): bump github.com/tendermint/tendermint (#10106) (cherry picked from commit 8ee5e50) * fix go.sum Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (backport #10026) (#10114) * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (#10026) (cherry picked from commit 28bf2c1) # Conflicts: # CHANGELOG.md # store/cachekv/store.go * Fix merge conflict * fix changelog Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Robert Zaremba <[email protected]> * chore: bump IAVL version (backport #10040) (#10186) * chore: bump IAVL version (#10040) * chore: bump IAVL version * test master * update IAVL version * adding missing go.sum entry * adding missing entries * fix go.sum * clear go.sum * fixing go.sum Co-authored-by: marbar3778 <[email protected]> (cherry picked from commit 693ffb1) * add changelog update * tidy go.mod Co-authored-by: Robert Zaremba <[email protected]> * feat: backport reject redundant transactions from ibc-go (#10211) * backport refund of redundant packets from ibc-go * update changelog * address review comments and lint errors * added nolint Co-authored-by: Carlos Rodriguez <[email protected]> * chore: Changelog and Release Notes for 0.42.10 (#10242) * chores: bump tendermint version * fix: add required helper for group module Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Amaury <[email protected]>
* [capricorn] cosmos-sdk v0.42.9 to v0.42.10 (#117) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (backport #9821) (#9880) * fix: file keyring fails to add/import/export keys when input is not stdin (fix #9566) (#9821) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over cosmos/cosmos-sdk#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) # Conflicts: # client/keys/add.go # client/keys/add_test.go # client/keys/export_test.go * fix: merge conflict backporting pr-9821 (#9888) Co-authored-by: daeMOn <[email protected]> * fix: Fix CLI query tx docs for acc/seq (#9942) (#9951) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: user from #validators-verfied channel on Cosmos Discord <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * build(deps): bump TM to v0.34.12 (backport #9956) (#9961) * perf: Remove telemetry from wrappings of store (backport #10077) (#10084) * docs: update to v0.44 version tag (#10069) (#10097) (cherry picked from commit d6c3017) # Conflicts: # docs/.vuepress/enhanceApp.js Co-authored-by: Ryan Christoffersen <[email protected]> * fix!: update ABCI query to use request height (backport #9879) (#10144) * fix: use keyring in config for add-genesis-account cmd (backport #9969) (#10065) * fix: use keyring in config for add-genesis-account cmd (#9969) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description ref: #9644 +use the keyring backend (if specified) in the binary config for the add-genesis-account command +update existing test to check for the case of keyring in config * build(deps): bump github.com/tendermint/tendermint from 0.34.12 to 0.34.13 (backport #10106) (#10107) * build(deps): bump github.com/tendermint/tendermint (#10106) (cherry picked from commit 8ee5e50) * fix go.sum Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (backport #10026) (#10114) * perf: Make CacheKV store interleaved iterator and insertion not O(n^2) (#10026) (cherry picked from commit 28bf2c1) # Conflicts: # CHANGELOG.md # store/cachekv/store.go * Fix merge conflict * fix changelog Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Robert Zaremba <[email protected]> * chore: bump IAVL version (backport #10040) (#10186) * chore: bump IAVL version (#10040) * chore: bump IAVL version * test master * update IAVL version * adding missing go.sum entry * adding missing entries * fix go.sum * clear go.sum * fixing go.sum Co-authored-by: marbar3778 <[email protected]> (cherry picked from commit 693ffb1) * add changelog update * tidy go.mod Co-authored-by: Robert Zaremba <[email protected]> * feat: backport reject redundant transactions from ibc-go (#10211) * backport refund of redundant packets from ibc-go * update changelog * address review comments and lint errors * added nolint Co-authored-by: Carlos Rodriguez <[email protected]> * chore: Changelog and Release Notes for 0.42.10 (#10242) * chores: bump tendermint version * fix: add required helper for group module Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Amaury <[email protected]> * fix: add hack to handle group v2 messages in baseapp (#118) * fix: add hack to handle group v2 messages in baseapp * chores: disable lint warning * feat: backport caelum bls on v0.42 sdk (#119) * Bls (#104) * bls signature for basic account * benchmark for bls and ed25519 * added bls sig verify cost to genesis * Revert "Merge branch 'fetchai:master' into bls" This reverts commit a5dd8ea, reversing changes made to 082e071. * format using go tools * nuisance golangci-lint errors * Bls (#105) * bls signature for basic account * benchmark for bls and ed25519 * added bls sig verify cost to genesis * Revert "Merge branch 'fetchai:master' into bls" This reverts commit a5dd8ea, reversing changes made to 082e071. * format using go tools * nuisance golangci-lint errors * POP interfaces in accounts and authentication * add bls multsig operations * fixed golangci-lint error * changes after comments * change codespace for invalid pop error * extend migrate with bls cost * set bls cost multiplier * fix ante test errors * feat: Caelum (#111) * bls signature for basic account * benchmark for bls and ed25519 * added bls sig verify cost to genesis * Revert "Merge branch 'fetchai:master' into bls" This reverts commit a5dd8ea, reversing changes made to 082e071. * format using go tools * nuisance golangci-lint errors * Bls (#104) * bls signature for basic account * benchmark for bls and ed25519 * added bls sig verify cost to genesis * Revert "Merge branch 'fetchai:master' into bls" This reverts commit a5dd8ea, reversing changes made to 082e071. * format using go tools * nuisance golangci-lint errors * POP interfaces in accounts and authentication * add bls multsig operations * fixed golangci-lint error * changes after comments * initial commit from regen-ledger/x/group v1.0.0 * minor changes to bls12381 key generation * initial commit from regen-ledger/proto/regen/group v1.0.0 * group module compatibility for fetchai cosomos-sdk * add bls account restriction to group members * fix bug in setting pop * make msg uniqueness checking optional * add bls basic/aggregate vote * add checking on empty messages/public keys * add gas caclulation/consumption for verifying aggregated votes * minor change to gas calculation for voteagg * initial commit for orm and types from regen-ledger v2.0.0-beta1 * upgrade testsuite to regen-ledger v2.0.0-beta1 * make bls requirement for group members optional * add tests for bls related group operations * client and server for poll and aggregated votes and integration tests * fix bls related test errors * fix proto-lint errors * goimport format * proto comments * update blst to v0.3.5 and more tests for bls * Update x/auth/ante/sigverify.go Co-authored-by: daeMOn <[email protected]> * Update x/group/client/util.go Co-authored-by: daeMOn <[email protected]> Co-authored-by: daeMOn <[email protected]> * fix: bls12381 compat with sdk v0.42 * fix: buf lint / breaking command changes * fix: staking test want more gas * chores: drop arm from CI test matrix * chores: fix lint Co-authored-by: kitounliu <[email protected]> Co-authored-by: kitty <[email protected]> * fix: more gas for simulations. Disable test caching Co-authored-by: kitounliu <[email protected]> Co-authored-by: kitty <[email protected]> * chores: revert bls integration (#121) * chores: bump sdk v0.42.11 (#123) * chores: revert bls integration * fix: --home flag parsing (backport #10226) (#10272) * fix: --home flag parsing (#10226) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #XXXX <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * fix: null guard for tx fee amounts (backport #10327) (#10343) * fix: null guard for tx fee amounts (#10327) ## Description It is possible to submit a TX with a fees object containing a Coin with a nil amount. This results in a rather cryptic redacted panic response when the basic validation checks fee Coins for negative amounts. This PR adds an additional check for nil to provide a friendlier error message. * perf: Only do memory allocation when zero coin is found (backport #10339) (#10362) * perf: Only do memory allocation when zero coin is found (#10339) ## Description Closes: #10333 Added a loop that checks for zero coins before making any memory allocations. If no zero coins are found, just return the `coins` slice as is. If a zero coin is found, then allocate the new array, stop looking for the first zero, and restart the loop to "remove" the 0's. * build(deps): bump github.com/tendermint/tendermint from 0.34.13 to 0.34.14 (backport #10357) (#10376) * build(deps): bump github.com/tendermint/tendermint from 0.34.13 to 0.34.14 (#10357) Bumps [github.com/tendermint/tendermint](https://github.com/tendermint/tendermint) from 0.34.13 to 0.34.14. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/tendermint/tendermint/releases">github.com/tendermint/tendermint's releases</a>.</em></p> <blockquote> <h2>0.34.14 (WARNING: BETA SOFTWARE)</h2> <p><a href="https://github.com/tendermint/tendermint/blob/v0.34.14/CHANGELOG.md#v0.34.14">https://github.com/tendermint/tendermint/blob/v0.34.14/CHANGELOG.md#v0.34.14</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/tendermint/tendermint/blob/master/CHANGELOG.md">github.com/tendermint/tendermint's changelog</a>.</em></p> <blockquote> <h2>v0.34.14</h2> <p>This release backports the <code>rollback</code> feature to allow recovery in the event of an incorrect app hash.</p> <h3>FEATURES</h3> <ul> <li><a href="https://github-redirect.dependabot.com/tendermint/tendermint/pull/6982">#6982</a> The tendermint binary now has built-in suppport for running the end-to-end test application (with state sync support) (<a href="https://github.com/cmwaters"><code>@cmwaters</code></a>).</li> <li>[cli] <a href="https://github-redirect.dependabot.com/tendermint/tendermint/pull/7033">#7033</a> Add a <code>rollback</code> command to rollback to the previous tendermint state. This may be useful in the event of non-determinstic app hash or when reverting an upgrade. <a href="https://github.com/cmwaters"><code>@cmwaters</code></a></li> </ul> <h3>IMPROVEMENTS</h3> <ul> <li><a href="https://github-redirect.dependabot.com/tendermint/tendermint/pull/7104">#7103</a> Remove IAVL dependency (backport of <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/6550">#6550</a>) (<a href="https://github.com/cmwaters"><code>@cmwaters</code></a>)</li> </ul> <h3>BUG FIXES</h3> <ul> <li><a href="https://github-redirect.dependabot.com/tendermint/tendermint/pull/7057">#7057</a> Import Postgres driver support for the psql indexer (<a href="https://github.com/creachadair"><code>@creachadair</code></a>).</li> <li>[ABCI] <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7110">#7110</a> Revert "change client to use multi-reader mutexes (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/6873">#6873</a>)" (<a href="https://github.com/tychoish"><code>@tychoish</code></a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/tendermint/tendermint/commit/85870def7b628effad73af942e638bbddf2ba8fd"><code>85870de</code></a> release: prepare changelog for 0.34.14 (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7105">#7105</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/ff2758b32e637b50734ad5ff1d0b24403af0deb2"><code>ff2758b</code></a> dep: remove IAVL dependency (backport <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/6550">#6550</a>) (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7104">#7104</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/a82cb7dcda832b8c6475481bf404257a56aa2d18"><code>a82cb7d</code></a> Revert "abci: change client to use multi-reader mutexes (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/6306">#6306</a>)" (backport <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7">#7</a>...</li> <li><a href="https://github.com/tendermint/tendermint/commit/1dfb3451eaaa438067dadb6835e9aa948689f39e"><code>1dfb345</code></a> e2e: light nodes should use builtin abci app (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7095">#7095</a>) (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7096">#7096</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/9f13b9b083da0ec45a48e57d5a283afdf698ba5b"><code>9f13b9b</code></a> e2e: abci protocol should be consistent across networks (backport <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7078">#7078</a>) (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7085">#7085</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/16ba782fa6549ea1e50a7fe7addb538ff15bf619"><code>16ba782</code></a> cli: allow node operator to rollback last state (backport <a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7033">#7033</a>) (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7080">#7080</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/474ed04273bade74df583c7bfdc63e6e1a70a919"><code>474ed04</code></a> Import Postgres driver support for the psql indexer (backport). (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7057">#7057</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/2d8287d0f70962cc1d7bda0250def18962abf282"><code>2d8287d</code></a> e2e: allow running of single node using the e2e app (backport) (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/7024">#7024</a>)</li> <li><a href="https://github.com/tendermint/tendermint/commit/294a9695b4a768b4c8a9cb71c3562cdbff58e64c"><code>294a969</code></a> e2e: backport minor reliability improvements (<a href="https://github-redirect.dependabot.com/tendermint/tendermint/issues/6967">#6967</a>)</li> <li>See full diff in <a href="https://github.com/tendermint/tendermint/compare/v0.34.13...v0.34.14">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/tendermint/tendermint&package-manager=go_modules&previous-version=0.34.13&new-version=0.34.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) * fix: unmarshalling issue with multisig keys in master (backport #10061) (#10113) * fix: unmarshalling issue with multisig keys in master (#10061) (cherry picked from commit 3d3bc7c) # Conflicts: # CHANGELOG.md # crypto/keys/multisig/multisig_test.go * fix conflicts * fix conflicts * Update crypto/keys/multisig/multisig_test.go * Removed unused imports * fix changelog * Update CHANGELOG.md * Fix TestLegacyMultisig test (#10275) Co-authored-by: Henrik Aasted Sørensen <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Mario Karagiorgas <[email protected]> * fix: query account balance by ibc denom (backport #10394) (#10524) * fix: query account balance by ibc denom (#10394) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #10381 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * chore: Iavl iterator (backport #10544) (#10546) * chore: Iavl iterator (#10544) <!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Closes: #10335 This PR adds a custom version of cosmos/iavl(cosmos/iavl#440) that removes the usage of channel-based approach on iterating IAVL tree. replaces cosmos/cosmos-sdk#10404 * build(deps): Bump github.com/cosmos/iavl from 0.17.2 to 0.17.3 (backport #10654) (#10664) * build(deps): Bump github.com/cosmos/iavl from 0.17.2 to 0.17.3 (#10654) Bumps [github.com/cosmos/iavl](https://github.com/cosmos/iavl) from 0.17.2 to 0.17.3. - [Release notes](https://github.com/cosmos/iavl/releases) - [Changelog](https://github.com/cosmos/iavl/blob/v0.17.3/CHANGELOG.md) - [Commits](cosmos/iavl@v0.17.2...v0.17.3) * fix: Add Events to TxResponse (backport #10630) (#10644) * fix: Add Events to TxResponse (#10630) (cherry picked from commit c4bedf8) # Conflicts: # CHANGELOG.md # go.sum # types/abci.pb.go # types/result.go * Michael sucks * Who Let the Bugs Out?? * Reinventing the wheel. Again. * No changes made Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> * fix: bech32 address test to satisfy the specification (#10163) (#10164) (#10665) ## Description Closes: #10163 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * build(deps): Use self-maintained btcutil (#10082) (backport #10201) (#10622) * build(deps): Use self-maintained btcutil (#10082) (#10201) ## Description Closes: #10082 * chore: v0.42.11 changelog and release notes (#10695) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Henrik Aasted Sørensen <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Mario Karagiorgas <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> * chores: go mod tidy Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Ryan Christoffersen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robert Zaremba <[email protected]> Co-authored-by: Dev Ojha <[email protected]> Co-authored-by: ValarDragon <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Carlos Rodriguez <[email protected]> Co-authored-by: Amaury <[email protected]> Co-authored-by: kitounliu <[email protected]> Co-authored-by: kitty <[email protected]> Co-authored-by: Henrik Aasted Sørensen <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]> Co-authored-by: Mario Karagiorgas <[email protected]> Co-authored-by: Aleksandr Bezobchuk <[email protected]>
…tdin (fix #9566) (#9821) (#9881) ## Description Add a test case to reproduce the issue described in #9566. The test currently fails, and I've pointed some possible solutions over cosmos/cosmos-sdk#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) Co-authored-by: daeMOn <[email protected]>
…tdin (fix cosmos#9566) (cosmos#9821) (cosmos#9881) ## Description Add a test case to reproduce the issue described in cosmos#9566. The test currently fails, and I've pointed some possible solutions over cosmos#9566 (comment). But I feel this needs more works in order to provide a more robust solution. I'll keep poking at better options, but taking any pointers if anyone has ideas. (cherry picked from commit f479b51) Co-authored-by: daeMOn <[email protected]>
Summary of Bug
Redirecting mnemonic and keyring passphrase to
stdin
stopped working when recovering an account.Version
>= v0.42.5
Steps to Reproduce
Add the following to a
test.txt
file:Compile
simapp
fromv0.42.4
and then try to redirect tostdin
fromtest.txt
file:Compile
simapp
fromv0.42.5
and then retry:Also affects
v0.42.6
.For Admin Use
The text was updated successfully, but these errors were encountered: