Commit Graph

16332 Commits

Author SHA1 Message Date
Alexander Block
321bbf5af4 Fix excessive memory use when flushing chainstate and EvoDB (#3008)
* Specialize Serialize(CSizeComputer&) for BLS objects

Speeds up size computation for BLS objects.

* Track memory usage in CDBTransaction and CEvoDB

* Take memory used by CEvoDB/CDBTransaction into account when flushing

* Implement specialized SerReadWrite for immer maps

This allows to use READWRITE and fixes compilation errors with CSizeComputer

* Log EvoDB memory usage independently

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2019-07-02 16:25:28 +02:00
Pasta
4968710a2f
Resolve AvailableCoins method call 2019-07-02 00:38:07 -05:00
Alexander Block
0410259dd5 Fix 2 common Travis failures which happen when Travis has network issues (#3003)
* Retry downloading of depends sources 3 times

* Manually invoke apt-get update and install instead of using addon

This allows us to use travis_retry on these operations.

* Add exception for depends/Makefile in .gitignore

* Remove --retry from curl call

This avoids future confusion as we don't rely on curl anymore to properly
retry downloads. curls does only retry on transient errors, while Travis
might cause all kinds of errors which circumvent the retry logic of curl.
2019-07-02 06:41:10 +02:00
Alexander Block
8d763c1440 Only load signingActiveQuorumCount + 1 quorums into cache (#3002)
No need to load 25 quorums when we're scanning for the larger quorums which
only have 4 active quorums. This avoids loading thousands of masternode
lists unnecessarily.
2019-07-02 06:40:47 +02:00
UdjinM6
2dc1b06ec7 Remove skipped denom from the list on tx commit (#2997)
* Remove skipped denom from the list on tx commit

Regardless of the tx type (PS or not).

* Update src/privatesend/privatesend-client.cpp

Co-Authored-By: Alexander Block <ablock84@gmail.com>
2019-07-02 06:40:28 +02:00
Alexander Block
b9aadc071b Fix excessive memory use when flushing chainstate and EvoDB (#3008)
* Specialize Serialize(CSizeComputer&) for BLS objects

Speeds up size computation for BLS objects.

* Track memory usage in CDBTransaction and CEvoDB

* Take memory used by CEvoDB/CDBTransaction into account when flushing

* Implement specialized SerReadWrite for immer maps

This allows to use READWRITE and fixes compilation errors with CSizeComputer

* Log EvoDB memory usage independently

Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2019-07-02 07:16:27 +03:00
Alexander Block
780bffeb78 Enable stacktrace support in gitian builds (#3006)
* Remove use of -rdynamic

This causes check-symbols to fail horribly and also turned out to be not
required when using libbacktrace. It was only required when using
"backtrace()" from "<execinfo.h>"

* Remove spurious ], from configure.ac

* Add -DENABLE_STACKTRACES=1 to CMakeLists.txt

* Remove unused method my_backtrace_simple_callback

* Use fs::path().filename() instead of basename()

* Add static g_exeFileName and g_exeFileBaseName

* Use .exe.dbg file when available

* Use uint64_t instead of uintptr_t

* Implement GetBaseAddress() for unix and win32

* Implement unified crash_info and use it everywhere before printing crash info

* Print a serialized version of crash_info when there is no debug info

* Implement "-printcrashinfo" command line option

* Compile stacktrace support unconditionally and only make crash hooks conditional

This also renames the --enable-stacktraces option to --enable-crash-hooks

* Enable crash hooks in win/linux Gitian builds

* Try to load .debug file on MacOS and enable crash hooks for osx Gitian builds

* Check for dsymutil and if it needs --flat

* Create .debug files in osx Gitian build

* Handle review comments

* Also print crash description when no stacktrace is available

* Unconditionally add -g1 debug information

Instead of making it dependent on "--enable-crash-hooks". We will need the
debug info every time now, even in release builds.

* Put MacOS debug info into dSYM symbols instead of plain .debug files

* Implement MacOS specific GetBaseAddress
2019-07-02 07:16:11 +03:00
Pasta
9adb72e112
remove initialize to 0 in chainparams.h
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-01 13:48:19 -05:00
Pasta
6ce3e55cb4
add extra params to AvailableCoins calls
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-01 13:44:40 -05:00
Pasta
6ad8fe0e9f
adjust CoinType logic
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-01 08:00:23 -05:00
Pasta
d5d27ad19b
s/bitcoind/dashd
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-01 07:58:31 -05:00
Alexander Block
5809c5c3d0 Implement "quorum memberof" (#3004)
* Implement BuildQuorumInfo and call it from quorum_info

* Add type to result of BuildQuorumInfo

* Implement "quorum memberof"
2019-06-27 23:25:59 +03:00
Alexander Block
63424fb26a Fix 2 common Travis failures which happen when Travis has network issues (#3003)
* Retry downloading of depends sources 3 times

* Manually invoke apt-get update and install instead of using addon

This allows us to use travis_retry on these operations.

* Add exception for depends/Makefile in .gitignore

* Remove --retry from curl call

This avoids future confusion as we don't rely on curl anymore to properly
retry downloads. curls does only retry on transient errors, while Travis
might cause all kinds of errors which circumvent the retry logic of curl.
2019-06-27 23:25:30 +03:00
Alexander Block
09b017fc53 Only load signingActiveQuorumCount + 1 quorums into cache (#3002)
No need to load 25 quorums when we're scanning for the larger quorums which
only have 4 active quorums. This avoids loading thousands of masternode
lists unnecessarily.
2019-06-27 23:25:02 +03:00
UdjinM6
b75e1cebd3
Decouple lite mode and client-side PrivateSend (#2893)
* Decouple lite mode and client-side PrivateSend

`-enableprivatesend`:
1. off by default in lite mode but can be overridden
2. does not start mixing, use `-privatesendautostart` (default is off) or `privatesend` rpc instead

* Disable PS when there is no wallet, do not auto-start mixing when wallet is locked

* Check for `!fEnablePrivateSend` and `!fPrivateSendRunning` instead of `!pwalletMain` in ps client code

* Add meaningful `privatesend` rpc error messages for various cases when mmixing is disabled
2019-06-27 23:24:43 +03:00
Wladimir J. van der Laan
39cfd61c07 Merge #9279: Consensus: Move CFeeRate out of libconsensus
381a46e Consensus: Policy: MOVEONLY: Move CFeeRate out of the consensus module (Jorge Timón)
330bb5a Consensus: Minimal way to move dust out of consensus (Jorge Timón)

Tree-SHA512: 19a2ea8169afd5a9d3f940d8974e34cfaead153e3ff3068ac82fccdb8694d19d9b45938904ec9e8cd095bd5ca3a0080364da29372f6aaf56b11a6c2ccd6c7a4d
2019-06-26 15:26:07 -05:00
Pieter Wuille
535d7d6a84 Merge #10347: Use range-based for loops (C++11) when looping over vector elements
211adc0 Use range-based for loops (C++11) when looping over vector elements (practicalswift)

Tree-SHA512: 0e007f20dcef99d3c7a1036265e00f689d69f42e02fd82dd8389f45b52d31947e5f9388de2610d3d9bd9f554915ce0d35ebce561e5ae3a9013956d0ee4937145
2019-06-26 12:45:10 -05:00
Wladimir J. van der Laan
30ad4b8e8c Merge #8952: Add query options to listunspent RPC call
bc63d0e Add query options to listunspent rpc call (Pedro Branco)

Tree-SHA512: 2d296eee8df4e7ac378206ac3003a300e6478502d4b814f1ed1a47614222b01cc35dba871345ced68629860c227aff2c9e4b7f0d4ed0aa7de8b04f26c983580f
Signed-off-by: Pasta <pasta@dashboost.org>

# Conflicts:
#	src/rpc/client.cpp
#	src/wallet/rpcwallet.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
2019-06-26 12:45:10 -05:00
Alexander Block
e7d7ecb6e9 Set a few param values to 0 by default
These ones are not necessarey set everytime for all networks.
2019-06-26 12:45:10 -05:00
Alexander Block
e740604f60 No need for zero initialization of devnet params 2019-06-26 12:45:10 -05:00
Wladimir J. van der Laan
50652674b5 Merge #8855: Use a proper factory for creating chainparams
c1082a7 Chainparams: Use the factory for pow tests (Jorge Timón)
2351a06 Chainparams: Get rid of CChainParams& Params(std::string) (Jorge Timón)
f87f362 Chainparams: Use a regular factory for creating chainparams (Jorge Timón)

Tree-SHA512: 359c8a2a1bc9d02db7856d02810240ada28048ac088f878b575597a7255cdb0ffdd1a647085ee67a34c6a7e7ed9e6cfdb61240cf6e75139619b640dbb096072c
2019-06-26 12:45:10 -05:00
Wladimir J. van der Laan
175d68ac21 Merge #10426: Replace bytes_serialized with bogosize
8b22af3 Replace bytes_serialized with bogosize (Pieter Wuille)

Tree-SHA512: e70a981bbb977329f9e324c45f9a1346ec9aacfbbad5474e608cdd1f852257502bb7db8003fd578260a609e45d1a9cf87ce96df9c4187d92d50f60a209e232ce
2019-06-26 12:44:46 -05:00
Wladimir J. van der Laan
51525efd66 Merge #10403: Fix importmulti failure to return rescan errors
4d2d604 Fix importmulti failure to return rescan errors (Russell Yanofsky)

Tree-SHA512: e5e6d6c5a2bb7230e1bcac1903a4b766cd57bf781fade50c6c9cd5713cd3e768db0987cfda9699b57a53d3a0a60951b96dce5283b3d3ec1f954162c439bc932b
2019-06-26 12:44:46 -05:00
MarcoFalke
35bafa14bd Merge #10515: [test] Add test for getchaintxstats
cc36b5e [test] Add test for getchaintxstats (Jimmy Song)

Tree-SHA512: a992b55f945118ad7410ab8d7ae7d2696e94a2d4a861d633f4501c439364027e2fddd522cb8b5ed3eb621ec4ed0e9fc683e0139aa6c2e2e27c361640f85f1876
2019-06-26 12:44:46 -05:00
Wladimir J. van der Laan
44a55019b4 Merge #10478: rpc: Add listen address to incoming connections in getpeerinfo
3457331 test: Add test for `getpeerinfo` `bindaddr` field (Wladimir J. van der Laan)
a7e3c28 rpc: Add listen address to incoming connections in `getpeerinfo` (Wladimir J. van der Laan)

Tree-SHA512: bcd58bca2d35fc9698e958e22a7cf8268a6c731a3a309df183f43fc5e725a88ae09f006290fde7aa03cee9a403e2e25772097409677cedbce8f267e01e9040f6
2019-06-26 12:44:45 -05:00
Pieter Wuille
40cec429b3 Merge #10471: Denote functions CNode::GetRecvVersion() and CNode::GetRefCount() as const
5f672ca8c net: Denote some CNode functions const (Pavlos Antoniou)

Tree-SHA512: f6d13d8002a4145fd87b34b35a739284e4a9b1af834bba109d324eccddb684eccb817553ba76102eb5b5819cab37f938b4ba74fdbda7c5386d00747b3024cd81
2019-06-26 12:44:45 -05:00
Pieter Wuille
f59e5e67f0 Merge #10500: Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
b9b814a38 Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings (Russell Yanofsky)

Tree-SHA512: 96a0612ca460ba1bfb3921f3aa348400fd3afa12c40f2ca1f3f04068b1574fe824d577e0123013d8898a4990084316dc1dfb541331849f0996ceff7f4eb25e6b
2019-06-26 12:44:45 -05:00
MarcoFalke
e353d271f0 Merge #10359: [tests] functional tests should call BitcoinTestFramework start/stop node methods
53f6775 fixup: fix nits (John Newbery)
a433d8a [tests] Update start/stop node functions to be private module functions (John Newbery)
d8c218f [tests] Functional tests call self.start_node(s) and self.stop_node(s) (John Newbery)

Tree-SHA512: 9cc01584a5e57686b7e7cb1c4c5186ad8cc7eb650d6d4f27b06bdb5e249a10966705814bdfb22d9ff2d5d3326911e489bf3d22257d751a299c0b24b7f40bffb5
2019-06-26 12:44:45 -05:00
MarcoFalke
70cd81cc8a Merge #10423: [tests] skipped tests should clean up after themselves
930deb9 [tests] skipped tests should clean up after themselves (John Newbery)

Tree-SHA512: ed486c1cf144c223efa738a66e8bb407089a23002871ef5b15c43d4c08641038a20253fc286853b457d66f37a52c81c16f7988aef90635ac262df6ce7bab9b18
2019-06-26 12:43:19 -05:00
Wladimir J. van der Laan
c7aa3723c7 Merge #10323: Update to latest libsecp256k1 master
e7c1b44 Squashed 'src/secp256k1/' changes from 8225239..84973d3 (Pieter Wuille)

Tree-SHA512: 3e1ba6e6ad9d68170a1a60bd963f2dbaa8b0ae592cc562e6cd23b2c7653f0b8016e4c682681ae2fb3714106a41f8b89708e16e8f52a42ff3db59fc28262eea0b
2019-06-26 12:43:19 -05:00
MarcoFalke
b6b486c274 Merge #10376: [tests] fix disconnect_ban intermittency
3ba2c08 [tests] fix disconnect_ban intermittency (John Newbery)

Tree-SHA512: f4e1a88b4126ad5e1aa861a99f9b2589194a25610b5e18bcc196e7dccfa02491f0b9549fbb9f9a73776ed5ee2f6b8ade264b92ac378a25c1a92df4b0272487a7
2019-06-26 12:43:19 -05:00
UdjinM6
b9a738528c
Remove skipped denom from the list on tx commit (#2997)
* Remove skipped denom from the list on tx commit

Regardless of the tx type (PS or not).

* Update src/privatesend/privatesend-client.cpp

Co-Authored-By: Alexander Block <ablock84@gmail.com>
2019-06-26 14:39:36 +03:00
UdjinM6
1a88a3c7d9
Merge pull request #2992 from PastaPastaPasta/backports-0.15-pr16
Backports 0.15 pr16
2019-06-26 14:38:33 +03:00
Alexander Block
dff2c851d5
Update manpages for 0.14.0.2 (#2999) 2019-06-26 06:03:05 +02:00
Pasta
a8c2020819
remove unused import cont.
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-25 14:38:38 -05:00
Wladimir J. van der Laan
60475f1272
Merge #11831: Always return true if AppInitMain got to the end
07c4838 Always return true if AppInitMain got to the end (Matt Corallo)

Pull request description:

  This should fix a rare zapwallettxes failure on travis, but also
  avoids having init operations (re-adding wallet transactions to
  mempool) running after RPC is free'd.

  I believe this was the failure at https://travis-ci.org/bitcoin/bitcoin/jobs/311747844 (from #11605).

Tree-SHA512: f0fea8c1b9265e2eeda57043d541380a3e58e4d9388fa24628a52fd56324257fcd7df0ca02e8f77f66fadd68d951893bab0f610ed9fd0a89b2ccd6bad1efa351
2019-06-25 06:09:33 -05:00
Pasta
a740a0cecd remove extra argument from code review
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 17:41:02 -05:00
Pasta
5a760dd90e
remove duplicate code
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 12:07:26 -05:00
Pasta
dd99dd08c6
add gArgs for a couple things not caught by scripted diff
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 12:03:00 -05:00
Marko Bencun
5d5171f478
remove unused gArgs wrappers
(#10607)
2019-06-24 12:03:20 -05:00
Pasta
6bfbe6053d
Scripted diff find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' based on bb81e17355
(#10607)

Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 12:03:00 -05:00
Pasta
5bdb2c0ce1
Revert "Show BIP9 progress in getblockchaininfo (#2435)"
This reverts commit 3685c85e7f.
2019-06-24 11:39:34 -05:00
Pasta
1bb4b9c085
fix gargs change regarding devnets
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 11:39:34 -05:00
Pasta
bb370afbfd
s/bitcoin/dash
Signed-off-by: Pasta <pasta@dashboost.org>
2019-06-24 11:39:34 -05:00
Pasta
b62db76180
Revert " Add real timestamp to log output when mock time is enabled (#2604)"
This reverts commit 968eb3fc5d.

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

# Conflicts:
#	src/util.cpp
#	src/utiltime.cpp
#	src/utiltime.h
2019-06-24 11:39:34 -05:00
Wladimir J. van der Laan
2ab30b846c
Merge #10475: [RPC] getmempoolinfo mempoolminfee is a BTC/KB feerate
f128f78 getmempool mempoolminfee is a BTC/KB feerate (Gregory Sanders)

Tree-SHA512: 5b32ffc0d2ba7ca623d4ce450fb67855d17b4fa8c3ffb8570a63dc53b3d476d52b39ad6190ac4357dbf01f6b535fa187cd8c34175a16469e9b00097e3bf2e2bc
2019-06-24 11:39:34 -05:00
Wladimir J. van der Laan
89e033085d
Merge #10447: Make bitcoind invalid argument error message specific
cd5622d Make bitcoind invalid argument error message specific (Wladimir J. van der Laan)

Tree-SHA512: 78999b9359685c4090f9a112e1d02bdddac22173f5f04600773b042acb9481ebb54d0f73d9d6d74249f845f497927a58d59de69bf33e3dccf096c3c80c7ebf6b
2019-06-24 11:39:34 -05:00
Wladimir J. van der Laan
785420b838
Merge #10467: add SeedNodes to CConnman::Options
5d67526 add SeedNodes to CConnman::Options (Marko Bencun)

Tree-SHA512: d732ab08697419f896d9598fa3c30030ddbe3b82a99a398d813ebcd5e1fc610ad1043fe0f4c51a7ec5c4d70ce93a9ac5a5c7a91fcaae046ec4f1f7c41523a360
2019-06-24 11:39:34 -05:00
Wladimir J. van der Laan
3ee7ffc7fd
Merge #10479: [trivial] Fix comment for ForceSetArg()
42a83e5 [trivial] Fix comment for ForceSetArg() (John Newbery)

Tree-SHA512: 596db8b4bb01bca18908e254e5b364d3d4fcb0ea49d7d54314c65106e497efed65a877d80740bff88e090aeb772be1e46d4571ecca9b9263578f3f680f0bd0ce
2019-06-24 11:39:34 -05:00
Pieter Wuille
1c6630f72f
Merge #10464: Introduce static DoWarning (simplify UpdateTip)
f28514576 Introduce static DoWarning (simplify UpdateTip) (Jorge Timón)

Tree-SHA512: 58b39f00bc921d47d199ef1cc15e9e36f918ec86e9182de46dc2f24fa9474853a92b18d330a274a3ea7c9b001681fdfa3d86aa2bbebb5c92ac8c5a6f7690dfc1
2019-06-24 11:39:34 -05:00