Commit Graph

104 Commits

Author SHA1 Message Date
UdjinM6
e9e5a24910 fixing strings and docs + instantsend.md (#1354) 2017-02-19 22:02:33 +01:00
TheLazieR Yip
89d14c5274 Fix Hot Masternode Starting (#1239) 2017-01-01 14:18:21 +04:00
UdjinM6
70b374062b [WIP] Few mn list sync changes (#1223)
* Few mn list sync changes:
- add more mn states
- only remove spent
- send mn ping in addition to mn announce on sync
- manage mn announces more carefully
- expire mns created from broadcasts with invalid ping
- old fWaitForPing logic for old nodes, should be helpful during migration period

This also adjusts active mn auto-start logic accordingly.
2016-12-24 06:49:13 +04:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
UdjinM6
88ee7a372e better local address discovery for active mn (#1203)
* Make local address discovery more robust in CActiveMasternode

* parameter interaction: -masternode=1 -> setting -listen=1

*  slightly postpone first run to give net thread a chance to connect to some peers

* make sure local address detected in CActiveMasternode::ManageStateInitial is valid

* Simplified address detection logic
2016-12-15 20:27:24 +04:00
UdjinM6
15cf414967 Slightly improve/cleanup log output (#1174) 2016-11-30 05:33:47 +04:00
Tim Flynn
286f6ad87e Add watchdog expiration map to governance cache (#1170)
* Fix misspelled logging category

* Added mapWatchdogObjects to governance cache and bumped format version
2016-11-29 04:01:03 +04:00
Tim Flynn
c31ba8ba4c New vote tallying implementation (#1135) 2016-11-13 21:52:34 +04:00
UdjinM6
19569c1d66 Fix CActiveMasternode (#1102)
* add GetStateString and static CMasternode::StateToString helpers

* Fix CActiveMasternode:
- should run `ManageStateLocal` only when `eType == MASTERNODE_LOCAL`
- should set `nState = ACTIVE_MASTERNODE_NOT_CAPABLE` in `ManageStateInitial` to let `GetStatus` return proper message
- more/better log output
2016-10-27 01:21:39 +04:00
Tim Flynn
e30f8bf6a0 Allow masternode broadcasts to update masternode information regardless of state (#1094)
* Allow MN broadcasts to update MN information regardless of state

* Add masternode public keys to log output for debugging

* Moved log message from start-alias to CMasternodeBroadcast::Create

* Fixed log message
2016-10-25 18:37:33 +04:00
UdjinM6
2d55b70381 (log) tweaks and (general) cleanup (#1086)
* docs

* deprecated/unused/duplicate

* comments

* log cleanup/verbosity tuning

* names/ifs/whitespaces/std
2016-10-22 20:52:14 +04:00
Tim Flynn
94e38e3184 V0.12.1.x sentinel watchdog pr (#1079)
Squashed:

* Replaced unsafe mnodeman.Find function with Get in governance-vote.cpp

* Reject unparsable governance objects

* Implemented sentinel watchdog objects (separated out from locking changes)

* Added WATCHDOG support to rpcgovernance.cpp

* Implemented WATCHDOG_EXPIRED state for masternodes

* Added serialization of watchdog timestamps

* Masternode fixes
 - Added version check to CMasternodeMan deserialization
 - Added several missing locking calls in CMasternodeMan

* Fixed missing member initialization in CMasternode constructor and added more logging

* Added MASTERNODE_WATCHDOG_MAX_SECONDS to governanceinfo

* Added masternodewatchdogmaxseconds info to getgovernanceinfo help

* Make masternodes remain in WATCHDOG_EXPIRED state unless removed or collateral expires

* Allow watchdog object creation by WATCHDOG_EXPIRED MN

* Fixed MN validation logic for governance object creation

* Count total masternodes instead of enabled masternodes in masternode-sync

* Transition out of WATCHDOG_EXPIRED state if the watchdog is inactive

* Fixed IsWatchdogExpired bug

* Fixed rate check for watchdog objects and no longer check MN state when validating governance objects

* Applied PR #1061 patch

* Ported locking changes from other branch

* Require only 1 block between new watchdog objects

* Accept pings for WATCHDOG_EXPIRED masternodes

* Lock CmasternodeMan::cs in CmasternodeMan::ProcessMessage

* Several governance changes
 - Fixed uninitialized value in CGovernancePayment class
 - Return an error on submission if any superblock payment cannot be parsed
 - Added logging more statements

* Explicitly initialize all governance object members

* Fix deadlock

* Fixed non-threadsafe access to masternode in activemasternode.cpp

* Revert added wallet lock

* Changed CActiveMasternode so that watchdog expired nodes can still send pings

* Modified CActiveMasternode to run pinger regardless of state when MN is in list

* Added voter and time information to getvotes command

* Improved CActiveMasternode state management

* Implemented GetInfo functions for more efficient thread-safe access to masternode information

* Added CActiveMasternode debug logging messages

* Fixed initial type setting and error message for incorrect protocol version

* Changes based on code review comments

* Set active state for local mode
2016-10-17 22:54:28 +04:00
UdjinM6
ae48630dfb Revert "[UI] Message change when Masternodes is started" (#1053) 2016-09-30 20:19:18 +04:00
Evan Duffield
0e9a57d6ad Merge pull request #1041 from crowning-/patch-1
[UI] Message change when Masternodes is started
2016-09-30 09:18:05 -07:00
UdjinM6
2b3478387c Deprecate masternodeaddr (#1048)
* Deprecate masternodeaddr (i.e. remove dash.conf-started remote masternode support)
2016-09-29 00:02:54 +04:00
crowning-
c368d3ba05 [UI] Changed message when Masternodes was started 2016-09-26 00:40:55 +02:00
UdjinM6
6e9d1779b9 (mostly trivial) Refactor CMasternode/Ping/Broadcast (#1022)
* Refactor CMasternode/Ping/Broadcast
Most noticable:
- pubkey -> pubKeyCollateralAddress
- pubkey2 -> pubKeyMasternode
- VerifySignature -> CheckSignature
- removed PoSe related stuff (deprecated)

Other variable name changes are trivial. Also adjusted debug log output.

* fix constructors
2016-09-16 02:00:06 +04:00
UdjinM6
36c4b6dc2e Trivial refactoring/cleanup (#990) 2016-09-05 20:09:25 +04: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
8f9544c46e Merge #917: Move broadcast creation to CMasternodeBroadcast
8ee7b8a Move broadcast creation to CMasternodeBroadcast
2016-07-29 07:32:08 +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
a0acb4bbac Merge #910: Refactor CActiveMasternode
- move wallet related functions GetMasternodeVin and GetVinFromOutput to wallet.cpp/h (renamed, refactored)
- use new ONLY_1000 coin type to avoid unlocking/locking mn outputs and cut down loops count from 2 to 1 (SelectCoinsMasternode removed)
2016-07-15 08:33:16 +02:00
Evan Duffield
d8453bb92b Use chainparams instead of standalone func for mn confirms
- Use function instead of chainparams directly
2016-05-19 13:54:23 -07:00
Evan Duffield
2ca8c85820 fixed voting errors 2016-05-19 11:34:43 -07:00
TheLazieR Yip
fe66b5acd0 Fix Hot Masternode
Add Update Masternode List from created masternode broadcast before relay.
2016-05-11 03:45:11 +07:00
TheLazieR Yip
56adee2de2 Fix Hot Masternode
Revert to master branch
2016-05-10 21:53:08 +07:00
crowning-
243067c0ee [UI] Rebranding: Darksend/InstantX changed to PrivateSend/InstantSend 2016-05-09 21:08:13 +02:00
crowning-
b61849c697 [UI] Rebranding: removed PrivacyProtect from mixing button 2016-04-19 20:49:19 +02:00
crowning-
e44dab084a [UI] Darksend changed to PrivacyProtect (UI+log) 2016-04-18 23:46:51 +02:00
UdjinM6
eaf57b3fb7 Implemented masternodebroadcast
This set of rpc commands provide an ability to create masternode broadcast messages offline
and relay them from online node later (messages expire in ~1 hour).

Arguments:
1. command        (string or set of strings, required) The command to execute
2. passphrase     (string, optional) The wallet passphrase
Available commands:
  create-alias  - Create single remote masternode broadcast message by assigned alias configured in masternode.conf
  create-all    - Create remote masternode broadcast messages for all masternodes configured in masternode.conf
  decode        - Decode masternode broadcast message
  relay         - Relay masternode broadcast message to the network

Closes #741
2016-03-17 08:29:53 +01:00
UdjinM6
38f386ae1c Few small changes: - Better log output (a bit more granular for mnb, fixing "\n"s and few other small issues) - Unify variable/class members naming a bit
Closes #733
2016-03-16 07:48:37 +01:00
UdjinM6
5c2a0cc9ec Fix bug that prevented new blocks to update tip during mixing
Closes #706
2016-03-02 12:54:46 +01:00
UdjinM6
6fc9b4c772 Replace hardcoded 9999 with Params(CBaseChainParams::MAIN).GetDefaultPort() 2016-02-17 21:52:37 +03: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
e2aaf09700 Cleanup
- lower unobvious dependency through header files, move few includes to the right places
- some trivial code cleanup

Closes #680
2016-01-31 12:08:45 +01:00
evan82
ddf71c0764 Merge pull request #561 from UdjinM6/v0.12.1.x_pre_enabled
V0.12.1.x pre-enabled status from masternodes
2015-09-22 07:14:10 -07:00
UdjinM6
f68a5d8102 remove depreciated dsee/dseep code
Closes #606
2015-09-12 16:35:37 +02:00
evan82
f315fbf25f Merge pull request #567 from UdjinM6/v0.12.1.x_fix_idle_mn_freeze
V0.12.1.x (possible) fix for idle mn freeze
2015-08-28 20:05:44 -07:00
UdjinM6
611640d4e1 fixes for mapSeenMasternodeBroadcast:
- active masternode ping should update mapSeenMasternodeBroadcast's lastPing too
- dseg should fill mapSeenMasternodeBroadcast to be able to serve it later on getdata with MSG_MASTERNODE_ANNOUNCE inv
2015-08-26 03:18:01 +03:00
Evan Duffield
8af620bd80 Fix remote-activation hanging issue
- Clients that were waiting for remote activation were repeatidly checking their wallet and external address. This will make them skip that check if the wallet is empty, then be remotely activated by mnb.
2015-08-23 18:17:07 -07:00
UdjinM6
c61f209c33 (possible) fix for idle mn freeze 2015-08-23 17:29:30 +03:00
UdjinM6
30ab984920 treat MN as pre-enabled while there is no legit ping that differ from initial one (from mnb) 2015-08-22 19:00:12 +03:00
Evan Duffield
24b7028b2e lock wallet for select 2015-08-14 19:06:00 -07:00
UdjinM6
f0790ed32c fix dseep flood / log output 2015-08-14 04:14:08 +03:00
UdjinM6
cbecd3bfa8 fix 2015-08-12 15:35:58 +03:00
Evan Duffield
595e30731a remove lock from active masternode 2015-08-10 14:48:58 -07:00
UdjinM6
e599928ed3 fix bugs in v12 dsee/dseep 2015-08-10 01:32:09 +03:00
UdjinM6
5bd997f255 more dsee/dseep for migration:
- inject our node in old masrternodes' list / ping accordingly
- ignore dsee/dseep after SPORK_10_MASTERNODE_PAY_UPDATED_NODES is activated
2015-08-09 16:17:19 +03:00
Evan Duffield
03236899d1 add fbvote debugging / wallet lock 2015-08-07 15:47:23 -07:00
UdjinM6
9a9e7b7644 strings/translation source fixes 2015-08-06 00:12:01 +03:00