-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi: re-audit contracts after confirmation, before acting
There is a very slight possibility that contract outputs that pass audit while in mempool or in some cases before they are broadcasted (rawtx audit) may differ from the output later observed in a block for the same coin. This risk is higher for spv wallets that will mostly only perform audits on rawtxs before broadcasting the txs, without a guarantee that the tx is accepted to the mempool. A malicious actor could broadcast a different tx with same hash (theoretically possible) but with a different output at the expected vout index. There is risk of funds if clients only later check that the hash for the earlier-audited tx is found in a block and proceed to send their counter swap or expose their contract secret via a redemption. This commit aims to mitigate that risk by repeating contract audits after the initial tx hash is observed on the blockchain, ensuring that the tx now observed on the blockchain is as desired.
- Loading branch information
1 parent
d4fcfd3
commit 9b51633
Showing
6 changed files
with
319 additions
and
88 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
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
Oops, something went wrong.