Age | Commit message (Collapse) | Author |
|
eacff95de Add release notes (Pieter Wuille)
bdacbda25 Overhaul importmulti logic (Pieter Wuille)
Pull request description:
This is an alternative to #14558 (it will warn when fields are being ignored). In addition:
* It makes sure no changes to the wallet are made when an error in the input exists.
* It validates all arguments, and will fail if anything fails to parse.
* Adds a whole bunch of sanity checks
Tree-SHA512: fdee0b6aca8c643663f0bc295a7c1d69c1960951493b06abf32c58977f3e565f75918dbd0402dde36e508dc746c9310a968a0ebbacccc385a57ac2a68b49c1d0
|
|
AcceptBlockHeader
66e15e8f97 Explain GetAncestor check for m_failed_blocks in AcceptBlockHeader (Sjors Provoost)
Pull request description:
Salvaged (but slightly modified) from #12138, the comment there was really helpful to wrap my head around that part of the code.
In addition, a naive reader like yours truly will first think `IsValid(BLOCK_VALID_SCRIPTS)` means the previous block was invalid. But IIUC that's not what it means. Instead, it means the block hasn't been checked for validity at the `BLOCK_VALID_SCRIPTS` level yet. So in that case the existing text "previous block index isn't valid" is wrong.
Tree-SHA512: 442a319a83290d94697fdf51376463b70454e0f3909d4a45594ddc2e7c26cd19dc703808385a25e26d6d2dddab0aa35ca41722f2e65ee6fe57bbaf62652d3ec8
|
|
guarded by cs_feeEstimator
dae1423e5a Add locking annotations to feeStats, shortStats and longStats (practicalswift)
764e42fee2 scripted-diff: Rename from cs_feeEstimator to m_cs_fee_estimator (practicalswift)
9a789d4dc6 policy: Add Clang thread safety annotations for variables guarded by cs_feeEstimator (practicalswift)
Pull request description:
* Add Clang thread safety annotations for variables guarded by `cs_feeEstimator`
* ~~Add missing `cs_feeEstimator` locks~~
Tree-SHA512: 24b1d876ad53524ee8989b9658ac1a1b2766ebb3b27a1f84601d207e74d090e33738b814afac2a1f5bcd37565abcb361c6e5adae212840ff1ca32c3c42953391
|
|
e4ed8ce2c8 blockfilter: Remove default clause in switch statement. (Jim Posen)
c30620983d blockfilter: Additional constructors for BlockFilter. (Jim Posen)
20b812993a blockfilter: Refactor GCS params into struct. (Jim Posen)
Pull request description:
These commits have been split out of #14121 because they are fairly independent and that PR is very large.
Tree-SHA512: b9643b159e114df50a295f433e807afe6082db55a2a3a17401c1509b850c71bf5011ab3638863b46663709726be4445be6fde1dec514aec7696135497a9f0183
|
|
Now the compiler will warn if not all enums are handled in the
switch.
|
|
d2ce315fbf [docs] add release note for change to GBT (John Newbery)
0025c9eae4 [mining] segwit option must be set in GBT (John Newbery)
Pull request description:
Calling getblocktemplate without the segwit rule specified is most
likely a client error, since it results in lower fees for the miner.
Prevent this client error by failing getblocktemplate if called without
the segwit rule specified.
Of the previous 1000 blocks (measured at block [551591 (hash 0x...173c811)](https://blockstream.info/block/000000000000000000173c811e79858808abc3216af607035973f002bef60a7a)), 991 included segwit transactions.
Tree-SHA512: 7933b073d72683c9ab9318db46a085ec19a56a14937945c73f783ac7656887619a86b74db0bdfcb8121df44f63a1d6a6fb19e98505b2a26a6a8a6e768e442fee
|
|
f3f6dde56e Test coinbase category in wallet rpcs (andrewtoth)
e982f0b682 Add all category options to wallet rpc help (andrewtoth)
Pull request description:
The current helptext for `listtransactions`, `listsinceblock` and `gettransaction` only list two of the five possible options for `category`. This incorrectly implies that these are the only two options, and can cause problems if the other three options aren't accounted for. Also, some of the documentation is incorrect when specifying which options are returned for which categories.
This PR updates the helptext for these RPCs and adds a functional regression test for the cases when the other three categories are returned.
Tree-SHA512: 67dd7ff6269a3b0f17f5d1a61b0ae1fb1f3778f05e1c440bfbb9b3a005c9c6d740abcace20f3d597cf2bd6779c494448690f13fab0bd2340f206213bc7890b51
|
|
Also this removes unused function parameters and improves comments.
|
|
That bug was introduced in #14228.
|
|
6c10037f72073eecc674c313580ef50a4f1e1e44 rpc: Fix data race (UB) in InterruptRPC() (practicalswift)
Pull request description:
Fix data race (UB) in `InterruptRPC()`.
Before:
```
$ ./configure --with-sanitizers=thread
$ make
$ test/functional/test_runner.py feature_shutdown.py
…
SUMMARY: ThreadSanitizer: data race rpc/server.cpp:314 in InterruptRPC()
…
ALL | ✖ Failed | 2 s (accumulated)
```
After:
```
$ ./configure --with-sanitizers=thread
$ make
$ test/functional/test_runner.py feature_shutdown.py
…
ALL | ✓ Passed | 3 s (accumulated)
```
Tree-SHA512: b139ca1a0480258f8caa7730cabd7783a821d906630f51487750a6b15b7842675ed679747e1ff1bdade77d248807e9d77bae7bb88da54d1df84a179cd9b9b987
|
|
fa9a5bc1a0 RPCHelpMan: Support required arguments after optional ones (MarcoFalke)
Pull request description:
There was a requirement that required arguments could not be positioned after an optional argument, but the deprecation of priority made the second argument to `prioritisetransaction` optional. So support that in `RPCHelpMan`.
Also format all named arguments in the same way (without the wrapping `"` even for strings), since the extended description already mentions the type and it feels odd to special case strings.
Tree-SHA512: c125145afb4a63abc995aaf0a89489efc0f470a720727a1ca6ee0bfd2bcbc59e87c38128dd1e0cdf03dbb5b18e84867887c3dabf6ec8378e66cb1f4cecb9e407
|
|
fa61202cae test: Add comment to g_insecure_rand_ctx (MarcoFalke)
fa0d3c4407 test: Undo thread_local g_insecure_rand_ctx (MarcoFalke)
Pull request description:
`thread_local` seems to be highly controversial according to the discussion in #14953, so remove it again from the tests.
Also remove boost::thread_group in the test that uses it, since I am touching it anyway.
Tree-SHA512: 977c1f597e3cfbd0e97d0b037d998fdbc701f62e9a2f57e02dbe1727b63ae8ff478dbd9d3d6dc4ffdfa23f2058b331f04949d51f23a8f55b41ecb75f088f1cbe
|
|
|
|
4d454dcb6 Refactoring with QString::toNSString (Hennadii Stepanov)
Pull request description:
This PR makes `MacNotificationHandler::showNotification()` cleaner and more readable.
The used `QString::toNSString()` function was introduced in Qt 5.2 which is minimum version now (#14725).
The behavior of `MacNotificationHandler::showNotification()` has not been changed.
cc: @jonasschnelli
Tree-SHA512: 940327a77746ee016415efd3b696ad8ec85dcf12bf3f62e55c9bdc1700415d81a8d03fbc79310982d37a4098786dcaef7cd9702db5498d59d8065447babc27f5
|
|
CWallet::ScanForWalletTransactions
8b9171ccf wallet: Initialize stop_block to nullptr in CWallet::ScanForWalletTransactions (Ben Woosley)
Pull request description:
Previously the argument would be untouched if the first block scan failed. This
makes the behavior predictable, and consistent with the documentation.
Tree-SHA512: 3efadf9fd5e25ecd9450f32545f58e61a123ad883e921ef427b13e4782ffdd8ffe905c9ad3edc7e8f9e4953342cd72247bb4cc9eeaf9e5fd04291ac5c1bb5eec
|
|
Previously the argument would be untouched if the first block scan failed. This
makes the behavior predictable, and consistent with the documentation.
|
|
|
|
|
|
|
|
|
|
The behavior of MacNotificationHandler::showNotification() has not been
changed.
|
|
d98a29ec408590e54f405a7f8d232cd9dc5b14da Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967. (practicalswift)
Pull request description:
Fix cuckoocache_tests TSAN failure introduced in #14935. Fixes #14967.
Tree-SHA512: aabbfa3ab41d9f498151a9b50a2a875fd51ed609bb54d89292114f59392aae57c85fdd5b7a04b589fbf598aaf736b425a6f62b12c806a1fa23bdd45d2d2accfb
|
|
95a5a9fcc qt: Remove ellipsis from sending/receiving addresses (João Barbosa)
a96c0df35 qt: Add Window menu (João Barbosa)
9ea38d022 qt: Allow to inspect RPCConsole tabs (João Barbosa)
Pull request description:
Overall this PR does the following:
- add top level menu Window
- add Minimize and Zoom actions to Window menu
- move Sending/Receiving address to Window
- remove Help->Debug window
- add one menu entry for each debug window tab
This removes the access to address book from the File menu.
With wallet support:
<img width="522" alt="screenshot 2018-12-11 at 00 33 05" src="https://user-images.githubusercontent.com/3534524/49770451-5bec0800-fcdc-11e8-91d6-f8f850ead92d.png">
Without wallet support:
<img width="593" alt="screenshot 2018-12-11 at 12 55 21" src="https://user-images.githubusercontent.com/3534524/49802183-19f6ac80-fd44-11e8-9973-36fcfb4f129e.png">
Tree-SHA512: 4fb03702efe18df7bae33950e462940162abe634c55d0214b8920812127b763234cc9b73f27b3702502a37b6d49bdd6c50b7c8d9a3daea75cecb0136556dd1ea
|
|
|
|
`testmempoolaccept "hexstring"` will give a "JSON parse error". The correct syntax is `testmempoolaccept \[\"hexstring\"\]` (but seems escaping is not displayed in other areas so leaving backspaces out).
|
|
returning a success code
c84c2b8c92 tests: Test for expected return values when calling functions returning a success code (practicalswift)
Pull request description:
Test for expected return values when calling functions returning a success code (instead of discarding the return values).
**Note to reviewers:** The following commands can be used to verify that the only text fragments added in this PR are `BOOST_CHECK(`, `!` and `)` :
```
$ git diff HEAD~1 | grep -E '^[\-][^\-]' | cut -b2- > before.txt
$ git diff HEAD~1 | grep -E '^[\+][^\+]' | cut -b2- > after.txt
$ cat after.txt | sed 's/BOOST_CHECK(//g' | sed 's/));/);/g' | tr -d '!' > after-sed.txt
$ diff -u before.txt after-sed.txt
$
```
Tree-SHA512: ff0863ef2046a2eda3c44e9c6b9aedfe167881f2fa58db29fef859416831233ef6502a3a11fd2322bc1a924db83df8d4a5c5879298007f2a7b085e2a7286af70
|
|
0e75f44a0 Replace CAffectedKeysVisitor with descriptor based logic (Pieter Wuille)
Pull request description:
It seems we don't need a custom visitor pattern anymore to find what keys are affected by a script. Instead, infer the descriptor, and see which keys it expands to.
Tree-SHA512: 8a52f61fb74e8ebfd8d02e759629e423ced6bd7d9a9ee7c4bdd2cca8465bc27b951cc69c8d835244a611ba55c6d22f83b81acef05487cb988c88c0951b797699
|
|
|
|
fbaaf782cea54dc433e72129ee1088b3169cdfd4 validation: assert that pindexPrev is non-null when required (Karl-Johan Alm)
Pull request description:
In `ContextualCheckBlock`, we are checking if `pindexPrev == nullptr` conditionally at the start, but then assume it is non-`null` later. This removes the latter assumption.
Tree-SHA512: 95f1e9dc839b2cc0e099d155e6180634ece8c6760d00b53e7d27128762e64c92e82d98a5f4a5786b48a4851b17cdbb4b667d3b6a99adb651256e2032de67d05c
|
|
fa694f706c37a1c512a7c346591a63c5e09ee239 test: Add tests for truncated scripts (MarcoFalke)
Pull request description:
Previously not covered by any test
Tree-SHA512: 9f99659bdf3947271074938456a2fe64f5b39fc868e9aa474cec199a536ae5d7428f1cfa7f361936b71b09ee4c426261e6b25668fa77b8416b30dbe4ddb357f0
|
|
e414486d56b9f06af7aeb07ce13e3c3780c2b69b Do not permit copying FastRandomContexts (Pieter Wuille)
022cf47dd7ef8f46e32a184e84f94d1e9f3a495c Simplify testing RNG code (Pieter Wuille)
fd3e7973ffaaa15ed32e5aeadcb02956849b8fc7 Make unit tests use the insecure_rand_ctx exclusively (Pieter Wuille)
8d98d426116f0178612f14d1874d331042c4c4b7 Bugfix: randbytes should seed when needed (non reachable issue) (Pieter Wuille)
273d02580aa736b7ccea8fce51d90541665fdbd1 Use a FastRandomContext in LimitOrphanTxSize (Pieter Wuille)
3db746beb407f7cdd9cd6a605a195bef1254b4c0 Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection (Pieter Wuille)
8098379be5465f598220e1d6174fc57c56f9da42 Use a local FastRandomContext in a few more places in net (Pieter Wuille)
9695f31d7544778853aa373f0aeed629fa68d85e Make addrman use its local RNG exclusively (Pieter Wuille)
Pull request description:
This improves a few minor issues with the RNG code:
* Avoid calling `GetRand*()` functions (which currently invoke OpenSSL, later may switch to using our own RNG pool) inside loops in addrman, networking code, `KnapsackSolver`, and `LimitOrphanSize`
* Fix a currently unreachable bug in `FastRandomContext::randbytes`.
* Make a number of simplifications to the unit tests' randomness code (some tests unnecessarily used their own RNG or the OpenSSL one, instead of using the unit test specific `insecure_rand_ctx`).
* As a precaution, make it illegal to copy a `FastRandomContext`.
Tree-SHA512: 084c70b533ea68ca7adc0186c39f0b3e0a5c0ae43a12c37286e5d42086e056a8cd026dde61b12c0a296dc80f87fdc87fe303b9e8e6161b460ac2086cf7615f9d
|
|
dcb70b152292a8df9fe834bacdf231ea848819b1 Indicate -rpcauth option password hashing alg (Carl Dong)
Pull request description:
By indicating the password hashing algorithm, users of bitcoin distributions without the script in `share/rpcauth` and users who don't want to rely on said script can use alternative means to generate the password hash.
Question for reviewers: perhaps we should also indicate that it is specifically a HMAC-SHA-256 of the _**UTF-8**_ encoding of their password?
Tree-SHA512: 86b546c2e78699fa253da0c1e76b21ef60e9b6a5778826ac5136e764d70e3213044cc05cdb4786ba27968781647c46e358a823bbc2db7d45d041d291ee03b83c
|
|
success code
|
|
This introduces various changes to the importmulti logic:
* Instead of processing input and importing things at the same time, first
process all input data and verify it, so no changes are made in case of
an error.
* Verify that no superfluous information is provided (no keys or scripts
that don't contribute to solvability in particular).
* Add way more sanity checks, by means of descending into all involved
scripts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tests and benchmarks.
8db0c3d42b Removed implicit CTransaction conversion from benchmaks (lucash-dev)
ed61abedb2 Removed implicit CTransaction constructor from tests (lucash-dev)
Pull request description:
This PR was split from #14906 and is a prerequisite for it.
It updates tests and benchmarks, removing all implicit calls to `CTransaction(CMutableTransaction&)` constructors. This will make possible making the constructor explicit in the next PR.
The original rationale for making the constructor explicit:
- Conversion constructors should not be explicit unless there's a strong reason for it (in the opinion of, for example, https://google.github.io/styleguide/cppguide.html, and https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ro-conversion. Let me know your take on this).
- This particular conversion is very costly -- it implies a serialization plus hash of the transaction.
- Even though `CTransaction` and `CMutableTransaction` represent the same data, they have very different use cases and performance properties.
- Making it explicit allows for easier reasoning of performance trade-offs.
- There has been previous performance issues caused by unneeded use of this implicit conversion.
- This PR creates a map for places to look for possible refactoring and performance gains (this benefit still holds if the PR is not merged).
Tree-SHA512: de8073aa6ff8a3153bcbe10818616677ecf9598e4978d8a0b4c39a262e71c36be5679cec08554c760d1f011ba6d37350318248eef15f6d9b86f9e4462b2de0d2
|
|
scan result: success / failure / user_abort
bd3b0361d Add stop_block out arg to ScanForWalletTransactions (Ben Woosley)
3002d6cf3 Return a status enum from ScanForWalletTransactions (Ben Woosley)
bb24d6865 Make CWallet::ScanForWalletTransactions args and return value const (Ben Woosley)
Pull request description:
Return the failed block as an out arg.
Fixes #11450.
/cc #12275
Tree-SHA512: 6a523e5425ebfe24e664a942ae21c797ccc1281c25b1bf8d02ad95c19dae343fd8051985ef11853474de7628fd6bed5f15190fbc087c3466ce6fdecab37d72a9
|
|
26879509f Add comments to descriptor tests (Pieter Wuille)
82df4c64f Add descriptor expansion cache (Pieter Wuille)
1eda33aab [refactor] Combine the ToString and ToPrivateString implementations (Pieter Wuille)
24d3a7b3a [refactor] Use DescriptorImpl internally, permitting access to new methods (Pieter Wuille)
6be0fb4b3 [refactor] Add a base DescriptorImpl with most common logic (Pieter Wuille)
Pull request description:
This patch modifies the internal `Descriptor` class to optionally construct and use an "expansion cache". Such a cache is a byte array that encodes all information necessary to expand a `Descriptor` a second time without access to private keys, and without the need to perform expensive BIP32 derivations. For all currently defined descriptors, the cache simply contains a concatenation of all public keys used.
This is motivated by the goal of importing a descriptor into the wallet and using it as a replacement for the keypool, where it would be impossible to expand descriptors if they use hardened derivation.
Tree-SHA512: f531a0a82ec1eecc30b78ba8a31724d1249826b028cc3543ad32372e1aedd537f137ab03dbffc222c5df444d5865ecd5cec754c1ae1d4989b6e9baeaffade32a
|
|
|
|
|
|
Considering https://stackoverflow.com/a/637708 the ellipsis in these
menu actions should be removed.
|
|
|