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

feat: ledger blind sign #6264

Merged
merged 49 commits into from
May 16, 2024
Merged

Conversation

brianp
Copy link
Contributor

@brianp brianp commented Apr 10, 2024

Description

Add key manager support to create transactions on chain where a ledger device is required to spend outputs

Motivation and Context

Cold storage support

How Has This Been Tested?

Manual localnet testing

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

This PR changes transaction hash mismatches which will invlaidate previous utxo's.

Copy link

github-actions bot commented Apr 10, 2024

Test Results (CI)

    3 files    120 suites   40m 56s ⏱️
1 278 tests 1 278 ✅ 0 💤 0 ❌
3 826 runs  3 826 ✅ 0 💤 0 ❌

Results for commit 147d5b9.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Apr 10, 2024
Copy link

github-actions bot commented Apr 10, 2024

Test Results (Integration tests)

 2 files  + 2  11 suites  +11   40m 9s ⏱️ + 40m 9s
33 tests +33  30 ✅ +30  0 💤 ±0  3 ❌ +3 
38 runs  +38  31 ✅ +31  0 💤 ±0  7 ❌ +7 

For more details on these failures, see this check.

Results for commit 147d5b9. ± Comparison against base commit 9920916.

♻️ This comment has been updated with latest results.

@ghpbot-tari-project ghpbot-tari-project added the CR-too_long Changes Requested - Your PR is too long label Apr 23, 2024
@brianp brianp force-pushed the ledger-blind-sign branch 2 times, most recently from accf6a0 to 70c17ab Compare April 29, 2024 09:15
@brianp brianp force-pushed the ledger-blind-sign branch 4 times, most recently from 94a5f07 to 2c50be5 Compare May 14, 2024 00:48
@brianp brianp changed the title WIP: ledger blind sign feat: ledger blind sign May 14, 2024
@SWvheerden SWvheerden marked this pull request as ready for review May 14, 2024 04:46
@SWvheerden SWvheerden requested a review from a team as a code owner May 14, 2024 04:46
Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

Looking good, small comments, then we can merge this

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

Looks really good, just some pertinent comments to be addressed in this PR or alternatively new issues to be created to address the comments after this PR is merged please.

@brianp
Copy link
Contributor Author

brianp commented May 15, 2024

All changes made, or suggestions noted. The zeroizing caused me a bit of grief up front but it's all working now.

I've ensured issues are on the board for stuff like ensuring the correct ledger device is selected, checking app version etc. I knew we'd need to do these things but figured it might be best to start implementing in smaller more manageable PRs.

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

Missed one private key for zeroing

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

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

utACK

Comment on lines +58 to +62
let sender_offset_private_key = Zeroizing::new(derive_from_bip32_key(
account,
sender_offset_key_index,
KeyType::SenderOffset,
)?);
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets fix after merge, we do not need the double Zeroizing here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh yeah. That was a mistake. I'll tidy it in the next PR.

@SWvheerden SWvheerden merged commit 301ea00 into tari-project:development May 16, 2024
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR-too_long Changes Requested - Your PR is too long P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants