Commit graph

20038 commits

Author SHA1 Message Date
Pieter Wuille 054d01d0a8 Do not relay banned IP addresses 2019-03-17 22:05:49 -07:00
MarcoFalke fa3caa1666
rpc: decodescript use IsValidNumArgs over hardcoded check 2019-03-17 22:52:18 -04:00
MarcoFalke faad33ff15
rpc: Clarify decodescript RPCResult doc 2019-03-17 22:51:33 -04:00
MarcoFalke acbbb7bf0d
Merge #15601: build: depends: Switch to python3 (take 3)
fa0f92af9a build: depends: Switch to python3 (MarcoFalke)

Pull request description:

  Actually try to switch to python3 after the incomplete attempts:

  *  Remove Python2 support #11881
  *  build: Require python 3.5 #14954
  * ...

Tree-SHA512: ba689c3788f2dd91c15d4ff5f6a73219c1a73893c18d3bb8e6da5c35acfef9897c7e100439ce5cac05624c66f7619d13528b60065c36545608fb387aab25e117
2019-03-17 15:59:27 -04:00
Wladimir J. van der Laan 85f003274d
Merge #15611: Add Gitian key for droark
204c729457 Add Gitian key for droark (Douglas Roark)

Pull request description:

  I've signed 0.18.0rc1 and 0.18.0rc2, and I intend to sign every release moving forward.

Tree-SHA512: 0662d4f3d4f719324c34f4074a5d4fcb8d8426846ea55e0771d84293bd2c390cc0a590da39b59a1ff96fc1dc2486e579f1e14a7aebbc1e7d991dfee7020a9032
2019-03-17 13:47:51 +01:00
Douglas Roark 204c729457
Add Gitian key for droark
I've signed 0.18.0rc1 and 0.18.0rc2, and I intend to sign every release moving forward.
2019-03-16 16:33:39 -07:00
Wladimir J. van der Laan 2f501fb5c6
Merge #15522: Document sizeof(size_t) assumptions and compiler assumptions in assumptions.h
c7a7250302 Document assumptions about C++ compiler (practicalswift)
c7ea8d3236 Add sizeof(size_t) assumptions (practicalswift)

Pull request description:

  Document `sizeof(size_t)` assumptions and compiler assumptions by adding compile-time checks in `assumptions.h`.

Tree-SHA512: db46481eecad6a87718ae637a7761d39d32cfe6f95fc8ad2b3a52a3d966c2a05c8f540dd3f362721279816571b04b6cce2de9b3b1d17606d7b197126cd4a8d1f
2019-03-16 17:11:14 +01:00
Wladimir J. van der Laan 165ea14efe
Merge #15604: [docs] release note for disabling reject messages by default
92f3e808f6 [docs] release note for disabling reject messages by default (John Newbery)

