Commit Graph

281 Commits

Author SHA1 Message Date
Homu 8ef1d333b5 Auto merge of #2894 - per-gron:dont-export-unless-needed, r=str4d
Make some globals static that can be

I wrote this patch as part of making a Bazel build system but it really is independent from that so I'm putting this as a separate PR.

External linkage does not help and just encourages sloppy dependencies (ie using symbols only declared in a cpp file in some other cpp file) and can lead to weird issues when there are name collisions.
2018-05-04 15:05:43 -07:00
Jack Grigg aeb089ecc7
Attempt to log before terminating if prevector allocation fails 2018-04-26 11:30:33 +01:00
Per Grön 39d2e9e0cb Make some globals static that can be
External linkage does not help and just encourages sloppy dependencies
and can lead to weird issues when there are name collisions.
2018-01-22 18:20:47 +01:00
syd c72a4732cc Remove Boost conditional compilation.
Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-23 00:05:21 -05:00
Simon 1051242926 Closes #2576. Update link to security info on z.cash website. 2017-10-31 20:31:40 -07:00
Daira Hopwood 506a21850a Remove UPnP support. fixes #2500
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-03 08:57:05 +01:00
Wladimir J. van der Laan da1357e6cc
Use real number of cores for default -par, ignore virtual cores
To determine the default for `-par`, the number of script verification
threads, use [boost:🧵:physical_concurrency()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.thread.physical_concurrency)
which counts only physical cores, not virtual cores.

Virtual cores are roughly a set of cached registers to avoid context
switches while threading, they cannot actually perform work, so spawning
a verification thread for them could even reduce efficiency and will put
undue load on the system.

Should fix issue #6358, as well as some other reported system overload
issues, especially on Intel processors.

The function was only introduced in boost 1.56, so provide a utility
function `GetNumCores` to fall back for older Boost versions.
2017-03-29 16:06:00 +13:00
zkbot f7fcad709b Auto merge of #2203 - arcalinea:2142_security_log_message, r=daira
Add message directing users to security guide

Addresses #2142, which was blocking on updates to zcash/support/security.html. That page has now been added, so this message directing users to the site can be included.

It displays in the zcash-cli --help and --version message text, and on the zcashd metrics screen.
2017-03-26 01:36:24 +00:00
Daira Hopwood f0d1accb7d Line-wrap privacy notice. Use <> around URL and end sentence with '.'.
Include privacy notice in help text for zcashd -help.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-26 02:08:29 +01:00
Jay Graber ab1d2d575c Add security message to license text, rm url from translation string 2017-03-24 13:48:27 -07:00
Wladimir J. van der Laan 167b6231c9
Move windows socket init to utility function 2017-03-24 09:03:59 +13:00
Adam Weiss 8550bcfeca
Buffer log messages and explicitly open logs
Prevents stomping on debug logs in datadirs that are locked by other
instances and lost parameter interaction messages that can get wiped by
ShrinkDebugFile().

The log is now opened explicitly and all emitted messages are buffered
until this open occurs.  The version message and log cut have also been
moved to the earliest possible sensible location.
2017-03-03 10:57:23 -08:00
Philip Kaufmann db954a65ac
use const references where appropriate 2017-03-03 10:57:05 -08:00
Jack Grigg 207924a1d5
Remove OpenSSL PRNG reseeding
Per https://download.libsodium.org/doc/generating_random_data/ reseeding the
default libsodium PRNG is not required.
2017-01-23 17:06:54 +01:00
zkbot 78674ca79e Auto merge of #2007 - bitcartel:1097_copyright_notice_and_date, r=bitcartel
Closes #1097 so that zcash-cli displays license info like zcashd.

LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.
2017-01-19 00:56:47 +00:00
zkbot 63e0e895a5 Auto merge of #2006 - bitcartel:1497_destination_path_validation_when_exporting, r=bitcartel
Fixes #1497 ZCA-009 by restricting export to a user defined folder and sanitizing filenames
2017-01-18 18:19:50 +00:00
Simon 9064d73bf8 Fixes #1497 ZCA-009 by restricting data exporting to user defined folder.
Previously the RPC interface allowed z_exportwallet, backupwallet and
dumpwallet to write data to an arbitrary filename.  ZCA-009 demonstrates
how this is vulnerable.  The resolution is to only allow data to
written when the -exportdir has been configured.  Also filenames are
restricted to alphanumeric characters.
2017-01-16 10:56:06 -08:00
Simon af02114469 Closes #1097 so zcash-cli now displays license info like zcashd.
LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.
2017-01-16 09:38:09 -08:00
Jack Grigg d87f00c4d5
Throw an error if zcash.conf is missing
An empty zcash.conf is sufficient to bypass this error.
2017-01-10 16:33:41 +01:00
lpescher 1d2db2765e Make command line option to show all debugging consistent with similar options
Most people expect a value of 1 to enable all for command line arguments.
However to do this for the -debug option you must type "-debug=".
This has been changed to allow "-debug=1" as well as "-debug=" to
enable all debug logging
2016-11-28 13:28:15 -08:00
Pieter Wuille bf673640e3 Use std::atomic for fRequestShutdown and fReopenDebugLog 2016-10-24 21:55:52 -07:00
Chirag Davé 7a4e0e0932 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
This allows access as an atomic variable in the presence
of async interrupts.

See issue #7433 for more details
fixes: #7433
2016-10-24 21:54:50 -07:00
Sean Bowe 796c7ee52f Update to `beta2` public parameters, remove `regtest`/`testnet3` parameters
subdirectories.
2016-10-03 15:58:02 -06:00
Lars-Magnus Skog 8fd71a194e changed module name from "bitcoin" to "Zcash" in FormatException() 2016-08-21 15:10:09 +02:00
Taylor Hornby aaf6495948 Rename bitcoin.conf and bitcoind.pid to zcash.conf and zcashd.pid in qa/ and src/ 2016-05-03 14:01:01 -06:00
Sean Bowe 4f1c37980e Load proving/verifying keys at startup from the public alpha parameters file. 2016-01-19 14:36:04 -07:00
Taylor Hornby 8a18333567 Rename .bitcoin (DataDir), bitcoind, and bitcoin-cli. 2015-11-30 13:03:21 -07:00
Wladimir J. van der Laan 1cd7952dde
Merge pull request #6703
45bfa13 PARTIAL: typofixes (found by misspell_fixer) (Veres Lajos)
21c406e add support for miniupnpc api version 14 (Pavel Vasin)
13bd5a7 rpc-tests: re-enable rpc-tests for Windows (Cory Fields)
ccc4ad6 net: Set SO_REUSEADDR for Windows too (Cory Fields)
1f6772e add unit test for CNetAddr::GetGroup. (Alex Morcos)
13642a5 Fix masking of irrelevant bits in address groups. (Alex Morcos)
6b51b9b Replace boost::reverse_lock with our own. (Casey Rodarmor)
626c5e6 Make sure we re-acquire lock if a task throws (Casey Rodarmor)
4877053 Add missing files to files.md (fanquake)
f171fee Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss)
c5b89fe Fix race condition on test node shutdown (Casey Rodarmor)
4a37410 Handle no chain tip available in InvalidChainFound() (Ross Nicoll)
f6d29a6 Use unique name for AlertNotify tempfile (Casey Rodarmor)
e6adac7 Delay initial pruning until after wallet init (Adam Weiss)
e0020d4 Make sure LogPrint strings are line-terminated (J Ross Nicoll)
7ff9d12 Make sure LogPrintf strings are line-terminated (Wladimir J. van der Laan)
5a39133 build: fix libressl detection (Cory Fields)
f6355e6 Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor)
60457d3 locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)
a496e11 Remove bash test note from rpc-tests readme (fanquake)
49c6a64 tests: Remove old sh-based test framework (Wladimir J. van der Laan)
a37567d Add autogen.sh to source tarball. (randy-waterhouse)
1f4d7cf travis: for travis generating an extra build (Cory Fields)
2015-09-23 14:12:55 +02:00
Cory Fields 60457d3c2f locking: fix a few small issues uncovered by -Wthread-safety
- rpcwallet: No need to lock twice here
- openssl: Clang doesn't understand selective lock/unlock here. Ignore it.
- CNode: Fix a legitimate (though very unlikely) locking bug.
2015-09-22 00:43:10 +00:00
Cory Fields 253143860d
openssl: avoid config file load/race
Github-Pull: #6438
Rebased-From: d4b1d5a8baf18e4c8d62846360c0c1c0c9331d70
2015-07-15 15:51:05 +02:00
Philip Kaufmann 5207f33f45 fix header include groups 2015-05-14 01:02:01 -04:00
Jonas Schnelli 3da7849007 [squashme] simplify SetupEnvironment() (by dexX7) 2015-05-10 10:06:41 +02:00
Jonas Schnelli b3ffcdf916 don't imbue boost::filesystem::path with locale "C" on windows
fixes https://github.com/bitcoin/bitcoin/issues/6078
2015-05-01 13:32:25 +02:00
Wladimir J. van der Laan 8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
sinetek 7f386d2ff2 DragonFlyBSD thread renaming. 2015-04-29 20:04:34 +07:00
sinetek cd558b421c FreeBSD, OpenBSD thread renaming. 2015-04-21 03:13:07 +07:00
Jorge Timón b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00
dexX7 ba0fa0d9bc
Initialization: set fallback locale as environment variable
The scope of `std::locale::global` appears to be smaller than `setenv("LC_ALL", ...)` and insufficient to fix messed up locale settings for the whole application.
2015-03-27 01:57:00 +01:00
dexX7 317e66c741
Initialization: set Boost path locale in main thread
The path locale is lazy initialized and to avoid deinitialization errors
in multithreading environments, it is set explicitly by the main thread.
2015-03-11 14:33:29 +01:00
Luca Venturini 1fdb9fa3f9 Help messages correctly formatted (79 chars)
Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format works even if the translation of the strings
modifies the lenght of the message.

