Commit graph

19 commits

Author SHA1 Message Date
Pablo Greco
3dfd7a4e9f Linter fixes 2023-08-31 14:47:07 -07: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
Andrew Poelstra
0bc6dbbce1 Merge e6207229b8 into merged_master (Elements PR #911)
Spent a while figuring out where this new function should live now that
the PSBT stuff has been pulled into src/psbt.cpp and the wallet, and isn't
mixed up with the RPC logic.

In the end I modified the the function to return a normal error rather
than throwing an RPC exception and put it in src/psbt.cpp with the other
functions that behave this way.
2020-11-30 14:31:38 +00:00
Andrew Poelstra
2e89c6172f Merge 51f62dcbbf into merged_master (Elements PR #846) 2020-11-26 01:08:07 +00:00
Andrew Poelstra
55e75466a4 Merge b47d087356 into merged_master (Elements PR #843)
Fixes the change-size estimation bug that I fixed in #17290, though incompletely
(Steven made up a size for the surjection proof which was different from the
size that I made up....this time I actually checked with libsecp to get an upper
bound.) He also found another place we were doing the wrong estimation, which
I had missed on my pass. So between the two of us I think we've done some good.

Also moves some which sets code coin_selection_params.tx_noinputs_size to after
some Elements sanity checks, which I think will have zero observable effect
(or non-observable effect) but it's part of the PR so I'm keeping it. Though
updated since we can now use BnB even with subtract-fee-from-output.
2020-11-26 01:08:05 +00:00
Andrew Poelstra
fc64d8f534 Merge 95602ec21f into merged_master (Elements PR #834)
Hadta bump the fee test in feature_confidential_transactions.py since our default
rangeproofs are now bigger.
2020-11-26 01:07:58 +00:00
Andrew Poelstra
240f03f586 Merge cef87f7a48 into merged_master (Bitcoin PR #17290)
This one took a little bit of work. Basically everywhere that Andy's new code
didn't compile, I looked for a similarly shaped line in the pre-PR diff between
Bitcoin and Elements and adjusted it in the same way. Was pretty typical; all
CAmounts become CAmountMaps, etc.

I then spent about 7 hours chasing down a coin selection failure in the blocksign
functional tests, which ultimately turned out to be a Core issue. I added a
stopgap fix (commented, search for "stopgap" in wallet.cpp), and opened the issue
https://github.com/bitcoin/bitcoin/issues/20347

There was also a bug where we were not estimating change output sizes correctly
in case we had massive blinded outputs, which I had to fix to get the functional
tests to pass.
2020-11-10 21:59:56 +00: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
51f62dcbbf
Merge #846: [RFC] Remove GetNumIssuance from BlindTransaction assert
34ef25072 Move GetNumIssuances to issuance.cpp (Steven Roose)
f9925853c Remove the GetNumIssuances in the assertion (Steven Roose)

Pull request description:

  This is in response to @dgpv 's https://github.com/ElementsProject/elements/issues/842.

  I'm not 100% confident this is correct, but it seems so. It also passed all tests on my machine.

Tree-SHA512: 65206ac5e464a222b379043ca7943e9764382d25db6afc3ade89a1c637404c9f902d9ac21e1671722f1a29592a135b69c2c9164932958929d6a6588a12a14ac2
2020-04-01 16:46:32 +01:00
Steven Roose
34ef250721
Move GetNumIssuances to issuance.cpp 2020-03-31 12:28:34 +01:00
Steven Roose
8aab8a24c8
Optimize size estimation in FundTransaction 2020-03-30 23:53:56 +01:00
Gregory Sanders
26e5490e83
Switch default bits of hiding to 52 2020-03-16 20:55:37 +00:00
Gregory Sanders
533a890972 Shrink sidechannel array, use wallet const for size 2019-07-01 10:06:46 -04:00
Gregory Sanders
30552459dc Spelling linter 2019-03-20 11:05:49 -04:00
Gregory Sanders
8371cfcdad Fixup blind.h guard 2019-03-20 10:19:19 -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