Pull request description:

  v0.18 deprecated BIP 61 REJECT messages.

  v0.19 disables them by default (#14054). This adds a release note to document that.

  BIP 61 REJECT messages will be removed entirely in a future version.

Tree-SHA512: 575b7e2800c40cd47b8704abb3ab1e5acdd266ece7209a629e47fed1a88ca94bc0858591e8707b157e913385360a43f2695ecaae81e9881dc2a9b3c9391c80c2
2019-03-16 13:27:41 +01:00
Wladimir J. van der Laan cede01b416
Merge #15609: scripts and tools: Set 'distro' explicitly
b8705a0915 Set 'distro' explicitly (Hennadii Stepanov)

Pull request description:

  The [gitian-builder](https://github.com/devrandom/gitian-builder) implicitly uses `ubuntu` as a default distro.

  [bin/gbuild#L237](81edd2fc8e/bin/gbuild (L237)):
  ```ruby
  distro = build_desc["distro"] || "ubuntu"
  ```

  This PR sets a gitian building distro explicitly in description files.

Tree-SHA512: d2a692047f3466a5c637433610854d1100fe68a78fb03b4a81c70911fa14b0228d9cf25bcf115930aab9cc8c5063dacaf79bcd151f1c3f6fee6419389aefcb8b
2019-03-16 13:26:48 +01:00
Hennadii Stepanov b8705a0915
Set 'distro' explicitly 2019-03-16 07:40:50 +02:00
MarcoFalke 118a5c8d94
Merge #15580: depends: native_protobuf: avoid system zlib
19a0c4af0f depends: native_protobuf: avoid system zlib (Carl Dong)

Pull request description:

  I don't believe we use any zlib features in protobufs

Tree-SHA512: cd09229f3fac215f58e9ddd4871f190cf2a301e25939aaa1c6ee130d1ba5bbb00d9ebe9ca012a2894bac4c2db923259f34fe43e255ad55ccd2b11ec88afc2a8f
2019-03-15 09:48:24 -04:00
John Newbery 92f3e808f6 [docs] release note for disabling reject messages by default 2019-03-15 09:16:12 -04:00
Jonas Schnelli d67f9d0db9
Merge #15577: Docs: Enable TLS in link to chris.beams.io
228e80608 Enable TLS in link to chris.beams.io (JeremyRand)

Pull request description:

  This PR enables TLS in a documentation link to chris.beams.io, which improves security.  This change was originally part of https://github.com/bitcoin/bitcoin/pull/13778 , which was closed for reasons unrelated to this change.

Tree-SHA512: 01f02031b39ebdaa7fc1859befde7e3bfff105892a8b9e1737ff94741599c6c5936eff53871e5e3560931512c9b7a4ea34f48d8555b583d232c90c2ca6d4d776
2019-03-15 13:57:26 +01:00
Glenn Willen faf3698808 wallet: Improve log output for errors during load
When loading the wallet, display the entire path in error messages, instead of
the name (which, for the default wallet, is the empty string.)

When an exception occurs during wallet loading, display e.what() if possible,
instead of nothing.
2019-03-14 18:49:19 -07:00
MarcoFalke b83c6f7940
Merge #15444: [docs] Additional productivity tips
ff7f31e07d [doc] productivity: more advanced git range-diff (Sjors Provoost)
3a21905a4e [doc] devtools: mention clang-format dependency (Sjors Provoost)
bf12093191 [doc] productivity: fix broken link (Sjors Provoost)

Pull request description:

  Fixes a broken link to `devtools/README.md`, points out the `clang-format` dependency and adds a `git range-diff` incantation that works even with rebases and squashes.

Tree-SHA512: 36e46282f1e28d1bf3f48ada995fbac548f61b7747091eb032b60919cf76c7bdad0fa8aecb0c47adbdaa9ef986d3ec7752b0bb94c63191401856e2ddeec48f3e
2019-03-14 17:02:28 -04:00
MarcoFalke fac1a0fe54
wallet: Remove unused GetLegacyBalance 2019-03-14 16:05:13 -04:00
MarcoFalke faa3a246e8
scripted-diff: wallet: Rename pcoin to wtx
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/const CWalletTx ?\* ?pcoin = &/const CWalletTx\& wtx = /g' src/wallet/wallet.cpp
sed -i -e 's/\<pcoin->/wtx./g' src/wallet/wallet.cpp
sed -i -e 's/\<pcoin\>/\&wtx/g' src/wallet/wallet.cpp
-END VERIFY SCRIPT-
2019-03-14 16:03:53 -04:00
MarcoFalke fa0f92af9a
build: depends: Switch to python3 2019-03-14 15:47:00 -04:00
Wladimir J. van der Laan 7fa1f6258c
Merge #15583: wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtree
15c69b158d wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtree (João Barbosa)

Pull request description:

  Use the `noexcept` members of `boost::filesystem::recursive_directory_iterator` in order to ignore `boost::filesystem::directory_iterator::construct: Permission denied` errors. The errors are logged though.

  Steps to reproduce the issue:

  ```sh
  # 1. create directory for -walletdir without read access:
  mkdir /tmp/foo && chmod a-r /tmp/foo

  # 2. run bitcoin-qt and should print an error, but continues running:
  /Volumes/Bitcoin-Core/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt -regtest -walletdir=/tmp/foo
  /private/tmp/foo: Permission denied

  # 4. go to File -> Open Wallet and should segfault:
  EXCEPTION: N5boost10filesystem16filesystem_errorE
  boost::filesystem::directory_iterator::construct: Permission denied: "/private/tmp/foo"
  bitcoin in Runaway exception
  ```

Tree-SHA512: 37e8bf5a1e0defc331030fd511bf9cac2765d01dfbf23e7233f37506e85b8ad07edcde9ba6dae7a2c95700c78d28c7dd248153607381852da96273cb159c4934
2019-03-14 18:58:43 +01:00
Patrick Strateman ef0019e054 Generate log entry when blocks messages are received unexpectedly. 2019-03-13 21:05:15 -04:00
Karl-Johan Alm 6c0a6f73e3
wallet/rpc: add maxfeerate parameter to sendrawtransaction 2019-03-14 08:48:46 +09:00
Karl-Johan Alm 7abd2e697c
wallet/rpc: add maxfeerate parameter to testmempoolaccept 2019-03-14 08:48:46 +09:00
João Barbosa 15c69b158d wallet: Log and ignore errors in ListWalletDir and IsBerkeleyBtree 2019-03-13 20:41:42 +00:00
MarcoFalke fae5f874d5
rpc: Document that minconf is an ignored dummy value 2019-03-13 14:43:55 -04:00
Wladimir J. van der Laan 8e1704c015
Merge #15559: doc: correct analyzepsbt rpc doc
335931df4a rpc: return a number for estimated_feerate in analyzepsbt (fanquake)
a4d0fd026b doc: correct analysepsbt rpc doc (fanquake)

Pull request description:

  Even though `missing` is optional, all its field are also all optional.

  `estimated_vsize` is optional (calculate alongside `estimated_feerate`).

  Make `estimated_feerate` output numeric.

Tree-SHA512: 5e063bcfbca73d3d08d29c5d1f59bc1791757f69248da4a9c70fe4b2fe82807ec4ed9fca48d439101d66ba924916fa5da9232167d74ea2b967fc04f0a36f190e
2019-03-13 12:18:19 +01:00
Wladimir J. van der Laan c3b1cb958f
Merge #15573: dead code: Remove dead option in HexStr conversion
56f1d28d9b dead code: Remove dead option in HexStr conversion (Lenny Maiorani)

Pull request description:

  Problem:
  - Nothing uses the `fspaces` argument to `HexStr()` besides unit
    tests. This argument results in extra complexity and a small
    performance decrease within the function.

  Solution:
  - Remove unused `fspaces` option.
  - Remove associated unit tests.

Tree-SHA512: 33d00ce354bbc62a77232fa301cdef0a9ed2c5a09e792bc40e9620c2f2f88636e322a38c76b81d10d12a1768dd1b3b2b9cf180f7e33daef9b4f27afed68ccf70
2019-03-12 13:11:26 +01:00
Wladimir J. van der Laan 59b291966e
Merge #15582: Fix overflow bug in analyzepsbt fee: CAmount instead of int
c9963ae8b1 Fix overflow bug in analyzepsbt fee: CAmount instead of int (Pieter Wuille)

Pull request description:

  This causes the `fee` and `estimated_feerate` values in the the analyzepsbt output to be off if the amount being spent exceed 21.47483647 BTC.

Tree-SHA512: 61c1e26894617c51cc5fc026a3677a0b759fcbac1e70efa7fdc68d57cfd484525e18c906f1b8c06fd5d846b74a3cb4bc0bbd302a6eeaade79055a47d6d0dacc2
2019-03-12 12:31:08 +01:00
Wladimir J. van der Laan e5770677de
Merge #15548: build: use full version string in setup.exe
fa55104cb8 build: use full version string in setup.exe (MarcoFalke)

Pull request description:

  Fixes: #15546

Tree-SHA512: a8ccbfef6b9fdd10bd0facadb25019b9296579eee6c8f7b4e5298cc4df52bba61864135ab8f46b900f7a3888fbcc921e039412d5a8127e44d8f2dd2c8fc56f86
2019-03-12 10:43:08 +01:00
fanquake 335931df4a
rpc: return a number for estimated_feerate in analyzepsbt 2019-03-12 07:17:42 +08:00
fanquake a4d0fd026b
doc: correct analysepsbt rpc doc 2019-03-12 07:17:22 +08:00
Pieter Wuille c9963ae8b1 Fix overflow bug in analyzepsbt fee: CAmount instead of int 2019-03-11 15:17:05 -07:00
Carl Dong 19a0c4af0f depends: native_protobuf: avoid system zlib 2019-03-11 13:05:58 -04:00
JeremyRand 228e80608d
Enable TLS in link to chris.beams.io 2019-03-11 16:03:49 +00:00
MarcoFalke c94852e791
Merge #15564: cli: remove duplicate wallet fields from -getinfo
3f6568d66b cli: remove duplicate wallet fields from -getinfo (fanquake)

Pull request description:

  `walletversion` and `balance` are both included below.

Tree-SHA512: cd9fe9739a2f492c8f7c0407b43a6fa95187f7e5318f05e080bac112f9f4333d2e9b84c505d098f8d66fa79439007d1c0b22e5a87d70bf5ea53ab647ee4c2046
2019-03-11 10:28:42 -04:00
MarcoFalke 887f57eb72
Merge #15566: cli: replace testnet with chain and return network name as per BIP70.
890396cbd5 cli: replace testnet with chain and return network name as per BIP70. (fanquake)

Pull request description:

  Related IRC discussion [here (line 151)](http://www.erisian.com.au/bitcoin-core-dev/log-2019-03-09.html).

Tree-SHA512: 8bdbacc7b8ce8bd2cc7c47aa9d73f2830a7c2e2ec43686430e3fba1a9db0e53a285467f26cde6dcc3bf948b7d6d59b9b7f184ce1a30a8970f39e5396dfc122f0
2019-03-11 10:26:46 -04:00
Lenny Maiorani 56f1d28d9b dead code: Remove dead option in HexStr conversion
Problem:
- Nothing uses the `fspaces` argument to `HexStr()` besides unit
  tests. This argument results in extra complexity and a small
  performance decrease within the function for branch evalulation.

Solution:
- Remove unused `fspaces` option.
2019-03-10 21:45:31 -06:00
Wladimir J. van der Laan 257f750cd9
Merge #15565: doc: remove release note fragments
6e1aaffa98 doc: remove release note fragments (fanquake)

Pull request description:

  Removes all release note fragments from prior to the 0.18.0 branch off.

  All of these fragments have been merged into the WIP release-notes on the [dev wiki](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/0.18.0-Release-Notes-Draft).

Tree-SHA512: ad991134bdb04c556bf9abf8211c253a65866e20e11ed111b5672270c138c5427608a56df6b155af3f0fd5bd7e8632b322d90dffc51b5d9bf742b85cf63c0c87
2019-03-09 10:35:44 +01:00
fanquake 3f6568d66b
cli: remove duplicate wallet fields from -getinfo 2019-03-09 16:40:46 +08:00
fanquake 890396cbd5
cli: replace testnet with chain and return network name as per BIP70. 2019-03-09 16:35:26 +08:00
fanquake 6e1aaffa98
doc: remove release note fragments
Removes all release note fragments from prior to the 0.18.0 branch off. All of these fragments have been merged into the WIP release-notes on the dev wiki.
2019-03-09 16:19:39 +08:00
Wladimir J. van der Laan 6b2ee268be
Merge #15562: doc: remove duplicate clone step in build-windows.md
5bd078876a doc: correct path in build-windows.md (Ferdinando M. Ametrano)

Pull request description:

  Replaces #15550, remove duplicate clone and `cd` into `bitcoin/`.

Tree-SHA512: d1f59906910b07c57f6aec75c89687a8cc2f0e677f9dac02b8fea5a4afd3f7903fabbf243403c239028e9bbf99aabfd36c8ebe8857956afeb06157ac546517e7
2019-03-09 08:13:27 +01:00
Wladimir J. van der Laan ff38148808
Merge #15486: [addrman, net] Ensure tried collisions resolve, and allow feeler connections to existing outbound netgroups
20e6ea259b [addrman] Improve collision logging and address nits (Suhas Daftuar)
f71fdda3bc [addrman] Ensure collisions eventually get resolved (Suhas Daftuar)
4991e3c813 [net] feeler connections can be made to outbound peers in same netgroup (Suhas Daftuar)
4d834018e3 [addrman] Improve tried table collision logging (Suhas Daftuar)

Pull request description:

  The restriction on outbound peers sharing the same network group is not intended to apply to feeler connections, so fix this.

  This fixes an issue where a tried table collision with an entry to a netgroup we already have an outbound connection to could cause feelers to stop working, because the tried collision buffer (`m_tried_collisions`) would never be drained.

  Also, ensure that all entries don't linger in `m_tried_collisions` by evicting an old entry if its collisions is unresolved after 40 minutes.

Tree-SHA512: 553fe2b01b82cd7f0f62f90c6781e373455a45b254e3bec085b5e6b16690aa9f3938e8c50e7136f19dafa250ed4578a26227d944b76daf9ce4ef0c75802389b6
2019-03-09 07:12:17 +01:00
Ferdinando M. Ametrano 5bd078876a
doc: correct path in build-windows.md
Co-authored-by: fanquake <fanquake@gmail.com>
2019-03-09 13:57:18 +08:00
Wladimir J. van der Laan 12408d33c6
Merge #15549: gitian: Improve error handling
32da92bdf6 gitian: Improve error handling (Wladimir J. van der Laan)

Pull request description:

  Improve error handling in gitian builds:

  - Set fail-on-error and pipefail flag, this causes a command to fail when either of the pipe stages fails, not only when the last of the stages fails, so this improves error detection.
  - Also use `xargs` instead of `find -exec`, because `find` will not propagate errors in the executed command, but `xargs` will.

  This will avoid some issues like #15541 where non-determinism is silently introduced due to errors caused by environment conditions (such as lack of disk space in that case).

Tree-SHA512: d5d3f22ce2d04a75e5c25e935744327c3adc704c2d303133f2918113573a564dff3d3243d5569a2b93ee7eb0e97f8e1b1ba81767e966af9015ea711a14091035
2019-03-09 06:45:19 +01:00
Wladimir J. van der Laan efed9809b4
Merge #15532: Remove sharp edge (uninit member) when using the compiler-generated ctor for BlockFilter
82c3b3f8e0 Remove sharp edge (uninitialized m_filter_type) when using the compiler-generated constructor for BlockFilter (practicalswift)

Pull request description:

  Remove sharp edge (uninitialised member `m_filter_type`) when using the compiler-generated constructor for `BlockFilter`.

  Before (but after added test):

  ```
  $ src/test/test_bitcoin -t blockfilter_tests/blockfilter_basic_test
  Running 1 test case...
  test/blockfilter_tests.cpp(118): error: in "blockfilter_tests/blockfilter_basic_test": check default_ctor_block_filter_1.GetFilterType() == default_ctor_block_filter_2.GetFilterType() has failed [ != ]

  *** 1 failure is detected in the test module "Bitcoin Test Suite"
  ```

  After:

  ```
  $ src/test/test_bitcoin -t blockfilter_tests/blockfilter_basic_test
  Running 1 test case...

  *** No errors detected
  ```

Tree-SHA512: 21d41f036b0bf12adcf1a788d84747353f2023cb85fd8ea6c97222967032e8bf54e7910cadb45dfcecd78e5b5dca86685f78cad0596b6d1a08f910ebf20d90aa
2019-03-08 15:26:28 +01:00
MarcoFalke 923d87497c
Merge #15528: contrib: Bump gitian descriptors for 0.19
fa58a2e335 contrib: Bump gitian descriptors for 0.19 (MarcoFalke)

Pull request description:

  Bump the cache directory (as in 263b3777e7)

Tree-SHA512: 2f9a4f8c14c3c6cef30bcdfed638486c6b957068b1e2380cbde1719c9bf8b53bcaff35833272a879af5b031e3ea0a32cc16f78cc7e4d7399037de89132311c5b
2019-03-08 09:12:03 -05:00
MarcoFalke fa55104cb8
build: use full version string in setup.exe 2019-03-07 15:14:25 -05:00
Jonas Schnelli d211edb349
Merge #15464: gui: Drop unused return values in WalletFrame
28c86de3b gui: Drop unused return values in WalletFrame (João Barbosa)

Pull request description:

  This is a small cleanup since the return value of `WalletFrame` methods are not used. This is in line with the usual async slot declaration.

Tree-SHA512: ff0ca098804118bba200a58cd796ff90e853a6430e58125bd178b7bfa9b2b763c13d17b81e8f3ebd94395cac249d80379ba1529680c47682ba6a2ed81492ba33
2019-03-07 21:04:28 +01:00
Wladimir J. van der Laan 3db0cc3947
Merge #15402: Granular invalidateblock and RewindBlockIndex
519b0bc5dc Make last disconnected block BLOCK_FAILED_VALID, even when aborted (Pieter Wuille)
8d220417cd Optimization: don't add txn back to mempool after 10 invalidates (Pieter Wuille)
9ce9c37004 Prevent callback overruns in InvalidateBlock and RewindBlockIndex (Pieter Wuille)
9bb32eb571 Release cs_main during InvalidateBlock iterations (Pieter Wuille)
9b1ff5c742 Call InvalidateBlock without cs_main held (Pieter Wuille)
241b2c74ac Make RewindBlockIndex interruptible (Pieter Wuille)
880ce7d46b Call RewindBlockIndex without cs_main held (Pieter Wuille)
436f7d735f Release cs_main during RewindBlockIndex operation (Pieter Wuille)
1d342875c2 Merge the disconnection and erasing loops in RewindBlockIndex (Pieter Wuille)
32b2696ab4 Move erasure of non-active blocks to a separate loop in RewindBlockIndex (Pieter Wuille)
9d6dcc52c6 Abstract EraseBlockData out of RewindBlockIndex (Pieter Wuille)

Pull request description:

  This PR makes a number of improvements to the InvalidateBlock (`invalidateblock` RPC) and RewindBlockIndex functions, primarily around breaking up their long-term cs_main holding. In addition:
  * They're made safely interruptible (`bitcoind` can be shutdown, and no progress in either will be lost, though if incomplete, `invalidateblock` won't continue after restart and will need to be called again)
  * The validation queue is prevented from overflowing (meaning `invalidateblock` on a very old block will not drive bitcoind OOM) (see #14289).
  * `invalidateblock` won't bother to move transactions back into the mempool after 10 blocks (optimization).

  This is not an optimal solution, as we're relying on the scheduler call sites to make sure the scheduler doesn't overflow. Ideally, the scheduler would guarantee this directly, but that needs a few further changes (moving the signal emissions out of cs_main) to prevent deadlocks.

  I have manually tested the `invalidateblock` changes (including interrupting, and running with -checkblockindex and -checkmempool), but haven't tried the rewinding (which is probably becoming increasingly unnecessary, as very few pre-0.13.1 nodes remain that would care to upgrade).

Tree-SHA512: 692e42758bd3d3efc2eb701984a8cb5db25fbeee32e7575df0183a00d0c2c30fdf72ce64c7625c32ad8c8bdc56313da72a7471658faeb0d39eefe39c4b8b8474
2019-03-07 17:40:58 +01:00
MarcoFalke 726d0668ff
Merge #15530: doc: Move wallet lock annotations to header
faebd2ef40 doc: Move wallet lock annotations to header (MarcoFalke)

Pull request description:

  We put the annotations in a central place (the header) as opposed to spreading them over the cpp files, where they easily get outdated.

Tree-SHA512: 18d8c7329efd3471713de18fe8d63d67c50fcb9fa99bc372294d829aa7668ea33e10d44e9e50121a04d8cc3302d5fd7759224f7935451a4693c4498a555257e6
2019-03-07 11:34:04 -05:00