Commit Graph

327 Commits

Author SHA1 Message Date
UdjinM6
af5aece96b make CopyrightHolders more generic 2017-12-11 18:54:01 +01:00
Wladimir J. van der Laan
e7a6f79e5a Merge #7192: Unify product name to as few places as possible
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr)
cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr)
cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr)
29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr)
78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr)
3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr)
4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr)
e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr)
917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr)
c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr)
902ccde depends: Add mac_alias to depends (Luke Dashjr)
82a2d98 depends: Add ds_store to depends (Cory Fields)
de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields)
e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr)
63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr)
1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr)
d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
2017-12-11 08:30:26 +01:00
gladcow
8075370d1e change invalid version string constant (#1532) 2017-07-17 17:38:32 +03:00
gladcow
70eb83a5ce New rpc call "masternodelist info" (#1513)
* add masternodelist info call

* safe version conversion function

* change default sentinel version value

* fix issues
2017-07-10 17:41:42 +03:00
gladcow
a439e98408 Replace watchdogs with ping (#1491)
* Add hassentinelping to governanceinfo

* sentinelping rpc call

* additional fields in mnp

* sentinel ping implementation

* change sentinel state to byte in mnp

* use adjusted time in sentinel ping

* update nTimeLastWatchdogVote if sentinel ping is actual

* remove unused fields

* bump protocol to 70207

* Fix small issues

 - fix the error message text in CActivbeMasternodeUpdateSentinelPing;
 - add empty string before public: in CActiveMasternode class declaration;
 - rename field sentinelPing in CMasternodePing to sentinelIsActual and change $
 - decrease sentinelVersion field size to uint16_t;

* revert proto bump for MIN_... consts

* revert changes in getgovernanceinfo

* Update mn vote time for remote masternodes

 - call UpdateWatchdogVoteTime in CMasternodeMan::ProcessMessage
 - deserialize masternodeping from the previous version archive without exception
 - add ability to set time in UpdateWatchdogVoteTime
 - set nTimeLastWatchdogVote to masternode ping sigTime if sentinel is actual
 - bump CMasternodeMan::SERIALIZATION_VERSION_STRING

* remove mn state checks and add correct rpc param convertion

* fix var names

* Helper class for version in string and integer form

* String version in sentinel ping

Version format is "x.x.x"

* test for bacward compatibility in serialization

* Change VersionInfo class to convert functions
2017-07-04 20:31:57 +03:00
UdjinM6
5988e1e7f5 Increase minimum debug.log size to 10MB after shrink. (#1480) 2017-05-31 06:49:22 +03:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
UdjinM6
a29a5345a1 remove deprecated keysLoaded, fSucessfullyLoaded, strBudgetMode (#1027) 2016-09-16 21:16:22 +04:00
UdjinM6
19ae48a02e Various masternode rpc changes/fixes (#1024)
* deprecate start-many

* remove outdated "enforce" rpc and enforceMasternodePaymentsTime

* "count" should lock cs_main and call GetNextMasternodeInQueueForPayment only when needed

* "masternodelist" fixes:
- rename "pubkey" -> payee", fix description
- fix "filter" description
- change "full" format: add lastpaidblock, move IP to the end of string to make it more table-ish
- fix "status" description
- fix "addr" filter, wasn't working
- trivial refactoring

* fix "start-alias" and "create-alias" error message - should be a bit more descriptive now

* rpcmasternode trivial cleanup
2016-09-16 19:22:57 +04:00
UdjinM6
7f687fd696 spork debug log: (#1016)
- add "spork" debug category
- move "seen" and "unknown" to new "spork" debug category to reduce log spam
- new/updated/seen messages should not overlap
2016-09-15 10:50:16 +04:00
UdjinM6
6af7a58d92 Merge remote-tracking branch 'bitcoin/0.12' into mergebtc12, fix/dashify
NOTE: .travis.yml was mostly preserved, probably needs additional attention
2016-08-26 04:09:20 +03:00
Tim Flynn
de7b2b6c51 Merge #944: V0.12.1.x governance pr - part 1 - base functionality
068c178 Added DBG macro in util.h to facilitate debugging

    - This macro allows debugging statements (typically printf's or cout's) to
      be activated or deactivated with a single comment.  Uncomment the line:
      //#define ENABLE_DASH_DEBUG
      in util.h to enable debugging statements.

    - When commented any code wrapped with the DBG() macro will simply be removed
      by the preprocessor.  When not commented all such wrapped statements will
      be present.

    - For maximum effectiveness it is best that util.h be the first effective include
      in all source files.  It is also possible to enable the macro for a single file
      by temporarily adding #define ENABLE_DASH_DEBUG to the top of the file.

    - Code committed to non-development branches should always have the define
      commented.

d125d9b V0.12.1.x -- merging trigger/generic object/superblock changes for testnet phase II

    - This commit contains the core governance system changes for 0.12.1.  Any unrelated
      changes have either been removed or moved to separate commits.

120724c File mode fixes

    - Changed mode 0755->0644 on several source files.

c7f9e11 Updated todo reminders

    - Added reminder to revert temporary reduction of number of votes
      required to trigger superblock to 1 for testing

92adc98 Made CSuperblockManager::IsValidSuperblockHeight an inline function

    - This is for efficiency since this function is called often and is
      only 1 line of code.

c050ed7 Added comment explaining rationale for no LOCK(cs) in CSuperblock::IsValid

dc933fe Removed unused CSuperblockManager::IsBlockValid function

decec88 Moved calls to SuperblockManager::IsValidSuperblockHeight into IsSuperblockTriggered.

    - Since calls to the later function are always protected by the former there's
      no reason to keep these separate and this simplifies the code in
      masternode-payments.cpp.

8672885 Reestablished expected value check for non-superblocks in IsBlockValueValid

b01cbe0 Changes to IsBlockValueValid to fix rpc test failure

a937c76 Changed include order to allow per file activation of the DBG macro

d116aa5 Fixed IsValidSuperblockHeight logic

    - Note this has an effect on testing because we can now only create
      1 superblock per day.  Devs may need to temporarily change testnet params
      for easier testing.

2d0c2de Convert superblock payments to CAmount

    - We assume that payment values in JSON are in units of DASH
      for consistency with other RPC functions, such as
      createrawtransaction.

376b833 Revert temporary testing value for nAbsVoteReq

    - Also ensure that number of votes required is never smaller than 1

8c89f4b Cleaned up CSuperblock error handling

    - Exceptions are now thrown consistently rather than using a mix of
      exceptions and return code checking.  Exceptions are now caught only
      in AddNewTrigger when the CSuperblock constructor is called.  Unnecessary object
      status members have been removed.

d7c8a6b Removed utilstrencodings header

    - This appears to help with travis tests, for unknown reasons.

c4dfc7a Fixed some minor code review issues

63c3580 Reverted locking change in miner.

    - This should have been done in the original PR but was overlooked.

4ab72de Fixed variable name to match common practice and bracket formatting

886a678 Improvements to vote conversion code

    - Replaced redundantly defined function with inclusion of governance-vote.h

    - Replaced magic numbers with their corresponding constant symbols

0a37966 Reordered governance message handling
2016-08-17 09:08:25 +02:00
Evan Duffield
dd539c3d69 Merge pull request #905 from UdjinM6/dashcoreDatadir
Change default datadir
2016-08-08 12:42:35 -07:00
UdjinM6
5a8c0c9b9d Merge #928: Refactor All The Things - part1
86d8505 Refactor CActiveMasternode
+ move strMasterNodeAddr to CActiveMasternode

a005c79 Refactor InstantSend
+ new lock cs_instantsend to protect maps on CleanTransactionLocksList()
+ new DEFAULT_INSTANTSEND_DEPTH constant
+ rename MIN_INSTANTX_PROTO_VERSION to MIN_INSTANTSEND_PROTO_VERSION and bump it

d24182c Refactor Privatesend
+ decouple from util.h and version.h
+ more functions for CDarksendBroadcastTx: constructors, signing, serialization
+ move from rand() to insecure_rand() in general but to GetRand() for session id
+ fix defaults
2016-08-05 21:49:45 +02:00
UdjinM6
0c65a9c892 Merge #918: Change anonymizedashamount -> privatesendamount for consistency
74f2725 Change anonymizedashamount -> privatesendamount for consistency
2016-07-29 07:28:57 +02:00
UdjinM6
175508d6b7 Merge #908: Remove global strMasterNodePrivKey
00743b8 Remove global strMasterNodePrivKey - no need to extract keys all the time, store them in CActiveMasternode and reuse when needed
2016-07-15 08:36:00 +02:00
UdjinM6
dd5bd97561 change default datadir to DashCore(Win,Mac)/.dashcore(Linux) as discussed in #898 2016-07-06 23:26:21 +03:00
UdjinM6
496a0c31c9 merge #882: Autobackup enhancements + support autobackup in PS
1c860ce Autobackup refactoring and improvements:
- make nWalletBackups globally accessable
- move autobackup code from init.cpp to walletdb.cpp, see AutoBackupWallet function
- refactor autobackup code to warn user if autobackup failed instead of silently ignoring this fact
- refactor autobackup code to be able to backup fresh new wallet right after it was created, add this functionality to init sequence
- add new cmd-line option "-walletbackupsdir" to specify full path to directory for automatic wallet backups, see GetBackupsDir function

0ba1548 autobackup in PS:
- add nKeysLeftSinceAutoBackup to have some idea how many keys in keypool are more or less safe, show it in advanced PS UI mode and in rpc output for privatesend and getwalletinfo commands
- add autobackups support in PrivateSend mixing both in daemon and QT mode, warn user if number of keys left since last autobackup is very low or even stop mixing completely if it's too low

f3a2494 Warn about a special case - less than 60 seconds between restarts i.e. backup file name is the same as previos one. Continue and do not disable automatic backups in this case
.

e7b56bd Refactor to address locked wallets issue, replenish keypool and re-initialize autobackup on unlock (only if was disabled due to keypool issue)
Adjust few message strings.
2016-06-15 21:13:04 +02:00
crowning-
7ee810d3b6 [UI] Rebranding: PrivateSend/InstantSend (update 2) (#804)
* [UI] Rebranding: PrivateSend/InstantSend (update 2)
* [UI] Changed name of sendtoaddress parameters: use_ix -> use_is and use_ds -> use_ps
2016-05-25 07:25:16 +02:00
UdjinM6
12317fa13e fix pid dash.pid -> dashd.pid 2016-05-11 12:30:52 +03:00
Alexander Regueiro
06c73a1751 Removed call to TryCreateDirectory from GetDefaultDataDir in src/util.cpp.
See https://github.com/bitcoin/bitcoin/issues/7845#issuecomment-207684728.
Also refactored `GetDefaultDataDir` function to return path for Mac in one expression.

Github-Pull: #7850
Rebased-From: 41dbc4849e
2016-04-27 22:34:48 +02:00
Evan Duffield
fe5c4dd811 Converting governance system
- Generic usage of governance objects
- Added different voting types of signaling
- Removed budget commands (projection, mesc -- see sentinel https://github.com/evan82/sentinel/blob/master/docs/example4.md)
- Added various voting signaling mechanisms (origin funding, remove, valid, endorsed, milestones, outerstorage)
2016-04-19 09:51:15 -07:00
UdjinM6
981efed749 Few debug related fixes
- make logthreadnames work correctly without logtimestamps (and with emty strings again)
 - fix crash in debug (it3)
 - log debug info about locks in one line
 - show actual DS rounds instead of n/a in coin control while in debug mode
 - fix initial string in debug.log: "Bitcoin version" -> "Dash version"
2016-03-25 16:41:11 +03:00
UdjinM6
2fc05e5b9d Add ability to change debug category on the fly from console
NOTE: Before switching to another debug catgory you'd need to turn debugging off via "debug 0"
      and wait a bit (each thread (de)activates debug mode on its own)
2016-03-16 07:46:35 +01:00
UdjinM6
a7fd7821e9 Add "-logthreadnames" cmd-line option to add thread names to debug messages 2016-03-16 07:46:29 +01:00
UdjinM6
a5ac60b868 Merge remote-tracking branch 'bitcoin/0.12' into HEAD
+ merge fixes
+ keepass on evhttp
2016-02-06 16:48:04 +03:00
UdjinM6
bbbbdd8100 more darkcoin->dash
Closes #690
2016-02-01 10:31:06 +01:00
CryptoVote
3f4d5c4c7d Updates monetary variable int64_t types to CAmount.
Closes #677
2016-01-31 11:34:57 +01:00
MarcoFalke
333e1eaeea
Bump copyright headers to 2015
- Bump copyright headers to 2015
- [devtools] Rewrite fix-copyright-headers.py
- [devtools] Use git pretty-format for year parsing

Github-Pull: #7205
Rebased-From: fa6ad855e9 fa24439ff3 fa71669452
2016-01-05 14:13:33 +01:00
MarcoFalke
faf93f37fe [trivial] Reuse translation and cleanup DEFAULT_* values
* DEFAULT_DISABLE_SAFEMODE = false
* Use DEFAULT_* constants for extern bools
2015-11-28 19:01:11 +01:00
Luke Dashjr
b966aa836a Constrain constant values to a single location in code 2015-11-28 18:47:29 +01:00
Wladimir J. van der Laan
9b63758974 util: Don't set strMiscWarning on every exception
Fixes #6809 - run-of-the-mill exceptions should not get into
strMiscWarning (which is reported by `getinfo`).
2015-11-27 13:36:11 +01:00
Suhas Daftuar
7bbc7c314f Add option for microsecond precision in debug.log 2015-10-26 15:05:37 -04:00
Arne Brutschy
58981d4f7d Changed logging to make -logtimestamps to work also for -printtoconsole 2015-09-30 17:57:28 +02:00
Holger Schinzel
3787421146 merging 0.12.0.x into 0.12.1.x 2015-09-22 16:46:03 +02:00
UdjinM6
841fc5fbae DS MultiSession cmd-line option (try to mix constantly, few times per block) 2015-09-15 20:52:45 +03:00
UdjinM6
ae14019e6d IX fixes:
- refactor initialization/fix initial values
- use global `fEnableInstantX`
- rpc output: `confirmations` (i.e. total) and `bcconfirmations` (blockchain only), fixes #593 also
- throw error in UI before submiting IX if it violates max amount
2015-09-11 21:26:15 +03:00
Wladimir J. van der Laan
26c9b83677 Move windows socket init to utility function 2015-09-03 10:59:19 +02:00
UdjinM6
ed6f2b1439 Merge remote-tracking branch 'bitcoin/0.10' into v0.12.0.x_merge10again 2015-08-11 21:48:57 +03:00
UdjinM6
12d320301f add composite debug category dash=darksend+instantx+masternode+keepass+mnpayments+mnbudget 2015-08-03 23:23:30 +03:00
Wladimir J. van der Laan
c38c49d0b7 Fix argument parsing oddity with -noX
`bitcoind -X -noX` ends up, unintuitively, with `X` set.
(for all boolean options X)

This result is due to the odd two-pass processing of arguments. This
patch fixes this oddity and simplifies the code at the same time.
2015-07-27 14:47:54 +02:00
Wladimir J. van der Laan
d2464dfee9
Merge pull request #6287
a794284 locking: add a quick example of GUARDED_BY (Cory Fields)
2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)
cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
2015-07-23 18:45:26 +02:00
Wladimir J. van der Laan
633fe10869
Merge pull request #6149
27d7605 Buffer log messages and explicitly open logs (Adam Weiss)
2015-07-22 18:24:20 +02:00
UdjinM6
753297ea99 drop -masternodeminprotocol/nMasternodeMinProtocol, use masternodePayments.GetMinMasternodePaymentsProto() 2015-07-20 08:03:36 +03:00
Cory Fields
7e66e9c97b
openssl: avoid config file load/race
Rebased-From: d4b1d5a8ba
Github-Pull: #6438
2015-07-17 09:16:57 +02:00
Cory Fields
d4b1d5a8ba openssl: avoid config file load/race 2015-07-14 17:54:04 -04:00
Adam Weiss
27d7605804 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.
2015-07-06 21:54:31 -04:00
Wladimir J. van der Laan
47162673c7 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.
2015-07-01 18:01:16 +02:00
Cory Fields
2b890dd424 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-06-16 04:04:02 -04:00
Philip Kaufmann
a9ac95c1bc use const references where appropriate 2015-06-04 19:34:18 +02:00