Sqashed 6 commits in a single one.
Help messages correctly formatted for SVGA text mode (132 chars)

Help messages are formatted programmatically with FormatParagraph
in order not to break existing strings in Transifex.

The new format should work even if the translation of the strings
modifies the lenght of the message.

Fix - syntax error

Correct formatting for 79 chars

Correctly based on C++ functions

Removed spare spaces from option strings

Fix - syntax error
2015-03-10 22:07:17 -07:00
Wladimir J. van der Laan 47a79bb880
Merge #5366: No longer check osx compatibility in RenameThread
850c570 No longer check osx compatibility in RenameThread (Michael Ford)
2015-02-18 17:36:39 +01:00
sandakersmann f914f1a746
Added "Core" to copyright headers
Github-Pull: #5494
Rebased-From: 15de949bb9277e442302bdd8dee299a8d6deee60
2014-12-19 19:55:32 +01:00
Philip Kaufmann 27df4123c4 make all catch() arguments const
- I saw this on http://en.cppreference.com/w/cpp/language/try_catch and
  thought it would be a good idea
- also unify used format to better be able to search for exception
  uses in our codebase
2014-12-17 09:39:24 +01:00
Michael Ford 850c570d68 No longer check osx compatibility in RenameThread
10.5 support has been dropped for some time now.
2014-11-25 16:12:55 +08:00
Michael Ford c63a73d18a Update comments in util to be doxygen compatible 2014-11-17 11:04:01 +08:00
21E14 a2cfae8e18 util.cpp comment correction 2014-11-01 09:41:48 -04:00
Wladimir J. van der Laan 494ff05a4c Merge pull request #4804 from jtimon/chainparams3
Remove CBaseChainParams::NetworkID()
2014-10-17 08:47:11 +02:00
jtimon ebdb9ff639 SQUASHME: fix "Reserve only one network specific cached path per session" 2014-10-11 20:56:27 +02:00
ENikS 1e73504865
Fixing C4146 warning
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-09-25 15:24:36 +02:00
jtimon f297479a19 Reserve only one network specific cached path per session 2014-09-21 21:21:09 +02:00