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

Bug - cardano-addresses and cardano-rosetta do not generate the same payment address when using the same derivation path #123

Open
johnmathews opened this issue Apr 9, 2021 · 0 comments

Comments

@johnmathews
Copy link

Using the same utxo.prv file I expect cardano-addresses and cardano-rosetta to generate the same payment address. This is not the case. Is this a bug or have I made a mistake?

Steps to reproduce:

  1. phrase.prv cardano-address recovery-phrase generate --size 15 > phrase.prv
  2. phrase.prv -> root.xsk cat phrase.prv | cardano-address key from-recovery-phrase Shelley | tee root.xsk
  3. root.xsk -> utxo.prv cardano-address key child 1852H/1815H/0H/0/0 < root.xsk | tee utxo.prv
  4. utxo.prv -> addr.xvk cardano-address key public --with-chain-code < utxo.prv | tee addr.xvk
  5. addr.xvk -> payment addr cardano-address address payment --network-tag testnet < addr.xvk > payment.addr

Then using cardano-rosetta:

  1. Inspect utxo.prv to show the extended private key. cardano-address key inspect < utxo.prv
  2. Use this in the send-transaction-example.ts cardano-rosetta script (it replaces the private key in the example scripts).
  3. The public key derived by cardano-rosetta is the second half of the extended private key.
  4. cardano-rosetta calls /construction/derive using the public key and receives a valid payment address add1 which is not the same as payment.addr.

I think that add1 should be the same as payment.addr, but it is not. Have I misunderstood something?

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

No branches or pull requests

1 participant