Commit Graph

16999 Commits

Author SHA1 Message Date
UdjinM6
20d59e1df5
Merge pull request #3102 from codablock/pr_pr_backports_v15_v16_2
Backport Bitcoin 0.16 PRs which were backported into 0.15 - part1
2019-09-24 12:39:40 +03:00
UdjinM6
9f1ee8c70a
scripted-diff: Refactor llmq type consensus param names (#3093)
-BEGIN VERIFY SCRIPT-
sed -i 's/llmqChainLocks/llmqTypeChainLocks/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/llmqForInstantSend/llmqTypeInstantSend/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
2019-09-24 12:38:50 +03:00
Wladimir J. van der Laan
f7a6790623 Merge #10854: Avoid using sizes on non-fixed-width types to derive protocol constants.
095b917 Avoid using sizes on non-fixed-width types to derive protocol constants. (Gregory Maxwell)

Pull request description:

  Thanks to awemany for pointing this out.

  This replaces #10172 which appears to be abandoned, but uses the constants as requested on that PR.

Tree-SHA512: 032c0d75b3aaf807a7d0c7fb8ff5515acc45ad58bd00fe81413f900fe02bad900534a970403b9bb568e132c9eddea6043e958daf625e8acc84375bd41ee2e2ef
2019-09-23 20:54:20 +02:00
Alexander Block
3eb0e1463b Fix rawtransaction.py test 2019-09-23 20:49:54 +02:00
Alexander Block
93e3294ecf Remove unsupported parameter from DecodeHexTx calls 2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
499fcecaf4 Merge #11334: qt: Remove custom fee radio group and remove nCustomFeeRadio setting
e53fa4a Remove custom fee radio group (Andrew Chow)

Pull request description:

  Removes the extraneous custom fee radio group and its single radio button. The radio button is replaced with a label that has the radio button's text.

  Continuation of #11332

Tree-SHA512: b47b675f900ee4e2f4823203a42bb697f707ba67a8504d730c53d4dae511d0ed03226af34efd7ea45570c6111f8b3b6c39ac28f1b5c090de225903442ad4159a
2019-09-23 20:49:54 +02:00
MarcoFalke
a09370aef6 Merge #11108: Changing -txindex requires -reindex, not -reindex-chainstate
cd0ea4874 Changing -txindex requires -reindex, not -reindex-chainstate (Matt Corallo)

Pull request description:

  If there's an 0.15.0rc3, this should go in it.

Tree-SHA512: 857e77f0af9c055a3d1d91f37474ee9e06d6bc8c5ed21b29201b6c386801e7041523949076cdf0daa4d357a5175ce49394d85a1bedfbf13f3e577bdb6da1d6ce
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
f9453e0558 Merge #11145: Fix rounding bug in calculation of minimum change
6af49dd Output a bit more information for fee calculation report. (Alex Morcos)
a54c7b9 Fix rounding errors in calculation of minimum change size (Alex Morcos)

Pull request description:

  Thanks to @juscamarena for reporting this.

  Please backport to 0.15.

  There was a potential rounding error where the fee for the change added to the fee for the original tx could be less than the fee for the tx including change.

  This is fixed in the first commit.  The second commit adds one more snippet of information in the fee calculation report.  I actually realized that there is more information that would be nice to report, but we can add that post 0.15.

  An open question is whether we should be returning failure if the test in line 2885 is hit or just resetting pick_new_inputs and continuing.  Originally I made it a failure to avoid any possible infinite loops.  But the case hit here is an example of where that logic possibly backfired.

Tree-SHA512: efe049781acc1f6a8ad429a689359ac6f7b7c44cdfc9578a866dff4a2f6596e8de474a89d25c704f31ef4f8c89af770e98b75ef06c25419d5a6dfc87247bf274
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
10c505cdfe Merge #11119: [doc] build-windows: Mention that only trusty works
fa14b67 [doc] build-windows: Mention that only trusty works (MarcoFalke)

Pull request description:

  This should prevent people from running into the issues to later find that there is no solution yet.

Tree-SHA512: c0512bb15ebd62113a4195a9577fec4ddacf164509673e178c6b5445c16ab7b110a13ba829e6eebb2a66dff61eeac6ec77f7c5f60bd64685a0c0d99f71f4edf7
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
7e8d1fcc1b Merge #11097: gitian: quick hack to fix version string in releases
4452829 gitian: quick hack to fix version string in releases (Cory Fields)

Pull request description:

  Credit: @luke-jr
  Release version strings were broken in Gitian by #7522. This is a minimal fix suitable for 0.15.

  After this, we should fix up version handling for good so that gitian packages the correct string in the release tarball, so that git is not required to get the tag name.

Tree-SHA512: fa609a744c46306b0809f08fed6e96eff41b13e82f3e213711e4abef370558b64a68972f283a038330882cb6c40b32547fbb0f89b8058cc2c6025bff134473c3
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
a31fb063a6 Merge #11081: Add length check for CExtKey deserialization (jonasschnelli, guidovranken)
07685d1 Add length check for CExtKey deserialization (Jonas Schnelli)

Pull request description:

  Fix a potential overwrite or uninitialised data issue.
  That code part is currently unused (at least in Bitcoin Core).
  We already do the same check `CExtPubKey`.

  Reported by @guidovranken

Tree-SHA512: 069ac5335248cf890491bc019537d3b0f7481428a4b240c5cd28ee89b56f4c9f45d947dd626fe89b2fae58472b6dbef57ed909876efe9963e2d72380d17cff12
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
124f3dbf28 Merge #11083: Fix combinerawtransaction RPC help result section
f9ca0fe Fix combinerawtransaction RPC help result section (Jonas Nick)

Pull request description:

  Without this PR it looks like the RPC would return something like a dictionary. But it just returns the transaction in hex.

Tree-SHA512: 565571fbb60cb805f81198cf0eab9ecdc04b62aff58c56145449235cd7c21215f4a1d7a5694d01c1a815fe0e787e5b790d24b71e2f9cc595cda16462ab680b8d
2019-09-23 20:49:54 +02:00
Wladimir J. van der Laan
8308012e18 Merge #10571: [RPC]Move transaction combining from signrawtransaction to new RPC
6b4f231 Move transaction combining from signrawtransaction to new RPC (Andrew Chow)

Pull request description:

  Create a combinerawtransaction RPC which accepts a json array of hex raw transactions to combine them into one transaction. Signrawtransaction is changed to no longer combine transactions and only accept one transaction at a time.

  The tests have been updated to test this. Tests for the signrawtransaction merge have also been removed.

  This is part of #10570

Tree-SHA512: 035aebbd6537c1c017d5c8e06d309228b4c23fe52d5b31ffde19741c81a11a6346ddbbdc582b77b02a47f4c22b1952b69d3c2ee1109c29b3f0f1b612d8de53ed
2019-09-23 20:49:54 +02:00
UdjinM6
1c74b668b6
Introduce getbestchainlock rpc and fix llmq-is-cl-conflicts.py (#3094)
* Introduce getbestchainlock rpc and fix llmq-is-cl-conflicts.py

* Add `known_block` field and move `getbestchainlock` to `blockchain` rpc category

* Add CChainLockSig::IsNull() and throw an exception in getbestchainlock if there is no known chainlock yet

* drop blockHash initializer
2019-09-23 21:36:55 +03:00
UdjinM6
ac0270871c
Respect logips config option in few more log outputs (#3078)
* Introduce CNode::GetLogString() and use it where appropriate

* All other cases

* fix typo

* drop useless argument
2019-09-22 23:48:15 +03:00
UdjinM6
d26b6a84cc
Fix a couple of issues with PS fee calculations (#3077)
* Fix PS fee calculations in GUI

Fixes the GUI fee estimation in Coin Control dialog when creating PS txes with the fSubtractFeeFromAmount option.

* Add missing nChangePosInOut reset for PS txes
2019-09-22 23:47:55 +03:00
Alexander Block
40399fd973 Circumvent BIP69 sorting in fundrawtransaction.py test (#3100)
"subtractFeeFromOutputs" is applied to the ordering of the input
transaction and after that BIP69 sorting is performed. This causes
flakiness in tests.
2019-09-22 23:47:17 +03:00
Nathan Marley
e2d651f601 Add OpenSSL termios fix for musl libc (#3099) 2019-09-22 23:47:02 +03:00
Nathan Marley
783653f6a8 Ensure execinfo.h and linker flags set in autoconf (#3098)
* Ensure execinfo.h and linker flags set in autoconf

* Only check for backtrace() if not Windows
2019-09-22 23:46:45 +03:00
Nathan Marley
7320c3da24 Refresh zmq 4.1.5 patches (#3092)
Some implementations of the `patch` tool cannot handle fuzz / divergence
2019-09-22 23:46:18 +03:00
Nathan Marley
822e617bef Fix chia_bls include prefix (#3091) 2019-09-22 23:46:04 +03:00
PastaPastaPasta
35f079cbf1 Remove unused code (#3097)
* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code, maybe need to revert / change the surrounding values

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* remove unused code

Signed-off-by: Pasta <pasta@dashboost.org>

* Revert "remove unused code"

This reverts commit 8ea0bbbc7b8ab1e779c02ae1dd029c11a9817d2e.
2019-09-22 23:45:22 +03:00
UdjinM6
b12cd5fbd3
Merge pull request #3101 from codablock/pr_backports_v15_v16_1
Backport changes in TX verification/signing API
2019-09-22 23:44:41 +03:00
UdjinM6
78a7ed8d18
Merge pull request #3096 from PastaPastaPasta/backports-0.15-pr26
Backports 0.15 pr26
2019-09-22 23:42:26 +03:00
Pasta
a72fc7c7d4
resolve NIT, remove extra line
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-22 09:30:00 -05:00
Pasta
f7a9b0df41
move deterministicMNManager->UpgradeDBIfNeeded(); to be after LoadChainTip
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-22 09:28:59 -05:00
Pasta
64dde0f6c3
add back the todo
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-22 09:26:55 -05:00
Alexander Block
689eff3aa0 Drop unused GetScriptForWitness 2019-09-20 19:36:28 +02:00
UdjinM6
4b579c77aa
Fix remaining issues 2019-09-20 10:30:04 -05:00
Wladimir J. van der Laan
02328ae966
Merge #11044: [wallet] Keypool topup cleanups
67ceff4 [wallet] Add logging to MarkReserveKeysAsUsed (John Newbery)
1221f60 [wallet] Remove keypool_topup_cleanups (John Newbery)

Pull request description:

  A couple of minor cleanups suggested by @ryanofsky here: https://github.com/bitcoin/bitcoin/pull/11022#pullrequestreview-55598940

  Does not affect functionality. Not required for v0.15.

Tree-SHA512: d8d0698fd26ea49a4157e68669d5511095760c3a1ecfa3f917e3f273efbafb55c51a202d677614216eae3f796b6e8d17506b2ec2d4799a94f18981b396e65eec
2019-09-20 10:30:04 -05:00
Pasta
ac07bf609e
revert unintentional change, 10758
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-20 10:30:04 -05:00
Pasta
3d445628a4
remove LogPrintf("Initializing databases...\n");
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-20 10:30:04 -05:00
Wladimir J. van der Laan
e941c9ba5a
Merge #11028: Avoid masking of difficulty adjustment errors by checkpoints
85c82b5 Avoid masking of difficulty adjustment errors by checkpoints (Pieter Wuille)

Pull request description:

  Currently difficulty adjustment violations are not reported for chains that branch off before the last checkpoint. Change this by moving the checkpoint check after the difficulty check.

Tree-SHA512: 33666f2c3459151b28c42041a463779e6df18f61d3dd5b1879a0af4e5b199ef74d1e33e06af68bebfdfb211569ad5fb56556bfebe9d63b5688d910ea211b839a
2019-09-20 10:30:04 -05:00
Pasta
2d922f5d31
fix
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-20 10:30:04 -05:00
Wladimir J. van der Laan
c438c9322f
Merge #11022: Basic keypool topup
d34957e [wallet] [tests] Add keypool topup functional test (Jonas Schnelli)
095142d [wallet] keypool mark-used and topup (John Newbery)
c25d90f [wallet] Add HasUnusedKeys() helper (John Newbery)
f2123e3 [wallet] Cache keyid -> keypool id mappings (John Newbery)
83f1ec3 [wallet] Don't hold cs_LastBlockFile while calling setBestChain (John Newbery)
2376bfc [wallet] [moveonly] Move LoadKeyPool to cpp (Matt Corallo)
cab8557 [wallet] [moveonly] Move CAffectedKeysVisitor (Jonas Schnelli)

Pull request description:

  This PR contains the first part of #10882 :

  - if a key from the keypool is used, mark all keys up to that key as used, and then try to top up the keypool
  - top up the keypool on startup

  Notably, it does not stop the node or prevent the best block from advancing if the keypool drops below a threshold (which means that transactions may be missed and funds lost if restoring from an old HD wallet backup).

Tree-SHA512: ac681fefeaf7ec2aab2fa1da93d12273ea80bd05eb48d7b3b551ea6e5d975dd97ba7de52b7fba52993823280ac4079cc36cf78a27dac708107ebf8fb6326142b
2019-09-20 10:30:04 -05:00
Wladimir J. van der Laan
d5fdf62faa
Merge #10919: Fix more init bugs.
e7539f8 Fix some broken init-time prints/constants (Matt Corallo)
13ab353 Check for empty coinsview instead of just-reset coinsview in init (Matt Corallo)
fce3f4f Fix resume-of-reindex-after-restart (Matt Corallo)
efac91e Always wait for threadGroup to exit in bitcoind shutdown (Matt Corallo)

Pull request description:

  This is a follow-on to #10758 to help move 10758 along. The first fixes a regression in master that was partially fixed in 10758, the second I'm not sure if its a regression or not, but its clearly a bug that should be fixed.

Tree-SHA512: aca7b97a97dca66e1a218a33cc6f4aa002292ff1bb0af64e35b81fbaa91b9504f2605375808b43e93a63fc73634ad079b30ef6c9f4ba338d3b5f72d816dfeaff
2019-09-20 10:30:04 -05:00
Alexander Block
7662c0b79a A couple of fixes 2019-09-20 11:10:07 +02:00
Alexander Block
16bd20e57c Remove segwit related code 2019-09-20 11:10:06 +02:00
Pieter Wuille
21eca6481f BIP143: Signing logic 2019-09-20 11:09:59 +02:00
Pieter Wuille
fff708d3a3 BIP143: Verification logic
Includes simplifications by Eric Lombrozo.
2019-09-19 21:04:36 +02:00
Pieter Wuille
8da543f279 Refactor script validation to observe amounts
This is a preparation for BIP143 support.
2019-09-19 21:04:36 +02:00
Pasta
1f06ecdd5a add gargs
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:44:58 -05:00
Pasta
9f71ab04bd remove chainparams from method call (10758)
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:41:16 -05:00
Pasta
05ad6d2ecb change nEnd to index (might break the progress bar on wallet creation, should test)
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:35:44 -05:00
Wladimir J. van der Laan
cd5a12f9fb Merge #10862: Remove unused variable int64_t nEnd. Fix typo: "conditon" → "condition".
5a6671c Fix typo: "conditon" → "condition" (practicalswift)
35aff43 Remove unused variable int64_t nEnd (practicalswift)

Pull request description:

  * Remove unused variable `int64_t nEnd`. Last use of `nEnd` removed in commit 1fc8c3d.
  * Fix typo: "conditon" → "condition". Typo introduced in commit 439c4e8.

Tree-SHA512: 61624e6f70828c485fe46dbe00df76f1a07b7a5849d41bf7d279323b687420e60e9b85192f611a37211f17f3dea8eb3f6f6dc65d90c92e5516404fd81d37785a
2019-09-18 17:31:02 -05:00
Pasta
714438af44 remove rewinding blocks
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:31:02 -05:00
Wladimir J. van der Laan
dbd4993084 Merge #10758: Fix some chainstate-init-order bugs.
c0025d0 Fix segfault when shutting down before fully loading (Matt Corallo)
1385697 Order chainstate init more logically. (Matt Corallo)
ff3a219 Call RewindBlockIndex even if we're about to run -reindex-chainstate (Matt Corallo)
b0f3249 More user-friendly error message if UTXO DB runs ahead of block DB (Matt Corallo)
eda888e Fix some LoadChainTip-related init-order bugs. (Matt Corallo)

Pull request description:

  This does a number of things to clean up chainstate init order,
  fixing some issues as it goes:

  * Order chainstate init more logically - first all of the
    blocktree-related loading, then coinsdb, then
    pcoinsTip/chainActive. Only create objects as needed.

  * More clearly document exactly what is and isn't called in
    -reindex and -reindex-chainstate both with comments noting
    calls as no-ops and by adding if guards.

  * Move the writing of fTxIndex to LoadBlockIndex - this fixes a
    bug introduced in d6af06d68aae985436cbc942f0d11078041d121b where
    InitBlockIndex was writing to fTxIndex which had not yet been
    checked (because LoadChainTip hadn't yet initialized the
    chainActive, which would otherwise have resulted in
    InitBlockIndex being a NOP), allowing you to modify -txindex
    without reindex, potentially corrupting your chainstate!

  * Rename InitBlockIndex to LoadGenesisBlock, which is now a more
    natural name for it. Also check mapBlockIndex instead of
    chainActive, fixing a bug where we'd write the genesis block out
    on every start.

  * Move LoadGenesisBlock further down in init. This is a more logical
    location for it, as it is after all of the blockindex-related
    loading and checking, but before any of the UTXO-related loading
    and checking.

  * Give LoadChainTip a return value - allowing it to indicate that
    the UTXO DB ran ahead of the block DB. This just provides a nicer
    error message instead of the previous mysterious
    assert(!setBlockIndexCandidates.empty()) error.

  * Calls ActivateBestChain in case we just loaded the genesis
    block in LoadChainTip, avoiding relying on the ActivateBestChain
    in ThreadImport before continuing init process.

  * Move all of the VerifyDB()-related stuff into a -reindex +
    -reindex-chainstate if guard. It couldn't do anything useful
    as chainActive.Tip() would be null at this point anyway.

Tree-SHA512: 3c96ee7ed44f4130bee3479a40c5cd99a619fda5e309c26d60b54feab9f6ec60fabab8cf47a049c9cf15e88999b2edb7f16cbe6819e97273560b201a89d90762
2019-09-18 17:31:02 -05:00
Wladimir J. van der Laan
0631cd95da Merge #10789: Punctuation/grammer fixes in rpcwallet.cpp
a5ecaf1 Fix misspellings and remove safety verbiage (Steven D. Lander)

Pull request description:

  Standardizing punctuation on CLI output and also including a few fixes for grammer.  This PR is for text only changes and includes no code edits.

Tree-SHA512: afde551bf1212838822188b6723f2bf1b7222decfa1cd7aa6b04967489108a29f80833af6059252af028c53437755f258275af0614e0d4d0311e09421cd8e131
2019-09-18 17:31:02 -05:00
Pasta
75e8e0a45a add a zero to the GenerateNewKey call
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:30:20 -05:00
Pasta
11e41b90c9 internal -> fInternal
Signed-off-by: Pasta <pasta@dashboost.org>
2019-09-18 17:30:20 -05:00