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

Testing Support bech32 encoding #1654

Merged
merged 2 commits into from
May 13, 2020
Merged

Testing Support bech32 encoding #1654

merged 2 commits into from
May 13, 2020

Conversation

piotr-iohk
Copy link
Contributor

Issue Number

#1603

Overview

  • 00306f0
    Polish key CLI help

  • 285add3
    Additional integration test for inspecting bech32 result

Comments

Before:

$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           MNEMONIC_WORD...
                                           [--encoding KEY-ENCODING]
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)

After:

$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           [--encoding KEY-ENCODING]
                                           MNEMONIC_WORD...
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
  --encoding KEY-ENCODING  Either 'hex' or 'bech32' (default: hex)

Also updated:

@piotr-iohk piotr-iohk added the IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG label May 12, 2020
@piotr-iohk piotr-iohk requested a review from Anviking May 12, 2020 11:50
@piotr-iohk piotr-iohk self-assigned this May 12, 2020
[ "Usage: key root [--wallet-style WALLET_STYLE] MNEMONIC_WORD..."
, " [--encoding KEY-ENCODING]"
[ "Usage: key root [--wallet-style WALLET_STYLE]"
, " [--encoding KEY-ENCODING] MNEMONIC_WORD..."
Copy link
Member

Choose a reason for hiding this comment

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

This just makes me realize: the mnemonic words should also probably be read from stdin instead of passed as argument!

@KtorZ
Copy link
Member

KtorZ commented May 12, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request May 12, 2020
1654: Testing Support bech32 encoding r=KtorZ a=piotr-iohk

# Issue Number

#1603

# Overview

- 00306f0
  Polish key CLI help
  
- 285add3
  Additional integration test for inspecting bech32 result

# Comments

Before:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           MNEMONIC_WORD...
                                           [--encoding KEY-ENCODING]
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
```


After:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           [--encoding KEY-ENCODING]
                                           MNEMONIC_WORD...
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
  --encoding KEY-ENCODING  Either 'hex' or 'bech32' (default: hex)

```

Also updated:
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface#key-root
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)#key-root

Co-authored-by: Piotr Stachyra <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 12, 2020

Build failed

@piotr-iohk
Copy link
Contributor Author

hydra failed:


Failures:

  test/integration/Test/Integration/Byron/Scenario/API/Addresses.hs:278:11: 
  1) API Specifications, BYRON_ADDRESSES, ADDRESS_CREATE_06 - Cannot create an address that already exists
       expected: Status {statusCode = 409, statusMessage = "Conflict"}
        but got: Status {statusCode = 201, statusMessage = "Created"}
       
       from the following response: Right (ApiAddress {id = (ApiT {getApiT = Address {unAddress = "\130\216\CANXB\131X\FS\250\EOTR\224\219\&7W|\ENQ\189\191y\130+\193\129\246\196\vXEd\SIr\135\172c|\161\SOHX\RSX\FSa.\142\214q\181\149=\DC44i\139#`\CAN>g\CAN\204\176\218\255I[F\131$\149\NUL\SUBZ\174\235\135"}},Proxy), state = ApiT {getApiT = Unused}})

  To rerun use: --match "/API Specifications/BYRON_ADDRESSES/ADDRESS_CREATE_06 - Cannot create an address that already exists/"

  test/integration/Test/Integration/Byron/Scenario/CLI/Addresses.hs:310:5: 
  2) CLI Specifications, BYRON_CLI_ADDRESSES, CLI_ADDRESS_CREATE_06 - Cannot create an address that already exists
       "Please enter your passphrase: *****************\nOk.\n" does not contain "I already know of such address."

Another occurence of -> #1644

@piotr-iohk
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request May 12, 2020
1654: Testing Support bech32 encoding r=piotr-iohk a=piotr-iohk

# Issue Number

#1603

# Overview

- 00306f0
  Polish key CLI help
  
- 285add3
  Additional integration test for inspecting bech32 result

# Comments

Before:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           MNEMONIC_WORD...
                                           [--encoding KEY-ENCODING]
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
```


After:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           [--encoding KEY-ENCODING]
                                           MNEMONIC_WORD...
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
  --encoding KEY-ENCODING  Either 'hex' or 'bech32' (default: hex)

```

Also updated:
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface#key-root
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)#key-root

Co-authored-by: Piotr Stachyra <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 12, 2020

Build failed

@KtorZ
Copy link
Member

KtorZ commented May 12, 2020

@piotr-iohk this is going to be "annoying". Hydra caches the build result, so it won't re-run the test suite to retry the flaky test.
One way to work around this could be to rewrite the head git commit --amend -C HEAD, and re-push it so that it has a different commit hash.

@piotr-iohk piotr-iohk force-pushed the piotr/key-testing branch from 285add3 to 2ce83c5 Compare May 12, 2020 15:19
@piotr-iohk
Copy link
Contributor Author

Btw. I don't think the test that is flaky, I was able to reproduce the problem manually today -> #1644 (comment).

@piotr-iohk
Copy link
Contributor Author

bors r+

iohk-bors bot added a commit that referenced this pull request May 12, 2020
1654: Testing Support bech32 encoding r=piotr-iohk a=piotr-iohk

# Issue Number

#1603

# Overview

- 00306f0
  Polish key CLI help
  
- 285add3
  Additional integration test for inspecting bech32 result

# Comments

Before:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           MNEMONIC_WORD...
                                           [--encoding KEY-ENCODING]
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
```


After:

```
$ cardano-wallet-jormungandr key root
Usage: cardano-wallet-jormungandr key root [--wallet-style WALLET_STYLE]
                                           [--encoding KEY-ENCODING]
                                           MNEMONIC_WORD...
  Extract root extended private key from a mnemonic sentence.

Available options:
  -h,--help                Show this help text
  --wallet-style WALLET_STYLE
                           Any of the following (default: icarus)
                             icarus (15 mnemonic words)
                             trezor (12, 15, 18, 21 or 24 mnemonic words)
                             ledger (12, 15, 18, 21 or 24 mnemonic words)
  --encoding KEY-ENCODING  Either 'hex' or 'bech32' (default: hex)

```

Also updated:
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-command-line-interface#key-root
 - https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)#key-root

Co-authored-by: Piotr Stachyra <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented May 12, 2020

Build failed

@KtorZ KtorZ merged commit 47c4faa into master May 13, 2020
@KtorZ KtorZ deleted the piotr/key-testing branch May 13, 2020 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IMPROVEMENT Mark a PR as an improvement, for auto-generated CHANGELOG
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants