Commit graph

19921 commits

Author SHA1 Message Date
John Newbery 1c29ac40fb [tests] style fixes in feature_pruning.py
Minor style fixups. No functional change.
2019-03-29 11:43:26 -04:00
MarcoFalke 3702e1c17b
Merge #15646: [tests] Add test for wallet rebroadcasts
529c1ae4a0 [tests] Add test for wallet rebroadcasts (John Newbery)

Pull request description:

  The existing wallet_resendwallettransactions.py test only tests the
  resendwallettransactions RPC. It does not test whether transactions are
  actually rebroadcast, or whether the rebroadcast logic is called on a
  timer.

  Update the test to not use the resendwallettransactions RPC and test
  that transactions are resent on a timer.

ACKs for commit 529c1a:
  MarcoFalke:
    re-utACK 529c1ae4a0

Tree-SHA512: 7341e7dd07cdc8ecbc08b1949121824148d2b58133a8e298ecdc5b7555713df3cecffb49854443cef9f033ef847cbf329e879a3bf57ab4e1fc733be432e9f718
2019-03-27 14:32:26 -04:00
John Newbery 529c1ae4a0 [tests] Add test for wallet rebroadcasts
The existing wallet_resendwallettransactions.py test only tests the
resendwallettransactions RPC. It does not test whether transactions are
actually rebroadcast, or whether the rebroadcast logic is called on a
timer.

This commit updates the test to not use the resendwallettransactions RPC and
test that transactions are rebroadcast on a timer.
2019-03-27 11:18:58 -04:00
MarcoFalke 656a15e539
Merge #15620: rpc: Uncouple non-wallet rpcs from maxTxFee global
fa1ad200d3 doc: Add release notes for 15620 (MarcoFalke)
fa96d76421 rpc: Uncouple rpcs from maxTxFee global (MarcoFalke)
fa965e03c7 rpc: Use IsValidNumArgs over hardcoded size checks (MarcoFalke)

Pull request description:

  This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.

  A follow up pull request will move `-maxtxfee` to the wallet.

  See also related discussions:

  * `-maxtxfee` should not be used by both node and wallet #15355
  *  [RFC] Long term plan for wallet command-line args #13044

ACKs for commit fa1ad2:
  jnewbery:
    utACK fa1ad200d3
  Empact:
    utACK fa1ad200d3
  jnewbery:
    utACK fa1ad200d3
  promag:
    utACK fa1ad20.

Tree-SHA512: c9cf0b54cd30ff3ab0d090b072cc38fcbb2840bc6ad9a9711995333bc927d2500aece6b5a60e061666eca5ed72b70aa318d21e51eb15ee0106b41f5b6e4e1adf
2019-03-27 09:01:53 -04:00
Wladimir J. van der Laan 848ec5603f
Merge #15643: contrib: gh-merge: Include ACKs in merge commit
fa1c073154 contrib: gh-merge: Include review comments in merge commit (MarcoFalke)

Pull request description:

  This includes all up-to-date ACKs in the merge commit for reference

Tree-SHA512: 32c9352d884f9ecf94940f50f2921fc9fc026083c120f54d0651a41814872e852aee8d0c4ad5bcd03292329f05d76fcb7bac11741e1dd3bf417211a186005afb
2019-03-27 11:55:17 +01:00
Wladimir J. van der Laan 208406038c
Merge #15519: Add Poly1305 implementation
e9d5e97561 Poly1305: tolerate the intentional unsigned wraparound in poly1305.cpp (Jonas Schnelli)
b34bf302f2 Add Poly1305 bench (Jonas Schnelli)
03be7f48fa Add Poly1305 implementation (Jonas Schnelli)

Pull request description:

  This adds a currently unused Poly1305 implementation including test vectors from RFC7539.

  Required for BIP151 (and related to #15512).

Tree-SHA512: f8c1ad2f686b980a7498ca50c517e2348ac7b1fe550565156f6c2b20faf764978e4fa6b5b1c3777a16e7a12e2eca3fb57a59be9c788b00d4358ee80f2959edb1
2019-03-27 11:53:15 +01:00
Jonas Schnelli e9d5e97561
Poly1305: tolerate the intentional unsigned wraparound in poly1305.cpp 2019-03-26 18:12:31 +01:00
Jonas Schnelli b34bf302f2
Add Poly1305 bench 2019-03-26 18:12:31 +01:00
Jonas Schnelli 03be7f48fa
Add Poly1305 implementation 2019-03-26 18:12:29 +01:00
MarcoFalke e14cd04abb
Merge #15637: rpc: Rename size to vsize in mempool related calls
e16b6a7188 rpc: Rename size to vsize in mempool related calls (Miguel Herranz)

Pull request description:

  #13008 rebased on `master`, with release notes split out.

  > In getmempoolancestors, getmempooldescendants, getmempoolentry and getrawmempool RPCs size returns the virtual transaction size as defined in BIP 141. Renaming it to vsize makes it consistent with returned value and other calls such as getrawtransaction.
  >
  > Related to #11218.

ACKs for commit e16b6a:
  MarcoFalke:
    re-utACK e16b6a7188
  jnewbery:
    utACK e16b6a7188

Tree-SHA512: ce95260fe7f280eacf4ff70bfffe02315c3a521b3b462a34e72a05b90733f40cc473319ac2df05d3e3c12cb7b1fbf2a1bbea632a8f979fff94207854cdbd494d
2019-03-26 12:56:14 -04:00
MarcoFalke 8a8b03ecd2
Merge #15603: docs: Add more tips to productivity.md
5801dd628d docs: Add more tips to productivity.md (gwillen)

Pull request description:

  Add advice to productivity.md on:
  - Using ccache to optimal effect
  - The with-incompatible-bdb configure option
  - Building less than the entire set of targets

ACKs for commit 5801dd:
  promag:
    utACK 5801dd6.
  MarcoFalke:
    utACK 5801dd6

Tree-SHA512: 2138acd4bf5a27ecaa9a02fb2141903d01ee199ba85ccf6a5ad6a0a4dabf4447d043108cdd86998801b0282e899f70892f9337b0b6dc59c6d1f0fccf61adb4e4
2019-03-25 18:26:41 -04:00
Miguel Herranz e16b6a7188
rpc: Rename size to vsize in mempool related calls 2019-03-24 12:01:43 +08:00
Wladimir J. van der Laan 7b13c64645
Merge #15642: [rpc] Remove deprecated rpc warnings
947f73ceba [docs] remove reference to signrawtransaction in the developer docs. (John Newbery)
7b6616b78b [rpc] Remove deprecated functionality message from validateaddress help (John Newbery)
839c3f7c49 [rpc] Remove signrawtransaction warning (John Newbery)

Pull request description:

  Removes some deprecated code from the RPCs:

  - signrawtransaction was deprecated in 0.17 and removed in 0.18. A warning message was left in place to advise users to use signrawtransactionwithwallet and signrawtransactionwithkey. That warning can now be removed.
  - validateaddress had some functionality deprecated in 0.17 and removed in 0.18. The help text for that functionality was not removed in 0.18 and can be removed now.

Tree-SHA512: 981678a697954ff2c392752e5a183b4b12c4eb94f55766ee1aa97a70d300668237db8fc5748c2772869d0155ba4a93e38817887b98160ee972a6f6ee94e3f7d9
2019-03-23 09:23:09 +01:00
gwillen 5801dd628d docs: Add more tips to productivity.md
Add advice to productivity.md on:
- Using ccache to optimal effect
- The with-incompatible-bdb configure option
- Building less than the entire set of targets
2019-03-22 12:39:17 -07:00
John Newbery 947f73ceba [docs] remove reference to signrawtransaction in the developer docs. 2019-03-22 15:18:20 -04:00
MarcoFalke 68520597cc
Merge #15631: qa: mininode: Clearer error message on invalid magic bytes
fab0a68aa2 qa: mininode: Clearer error message on invalid magic bytes (MarcoFalke)

Pull request description:

  Old message:
  ```
  ValueError: got garbage b'\xfa\xbf\xb5\xdafeefilter\x00\x00\x00\x08\x00\x00\x00\xe8\x0f\xd1\x9f\xe8\x03\x00\x00\x00\x00\x00\x00'
  ```

  New message:
  ```
  ValueError: magic bytes mismatch: b'\x00\x11"2' != b'\xfa\xbf\xb5\xdapong\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x97\xe6\x04\xd2\xff\x00\x00\x00\x00\x00\x00\x00'
  ```

ACKs for commit fab0a6:
  laanwj:
    Much better message, utACK fab0a68aa2

Tree-SHA512: 55854ef93d79c4f3219440e367fbcdf5db7b54c6530db0087fa8f8d9e786dac713f05da6f6c4c3cf29e18d07b4472f96a8ed894d66318e08cf8f208252199b70
2019-03-22 13:10:40 -04:00
MarcoFalke fa1c073154
contrib: gh-merge: Include review comments in merge commit 2019-03-22 12:03:04 -04:00
John Newbery 7b6616b78b [rpc] Remove deprecated functionality message from validateaddress help
This functionality was removed in v0.18.
2019-03-22 10:30:25 -04:00
John Newbery 839c3f7c49 [rpc] Remove signrawtransaction warning
signrawtransaction was deprecated in 0.17 and removed in 0.18. A warning
was left in place to tell users to migrate to using
signrawtransactionswithwallet or signrawtransactionwithkey. Remove the
warning now that it's been two releases since the method was removed.
2019-03-22 10:30:25 -04:00
Jonas Schnelli abd914ed34
Merge #15614: gui: Defer removeAndDeleteWallet when no modal widget is active
a10972bc0 gui: Defer removeAndDeleteWallet when no modal widget is active (João Barbosa)

Pull request description:

  Fixes #15310.

Tree-SHA512: ac91a4e37020d3a854830c50c0a7a45c2c0537f80be492ec5e9ba7daf90725e912f9dcc324605493599c36180e1d3bcdfa86840b7325cba208b7e93fbe7be368
2019-03-22 11:09:06 +01:00
João Barbosa a10972bc03 gui: Defer removeAndDeleteWallet when no modal widget is active 2019-03-22 09:51:04 +00:00
MeshCollider 717fd58c4b
Merge #15625: refactor: Remove unused function
bb6195e34 refactor: Remove unused function (practicalswift)

Pull request description:

  Last use removed in cad5dd2368.

Tree-SHA512: f65bf8f77b9aadbfba39bd80076a4d773eddf685a8a90ef2db549552a3d0ccd426ce3920b2f71954703f64d840fa88349957996d1f64a9c4d3f27a99b4da70e7
2019-03-21 21:00:25 +13:00
MeshCollider 2607d960a0
Merge #10973: Refactor: separate wallet from node
d358466de Remove remaining wallet accesses to node globals (Russell Yanofsky)
b1b2b2389 Remove use of CCoinsViewMemPool::GetCoin in wallet code (Russell Yanofsky)
4e4d9e9f8 Remove use of CRPCTable::appendCommand in wallet code (Russell Yanofsky)
91868e628 Remove use CValidationInterface in wallet code (Russell Yanofsky)

Pull request description:

  This PR is the last in a chain of PRs (#14437, #14711, and #15288) that make the wallet code access node state through an abstract [`Chain`](https://github.com/ryanofsky/bitcoin/blob/pr/wipc-sep/src/interfaces/chain.h) class in [`src/interfaces/`](https://github.com/ryanofsky/bitcoin/tree/pr/wipc-sep/src/interfaces) instead of using global variables like `cs_main`, `chainActive`, and `g_connman`. After this PR, wallet code no longer accesses global variables declared outside the wallet directory, and no longer calls functions accessing those globals (as verified by the `hide-globals` script in #10244).

  This PR and the previous PRs have been refactoring changes that do not affect behavior. Previous PRs have consisted of lots of mechanical changes like:

  ```diff
  -    wtx.nTimeReceived = GetAdjustedTime();
  +    wtx.nTimeReceived = m_chain->getAdjustedTime();
  ```

  This PR is smaller, but less mechanical. It replaces last few bits of wallet code that access node state directly (through `CValidationInterface`, `CRPCTable`, and `CCoinsViewMemPool` interfaces) with code that uses the `Chain` interface.

  These changes allow followup PR #10102 (multiprocess gui & wallet PR) to work without any significant updates to wallet code. Additionally they:

  * Provide a single place to describe the interface between wallet and node code.
  * Can make better wallet testing possible, because the `Chain` object consists of virtual methods that can be overloaded for mocking. (This could be used to test edge cases in the rescan code, for example).

Tree-SHA512: e6291d8a3c50bdff18a9c8ad11e729beb30b5b7040d7aaf31ba678800b4a97b2dd2be76340b1e5c01fe2827d67d37ed1bb4c8380cf8ed653aadfea003e9b22e7
2019-03-21 20:58:43 +13:00
Wladimir J. van der Laan b3f82284ba
Merge #15597: net: Generate log entry when blocks messages are received unexpectedly
ef0019e054 Generate log entry when blocks messages are received unexpectedly. (Patrick Strateman)

Pull request description:

  Currently these are incorrectly logged as an unknown command.

Tree-SHA512: dd272388a90b79897f8c1ea6d4c949323fcf75493f3a5b2ec9a26a2cf6a8ee743b497941702f21df8fae0f5b9481444363643379832dbd5053b0cc0b0363de04
2019-03-20 20:36:25 +01:00
Wladimir J. van der Laan bbc436e09e
Merge #15626: Docs: Update ACK description in CONTRIBUTING.md
0d9d2b385b Doc: update ACK description in CONTRIBUTING.md (Jon Atack)

Pull request description:

  as per https://github.com/bitcoin/bitcoin/pull/15617#issuecomment-474773043.

  Edit:

  as per https://github.com/bitcoin/bitcoin/pull/15617#issuecomment-474773043 and https://github.com/bitcoin/bitcoin/pull/15626#discussion_r267286564.

Tree-SHA512: 12df420d20338270bca310873c73d2f38b631c05cf8b3e5b2c1380f95936cb122687ba66b71de53348222efd5fed6d21e67f535a6ada689bf294dceec184a631
2019-03-20 20:11:47 +01:00
MarcoFalke 93623eea71
Merge #15623: refactor: Expose UndoReadFromDisk in header
fa11c036e9 refactor: Expose UndoReadFromDisk in header (MarcoFalke)

Pull request description:

  It is not possible to calculate the fee of a non-mempool transaction in RPCs unless txindex is active or the prevtxs are passed in through the RPC.

  Fix that issue for confirmed txs by exposing `UndoReadFromDisk` in the header file.

  This pull is a requirement for
  * rpc: faster getblockstats using BlockUndo data #14802
  *  Index for BIP 157 block filters #14121
  * my local patches

Tree-SHA512: 859ea5f2dfb4feac612b50faeb0e2b6c07b83f1d983e519d7647a78058d85c0390fd09ec66b460ae7a4c3b273e81b0013ee9f4bb8dfba0c4782ffaa1fa453ea6
2019-03-20 12:28:18 -04:00
Jon Atack 0d9d2b385b
Doc: update ACK description in CONTRIBUTING.md
as per https://github.com/bitcoin/bitcoin/pull/15617#issuecomment-474773043 and https://github.com/bitcoin/bitcoin/pull/15626#discussion_r267286564.
2019-03-20 12:10:35 +01:00
Wladimir J. van der Laan 81f732bcaa
Merge #15617: p2p: Do not relay banned IP addresses
054d01d0a8 Do not relay banned IP addresses (Pieter Wuille)

Pull request description:

Tree-SHA512: 538c43781c789949e1ae566533e76835d478e40e8ba6427b22234ee611cb4a311b2940a214e37c1e9c9afe28a6814a00d490a39e3580bb5ebd85b03e95040246
2019-03-20 11:38:08 +01:00
practicalswift bb6195e34d refactor: Remove unused function 2019-03-20 10:51:15 +01:00
MarcoFalke fab0a68aa2
qa: mininode: Clearer error message on invalid magic bytes 2019-03-19 17:14:12 -04:00
MarcoFalke fa1ad200d3
doc: Add release notes for 15620 2019-03-19 17:06:43 -04:00
MarcoFalke fa11c036e9
refactor: Expose UndoReadFromDisk in header 2019-03-19 14:20:43 -04:00
Wladimir J. van der Laan e45b7f20e6
Merge #15618: refactor: Remove unused function
fa5c511a83 refactor: Remove unused function (MarcoFalke)

Pull request description:

  Oversight of kallewoof and mine in https://github.com/bitcoin/bitcoin/pull/13541#discussion_r266555476

Tree-SHA512: 2fd3c4ecde5d3c58b113aa58d606976ceb4998358bde0547ead8e83df210722fa9821d2c88b717bdd190ef71593cd9c0154c3a5d3f2ccc3af8cbf6c36aaa6d45
2019-03-18 20:06:11 +01:00
MarcoFalke fa96d76421
rpc: Uncouple rpcs from maxTxFee global 2019-03-18 13:56:56 -04:00
MarcoFalke fa965e03c7
rpc: Use IsValidNumArgs over hardcoded size checks 2019-03-18 13:55:19 -04:00
MarcoFalke fa5c511a83
refactor: Remove unused function 2019-03-18 13:30:55 -04:00
MarcoFalke c033c4b5ce
Merge #13541: wallet/rpc: sendrawtransaction maxfeerate
7abd2e697c wallet/rpc: add maxfeerate parameter to testmempoolaccept (Karl-Johan Alm)
6c0a6f73e3 wallet/rpc: add maxfeerate parameter to sendrawtransaction (Karl-Johan Alm)
e5efacb941 test: Refactor vout fetches in rpc_rawtransaction (Karl-Johan Alm)

Pull request description:

  This adds a new `maxfeerate` parameter to `sendrawtransaction` which forces the node to reject a transaction whose feerate is above the given fee rate.

  This is a safety harness from shooting yourself in the foot and accidentally overpaying fees.

  See also #12911.

Tree-SHA512: efa50134a7c17c9330cfdfd48ba400e095c0a419cc45e630618d8b44929c25d780d1bb2710c1fbbb6e687eca373505b0338cdaa7f2ff4ca22636d84c31557a2e
2019-03-18 13:22:15 -04:00
MarcoFalke 2c336a9ccd
Merge #15581: depends: Make less assumptions about build env
f7696e6183 depends: qt: Don't hardcode pwd path (Carl Dong)
89bee1bdbf depends: tar: Always extract as yourself (Carl Dong)
340ef50772 depends: Defer to Python detected by autoconf (Carl Dong)

Pull request description:

  Removes some implicit assumptions that the depends system has about its environment and, as a side-effect, makes it possible to build the depends tree under severely privilege-limited environments such as containers built by Guix.

Tree-SHA512: e8618f9310a0deae864b44f9b60baa29e6225ba16817973ff7830b55798ebd4343aa06da6c1f92682a7afb709d26f80d6ee794a139d4d44c27caf4f0c8fe95fc
2019-03-18 11:31:09 -04:00
MarcoFalke 27781b6530
Merge #15466: tests: Print remaining jobs in test_runner.py
2e5d482659 tests: Print remaining jobs in test_runner.py (Steven Roose)

Pull request description:

  This helps finding out which tests fail to finish.

Tree-SHA512: d22beb82beecd33aaa50731c83075e49577842d29fd21aa63bcb859df5da99069eba9cc16eed5d91dbba8fb0fdc317fb88b3b370c4d3917e9da1cd13b0a622dc
2019-03-18 11:26:04 -04:00
Carl Dong f7696e6183 depends: qt: Don't hardcode pwd path
Let a man use his builtins if he wants to! Also, removes the unnecessary
assumption that pwd lives under /bin/pwd.
2019-03-18 11:05:17 -04:00
Carl Dong 89bee1bdbf depends: tar: Always extract as yourself
For normal users, --no-same-owner is default, but not so for root, where
it is assumed that root can change ownership willy-nilly. This is not
the case for privilege-limited container environments where we gaslight
the process into thinking it's root.
2019-03-18 11:05:17 -04:00
Carl Dong 340ef50772 depends: Defer to Python detected by autoconf
Since autoconf already detects the correct python binary path, we should
use that instead of going around it. Also has the benefit of working in
extremely restricted environments where /usr/bin/env might not be
available.
2019-03-18 11:05:17 -04:00
MeshCollider 7ec7aea442
Merge #15491: wallet: Improve log output for errors during load
faf369880 wallet: Improve log output for errors during load (Glenn Willen)

Pull request description:

  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.

Tree-SHA512: 435247628db669579bb694ba4b53ba174fe42c0329fc72f09fc274bb28463ee69f53412abb2a3b45bb8f59f7eb928c0167e397b8d0a514135142192a87294614
2019-03-18 20:34:55 +13:00
Pieter Wuille 054d01d0a8 Do not relay banned IP addresses 2019-03-17 22:05:49 -07: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