-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): remove implicit change in protocol for partial/full signat…
…ures (#5488) Description --- Removes check for an invalid signature, presumed to be a partial signature, which results in partial signature aggregation being skipped if a valid signature is passed in. Motivation and Context --- This check validates the receiver signature to determine if the signature is sent is partial or full. If partial we aggregate the sender and receiver partial signatures. A partial signature and an invalid signature run the same code path (` if received_output.verify_metadata_signature().is_err() {`) This code branch is executed as part of every normal Tari transaction. It is not possible for the (non-local) receiver to unilaterally produce a correct signature and "bypass" aggregation as they do not possess the required secrets. The primary reason for this check is to allow the protocol to be shortcut when the sender and receiver are the same party and therefore can produce a valid signature (sign_as_sender_and_receiver). This PR implements this shortcut explicitly by adding a separate call for this case `add_presigned_recipient_info`. How Has This Been Tested? --- Existing transaction tests. What process can a PR reviewer use to test or verify this change? --- Send a normal and send-to-self transaction <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
2 changed files
with
101 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters