Commit graph

34845 commits

Author SHA1 Message Date
James Dorfman
cd394a40ed Merge eca4cd9259 into merged_master (Elements PR #1169) 2023-03-13 05:27:12 +00:00
James Dorfman
04bd333eaf Merge f09a276eb0 into merged_master (Elements PR #1171) 2023-03-13 05:27:12 +00:00
James Dorfman
a2183b9e86 Merge 38eacf73e3 into merged_master (Elements PR #1175) 2023-03-13 05:27:11 +00:00
James Dorfman
7c66f57fb9 Merge ae220b8545 into merged_master (Elements PR #1184) 2023-03-13 05:27:11 +00:00
James Dorfman
3d2881680e Merge 285a18dbe9 into merged_master (Elements PR #1173) 2023-03-13 05:27:11 +00:00
Glenn Willen
6f5b948a36 Merge a7c455e6bf into merged_master (Elements PR #1178) 2023-03-01 17:10:34 -08:00
Glenn Willen
8b34ffac1e Merge f1dd3de8e1 into merged_master (Elements PR #1172) 2023-03-01 16:30:10 -08:00
Glenn Willen
eb5e63b8d5 Merge 1cfcf1c360 into merged_master (Elements PR #1155) 2023-03-01 15:38:39 -08:00
Glenn Willen
c835c7cb87 Merge f49e97dd47 into merged_master (Elements PR #1162) 2023-03-01 14:45:25 -08:00
Glenn Willen
f3332ba8c8 Merge ed31d2215f into merged_master (Elements PR #1165) 2023-03-01 14:22:06 -08:00
Glenn Willen
a04d6f313c Merge 457a5645fe into merged_master (Elements PR #869) 2023-03-01 13:46:51 -08:00
Glenn Willen
de41f79f6f Merge b4935a51c0 into merged_master (Elements PR #1157) 2023-03-01 12:09:22 -08:00
Glenn Willen
65bdef4b5f Use git --no-pager in ci script.
When running 'git log' in a ci script, pass --no-pager to ensure
that a pager (i.e. 'less') is never used. When running in CI,
there is no controlling terminal, so a pager will never be used;
but when running the CI scripts by hand to reproduce CI issues,
the automatic invocation of a pager by 'git log' breaks the script.
2023-03-01 12:08:03 -08:00
Glenn Willen
0931e4590b Merge da236e8ad9 into merged_master (Elements PR ElementsProject/elements#1160) 2023-03-01 12:06:11 -08:00
Glenn Willen
fe6c7525fc Merge 3e646d4888 into merged_master (Elements PR #1159) 2023-03-01 10:55:30 -08:00
Glenn Willen
391bb41e14 Merge 03b646930f into merged_master (Elements PR #1154) 2023-03-01 10:45:02 -08:00
Glenn Willen
edce83c4f3 Merge 53da86e398 into merged_master (Elements PR #1150) 2023-03-01 10:33:38 -08:00
Glenn Willen
01015bf992 Merge 0be72f4c39 into merged_master (Elements PR #1146) 2023-03-01 10:23:45 -08:00
Glenn Willen
3a57896cb2 Merge debf46b89e into merged_master (Elements PR #1145) 2023-03-01 10:13:04 -08:00
Glenn Willen
0876dba1a3 Merge fa809aff5e into merged_master (Elements PR #1141) 2023-03-01 10:01:55 -08:00
Glenn Willen
0ae24ee3c6 Merge 6422e50652 into merged_master (Elements PR ElementsProject/elements#1140) 2023-03-01 09:51:17 -08:00
Glenn Willen
007bc08775 Merge 6132c01d60 into merged_master (Elements PR #1121) 2023-03-01 09:37:39 -08:00
Glenn Willen
4fedc4f94c Merge 1efefc3914 into merged_master (Elements PR #1131) 2023-03-01 09:28:02 -08:00
Glenn Willen
98e863fcbb Merge 426679e48c into merged_master (Elements PR #1134) 2023-03-01 09:18:11 -08:00
Glenn Willen
6478593fbe Merge 1be529a11b into merged_master (Elements PR #1130) 2023-03-01 09:08:34 -08:00
Glenn Willen
aadadf76d6 Merge cd9d64ebff into merged_master (Elements PR #1127) 2023-03-01 08:59:04 -08:00
Glenn Willen
bc0b708508 Merge c80e926d6e into merged_master (Elements PR ElementsProject/elements#1122) 2023-03-01 00:44:02 -08:00
Glenn Willen
49d83e5aed Merge 83ad381f47 into merged_master (Elements PR #1117) 2023-03-01 00:30:48 -08:00
Glenn Willen
a396dc2347 Merge 87028135ad into merged_master (Elements PR #1107) 2023-03-01 00:27:07 -08:00
Glenn Willen
2a246a8da1 Merge b4d4b1a2c1 into merged_master (Elements PR #1114) 2023-03-01 00:26:50 -08:00
Glenn Willen
011feab4c4 Fix spelling lints.
For all spelling lints, either fix them in place, or add them to the
ignore list.

I don't understand how these have gotten in here without ever
triggering the linter until now. I'm not sure if it's something about
my test environment or what. But fixing them can't hurt.
2023-02-26 19:30:18 -08:00
Pablo Greco
eca4cd9259
Merge pull request #1169 from andreabonel/fix_windows_elements_company
Fix company for Windows exes
2022-10-15 18:09:44 -03:00
Pablo Greco
f09a276eb0
Merge pull request #1171 from andreabonel/master-replace-icons
Replace icons
2022-10-15 18:09:26 -03:00
Pablo Greco
38eacf73e3
Merge pull request #1175 from andreabonel/fix_windows_uninstaller_icon
Fix Windows uninstaller icon in "Add or remove programs"
2022-10-15 18:09:08 -03:00
Pablo Greco
ae220b8545
Merge pull request #1184 from gwillen/feature-fix-taproot-parse-blinding
Preserve blinding key when parsing taproot address.
2022-10-15 13:44:31 -03:00
Glenn Willen
d0625e1ed5 Add taproot address parsing test case, regression test for #1181. 2022-10-11 17:02:34 -07:00
Glenn Willen
6b4228e3a5 Preserve blinding key when parsing taproot address. 2022-10-11 15:30:04 -07:00
Pablo Greco
285a18dbe9
Merge pull request #1173 from andreabonel/fix_issue_1120
Fix location for default cookie path
2022-10-05 22:57:29 -03:00
Andrea Bonel
86db1b70e9 Fix location for default cookie path 2022-09-27 18:56:20 -03:00
James Dorfman
a7c455e6bf
Merge pull request #1178 from psgreco/master-fix-linter
Fix lint
2022-09-26 12:21:26 -04:00
Pablo Greco
90c4bf99f6 Fix lint 2022-09-26 12:09:28 -03:00
Pablo Greco
f1dd3de8e1
Merge pull request #1172 from apoelstra/2022-09--wallet-fix
wallet: don't clear out all the blinding data when dropping change
2022-09-26 11:43:30 -03:00
Andrew Poelstra
e5e3ec2700
wallet: account for issuances during coin selection
Prior to coin selection we need to indicate that the issuances will take
extra space, otherwise we may fail to select enough coins to cover our
fees, triggering the new "fee needed exceeds fees available" assertion.
2022-09-22 13:20:29 +00:00
Andrew Poelstra
3c896b11e0
test: rename elements_regression_1172 to follow naming convention 2022-09-20 21:17:50 +00:00
Andrew Poelstra
79fd90f064
wallet: extend fix to "dropped change is the last blinded output" case 2022-09-20 21:17:47 +00:00
Andrew Poelstra
fac694be4c
wallet: don't clear out all the blinding data when dropping change
The Elements 22 blinding logic has an edge case where when we drop change,
leaving only a single blinded output, we recompute a bunch of blinding
data to handle the potential for us to have 0 inputs and 1 output to blind.
(BlindTransaction will fail in this case because it cannot make the
transaction balance with only one output to mess with.)

In this recomputation, we dropped more data than we meant to, causing us
to incorrectly blind an output.
2022-09-20 17:40:47 +00:00
Andrew Poelstra
23e91d0ef8
wallet: fix some fee calculation bugs
First, this reverts commit ca2d72ae8b to reinstate
an assertion that was added in Bitcoin #22686. It did not compile because our
`change_and_fee` variable is a map rather than number; I changed it to use
`map_change_and_fee.at(policyAsset)` to match the equivalent change 2 lines down
from a5d97b363b (merge of Bitcoin #22008).

Then fix the following bugs:

1. Change the new test in rpc_fundrawtransaction.py to bump the -maxtxfee value,
   which we'd otherwise exceed, failing the test and masking actual failures.
   (This was just caused by the extreme fee settings of the test combined with
   Elements' large transactions.)
2. Change the fee-output size estimation for `tx_noinputs_size` to be 46 rather
   than 44 bytes; we forgot that even null surjection/rangeproofs need a 0 byte
   when output witnesses are present. This mistake triggered the new assertion.
3. Correct the logic in which change outputs are sometimes dropped even when
   they are the only blinded output in a transaction with blinded inputs. This
   would cause the new test to fail with `bad-txn-inputs-ne-outputs`; I'm very
   surprised that no existing tests hit this.

   (I have an existing comment block in this code where I "promise" that I had
   a good reason for doing something mysterious related to blinding. I was not
   able to reverse-engineer my intention here, though I think it is related to
   this, but since I couldn't understand it I just left this block intact and
   worked around it.)
4. This then triggered the assertion again since the coin selection code
   assumes that sufficiently-small change will always be dropped. If we prevent
   this drop we will have under-funded the transaction.

   To fix this we add Yet Another Flag `may_need_blinded_dummy` in which we add
   extra weight to `tx_noinputs_size` in the case that we're doing a blinded tx
   but have no blind destinations. We turn this off after coin selection if it
   turns out that we don't have any blinded inputs, though ofc at that point
   much of the damage/inefficiency has already been done..
5. Fix some constants in other functional tests which assumed precise fee
   calculations; these precise values changed because of fixes (2) and (4).

There is one new FIXME, which is that the "dummy change" value will now be a
zero-valued OP_RETURN but we still put a full-size rangeproof and surjection
proof on it. There is some plausible privacy benefit to this but not much,
and wasting 5000+ bytes rather than the ~65 needed for an exact-value proof
is not worth it. We will fix this in the future when we overhaul the wallet
blinding logic.
2022-09-20 17:39:24 +00:00
Glenn Willen
2273079c45
elements: Fix build by removing newly-added assertion from upstream that doesn't make sense with assets 2022-09-20 17:38:44 +00:00
Andrew Chow
dfc3e891d7
wallet: Assert that enough was selected to cover the fees
When the fee is not subtracted from the outputs, the amount that has
been reserved for the fee (change_and_fee - change_amount) must be
enough to cover the fee that is needed. It would be a bug to not do so,
so use an assert to make this obvious if such a situation were to occur.

Github-Pull: bitcoin/bitcoin#22686
Rebased-From: d9262324e8
2022-09-20 17:38:44 +00:00
Andrea Bonel
f5399df08a Replace Bitcoin icons with the corresponding for Elements 2022-09-19 14:31:33 -03:00