Commit graph

25 commits

Author SHA1 Message Date
Andrew Poelstra
ba8273ac94 lint: fix non-pylint linter errors
Includes fixing all the spelling mistakes that are our fault,
but not those present upstream in Core.
2021-10-15 00:20:20 +00:00
Andrew Poelstra
d973e1105d
Merge ElementsProject/elements#1014: Fix crash when creating large inputs
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 #979

  Fixes #880

ACKs for top commit:
  gwillen:
    utACK f7e1fb6.

Tree-SHA512: 6f95732964503e5ac6fc85fd6b45958f1b1719b1f9ecf3d6295d571489112837cdb4429a02a389da82e8d5fcd55527241cba50bceff00bb4facd8be037c7dcab
2021-08-30 20:56:31 +00:00
Andrew Poelstra
ba538cbe2a blind.cpp: refuse to create surjection proofs that would trigger an assertation failure 2021-07-01 22:03:52 +00:00
Andrew Chow
4940ceeea6 Use a constant for maximum surjection targets 2021-06-22 14:42:38 -04:00
Andrew Chow
e7dd046b03 Implement BlindPSBT 2021-06-22 14:42:19 -04:00
Glenn Willen
8a73f5d242 When decoding or signing a PSBT, check blinded values.
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.
2020-10-05 02:21:25 -07:00
Steven Roose
34ef250721
Move GetNumIssuances to issuance.cpp 2020-03-31 12:28:34 +01:00
Steven Roose
f9925853c5
Remove the GetNumIssuances in the assertion 2020-03-31 12:28:15 +01:00
Steven Roose
edfa40eb69
Remove the min(max( construction for the ct_exponent argument
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.
2020-03-24 14:15:15 +00:00
Steven Roose
e87b390409
Some readability improvements in blind.cpp 2020-03-16 20:55:42 +00:00
Gregory Sanders
26e5490e83
Switch default bits of hiding to 52 2020-03-16 20:55:37 +00:00
Steven Roose
b9727ae60c
Merge #673: Shrink sidechannel array, use wallet const for size
533a89097 Shrink sidechannel array, use wallet const for size (Gregory Sanders)

Pull request description:

Tree-SHA512: 9c4328c6c60dcaa6f821cec1e7632829297e275e2067a2e3d30a62e0e27731b43199614fa7df3e7cc32b524eab2c4ef49574cb728515eec9e1e64d78e6f1e77c
2019-07-02 19:02:40 +01:00
Gregory Sanders
533a890972 Shrink sidechannel array, use wallet const for size 2019-07-01 10:06:46 -04:00
Gregory Sanders
7b302eb99d
Merge #663: Add support for blinding pegins
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
2019-06-21 11:05:24 -04:00
Steven Roose
f9d159ba3a
Don't assert on user-inputed values
This prevents the assertion from crashing the node when an RPC user
enters invalid blinding factors.
2019-06-14 15:52:11 +01:00
Steven Roose
a9f589b9ec
Add support for blinding pegin transactions
Both via blindrawtransaction and rawblindrawtransaction.
2019-06-13 16:58:50 +01:00
Steven Roose
52f6f6905b
WIP: Fix compilation after merge 2019-05-20 16:22:05 +01:00
Steven Roose
9f4f2e7519
MERGE-FIX: Fix compilation errors 2019-05-03 17:46:12 +01:00
Gregory Sanders
b08fcb1f9a RawFillBlinds needs to push blank pubkeys if output it already blinded 2019-04-18 10:52:22 -04:00
Dmitry Petukhov
93f49ed814 fix vector length calculation for targets in BlindTransaction
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.
2019-03-28 16:58:31 -04:00
Gregory Sanders
665d9ebe0e Whitespace and tab linting 2019-03-20 11:19:07 -04:00
Gregory Sanders
30552459dc Spelling linter 2019-03-20 11:05:49 -04:00
Steven Roose
aa33202bda
[BROKEN] Add blinding logic 2019-03-20 12:05:51 +00:00
Steven Roose
fde9fe1010
Add basic issuance boilerplate 2019-03-20 12:05:42 +00:00
Steven Roose
f81122f948
Add asset and value blinding functionality 2019-03-20 12:05:41 +00:00