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

fix: parse keys with 0x prefix #322

Merged
merged 1 commit into from
Dec 11, 2024
Merged

fix: parse keys with 0x prefix #322

merged 1 commit into from
Dec 11, 2024

Conversation

LGLO
Copy link
Contributor

@LGLO LGLO commented Dec 11, 2024

Description

Our registration-signatures command outputs:

{"spo_public_key":"0x08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e","spo_signature":"0x040a8b9f336986fe5cea10a3bfcd6fb4f84dceda8e00ca23eee6e28af0605fb86fd96b41746df159b318b5075e067ce30e67d2bf5fef3e21f01a48325e375a06","sidechain_public_key":"0x039799ff93d184146deacaa455dade51b13ed16f23cdad11d1ad6af20103391180","sidechain_signature":"0xf0905c8d5a4db6075f76f6628282b3e257ffa1184ba2e35cd34415968d360d7452c981d171b4f22489690994a46026c1c1801df3e83f1038d4f20bb8affdfbcd"}

, so it is not nice to not accept 0x prefix at input.
With this modification such command is accepted:

target/debug/partner-chains-node smart-contracts register --genesis-utxo c389187c6cabf1cd2ca64cf8c76bf57288eb9c02ced6781935b810a1d0e7fbb4#0 --registration-utxo c389187c6cabf1cd2ca64cf8c76bf57288eb9c02ced6781935b810a1d0e7fbb4#2 \
--spo-public-key 0x08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e \
--spo-signature 0x08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e \
--partnerchain-signature 0x08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e08accadc8b60a5f519ee74ab144ada6993709f5479152f9217688889d8a2db2e \
--partnerchain-public-keys 0x039799ff93d184146deacaa455dade51b13ed16f23cdad11d1ad6af20103391180:0xe85534c93315d60f808568d1dce5cb9e8ba6ed0b204209c5cc8f3bec56c10b73:0xcdf3e5b33f53c8b541bbaea383225c45654f24de38c585725f3cff25b2802f55 --payment-key-file dev/local-environment/configurations/partner-chains-nodes/partner-chains-node-4/keys/payment.skey

Checklist

  • Commit sequence broadly makes sense and commits have useful messages.
  • New tests are added if needed and existing tests are updated.
  • Relevant logging and metrics added
  • CI passes. See note on CI.
  • Any changes are noted in the changelog.md for affected crate
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG Partner Chains developers to do this
for you.

@LGLO LGLO enabled auto-merge (squash) December 11, 2024 15:54
@LGLO LGLO requested a review from kpinter-iohk December 11, 2024 15:54
Copy link
Contributor

@kpinter-iohk kpinter-iohk left a comment

Choose a reason for hiding this comment

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

Good catch, thank you for the fix!

@LGLO LGLO merged commit 923c9ac into master Dec 11, 2024
14 checks passed
@LGLO LGLO deleted the ETCM-8754-fix-parsing-keys branch December 11, 2024 17:51
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.

2 participants