Commit graph

34696 commits

Author SHA1 Message Date
Glenn Willen
5cfd3812fc Merge 24ab49d110 into merged_master (Elements PR ElementsProject/elements#1085) 2022-04-21 15:36:43 -07:00
Glenn Willen
df04042bcc Merge 023e343b50 into merged_master (Elements PR ElementsProject/elements#1093) 2022-04-20 23:38:17 -07:00
Glenn Willen
f6f2faca88 Merge 7d83cc0089 into merged_master (Elements PR ElementsProject/elements#1075) 2022-04-20 23:21:03 -07:00
Glenn Willen
f035196ceb Merge 586e5c7dd7 into merged_master (Elements PR ElementsProject/elements#1062) 2022-04-20 21:51:53 -07:00
Glenn Willen
dea074b88a Merge b707a6f00f into merged_master (Elements PR ElementsProject/elements#1069) 2022-04-20 20:51:37 -07:00
Glenn Willen
ef37d6a609 Merge 3c4e4ada12 into merged_master (Elements PR ElementsProject/elements#1066) 2022-04-20 20:26:58 -07:00
Glenn Willen
c2aaa7cada Merge 9cc56b87fb into merged_master (Elements PR ElementsProject/elements#1070) 2022-04-20 20:08:44 -07:00
Glenn Willen
dd62faf9ec Merge 2247e44b95 into merged_master (Elements PR ElementsProject/elements#1068) 2022-04-20 19:45:58 -07:00
Glenn Willen
19307ddeb3 Merge fec996403a into merged_master (Elements PR ElementsProject/elements#1072) 2022-04-20 19:29:07 -07:00
Glenn Willen
63f92662df Merge 04cedf3f6b into merged_master (Elements PR ElementsProject/elements#1057) 2022-04-20 19:11:57 -07:00
Glenn Willen
04fd3d8dab Fix dropped '&' from merge of #1022
When PR 1022 was merged, an & got dropped from the declarations of the two
"fStall" out-parameters, rendering them unused (and triggering a compiler
warning.) Restore them, restoring the functionality of #1022.
2022-04-20 18:35:06 -07:00
Steven Roose
24ab49d110
Merge pull request #1085 from psgreco/master-blocktimeoutfix
Remove block from in-flight list when a duplicate is received
2022-02-17 16:06:27 +01:00
Andrew Poelstra
023e343b50
Merge ElementsProject/elements#1093: Typo correction: 'hrinkdebugfile'
15f29a4eff Typo correction: 'hrinkdebugfile' (opacey)

Pull request description:

  Amending "# hrinkdebugfile=1" to "# shrinkdebugfile=1"

ACKs for top commit:
  apoelstra:
    ACK 15f29a4eff

Tree-SHA512: 2438f73bb1b1e3cc4537cae6cf40a5a6366d4d524af4f24cca2e536624fee0f676dc1f200f41d2d0a8c886e808d1cb69e3f0c695181f1a472c03c7a2ac6c6614
2022-02-17 14:27:29 +00:00
opacey
15f29a4eff
Typo correction: 'hrinkdebugfile'
Amending "# hrinkdebugfile=1" to "# shrinkdebugfile=1"
2022-02-16 16:57:37 +00:00
Pablo Greco
5f9696437f Remove block from in-flight list when a duplicate is received 2021-12-23 18:07:52 +00:00
Steven Roose
7d83cc0089
Merge ElementsProject/elements#1075: Remove obsolete comment after a06aac152a
a58b3b7ab3 Remove obsolete comment after a06aac152a (Pablo Greco)

Pull request description:

  Leftover change from https://github.com/ElementsProject/elements/pull/1062

Top commit has no ACKs.

Tree-SHA512: 6334848e697cf7d0a0b4aeb9d224994924338fb242c9fca0b280a8db71225d7eea976f606cf9a300d70aa26b38a361f0b44edb69e337e438fc6b4d25e143bd7b
2021-11-26 15:19:16 +00:00
Pablo Greco
a58b3b7ab3 Remove obsolete comment after a06aac152a 2021-11-26 15:12:23 +00:00
Steven Roose
586e5c7dd7
Merge ElementsProject/elements#1062: Implement vbparams equivalent for elements
85c3c2b819 Deprecate con_dyna_deploy_start in favor of evbparams (Pablo Greco)
d15d08c605 Dynafed is already activated in liquidv1, remove start argument parsing (Pablo Greco)
a06aac152a Make dynafed signaling opt-out instead of opt-in (Pablo Greco)
19f54eb5e0 Make sure command line takes precedence when processing evbparams (Pablo Greco)
24cafa50cf Implement vbparams for Elements (evbparams) (Pablo Greco)

Pull request description:

  Fixes: https://github.com/ElementsProject/elements/issues/1061

ACKs for top commit:
  stevenroose:
    Looks good, utACK 85c3c2b

Tree-SHA512: 124a25d762e8c5053d388153374ac629779df5dc8af09308cb5f794c707c890fd379e81b72ecc9892e5a02e414bc6539082d95fb69dcb2512e7f91b3f8bcffdd
2021-11-26 15:07:18 +00:00
Steven Roose
b707a6f00f
Merge ElementsProject/elements#1069: Fix elements multiple-header-download issue.
cdfb4c9c6c Fix elements multiple-header-download issue. (Glenn Willen)

Pull request description:

  This fixes an issue which causes Elements to download the blockchain headers
  multiple times during initial block download.

  In particular: each time we receive an INV P2P message with a new block
  (about once a minute), we start downloading the headers, again, in parallel
  with any existing download(s) in progress.

  With this change, after we receive each batch of headers, we check whether
  any of the headers in it were new to us. If not (they were all duplicates),
  we stop there, and do not ask the peer for another batch. This reduces the
  maximum amount of duplication to about 2x, which is not ideal, but a HUGE
  improvement.

  With luck, this may help with #1013. But it's primarily directed at fixing slow initial block download, which I can't immediately find an open issue for on this repo, but has been a long-standing problem.

ACKs for top commit:
  stevenroose:
    looks good, utACK cdfb4c9c6c

Tree-SHA512: 693a8f89cae1819292146b5bc676e34cd9045bf3a771d78959d8f704072020d5ccb073d6d5b89786598129fd9fd4f80d2c207a2db29597984fcae774cbfacadb
2021-11-26 11:57:53 +00:00
Steven Roose
3c4e4ada12
Merge ElementsProject/elements#1066: Reevaluate descriptor post parse
6c1d0d3ca8 Re-evaluate peg-out descriptor if wallet is reparsed (Jeff Frontz)

Pull request description:

  In `sendtomainchain_pak()` a check is made if the associated `descriptor` is null and an attempt to remedy is made -- but the remedy is never applied to `descriptor` (which results in a SEGV later).  This code fixes that.

  Note: unfortunately it also removes the `const` qualifier.  I'm not sure what/if there are conventions for dealing with that (e.g., creating a new `const` of, like, `sanitized_descriptor` for subsequent use in the function?).

Top commit has no ACKs.

Tree-SHA512: 8fb4a28ebd0d76647c1b0ecf98f3e18905c880a9562caa1b02ca66647dcbe00b2a6bd91da7ce6a61bd34bb3096030714417170badccdaeaa4c0a03e8704f8ca1
2021-11-26 11:52:48 +00:00
Steven Roose
9cc56b87fb
Merge ElementsProject/elements#1070: Mark pegin-related args to createrawtransaction as optional.
e72544da90 Mark pegin-related args to createrawtransaction as optional. (Glenn Willen)

Pull request description:

  Fixes #1064 .

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

Top commit has no ACKs.

Tree-SHA512: a901c4bd65fbd7fceebe39cca9f8e377741e61ef2968bc3c955e26bffb2b371a342b49a09f76696ac45f047d8c410500f5872fb722007fb92b17d0bca97d69dc
2021-11-26 11:50:57 +00:00
Steven Roose
2247e44b95
Merge ElementsProject/elements#1068: Typos in pset doc
3c911a7ed7 Typos in pset doc (Riccardo Casatta)

Pull request description:

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

Top commit has no ACKs.

Tree-SHA512: 02f07fd5938f2ffe26a79aeaed673274f8cf18879eae2e8ee1e0a3c650232083545cbb7ee07a5f7e53cb756782b8a5a36201992c16d3b268fb0e73828419bfd5
2021-11-25 17:20:35 +00:00
Steven Roose
fec996403a
Merge ElementsProject/elements#1072: Remove redundant log message in IsValidPeginWitness
b2dd758ce4 Remove redundant log message in IsValidPeginWitness (Glenn Willen)

Pull request description:

  The value it logs, very frequently, is essentially static, coming straight from the chainparams, and should never change during runtime anyway. (With a small exception that doesn't really matter and is probably not the reason for the log.)

Top commit has no ACKs.

Tree-SHA512: 5cda28c850a808a8a0d43bd3369a0a18817e774d35e4c7605e3e4ffe7746f192a603c031413286a9b5c8d557f9b1807ba5ac236d8ecef9f9b64517446b788f80
2021-11-25 17:01:37 +00:00
Pablo Greco
85c3c2b819 Deprecate con_dyna_deploy_start in favor of evbparams 2021-11-23 14:36:03 +00:00
Pablo Greco
d15d08c605 Dynafed is already activated in liquidv1, remove start argument parsing 2021-11-23 14:36:03 +00:00
Pablo Greco
a06aac152a Make dynafed signaling opt-out instead of opt-in 2021-11-23 14:36:03 +00:00
Pablo Greco
19f54eb5e0 Make sure command line takes precedence when processing evbparams 2021-11-23 14:36:03 +00:00
Pablo Greco
24cafa50cf Implement vbparams for Elements (evbparams) 2021-11-23 14:36:03 +00:00
Glenn Willen
b2dd758ce4 Remove redundant log message in IsValidPeginWitness 2021-11-22 13:37:31 -08:00
Glenn Willen
e72544da90 Mark pegin-related args to createrawtransaction as optional. 2021-11-17 17:02:14 -08:00
Glenn Willen
cdfb4c9c6c Fix elements multiple-header-download issue.
This fixes an issue which causes Elements to download the blockchain headers
multiple times during initial block download.

In particular: each time we receive an INV P2P message with a new block
(about once a minute), we start downloading the headers, again, in parallel
with any existing download(s) in progress.

With this change, after we receive each batch of headers, we check whether
any of the headers in it were new to us. If not (they were all duplicates),
we stop there, and do not ask the peer for another batch. This reduces the
maximum amount of duplication to about 2x, which is not ideal, but a HUGE
improvement.
2021-11-17 09:06:38 -08:00
Riccardo Casatta
3c911a7ed7
Typos in pset doc 2021-11-15 14:56:21 +01:00
Jeff Frontz
6c1d0d3ca8 Re-evaluate peg-out descriptor if wallet is reparsed 2021-11-11 16:10:58 -05:00
Steven Roose
04cedf3f6b
Merge ElementsProject/elements#1057: Make error messages when talking to parent chain daemon more useful.
cfed38503e Make error messages when talking to parent chain daemon more useful. (Glenn Willen)

Pull request description:

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  stevenroose:
    utACK cfed38503e

Tree-SHA512: 1b76d50516bdc809d652e932f1336a8d17c51aae1094a664b3098cdd63ce0826175f25cb64539c6b3cf0ad086ccce4d883600ab960010fd9a0401c557a562e82
2021-10-19 20:29:11 +01:00
Andrew Poelstra
6ab7760cac test: add dynafed params for testnet (only used in unit tests, fix needed for uninit mem linter) 2021-10-15 00:20:23 +00:00
Andrew Poelstra
242586cea6 lint: fix pylint issues 2021-10-15 00:20:23 +00:00
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
f71e68f75d lint: replace tabs with spaces 2021-10-14 23:55:20 +00:00
Andrew Poelstra
fad6c8a526 ci: change a couple bitcoins to elementss 2021-10-14 23:55:17 +00:00
Andrew Poelstra
a1f0aea3d7 Merge 43665e3ca0 into merged_master (Elements PR ElementsProject/elements#1055) 2021-10-14 19:32:30 +00:00
Glenn Willen
cfed38503e Make error messages when talking to parent chain daemon more useful. 2021-10-13 02:22:52 -07:00
Andrew Poelstra
43665e3ca0
Merge ElementsProject/elements#1055: minor PSET fix
0e1007fa7b minor PSET fix (Andrew Poelstra)

Pull request description:

  Noticed because it triggered a compiler warning.

  No test -- we will add one in a future "end-to-end issuance via PSET" tutorial script which is out of scope for the 0.21 release.

ACKs for top commit:
  achow101:
    ACK 0e1007fa7b

Tree-SHA512: c90427fd74c84bdee6940d2148818793e4641e6dd12dd4855a229afb6b725313c6074fc14171c911e5a541e252dd4027e65521c7fe5c62e265fb38076c1d5ca4
2021-10-06 23:09:09 +00:00
Andrew Poelstra
5fedc912ba Merge dfb3c4647a into merged_master (Elements PR ElementsProject/elements#1054) 2021-10-06 19:23:55 +00:00
Andrew Poelstra
dfb3c4647a
Merge ElementsProject/elements#1054: Update hardcoded PAK list for Liquid v1
a4b66a24b7 Update hardcoded PAK list for Liquid v1 (Glenn Willen)

Pull request description:

  Forward-port of #892

  Confirmed that no other 0.18 PRs need a forward-port.

ACKs for top commit:
  gwillen:
    utACK a4b66a2 , thanks.

Tree-SHA512: 4f621cd93ee79faeb2080e0dccbf587d071d7777848915b21f3d281ad28a0151756cc4a16b383caa4c0184f2348cd1cc843e1d87a8d94a1f99068ff1b36f615f
2021-10-06 19:22:38 +00:00
Andrew Poelstra
0e1007fa7b minor PSET fix 2021-10-06 19:10:15 +00:00
Glenn Willen
a4b66a24b7 Update hardcoded PAK list for Liquid v1 2021-10-06 14:57:10 +00:00
Andrew Poelstra
b64ca7f411 Merge 6eed792d43 into merged_master (Elements PR ElementsProject/elements#1050)
Conflicts were mostly obvious, except for those in CreateTransactionInternal.
(This function was moved from wallet.cpp to spend.cpp, and substantially
rewritten, between 0.21 and 22.0.) For those I manually applied the changes
from the diff, which wound up taking a slightly different form.

Also had to update the new test because the `addresses` field of the RPC
output was removed.
2021-10-04 15:13:47 +00:00
Andrew Poelstra
6eed792d43
Merge ElementsProject/elements#1050: wallet: fix a pile of bugs in transaction funding logic
a67a2df330 pset: remove one more intermediate-zero check from the blinding logic (Andrew Poelstra)
9eb285c19d test: add test for confidential non-wallet-owned change (Andrew Poelstra)
185d473fe8 walletcreatefundedpsbt: add functional test for blinding edge cases (Andrew Poelstra)
533da12c2c wallet: make sure extra OP_RETURN output is blinded when called from fundraw (Andrew Poelstra)
b09b63bd1b pset: allow input blinding factors to sum to zero, or value to be 0 (Andrew Poelstra)
9afcb83baf wallet: correctly handle blinding of manually-set change addresses (Andrew Poelstra)
9813c3e74a wallet: fix "cannot unblind IsMine output" check in SignPSBT (Andrew Poelstra)
7103471fd5 walletcreatefundedpsbt: signal blinding data correctly to `FundTransaction` (Andrew Poelstra)

Pull request description:

  Fixes #1049

  Needs backport to 0.21 (and a new rc).

  Although there are several bugs here, none affect the functionaries. There is a more thorough summary in the second-to-last commit message.

ACKs for top commit:
  achow101:
    ACK a67a2df330

Tree-SHA512: 25066c29f080e43cd00c5b33c60a986a8cb5bbf4ca01ceb3b4182c5b8f61979a1d6d946b8f28fa871ec90f44bdb6fc22014b5c11280cf081181db102cd588cdf
2021-10-02 15:13:45 +00:00
Andrew Poelstra
ea62009330 Merge 4798e8ee2c into merged_master (Elements PR ElementsProject/elements#1052) 2021-10-02 14:06:41 +00:00
Andrew Poelstra
7b69a940eb Merge 846ab81794 into merged_master (Elements PR ElementsProject/elements#1051) 2021-10-02 13:27:49 +00:00