f7e1fb6708 blind: add functional test that attempting to spend more than 256 inputs fails "gracefully" (Andrew Poelstra)
ba538cbe2a blind.cpp: refuse to create surjection proofs that would trigger an assertation failure (Andrew Poelstra)
Pull request description:
There isn't really any reasonable way to recover from this situation but we can at least gracefully fail instead of triggering an assertation failure.
Fixes#979Fixes#880
ACKs for top commit:
gwillen:
utACK f7e1fb6.
Tree-SHA512: 6f95732964503e5ac6fc85fd6b45958f1b1719b1f9ecf3d6295d571489112837cdb4429a02a389da82e8d5fcd55527241cba50bceff00bb4facd8be037c7dcab
When we decode or sign a PSBT given to us via RPC, first check that, if
it contains blinded output values, they verifiably match the unblinded
output values contained in the original transaction proposal. Otherwise fail.
We removed the similar construction for ct_bits in an earlier commit.
The construction is to keep the value between -1 and 18. This kind of
means that a user that inputs a value outside that range will not get an
error, but will use the value on the edge of the range instead.
It's probably better to return an error (generated by secp256k1) in the
case of invalid input.
cc49106 Update getnewaddress help message with "blech32" special case (Steven Roose)
56358b8 Add tests for blinding pegin transactions (Steven Roose)
a9f589b Add support for blinding pegin transactions (Steven Roose)
bf0cc83 Add confidential assets values to listunspent documentation (Steven Roose)
4e84596 Always return blind address for "blech32" type (Steven Roose)
Pull request description:
Adds pegin handling support for `blindrawtransaction` and `rawblindrawtransaction`.
Tree-SHA512: 1138aeedd2d5852108abd53a6afc83524e5f06ad3ab770fd8ab37c97c8dd5c49f78b8d44bdf7cbe2c073e07cd8566bf032526ab6488e99fc02f8b5b154a3fde1
the size of surjectionTargets and targetAssetGenerator vectors
was calculated as tx.vin.size()*3, based on the fact that for
each input there might also be up to 2 issuance pseudo-inputs,
but did not take into account that the number of auxiliary generators
may exceed the number of inputs. This fixes the size calculations
by taking into account auxiliary generators supplied beyond vin size.