Commit graph

21275 commits

Author SHA1 Message Date
Elichai Turkel
afc0966d72
Moved and renamed hash256 from util.py to zmq_interface.py 2019-08-13 15:39:46 -04:00
Emil Engler
14f7eec3bd
rpc: Fix getblocktemplate CLI example (#16594) 2019-08-13 18:25:58 +02:00
Martin Zumsande
7cd069d8ef Add test for AddTimeData 2019-08-13 17:04:10 +02:00
MarcoFalke
fa1e9c68a7
travis: Bump timeout from 50 minutes to 90 2019-08-13 10:03:20 -04:00
fanquake
b799ebcc17
Merge #16566: util: refactor upper/lowercase functions
0481fa2584 util: refactor upper/lowercase functions (Karl-Johan Alm)

Pull request description:

  This includes renaming Downcase() to ToLower() and make it return a string rather than modify referenced arg.
  Also adds ToUpper() string version.

  Additionally, it clarifies that the locale independency of the case functions is a *feature* and not a limitation. I interpreted it as the latter and rewrote code to be locale-aware before realizing this.

  This is done in preparation for #11413 and as a general refactor. I don't think the optimization that the pre-refactor state gave warrants the unwieldy usage.

ACKs for top commit:
  laanwj:
    ACK 0481fa2584 from me
  practicalswift:
    ACK 0481fa2584 -- diff looks correct
  l2a5b1:
    ACK 0481fa2 - Although, I think @luke-jr's [feedback](https://github.com/bitcoin/bitcoin/pull/16566#issuecomment-519580760) is spot on; `Downcase` is just an artifact of `ParseNetwork`, which has been happily downcasing `net` via a string argument for over 7 years; and I do recommend to add `ToLower` *when* somebody actually needs it in new work, there is no point in keeping a trivial utility function if it is not appreciated.
  promag:
    ACK 0481fa2584.

Tree-SHA512: 9b834ecc1b97db043e261bcbc59e42372e11e2fb9a6943688f18a835bf5c9205f68e4614f58e90ba260d1b8f0e060c6f67b390b62436c21b56891db23bc41628
2019-08-13 12:28:22 +08:00
MarcoFalke
fa7789f731
doc: Mention other ways to conserve memory on compilation 2019-08-12 16:22:09 -04:00
MarcoFalke
fa4ee0ddf1
build: Remove unused src/obj-test folder 2019-08-12 15:32:46 -04:00
MarcoFalke
b499d8576f
Merge #16557: [wallet] restore coinbase and confirmed/conflicted checks in SubmitMemoryPoolAndRelay()
c8b53c3bea [wallet] Restore confirmed/conflicted tx check in SubmitMemoryPoolAndRelay() (John Newbery)
214c4ecb9a [wallet] restore coinbase check in SubmitMemoryPoolAndRelay() (John Newbery)

Pull request description:

  These checks don't change mempool acceptance/relay behaviour, but reduce log spam.

ACKs for top commit:
  MarcoFalke:
    ACK c8b53c3bea (non-doc changes are mostly a git revert 8753f5652b)
  ariard:
    utACK c8b53c3

Tree-SHA512: f928573ad68d2f70ac69a84b57f352d255dccd1942097cc664f130fcbdcdd7364bc52c43b9157e65ebbaaebbe93586c6e8386f24361b27478e0a23a445677672
2019-08-12 13:49:58 -04:00
Wladimir J. van der Laan
00dad5e0e1
Merge #16581: sipsorcery gitian key
9063911017 sipsorcery gitian key. (Aaron Clauson)

Pull request description:

ACKs for top commit:
  laanwj:
    ACK 9063911017
  fanquake:
    Concept ACK 9063911017

Tree-SHA512: 98b5bb8aa29a8a4c84c204672b5125bbdbdd5a596b03cc7c7a65f3c6cd76337e66929e03d7b2cbe3c7ac1925343f388fd3bf483da0373fd80e8b30957c48dc74
2019-08-12 14:24:21 +02:00
Jonas Schnelli
9059a6f248
Merge #16349: qt: Remove redundant WalletController::addWallet slot
6285a318d7 Remove redundant WalletController::addWallet slot (Hennadii Stepanov)

Pull request description:

  ~~Fix #15453.~~ It is fixed by https://github.com/bitcoin/bitcoin/pull/16348#issuecomment-509308347

  The _only_ reason of these lines on master (8c69fae944)
  2679bb8919/src/qt/walletcontroller.cpp (L121-L128)
  is to `Q_EMIT walletAdded(wallet_model);` in a thread-safe manner;

  This PR makes this in a line of code:
  1b83875006/src/qt/walletcontroller.cpp (L121)

  EDITED:
  To establish the ownership of a new `WalletModel` object is not necessary on the master (https://github.com/bitcoin/bitcoin/pull/16349#discussion_r301679192 by **promag**).
  But:
  > it's good habit to set ownership

  And I agree. It is a safe practice.

ACKs for top commit:
  promag:
    ACK 6285a318d7.
  jonasschnelli:
    utACK 6285a318d7
  ryanofsky:
    utACK 6285a318d7. Only change since last review is rebasing and restoring a deleted comment. I do think the comments I suggested last review would be better than this one, but this is at least better than before.

Tree-SHA512: 90370cb1fe853b84dd16c3781ba4f97f3f4deca56bba0203e457f37b3220fd13228cf8495fd882ff18b7c782c27544cc2e7a88aaec5b69b9ef6d8626bdaaf332
2019-08-12 14:15:56 +02:00
fanquake
ac3e65204a
Merge #16585: doc: Update Markdown syntax for bdb packages
1f26328c1b doc: Update Markdown syntax for bdb packages (Emil Engler)

Pull request description:

  This pull requests adds single back quotes to libdb-dev and libdb++-dev.
  The reason for this is that I (and probably others) overlook them too often and they look like normal text because they have no style.

ACKs for top commit:
  fanquake:
    ACK 1f26328c1b

Tree-SHA512: cd52e34f5b063f9d4337e1fcb04459d2c40be47afe5118c27d949a521980413aefe3ecb862b7b427e576c7690b999f7abdd53193e1b110c3f64a4cd1c3a41cbc
2019-08-12 07:50:30 +08:00
Emil Engler
1f26328c1b
doc: Update Markdown syntax for bdb packages 2019-08-11 23:07:59 +02:00
nicolas.dorier
c5b404e8f1
Add functional tests for flexible whitebind/list 2019-08-11 11:33:29 +09:00
nicolas.dorier
d541fa3918
Replace the use of fWhitelisted by permission checks 2019-08-11 11:33:28 +09:00
nicolas.dorier
ecd5cf7ea4
Do not disconnect peer for asking mempool if it has NO_BAN permission 2019-08-11 11:33:27 +09:00
nicolas.dorier
e5b26deaaa
Make whitebind/whitelist permissions more flexible 2019-08-11 11:33:27 +09:00
Aaron Clauson
9063911017
sipsorcery gitian key. 2019-08-10 05:39:47 +02:00
Andrew Chow
a2714a5c69 Give QApplication dummy arguments
QApplication takes the command line arguments and parses them itself
for some built in command line arguments that it has. We don't want
any of those built in arguments, so instead give it dummy arguments.
2019-08-09 15:47:37 -04:00
Wladimir J. van der Laan
e47e36cb49
Merge #16573: build: disable building libsecp256k1 benchmarks
bf72b8a555 build: disable libsecp256k1 benchmarks (fanquake)

Pull request description:

  These were previously disabled, but upstream changed to having benchmarks enabled by default
  in https://github.com/bitcoin-core/secp256k1/pull/480 and we pulled that change in as part of #15703.

ACKs for top commit:
  laanwj:
    ACK bf72b8a555
  real-or-random:
    ACK bf72b8a555 I only looked at the diff
  practicalswift:
    ACK bf72b8a555 -- diff looks correct

Tree-SHA512: f4c99c774c8bfd37f98fa200667530988ef8da61920fafdff7e929d9dc5dd8304981b625611f6c3fbc525172d269a2a1d33e592297bd8ff418dff11b05b5e204
2019-08-09 20:58:25 +02:00
John Newbery
c8b53c3bea [wallet] Restore confirmed/conflicted tx check in SubmitMemoryPoolAndRelay()
Restores the confirmed/conflicted tx check removed in
8753f5652b. There should be no external
behaviour change (these txs would not get accepted to the mempool
anyway), but not having the check in the wallet causes log spam.

Also adds a comment to ResentWalletTransactions() that
confirmed/conflicted tx check is done in SubmitMemoryPoolAndRelay().
2019-08-09 11:07:30 -04:00
MarcoFalke
9ab9d63569
Merge #16503: Remove p2pEnabled from Chain interface
b7b9f6e4ce Remove p2pEnabled from Chain interface (Antoine Riard)

Pull request description:

  RPC server starts in warmup mode, it can't process yet calls, then follows connection manager initialization and finally RPC server get out of warmup mode. RPC calls shouldn't be able to get P2P disabled errors because once we initialize g_connman it's not unset until shutdown, after RPC server has been stopped.

  @mzumsande comment in #15713 let me thought that `p2pEnabled` was maybe useless, `g_connman` is always initialized before RPC server is getting out of warmup. These checks against P2P state were introduced in 5b446dd5b1.

ACKs for top commit:
  promag:
    ACK b7b9f6e4ce
  jnewbery:
    ACK b7b9f6e4ce

Tree-SHA512: 4de2b9fc496bf8347ff5cc645848a5a44c8ca7596cd134f17f3088f5f8262d1d88b8e2a052df93e309ec9a81956a808df17a9eb9f10d4f4d693c95d607fe3561
2019-08-09 09:47:35 -04:00
fanquake
32776276ef
Merge #16574: doc: Add historical release notes for 0.18.1
61c5c64b31 doc: Add historical release notes for 0.18.1 (Wladimir J. van der Laan)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK 61c5c64b31

Tree-SHA512: d98011ee79ae9fb69bd4c0d408b87fd05c640e35683b44bacbb49dbc7e66ebb754f46edd268af611b3fd1c171c2a723d516a21099bd6fd015491f0f4119ca33e
2019-08-09 21:19:18 +08:00
Wladimir J. van der Laan
61c5c64b31 doc: Add historical release notes for 0.18.1 2019-08-09 13:22:15 +02:00
fanquake
bf72b8a555
build: disable libsecp256k1 benchmarks
These were previously disabled, but upstream changed to having benchmarks enabled by default
in https://github.com/bitcoin-core/secp256k1/pull/480 and we pulled that change as part of #15703.
2019-08-09 11:12:51 +08:00
Antoine Riard
b7b9f6e4ce Remove p2pEnabled from Chain interface
RPC server starts in warmup mode, it can't
process yet calls, then follows connection manager
initialization and finally RPC server get out of
warmup mode. RPC calls shouldn't be able to get
P2P disabled errors because once we initialize
g_connman it's not unset until shutdown, after
RPC server has been stopped.
2019-08-08 22:57:35 -04:00
Jeremy Rubin
2dbfb37b40 Fix Char as Bool in interfaces 2019-08-08 16:18:30 -07:00
Karl-Johan Alm
0481fa2584
util: refactor upper/lowercase functions
This includes renaming Downcase() to ToLower() and make it return a string rather than modify referenced arg.
Also adds ToUpper() string version.
2019-08-08 11:35:14 +09:00
Pieter Wuille
26d3fad109 Add unmodified-but-with-checksum to getdescriptorinfo 2019-08-06 17:11:12 -07:00
Pieter Wuille
104b3a5069 Factor out checksum checking from descriptor parsing 2019-08-06 17:11:12 -07:00
John Newbery
214c4ecb9a [wallet] restore coinbase check in SubmitMemoryPoolAndRelay()
This check doesn't change mempool acceptance/relay behaviour, but reduces log spam.
2019-08-06 14:38:34 -04:00
James O'Beirne
fae6ab6aed refactor: pcoinsTip -> CChainState::CoinsTip()
This aliasing makes subsequent commits easier to review; eventually CoinsTip()
will return the CCoinsViewCache managed by CChainState.
2019-08-06 13:13:06 -04:00
MarcoFalke
e5fdda68c6
Merge #16554: test: only include and use OpenSSL where it's actually needed (BIP70)
2f37163caf test: only include and init openSSL where it's actually used (fanquake)

Pull request description:

  This should save initializing OpenSSL during tests if compiled with `--disable-bip70`.

ACKs for top commit:
  laanwj:
    straightforward ACK 2f37163caf

Tree-SHA512: 513e867718c79b014b4d470404c891d83c21df92eed07abaccd89b88a32f8b801e402e7d0d400c49c1b964f4b76409ca17fb90bde2e2c45dcf8a1897b452683f
2019-08-06 08:49:34 -04:00
MarcoFalke
b725979a11
Merge #16535: test: Explain why -whitelist is used in feature_fee_estimation
fa76285fdd test: Explain why -whitelist is used in feature_fee_estimation (MarcoFalke)
faff85a69a test: Format feature_fee_estimation with pep8 (MarcoFalke)

Pull request description:

ACKs for top commit:
  practicalswift:
    ACK fa76285fdd -- diff looks correct
  Sjors:
    ACK fa76285, every bit of clarification helps. It's clear that without `-whitelist` the test becomes extremely slow (it does pass).

Tree-SHA512: 13ec7e4cd0409e7bb76cbcd344e31c0f612c8ce4a1f1ec6ceaedf345f634bc09786ed38d38920c3469b2862c856ee3e5e42534ef90f531bd8dc83c3db3c06417
2019-08-06 08:34:07 -04:00
fanquake
3303124960
build: disable libxcb extensions
Because we pass -qt-xcb to Qt, it will compile in a set of xcb helper libraries and extensions.
So skip building all of the libxcb extensions when we build libcxb in depends.

More info is available  here: https://doc.qt.io/qt-5.9/linux-requirements.html
2019-08-06 16:53:36 +08:00
fanquake
2f37163caf
test: only include and init openSSL where it's actually used 2019-08-06 16:50:42 +08:00
fanquake
fbe4b7665b
Merge #16530: doc: Fix grammar and punctuation in developer notes
b2ea20d330 doc: Fix grammar and punctuation in developer notes (Kristian Kramer)

Pull request description:

  This pull request is regarding minor grammar and punctuation errors in the developer notes. There were no modifications to the existing code, only alterations to fix the grammar and punctuation in the text to make the developer notes more understandable and easier to read.

ACKs for top commit:
  fanquake:
    ACK b2ea20d330

Tree-SHA512: eef990b7e7645b44a1ab0b057f4df35894c307fd23cc861a10d3cc80e7fe7fe8f5b94467f8224cc8a7aaa226f82be3a1f0460a45f3e25e5dab1e1d333c9edbc0
2019-08-06 09:54:08 +08:00
fanquake
31d98584f3
Merge #16497: gui: Generate bech32 addresses by default (take 2, fixup)
fa5a4cd813 gui: Generate bech32 addresses by default (take 2, fixup) (MarcoFalke)

Pull request description:

  This commit was missing from my previous pull request for some reason 🤔 :

  *    gui: Generate bech32 addresses by default #15711

ACKs for top commit:
  jonasschnelli:
    Tested ACK fa5a4cd813
  promag:
    ACK fa5a4cd813.
  fanquake:
    ACK fa5a4cd813

Tree-SHA512: 4a38df929d7704bf08e50a2e814b2e6cd25c4165d040a84287045b44e32f4708750845520d64170ea58e41de3ca496da4625d3eb375f9528b21b364c22068a6b
2019-08-06 09:39:26 +08:00
MarcoFalke
62117f9f36
Merge #16363: test: Add test for BIP30 duplicate tx
fa8489a155 test: Add test for BIP30 duplicate tx (MarcoFalke)
77770d95e2 test: Properly serialize BIP34 coinbase height (MarcoFalke)

Pull request description:

  This adds a test for BIP30 to check that duplicate txs can exist in the blockchain given the first one was completely spent when the second one is added. (Requested by ajtowns in https://github.com/bitcoin/bitcoin/pull/16333#issuecomment-508604071)

  We can not add a test that a later duplicate tx overwrites a previous one, because BIP30 is always enforced on regtest. If someone feels strongly about such a test, some Bitcoin Core code would have to be modified, which can be done in a follow up pull request.

  Also, add a commit to fix the BIP34 test failures reported in https://github.com/bitcoin/bitcoin/pull/14633#issue-227712540

ACKs for top commit:
  laanwj:
    Code review ACK fa8489a155

Tree-SHA512: c707d0bdc93937263876b603425b53322a2a9f9ec3f50716ae2fa9de8ddc644beb22b26c1bfde7f4aab102633e096b354ef380db919176bd2cb44a2828f884aa
2019-08-05 08:16:18 -04:00
MarcoFalke
d5ea8f4bf3
Merge #16509: test: Adapt test framework for chains other than "regtest"
faf36838bd test: Avoid hardcoding the chain name in combine_logs (MarcoFalke)
fa8a1d7ba3 test: Adapt test framework for chains other than "regtest" (MarcoFalke)
68f546635d test: Fix “local variable 'e' is assigned to but never used” (Ben Woosley)

Pull request description:

  This is required for various work in progress:

  * testchains #8994
  * signet #16411
  * some of my locally written tests

  While it will be unused in the master branch as of now, it will make all of those pull requests shorter. Thus review for non-regtest tests can focus on the actual changes and not some test framework changes.

ACKs for top commit:
  jonatack:
    ACK faf36838bd, ran tests and reviewed the code.

Tree-SHA512: 35add66c12cab68f2fac8f7c7d47c604d3f24eae9336ff78f83e2c92b3dc08a25e7f4217199bac5393dd3fb72f945bba9c001d6fbb8efd298c88858075fcb3d6
2019-08-05 08:08:18 -04:00
MarcoFalke
c77f7cdbd1
Merge #16197: net: Use mockable time for tx download
fab3658356 [qa] Test that getdata requests work as expected (Suhas Daftuar)
fa883ab35a net: Use mockable time for tx download (MarcoFalke)

Pull request description:

  Two commits:

  * First commit changes to mockable time for tx download (refactoring, should only have an effect on regtest)
  * Second commit adds a test that uses mocktime to test tx download

ACKs for top commit:
  laanwj:
    code review ACK 16197/commits/fab365835639a3da03f8ad9a58a0db6c6c4c2314
  jamesob:
    ACK fab3658356

Tree-SHA512: 3a64a3e283ec4bab1f6e506404b11f0a564a5b61d2a7508ae738a61f035e57220484c66e0ae47d847fe9f7e3ff5cc834909d7b34a9bbcea6abe01f8742806908
2019-08-05 08:01:28 -04:00
MarcoFalke
fa0b910486
[doc] chain: Declare BLOCK_VALID_HEADER reserved 2019-08-05 07:58:58 -04:00
MarcoFalke
1063fc9cf9
Merge #16536: doc: Update and extend benchmarking.md
05fdb97df4 [doc] Update and extend benchmarking.md (Antoine Riard)

Pull request description:

  Trying to make benchmarking docs a bit more friendly.

  If you have any more ideas, specially on the Notes section, which component need more benchmarks.

  (oh isn't a write-up somewhere to generate flame graphs for core ?)

ACKs for top commit:
  jonatack:
    ACK 05fdb97df4
  fanquake:
    ACK 05fdb97df4 - with the single nit.

Tree-SHA512: 1d31438065cab12b43b0227c1c774b412ac3d9d46d4cbe69cfe753424a81e51839777e815c70880da8ae6c8fb95221dc7559334eeb550221e8a76fb20a370f75
2019-08-05 07:54:53 -04:00
MarcoFalke
6b6386e854
Merge #16538: test: Add missing sync_blocks to feature_pruning
fa566b2601 test: Add missing sync_blocks to feature_pruning (MarcoFalke)

Pull request description:

  Fixes #16537
  Fixes #16520

ACKs for top commit:
  promag:
    ACK fa566b2601.
  jonatack:
    ACK fa566b2601. These past few months I have been seeing intermittent failures with this test on master. Ran `(for i in {1..40}; do test/functional/feature_pruning.py -l=debug; done)` overnight with this change; no failures.

Tree-SHA512: 5181d5ea525f43ad09e1c8b9ae72e32219f483948854c6dc07dda24b790cbdf4012e586253a0e158a71a980d1ca9f5fdf06aafbe95b8ea3d9154ef2c8687395b
2019-08-05 07:48:45 -04:00
fanquake
e55444a2a8
Merge #16534: build: add Qt Creator Makefile.am.user to .gitignore
0a4e4a05ea [build] .gitignore add Qt Creator Makefile.am.user (Peter Bushnell)

Pull request description:

  Opening Bitcoin with Qt Creator via the Makefile.am generates a Makefile.am.user. Would be handy to have this file ignored. Looking around I can see this file has snuck into a few downstream projects. I do personally find myself editing commits to remove this file when I've not been paying attention. There's got to have been a few PRs with this file accidentally attached.

ACKs for top commit:
  promag:
    ACK 0a4e4a05ea.
  practicalswift:
    ACK 0a4e4a05ea -- diff looks correct
  fanquake:
    ACK 0a4e4a05ea - Something like this might be better in your local .gitignore_global, but we do have a section on Qt Creator in the docs, so I guess this is fine.

Tree-SHA512: 282fd37ec6b313bf86ebe85a42e7f05b14969c683d32f01d2561f4e15d90a2e89f4d0e3c227cb3350684bcae21d178ea343edb32c4c1d33f4849246222c9b8d5
2019-08-04 09:00:58 +08:00
Kristian Kramer
b2ea20d330 doc: Fix grammar and punctuation in developer notes
This pull request is regarding minor grammar and punctuation errors in the developer notes. There were no modifications to the existing code, only alterations to fix the grammar and punctuation in the text.

Update developer-notes.md

Update developer-notes.md

Revert "Update developer-notes.md"

This reverts commit dfeb0bacb054ed24766f8af7bae0c0166b0cb4cb.
2019-08-03 09:30:37 -06:00
MarcoFalke
fa566b2601
test: Add missing sync_blocks to feature_pruning 2019-08-02 15:36:06 -04:00
Antoine Riard
05fdb97df4 [doc] Update and extend benchmarking.md 2019-08-02 13:33:13 -04:00
MarcoFalke
3a3d8b8357
Merge #16097: Refactor: Add Flags enum to ArgsManager class
e6f649cb2c test: Make tests arg type specific (Hennadii Stepanov)
b70cc5d733 Revamp option negating policy (Hennadii Stepanov)
db08edb303 Replace IsArgKnown() with FlagsOfKnownArg() (Hennadii Stepanov)
dde80c272a Use ArgsManager::NETWORK_ONLY flag (Hennadii Stepanov)
9a12733508 Remove unused m_debug_only member from Arg struct (Hennadii Stepanov)
fb4b9f9e3b scripted-diff: Use ArgsManager::DEBUG_ONLY flag (Hennadii Stepanov)
1b4b9422ca scripted-diff: Use Flags enum in AddArg() (Hennadii Stepanov)
265c1b58d8 Add Flags enum to ArgsManager (Hennadii Stepanov)
e0d187dfeb Refactor InterpretNegatedOption() function (Hennadii Stepanov)
e0e18a1017 refactoring: Check IsArgKnown() early (Hennadii Stepanov)

Pull request description:

  This PR adds the `Flags` enum to the `ArgsManager` class. Also the `m_flags` member is added to the `Arg` struct. Flags denote an allowed type of an arg value and special hints.

  This PR is only a refactoring and does not change behavior.

ACKs for top commit:
  jamesob:
    ACK e6f649cb2c
  MarcoFalke:
    ACK e6f649cb2c thanks for adding types to the command line options

Tree-SHA512: b867f8a9cbce2d2473c293d534af662d8cd5be15060ff0682e97af678974bdaac35e8bc6328ccba32f105034bcd38f169b92a6fb67798667891ce14d5d2a2dea
2019-08-02 12:18:16 -04:00
MarcoFalke
fa76285fdd
test: Explain why -whitelist is used in feature_fee_estimation
Also, Remove seemingly unused and undocumented -maxorphantx=1000
2019-08-02 11:16:24 -04:00
MarcoFalke
faff85a69a
test: Format feature_fee_estimation with pep8 2019-08-02 11:08:07 -04:00