-
Notifications
You must be signed in to change notification settings - Fork 718
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
[Wallet][RPC] FundTransaction - fundrawtransaction #1663
[Wallet][RPC] FundTransaction - fundrawtransaction #1663
Conversation
8771399
to
ba6109b
Compare
ba6109b
to
5a41ebb
Compare
Rebased. Ready for review/QA. |
|
@NoobieDev12 , what kind of errors?
Let's add the signatures to the input:
Let's broadcast it to the network:
|
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.
Code review ACK 5a41ebb.
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.
Working as intended 👌 , tested ACK 5a41ebb.
Thanks for the detailed reply and explanation RZ! |
Needs a rebase, but otherwise ACK |
- backports bitcoin/bitcoin@1e0d1a2 Some code stolen from Jonas Schnelli <[email protected]>
- backports bitcoin/bitcoin@0aad1f1 Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them. This primarily targets transaction outputs with `OP_RETURN`.
- backports bitcoin/bitcoin@d3354c5 This indicates that, eg, we have a public key for a key which may be used as a pay-to-pubkey-hash. It generally means that we can create a valid scriptSig except for missing private key(s) with which to create signatures. - backports bitcoin/bitcoin@428a898 [squash commit]
- backports bitcoin/bitcoin@6bdb474 Some code and test cases stolen from Bryan Bishop <[email protected]> (pull bitcoin#5524). - backports bitcoin/bitcoin@d042854 [squash commit]
- backports bitcoin/bitcoin@f7dc1d3 Strict flag forces type check on all object keys.
- backports bitcoin/bitcoin@db992ea [PIVX: Don't keep backward compatibility (as this is introduced and updated in the same PR)]
5a41ebb
to
fc81158
Compare
Rebased, and added one last case to the functional test. |
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.
re ACK fc81158 .
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.
ACK fc81158
d1d15c8 Fix missing sigverion in main_test.cpp CreateDummyScriptSigWithKey. (furszy) a034daf Rename to PrecomputedTransactionData (furszy) b4b181b Unit test for sighash caching (furszy) 2ef3872 Report non-mandatory script failures correctly. (furszy) 446d340 Precompute sighashes (furszy) dfd24eb Update wallet_txn_close.py test: (furszy) a5170f0 BIP143: Signing logic. (furszy) d2dd547 BIP143: Verification logic. (furszy) dccc3c6 Refactor script validation to observe amounts (furszy) daf044a Reduce unnecessary hashing in signrawtransaction (furszy) Pull request description: Base work for the new transaction digest algorithm for signature verification on PIVX Sapling transactions. Essentially, an implementation of BIP143 + few more good commits that found down the rabbit hole. Back ports: * bitcoin#7276 * bitcoin#7976 * bitcoin#8118 * bitcoin#8149 (only amount validation and SignatureHash commits). * bitcoin#6088 (only the dummy signature one - will be removed once #1663 get merged -). * bitcoin#6379 * bitcoin#8524 Next step over this area (need 1553 merged to be able to push it) is the further specialization of BIP143 into our custom implementation of ZIP143 (with a different digest algorithm definition using our tx data and hash personalization). ACKs for top commit: Fuzzbawls: utACK d1d15c8 random-zebra: ACK d1d15c8 and merging... Tree-SHA512: 7665cccf095c5bce0b18ef7ab8fcf7bede9304993b48f1af9c352c568861dec728d1d68671aab857b73d46567678492c4b97c24644a15f3f29fc4d723b183522
based on top of
This introduces a new wallet function,
CWallet::FundTransaction()
(and exposes it via RPC withfundrawtransaction
), to fill a tx containing only vouts (or not enough vins to cover the vouts) with unspent coins from the wallet.fundrawtransaction
will not modify existing inputs, and will add one change output (if needed) to the outputs. It will not sign the inputs (so can include also watch-only or multi-sig inputs, if enabled).backported from:
*
]adapting the tests for the (more recent) framework.
[
*
] Note: this has been included to be able to callfundrawtransaction
without the need for an unencrypted wallet (for the change address key)