-
Notifications
You must be signed in to change notification settings - Fork 838
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e661509
commit bf22ad9
Showing
2 changed files
with
224 additions
and
22 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
bf22ad9
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.
When Bob is creating the multiparty transaction, the code shows a payment of 0.01 from the Alice+Bob wallet to Carla, and a payment of 0.02 to Alice, to be paid by Carla.
However, CoverOnly("0.02") seems to indicate that 0.02 is being paid out of the Alice+Bob wallet. Isn't that incorrect? The Alice+Bob wallet only needs to cover 0.01, the payment to Carla.
bf22ad9
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.
Carla has to know Alice+Bob's coin sources? Why? The Alice+Bob inputs are already specified/resolved in the aliceSigned tx.
And Carla knows Alice+Bob's redeem script? That seems worrisome.
If Carla knows the Alice+Bob redeem script, can't Carla use that to spend from the Alice+Bob tx without Alice or Bob's consent/signature?
bf22ad9
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.
So she knows how much coin she has to add to cover the transaction.
Carla does not need to know the Redeem, if she has a normal Coin, it is enough. (Only the Amount is important)
Carla can't spend without consent, even if she had the ScriptCoin (which I is not mandatory), because Bob have not signed yet.
I'll modify later
bf22ad9
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.
I'd prefer that Bob tells Carla how much Carla needs to contribute to the transaction, since there could be multiple additional sources that have not been specified yet. If Carla and Dan need to contribute to the transaction, then Carla knowing how much Alice+Bob have already contributed isn't enough for Carla to know (from the tx alone) how much she is to contribute. The amount to contribute has to be communicated outside the partial transaction being passed around.
bf22ad9
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.
Take a look at 3524dfd
I found a clean way to allow both scenario