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

Moved funds sweep SPV proofs #3793

Merged
merged 9 commits into from
Mar 15, 2024
Merged

Conversation

tomaszslabon
Copy link
Contributor

@tomaszslabon tomaszslabon commented Mar 8, 2024

#Refs: #3738.
This PR adds functionalities for creating and submitting moved funds sweep transaction SPV proofs.

Finding the possible unproven moved funds sweep transactions is done by retrieving MovingFundsCommitmentSubmitted events and looking at the recent transactions of target wallets from each event.

An unproven moved funds seep transaction must have the following format:

  • the first input must refer to an unproven moved funds sweep request
  • the second input (optional) must refer to the current wallet's main UTXO
  • the (single) output that pays to the wallet itself

Once the unproven moved funds sweep transactions are found, they are proven.

@tomaszslabon tomaszslabon force-pushed the moved-funds-sweep-spv-proof branch from 327226b to c2e061d Compare March 13, 2024 13:35
@tomaszslabon tomaszslabon force-pushed the moved-funds-sweep-spv-proof branch from 902f6ea to 76f0f43 Compare March 15, 2024 13:20
@lukasz-zimnoch lukasz-zimnoch merged commit a1c6c31 into main Mar 15, 2024
29 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the moved-funds-sweep-spv-proof branch March 15, 2024 14:03
lukasz-zimnoch added a commit that referenced this pull request Mar 15, 2024
)

#Depends on #3793.
This PR adds an additional check when ensuring the wallet is
synchronised between chain.
The new check involves verifying if any UTXO assigned to the wallet
comes from the moved funds sweep transaction.
We only checked if the UTXO comes from a deposit sweep transaction, but
it is also possible a moved funds sweep could be the first transaction
coming from a new wallet.

Additionally, the `GetMovedFundsSweepRequest` function was updated to
follow the same pattern as functions for getting deposit sweep requests
or pending redemption requests.
@lukasz-zimnoch lukasz-zimnoch added this to the v2.1.0 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants