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: disable P2P transaction negotiation while recovery is in progress #3248

Merged

Conversation

philipr-za
Copy link
Contributor

Description

Some weird behaviour was observed when a wallet would be busy with recovery and then receive transaction negotiation messages, either directly or via SAF.

The Recovery process is updating the Key Manager Indices and looking for commitments on the blockchain so to allow transaction negotiation during this time is dangerous as it might put duplicate commitments into the db and reuse spending keys.

This PR checks for the db key/value used to indicate Recovery progress before handling a transaction negotiation p2p message and if it is there the message is ignored with a log.

How Has This Been Tested?

Manual test

@stringhandler stringhandler changed the title fix: Disable P2P transaction negotiation while recovery is in progress fix: disable P2P transaction negotiation while recovery is in progress Aug 27, 2021
@stringhandler
Copy link
Collaborator

Needs clippy fixed

@philipr-za philipr-za force-pushed the philip-recovery-status branch from 452648e to 8b91216 Compare August 30, 2021 12:52
stringhandler
stringhandler previously approved these changes Aug 30, 2021
@aviator-app
Copy link
Contributor

aviator-app bot commented Aug 30, 2021

PR queued successfully. Your position in queue is: 10

@aviator-app aviator-app bot added mq-failed and removed mq-failed labels Aug 30, 2021
Some weird behaviour was observed when a wallet would be busy with recovery and then receive transaction negotiation messages, either directly or via SAF.

The Recovery process is updating the Key Manager Indices and looking for commitments on the blockchain so to allow transaction negotiation during this time is dangerous as it might put duplicate commitments into the db and reuse spending keys.

This PR checks for the db key/value used to indicate Recovery progress before handling a transaction negotiation p2p message and if it is there the message is ignored with a log.
@philipr-za philipr-za force-pushed the philip-recovery-status branch from 8b91216 to c8b737e Compare September 7, 2021 10:20
@stringhandler stringhandler merged commit 844e6cf into tari-project:development Sep 7, 2021
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