Commit graph

28760 commits

Author SHA1 Message Date
W. J. van der Laan
e5faec65bd doc: Fix doxygen comment silent merge conflict in descriptor.cpp
It looks like #21238 introduced a silent merge conflict in the
documentation, which fails with `-Wdocumentation` in the CI.
2021-04-20 09:29:43 +02:00
W. J. van der Laan
906ecb87c8
Merge #21238: A few descriptor improvements to prepare for Taproot support
0b188b751f Clean up context dependent checks in descriptor parsing (Pieter Wuille)
33275a9649 refactor: move uncompressed-permitted logic into ParsePubkey* (Pieter Wuille)
17e006ff8d refactor: split off subscript logic from ToStringHelper (Pieter Wuille)
6ba5dda0c9 Account for key cache indices in subexpressions (Pieter Wuille)
4441c6f3c0 Make DescriptorImpl support multiple subscripts (Pieter Wuille)
a917478db0 refactor: move population of out.scripts from ExpandHelper to MakeScripts (Pieter Wuille)
84f3939ece Remove support for subdescriptors expanding to multiple scripts (Pieter Wuille)

Pull request description:

  These are a few refactors and non-invasive improvements to the descriptors code to prepare for adding Taproot descriptors.

  None of the commits change behavior in any way, except the last one which improves error reporting a bit.

ACKs for top commit:
  S3RK:
    reACK 0b188b7
  Sjors:
    re-ACK 0b188b7
  achow101:
    re-ACK 0b188b751f

Tree-SHA512: cb4e999134aa2bace0e13d4883454c65bcf1369e1c8585d93cc6444ddc245f3def5a628d58af7dab577e9d5a4a75d3bb46f766421fcc8cc5c85c01a11f148b3f
2021-04-20 08:59:09 +02:00
MarcoFalke
de77cbc9d8
Merge bitcoin/bitcoin#21691: test: Check that no versionbits are re-used
fa8eaee6a8 test: Run versionbits_sanity for all chains (MarcoFalke)
faec1e9ee1 test: Address outstanding versionbits_test feedback (MarcoFalke)
fad4167871 test: Check that no versionbits are re-used (MarcoFalke)

Pull request description:

ACKs for top commit:
  jnewbery:
    Code review ACK fa8eaee6a8
  ajtowns:
    ACK fa8eaee6a8 code review only

Tree-SHA512: e99ffcca8970921fd07fa9e04cf1ea2515a317409865d34ddfd70be0f0b0616b29d1fad58262d96a3c3418c0cf7018a6a955802a178b8f78f6ecfaa30a37d91c
2021-04-20 07:15:12 +02:00
fanquake
a839303edc
Merge #21244: Move GetDataDir to ArgsManager
bb8d1c6e02 Change ClearDataDirPathCache() to ArgsManager.ClearPathCache(). (Kiminuo)
b4190eff72 Change GetBlocksDir() to ArgsManager.GetBlocksDirPath(). (Kiminuo)
83292e2a70 scripted-diff: Modify unit tests to use the ArgsManager in the BasicTestingSetup class instead of implicitly relying on gArgs. (Kiminuo)
55c68e6f01 scripted-diff: Replace m_args with m_local_args in getarg_tests.cpp (Kiminuo)
511ce3a26b BasicTestingSetup: Add ArgsManager. (Kiminuo)
1cb52ba065 Modify "util_datadir" unit test to not use gArgs. (Kiminuo)
1add318704 Move GetDataDir(fNetSpecific) implementation to ArgsManager. (Kiminuo)
70cdf679f8 Move StripRedundantLastElementsOfPath before ArgsManager class. (Kiminuo)

