sparrowwallet / sparrow

Desktop Bitcoin Wallet focused on security and privacy. Free and open source.
https://sparrowwallet.com/
Apache License 2.0
1.38k stars 192 forks source link

[FEATURE] add support for construct tx with a sighash different than SIGHASH_ALL with a larger output than the input. #706

Open sparrrrr opened 2 years ago

sparrrrr commented 2 years ago

would be very powerful, if can be possible to construct transactions , with the other sighash types different than SIGHASH_ALL, like these ones: https://raghavsood.com/blog/2018/06/10/bitcoin-signature-types-sighash https://bcoin.io/guides/crowdfund-tx.html https://learn.saylor.org/mod/book/view.php?id=36341&chapterid=18919 Thanks

ElChvo commented 2 years ago

+1

decentralizedb commented 2 years ago

This PR, could be a very desirable and valuable implementation of signatures that enable a more versatile type of transaction for Bitcoin, and Sparrow is the ideal candidate to do it!

Guerrillabitcoin commented 2 years ago

looks great!

urEntropy commented 2 years ago

That would be great

Dexjj commented 2 years ago

I think it's a great implementation for current code.

Cheer up and continue with the great work you are achieving!

Solenoist commented 2 years ago

A great idea. I need it!

4rkad commented 2 years ago

It could be interesting in exchanges between peers without trust in 3rd parties

zehks commented 2 years ago

I support that

craigraw commented 2 years ago

It is already possible to create PSBTs (and transactions) with different sighash types - from what I understand this issue is actually about creating transactions that would usually not be possible within a wallet (for example, creating an output that is larger than the funds available in the wallet).

I would like to understand the desired use case better. Supporting the crowdfunding use case is more than just allowing the creation of a transaction with such a large output - there must also be support for a funder to load the transaction in a wallet and add inputs to it, before passing it on to the next funder to add more inputs. This process doesn't seem very practical or private to me (over say a standard BIP47 type crowdfunding approach), but possibly I am missing something.

sparrrrr commented 2 years ago

It is already possible to create PSBTs (and transactions) with different sighash types - from what I understand this issue is actually about creating transactions that would usually not be possible within a wallet (for example, creating an output that is larger than the funds available in the wallet).

I would like to understand the desired use case better. Supporting the crowdfunding use case is more than just allowing the creation of a transaction with such a large output - there must also be support for a funder to load the transaction in a wallet and add inputs to it, before passing it on to the next funder to add more inputs. This process doesn't seem very practical or private to me (over say a standard BIP47 type crowdfunding approach), but possibly I am missing something.

Thanks for your interest. Indeed, the point is to be able to create transactions with larger outputs. One of the possibilities, and part of what I am working on is to fund a 2-2 multi-signature wallet between two users who do not know or trust each other. These funds would serve as a deposit of collateral and payment on which they could make exchanges in the real world. Currently it is not possible with any wallet to create a transaction like this: alice sends 1 btc to [msig alice&bob 2-2] only if bob sends 1 btc too to [msig alice&bob 2-2]

( if you don't build the transaction in raw).

For other things a standard BIP47 crowdfunding tx isn't really a true crowdfunding is it more like a donation, the concept of crowdfunding is more like "funders fund if the project reach the funding goal", this way possibilitate a way to create p2p crowdfunding projects only if the tx reach the goal, in a more decentralized way.

DrJonesKlaus commented 2 years ago

Any possibility to decentralize p2p exchanges without trust might worth a try. Interesting proposal

BlueLynx21 commented 2 years ago

Come on with this amazing project.

sparrrrr commented 1 year ago

Upped