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

Add one missing extended to non extended golden tests #457

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Nov 15, 2023

Changelog

- description: |
    Add a test of extended to non-extended conversions, for a type of key that was untested
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - improvement    # QoL changes e.g. refactoring
  # - bugfix         # fixes a defect
  - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Fixes #424

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@smelc
Copy link
Contributor Author

smelc commented Nov 15, 2023

For the record, the input file cardano-cli/test/cardano-cli-golden/files/input/key/non-extended-keys/extended-payment.vkey was generated with:

cardano-signer keygen --json-extended --path 1852H/1815H/0H/0/0 --vkey-extended | jq

(thanks @gitmachtl for the tool ❤️)

@smelc
Copy link
Contributor Author

smelc commented Nov 15, 2023

@gitmachtl> could you tell me how to generate a genesis delegate extended verification key? I can't find out by myself.

@gitmachtl
Copy link
Contributor

gitmachtl commented Nov 15, 2023

@gitmachtl> could you tell me how to generate a genesis delegate extended verification key? I can't find out by myself.

you mean a GenesisDelegateSigningKey_ed25519 in extended format?

these are just normal ed25519 keys, you can generate them like you did with the ones above via

cardano-signer keygen --path payment --vkey-extended --out-skey genesis-del.skey --out-vkey genesis-del.vkey

in extended format and simply rename the type and description in the output files. i have never seen a genesis or genesis-delegate key in extended format. not even sure if there is a proper type for it like GenesisExtendedDelegateSigningKey_ed25519_bip32 ? i don't think there is a derivation path available for those keys tbh, so i would go with a regular payment one. outputformat is the same.

@disassembler do you know about derivation paths for genesis keys and genesis delegation keys?

@smelc
Copy link
Contributor Author

smelc commented Nov 16, 2023

you mean a GenesisDelegateSigningKey_ed25519 in extended format?

I'm not sure as I'm not familiar with the different variations of key. My interest comes from the presence of AGenesisDelegateExtendedVerificationKey in cardano-api, which wraps a GenesisDelegateExtendedKey.

cc @Jimbo4350 who maybe knows?

@smelc smelc force-pushed the smelc/add-missing-extended-to-non-extended-golden-tests branch from 04b1ccf to dc568b3 Compare November 27, 2023 20:27
@smelc smelc changed the title Add missing extended to non extended golden tests Add one missing extended to non extended golden tests Nov 28, 2023
@smelc smelc marked this pull request as ready for review November 28, 2023 09:54
@smelc
Copy link
Contributor Author

smelc commented Nov 28, 2023

There is still one kind of extended keys that is not tested, but better merge this PR that let it bitrot, hence marking it ready.

@smelc smelc added this pull request to the merge queue Nov 28, 2023
Merged via the queue into main with commit 3379069 Nov 28, 2023
26 checks passed
@smelc smelc deleted the smelc/add-missing-extended-to-non-extended-golden-tests branch November 28, 2023 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing golden tests for extended->non-extended conversion
3 participants