Pull request description:

  This PR attempts to contribute to "Remove gArgs" (#21005).

  Main changes:

  * `GetDataDir()` function is moved to `ArgsManager.GetDataDirPath()`.
  * `GetBlocksDir()` function is moved to `ArgsManager.GetBlocksDirPath()`.

ACKs for top commit:
  ryanofsky:
    Code review ACK bb8d1c6e02. Just minor const/naming changes and splitting/scripting commits since last review
  MarcoFalke:
    review ACK bb8d1c6e02 📓
  hebasto:
    re-ACK bb8d1c6e02, addressed comments, and two commits made scripted-diffs since my [previous](https://github.com/bitcoin/bitcoin/pull/21244#pullrequestreview-638270583) review.

Tree-SHA512: ba9408c22129d6572beaa103dca0324131766f06d562bb7d6b9e214a0a4d40b0216ce861384562bde24b744003b3fbe6fac239061c8fd798abd3981ebc1b9019
2021-04-20 08:42:56 +08:00
fanquake
67a359313f
Merge #21728: remove executable flag for src/net_processing.cpp
f2f2541ee7 remove executable flag for src/net_processing.cpp (Sebastian Falbesoner)

Pull request description:

  The file permissions for `src/net_processing.cpp` have been changed in #21713, as discovered by fanquake (https://github.com/bitcoin/bitcoin/pull/21713#issuecomment-822245960). This PR removes the executable flag again.

ACKs for top commit:
  kiminuo:
    ACK f2f2541ee7 :)
  jnewbery:
    ACK f2f2541ee7
  promag:
    ACK f2f2541ee7.

Tree-SHA512: 1d5a62afb1152029e69fccea2ae53dcb262a91724a5c03dfc4de8c409b280814d0c211c2f9a71f1a6e927f4ed571ba4ac311de9de8ebb797eaf1051674241bdb
2021-04-20 08:11:20 +08:00
dplusplus1024
de17d245b7
Re-add command to install vcpkg
`vcpkg integrate install` must be executed so that msbuild will automatically install external dependencies.

It was removed in 712f95d332

It was originally added in 7644567758
2021-04-19 16:41:34 -06:00
Fabian Jahr
5f96d7d22d
rpc: gettxoutsetinfo rejects hash_serialized_2 for specific height 2021-04-19 21:11:37 +02:00
Fabian Jahr
23fe50436b
test: Add test for coinstatsindex behavior in reorgs
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2021-04-19 21:11:37 +02:00
Fabian Jahr
90c966b0f3
rpc: Allow gettxoutsetinfo and getblockstats for stale blocks 2021-04-19 21:11:37 +02:00
Fabian Jahr
b9362392ae
index, rpc: Add use_index option for gettxoutsetinfo 2021-04-19 21:11:33 +02:00
Fabian Jahr
bb7788b121
test: Test coinstatsindex robustness across restarts 2021-04-19 20:31:02 +02:00
Fabian Jahr
e0938c2909
test: Add tests for block_info in gettxoutsetinfo
This additional data will automatically be returned if the coinstats index is used.
2021-04-19 20:31:02 +02:00
Fabian Jahr
2501576ecc
rpc, index: Add verbose amounts tracking to Coinstats index 2021-04-19 20:31:02 +02:00
Jon Atack
655d929836
test: add coinstatsindex getindexinfo coverage, improve current tests 2021-04-19 20:31:02 +02:00
Fabian Jahr
ca01bb8d68
rpc: Add Coinstats index to getindexinfo 2021-04-19 20:31:02 +02:00
Fabian Jahr
57a026c30f
test: Add unit test for Coinstats index 2021-04-19 20:31:02 +02:00
Fabian Jahr
6a4c0c09ab
test: Add functional test for Coinstats index 2021-04-19 20:31:01 +02:00
Fabian Jahr
3f166ecc12
rpc: gettxoutsetinfo can be requested for specific blockheights 2021-04-19 20:30:59 +02:00
Fabian Jahr
3c914d58ff
index: Coinstats index can be activated with command line flag 2021-04-19 20:28:48 +02:00
Fabian Jahr
dd58a4de21
index: Add Coinstats index
The index holds the values previously calculated in coinstats.cpp
for each block, representing the state of the UTXO set at each
height.
2021-04-19 20:28:48 +02:00
Fabian Jahr
a8a46c4b3c
refactor: Simplify ApplyStats and ApplyHash 2021-04-19 20:28:48 +02:00
Fabian Jahr
9c8a265fd2
refactor: Pass hash_type to CoinsStats in stats object 2021-04-19 20:28:48 +02:00
Fabian Jahr
2e2648a902
crypto: Make MuHash Remove method efficient
Division of MuHash objects are very expensive and multiplication relatively cheap. The whole idea of introducing and tracking numerator and denominators seperately as a representation of the internal state was so that divisions would be rare. So using divison in the Remove method did not make any sense and was just a silly mistake which is corrected here.
2021-04-19 20:28:46 +02:00
Aaron Clauson
f02ca7a354
Update msvc build to use Qt5.12.10 binaries. 2021-04-19 16:41:50 +01:00
MarcoFalke
fafb68add5
refactor: Add and use EnsureConnman in rpc code 2021-04-19 13:04:23 +02:00
Russell Yanofsky
615965cfd1 Move common package version code to init/common 2021-04-19 06:11:38 -04:00
Hennadii Stepanov
13d27b452d
Merge bitcoin-core/gui#276: Elide long strings in their middle in the Peers tab
4e0613369f qt: Elide long strings in their middle in the Peers tab (Hennadii Stepanov)

Pull request description:

  The eliding of long addresses (Onion v3 etc) in the Peers tab in their middle was [discussed](https://github.com/bitcoin-core/gui/issues/262#issuecomment-810490396) in #262.

  On master (f0fa32450e):
  ![DeepinScreenshot_select-area_20210410141435](https://user-images.githubusercontent.com/32963518/114267903-24eea400-9a07-11eb-8c80-99f68d5cc522.png)

  With this PR:
  ![DeepinScreenshot_select-area_20210410140430](https://user-images.githubusercontent.com/32963518/114267796-83675280-9a06-11eb-921f-ca47c2075496.png)

  This PR suggests the minimal diff to achieve the goal. OTOH, this change in behavior is common for all columns in the Peers table, but it seems harmless.

ACKs for top commit:
  jarolrod:
    tACK 4e0613369f
  promag:
    Code review ACK 4e0613369f.

Tree-SHA512: 1d5a62afb1152029e69fccea2ae53dcb262a91724a5c03dfc4de8c409b280814d0c211c2f9a71f1a6e927f4ed571ba4ac311de9de8ebb797eaf1051674241bdb
2021-04-19 13:11:38 +03:00
Russell Yanofsky
5bed2ab42c Move common logging start code to init/common 2021-04-19 06:11:38 -04:00
Russell Yanofsky
1fb7fcfa52 Move common logging GetArgs code to init/common 2021-04-19 06:11:38 -04:00
Russell Yanofsky
90469c1690 Move common logging AddArg code to init/common 2021-04-19 06:11:38 -04:00
Russell Yanofsky
387c4cf588 Move common sanity check code to init/common 2021-04-19 06:11:38 -04:00
Russell Yanofsky
a67b54855b Move common global init code to init/common 2021-04-19 06:11:38 -04:00
MarcoFalke
cfec4a1dad
Merge bitcoin/bitcoin#21280: test: bug fix in transaction_tests
b109bde46a [test] check that mapFlagNames is up to date (glozow)
5d3ced72f9 [test] remove unnecessary OP_1s from invalid tests (glozow)
5aee73d175 [test] minor improvements / followups (glozow)
8a365df558 [test] fix bug in ExcludeIndividualFlags (glozow)
8cac2923f5 [test] remove invalid test from tx_valid.json (glozow)

Pull request description:

  This is a followup to #19698.

  - There was a bug in the `ExcludeIndividualFlags` function which is fixed here.
  - Fixing this bug also showed that there is a test that's supposed to fail (already existing in tx_invalid.json) in tx_valid.json, so I removed it. Other than that, the tests should all pass.
  - Also implements a few suggestions I received offline: removing the `OP_1`s from the invalid tests (similar to 19db590d04), comments, and style.
  - A few other small fixes, like adding asserts, putting all the flags in `mapFlagNames`, better error messages

ACKs for top commit:
  jnewbery:
    utACK b109bde46a

Tree-SHA512: 7233a8c0f1ae1172fac8000ea6e05384ecf79074c39948d118464868505c7f02f17e96503c81bd05c07adb2087648a5d93d9899e16fdefa6b7efcb51319444a9
2021-04-19 11:26:42 +02:00
MarcoFalke
83c715415a
Merge #20857: test: update documentation in feature_csv_activation.py
9053b88b1c update docstring in feature_csv_activation.py (Pierre K)

Pull request description:

  These changes in the test documentation reflect the changes introduced in #17921.

ACKs for top commit:
  MarcoFalke:
    review ACK  9053b88

Tree-SHA512: 17fb954baded8dab1c869dd48b76b516150bae616c792c573e4114d4adfdd40195745c56570aa3050cc0015ee496acd7ec178df8ba14831dd22f9722fda84da2
2021-04-19 09:47:57 +02:00
Sebastian Falbesoner
f2f2541ee7 remove executable flag for src/net_processing.cpp 2021-04-19 09:47:34 +02:00
MarcoFalke
d4300a10dd
Merge #21679: rpc: Keep default argument value in correct type
bee56c78e9 rpc: Check default value type againts argument type (João Barbosa)
f81ef4303e rpc: Keep default argument value in correct type (João Barbosa)

Pull request description:

  Store default values of RPC arguments in the corresponding type instead of a string. The value is then serialized when the help output is needed. This change simplifies #20017.

  The following examples illustrates how to use the new `RPCArg::Default` and `RPCArg::DefaultHint`:

  ```diff
  - {"verbose", RPCArg::Type::BOOL, /* default */ "false", "True for a json object, false for array of transaction ids"}
  + {"verbose", RPCArg::Type::BOOL, RPCArg::Default(false), "True for a json object, false for array of transaction ids"}
  ```

  ```diff
  - {"nblocks", RPCArg::Type::NUM, /* default */ "one month", "Size of the window in number of blocks"}
  + {"nblocks", RPCArg::Type::NUM, RPCArg::DefaultHint("one month"), "Size of the window in number of blocks"}
  ```

  No behavior change is expected.

ACKs for top commit:
  LarryRuane:
    ACK bee56c78e9
  MarcoFalke:
    ACK bee56c78e9 🦅

Tree-SHA512: c47d78c918e996d36631d4ad3c933b270a34c5b446b8d736be94cf4a0a7b8c0e33d954149ec786cf9550639865b79deb6a130ad044de6030f95aac33f524293a
2021-04-19 09:04:31 +02:00
MarcoFalke
17b51cd5cb
Merge #21713: Refactor ProcessNewBlock to reduce code duplication
9a0653553a Refactor ProcessNewBlock to reduce code duplication (R E Broadley)

Pull request description:

  There are probably a few issues with this code (maybe there's even a reason this code is duplicated as it currently is), so apologies in advance that I'm still a little (maybe very) bad with C++

ACKs for top commit:
  MarcoFalke:
    ACK 9a0653553a 💻
  promag:
    Code review ACK 9a0653553a.
  theStack:
    Code-review ACK 9a0653553a 🌴

Tree-SHA512: f8634ffad4b2370204d1a0945db4e27248b9e579d9912784da432b8ee3303cae424fa9f7500000dcfb31e6d29d04a8f7d322d17a6fe3d4adaddd10c539458a8c
2021-04-19 09:01:49 +02:00
W. J. van der Laan
ed133fe005
Merge #21615: script: Add trusted key for hebasto
55d85834cc script: Add trusted key for hebasto (Hennadii Stepanov)

Pull request description:

  It is assumed that my responsibility will be limited to the [GUI repo](https://github.com/bitcoin-core/gui).

ACKs for top commit:
  laanwj:
    ACK 55d85834cc
  MarcoFalke:
    matches the key I have locally ACK 55d85834cc 🍪
  jarolrod:
    ACK 55d85834cc 🥃

Tree-SHA512: 256d03e108c9a14e251340ac6e91234d076778cb6bd551439182176207051f4efc55d396754867e5a7191c8c698610f92016668e163037c67dde56f4136026b8
2021-04-19 08:53:51 +02:00
fanquake
a47ae618a0
Merge #21718: rpc: Improve error message for getblock invalid datatype.
a411494261 rpc: Improve getblock error message for invalid data type. (klementtan)

Pull request description:

  Improve error messages for getblock invalid datatype.

  fixes: #21717

ACKs for top commit:
  instagibbs:
    utACK a411494261
  theStack:
    ACK a411494261
  promag:
    Code review ACK a411494261.

Tree-SHA512: 6e7d8290681e8ab375629f81669d0f8e0c21f9eb7ed9e2455cd19ea013e69b2d95fa7a9ee795315b2d5c60c96035c6cefc3d6e1039a06fd88c1dc7fe275ee6a1
2021-04-19 14:16:19 +08:00
João Barbosa
5f438d66c1 refactor, qt: Simplify SendCoinsDialog::updateCoinControlState 2021-04-18 21:12:57 +01:00
João Barbosa
c5a470eee1 refactor: Drop CCoinControl::SetNull 2021-04-18 21:10:47 +01:00
Pierre K
9053b88b1c update docstring in feature_csv_activation.py
These changes in the test documentation reflect the changes introduced in #17921
2021-04-18 22:05:14 +02:00
Kiminuo
bb8d1c6e02 Change ClearDataDirPathCache() to ArgsManager.ClearPathCache(). 2021-04-18 12:07:00 +02:00
Kiminuo
b4190eff72 Change GetBlocksDir() to ArgsManager.GetBlocksDirPath(). 2021-04-18 11:59:28 +02:00
Kiminuo
83292e2a70 scripted-diff: Modify unit tests to use the ArgsManager in the BasicTestingSetup class instead of implicitly relying on gArgs.
-BEGIN VERIFY SCRIPT-
git ls-files src/test/dbwrapper_tests.cpp src/test/denialofservice_tests.cpp src/test/flatfile_tests.cpp src/test/fs_tests.cpp src/test/settings_tests.cpp src/test/util_tests.cpp | xargs sed -i 's/GetDataDir()/m_args.GetDataDirPath()/g';
-END VERIFY SCRIPT-
2021-04-18 11:59:28 +02:00
Kiminuo
55c68e6f01 scripted-diff: Replace m_args with m_local_args in getarg_tests.cpp
-BEGIN VERIFY SCRIPT-
git ls-files src/test/getarg_tests.cpp | xargs sed -i "s/m_args/m_local_args/g";
-END VERIFY SCRIPT-
2021-04-18 11:59:28 +02:00
Kiminuo
511ce3a26b BasicTestingSetup: Add ArgsManager. 2021-04-18 11:59:28 +02:00
Kiminuo
1cb52ba065 Modify "util_datadir" unit test to not use gArgs. 2021-04-18 11:59:25 +02:00
klementtan
a411494261 rpc: Improve getblock error message for invalid data type. 2021-04-18 12:30:58 +08:00
MarcoFalke
faabeb854a
refactor: Mark member functions const 2021-04-17 20:13:34 +02:00