-
Notifications
You must be signed in to change notification settings - Fork 217
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
Discovering in shared wallets #2675
Discovering in shared wallets #2675
Conversation
05fba1f
to
f4a7a8d
Compare
@piotr-iohk could you confirm the two issues in the ticket are fixed now, please :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
, DerivationIndex $ getIndex coinType | ||
, DerivationIndex $ getIndex accIx | ||
, DerivationIndex $ getIndex utxoExternal | ||
, DerivationIndex $ getIndex addrIx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Index / DerivationIndex stuff ... not confusing at all!
wid = WalletId $ digest $ publicKey rootXPrv | ||
pTemplate = scriptTemplateFromSelf (getRawKey accXPub) $ body ^. #paymentScriptTemplate | ||
dTemplateM = scriptTemplateFromSelf (getRawKey accXPub) <$> body ^. #delegationScriptTemplate | ||
wName = getApiT (body ^. #name) | ||
accXPub = publicKey $ deriveAccountPrivateKey pwd rootXPrv accIx | ||
accXPub = publicKey $ deriveAccountPrivateKey pwd rootXPrv (Index $ getDerivationIndex ix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just code reshuffling allowing to use guardHardened above. No logic was changed
Looks good now! 👍 Both cannot be reproduced. |
bors r+ |
2675: Discovering in shared wallets r=paweljakubas a=paweljakubas # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> adp-927 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Adding the integration test showing the case - [x] implement IsOurs and enable discovery - [x] introduce hardened index guard outlawing improper ix in account when creating wallet - [x] investigated another chain follower error for active shared wallet. It turn out there is very subtle error in sqlite handler when inserting the cosigner. Before that all cosigners were deleted which is incorrect, only cosigner row for a given credential and walid should be deleted. Otherwise, payment cosigners are deleted when delegation template is present and reading (selecting) is erroneous. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Pawel Jakubas <[email protected]>
Build failed: |
bors r+ |
2675: Discovering in shared wallets r=Anviking a=paweljakubas # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> adp-927 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Adding the integration test showing the case - [x] implement IsOurs and enable discovery - [x] introduce hardened index guard outlawing improper ix in account when creating wallet - [x] investigated another chain follower error for active shared wallet. It turn out there is very subtle error in sqlite handler when inserting the cosigner. Before that all cosigners were deleted which is incorrect, only cosigner row for a given credential and walid should be deleted. Otherwise, payment cosigners are deleted when delegation template is present and reading (selecting) is erroneous. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Pawel Jakubas <[email protected]>
2a152eb
to
bdd2b4b
Compare
Canceled. |
bors r+ |
2675: Discovering in shared wallets r=paweljakubas a=paweljakubas # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> adp-927 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Adding the integration test showing the case - [x] implement IsOurs and enable discovery - [x] introduce hardened index guard outlawing improper ix in account when creating wallet - [x] investigated another chain follower error for active shared wallet. It turn out there is very subtle error in sqlite handler when inserting the cosigner. Before that all cosigners were deleted which is incorrect, only cosigner row for a given credential and walid should be deleted. Otherwise, payment cosigners are deleted when delegation template is present and reading (selecting) is erroneous. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Pawel Jakubas <[email protected]>
Build failed:
|
spotted in integration testing:
|
bors retry |
Build succeeded: |
2675: Discovering in shared wallets r=paweljakubas a=paweljakubas # Issue Number <!-- Put here a reference to the issue that this PR relates to and which requirements it tackles. Jira issues of the form ADP- will be auto-linked. --> adp-927 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] Adding the integration test showing the case - [x] implement IsOurs and enable discovery - [x] introduce hardened index guard outlawing improper ix in account when creating wallet - [x] investigated another chain follower error for active shared wallet. It turn out there is very subtle error in sqlite handler when inserting the cosigner. Before that all cosigners were deleted which is incorrect, only cosigner row for a given credential and walid should be deleted. Otherwise, payment cosigners are deleted when delegation template is present and reading (selecting) is erroneous. # Comments <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Jira will detect and link to this PR once created, but you can also link this PR in the description of the corresponding ticket ✓ Acknowledge any changes required to the Wiki ✓ Finally, in the PR description delete any empty sections and all text commented in <!--, so that this text does not appear in merge commit messages. --> Co-authored-by: Pawel Jakubas <[email protected]> 33629a0
Issue Number
adp-927
Overview
Comments