Commit Graph

167 Commits

Author SHA1 Message Date
UdjinM6
80b71d9746 Few networking fixes (#1341)
* Few networking fixes:
- skip "masternode"/inbound connections for sync related processes
- do not sync gov data to other nodes until fully synced ourselves
- do not accept incoming connections until fully synced

* inbound connections could be harmful only if our node is a masternode

* same for CGovernanceManager::Sync
2017-02-16 19:14:42 +04:00
Tim Flynn
399330d42d Improve governance syncing efficiency with bloom filter (#1299)
* Use bloom filter for governance vote syncing

Modify masternode-sync to send bloom filters

Correctly initialize bloom filter

Set fUseFilter argument

Increase bloom filter size to account for multiple signals

Set bloom filter parameters

Use constants for bloom filter parameters

Added filter size check

Added filter size check in masternode-sync

Update bloom filter

Changed bloom parameters

* Bump protocol version

* Update sync time for inv's

* Changes based on code review comments

* Make bloom filter size network dependent

* Fix network dependent filter parameters

* Remove unneeded constant definition

* Move constant definition

* Add blank line
2017-02-02 12:50:44 +04:00
Tim Flynn
2ea9c69985 Logging improvements (#1268)
* Add default log messages when beginning asset sync

* Added default log message for AskFor buffer full condition

* Improve log message based on code review comments
2017-01-18 19:23:49 +04:00
UdjinM6
f1ee9d9c71 Change governance sync process (#1265)
* On gov sync first sync objs, then ask for votes on per-obj basis from different peers.

This should help to sync obj list initially and split the load among many peers. Also adds ability to catch up votes later after the sync.

* ask for all objects, do this in cycles

* Fix Sync() code, better readability

* ask multiple nodes at once when possible, perf boost for large numper of objs

* Addressed comments: pass reference, more peer version check
2017-01-18 00:02:38 +04:00
UdjinM6
5cb6486616 Assuming that we synced blockchain already if we have at least MASTERNODE_SYNC_ENOUGH_PEERS (6 currently) peers at the same height as we are (#1257) 2017-01-11 03:33:14 +04:00
UdjinM6
621f9ebeca remove GetEstimatedMasternodes and GetTotalCoinEstimate (#1258) 2017-01-11 03:33:01 +04:00
UdjinM6
457c20092f Select peers on initial sync more carefully (#1238)
* Select peers on initial sync more carefully

* allow a small error margin of 1 block

* fix comment/log message
2017-01-01 22:30:40 +04:00
UdjinM6
34fd8daf5a Fix sync issues (#1225)
* Store time we saw mnb last time, bump sync timeout
if we received seen mnb but we are too close to MASTERNODE_NEW_START_REQUIRED_SECONDS

* Reset blockchain sync status if new blocks were accepted during sync

* Add some debug log output

* wait for at least one new block to be accepted

* bump CGovernanceManager-Version
2016-12-26 10:44:36 +04:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
UdjinM6
6a3550b94f Fix some gov sync issues (#1191)
* Don't relay objects and votes until synced

* fix sync timeout for govobjs

* count objs and votes separately

* reuse GetHash() value, adjust log messages
2016-12-06 20:40:37 +04:00
UdjinM6
0e28de7e10 Merge #1189: release nodes after loop in CMasternodeSync::ProcessTick() 2016-12-05 11:06:51 +01:00
UdjinM6
b847642428 bug: int -> int64_t (#1179) 2016-12-02 16:53:28 +04:00
UdjinM6
0600a6ce1a Fix (dead)locks (#1169)
* locks in PS

* lock in governance

* locks in IS

* lock in ProcessGetData

* locks in CMasternodeSync

* centralize mnodeman.Check call

* locks order in mnpayments

* use current block chainTip when possible (less locks)

* add missing lock in CountInputsWithAmount

* fix deadlock RequestLowDataPaymentBlocks/IsTransactionValid

* LOCK2 in CheckMnbAndUpdateMasternodeList, CheckAndUpdate, SendVerifyRequest

* LOCK(cs) is not needed here

* Decouple governance init actions from serialization
Should fix this:
```
Assertion failed: lock governance.cs not held in governance-classes.cpp:117; locks held:
cs_Shutdown  init.cpp:200 (TRY)
cs  ./governance.h:195
cs  governance.cpp:835
Abort trap: 6
```
2016-11-28 18:21:50 +04:00
UdjinM6
d9d6d4f6eb fix deadlock on sync (#1104) 2016-10-30 23:40:30 +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
2feb321c2e IsBlockchainSynced should not proceed until we are past the latest checkpoint (#1070) 2016-10-11 01:11:20 +04:00
Evan Duffield
bdf1a6d24d Merge pull request #1045 from UdjinM6/fixSync1
Various sync fixes
2016-09-29 14:21:47 -07:00
UdjinM6
231532d6d0 Align governance proto logic with logic for similar proto for other modules (#1049)
i.e MSG_GOVERNANCE_PEER_PROTO_VERSION -> MIN_GOVERNANCE_PEER_PROTO_VERSION (to check other peers) + PROTOCOL_VERSION (to announce own version)
2016-09-29 00:03:54 +04:00
UdjinM6
cfeda84a3c Do not switch from MASTERNODE_SYNC_SPORKS to next asset until blockchain is synced 2016-09-27 12:02:57 +03:00
UdjinM6
174ee8f880 apply IBD-like logic in IsBlockchainSynced 2016-09-27 11:56:10 +03:00
UdjinM6
b8557662d3 Rewrite fulfilled requests handling (#1040) 2016-09-27 11:50:04 +04:00
UdjinM6
d6637c2e8e simplify CMasternodePayments::IsEnoughData (always using GetStorageLimit) (#1025)
* simplify CMasternodePayments::IsEnoughData (always using GetStorageLimit)
2016-09-21 19:32:42 +04:00
UdjinM6
ec239ffa36 Mostly winner -> payment vote (#1033)
Followup for the recent winner_block PR (#1028) and name confusion discovered during code review.

"Mostly" because also:

- CMasternodeBlockPayees::GetPayee -> CMasternodeBlockPayees::GetBestPayee which describes what this function is actually doing a bit better imo;
- fixing constructor CMasternodePaymentVote empty constructor
2016-09-21 18:45:29 +04:00
UdjinM6
1e2d61ad0d Implement a way to sync only needed winners (#1028)
* store vote hashes in CMasternodePayee and use them in CMasternodePayments::Sync

* Request low data payment blocks in batches directly from some node instead of/after preliminary Sync.

* remove nVotes
2016-09-19 02:23:52 +04:00
Evan Duffield
6f84dc15c0 Merge pull request #1009 from UdjinM6/lastPaid
Improve mn winners detection
2016-09-13 08:35:59 -07:00
UdjinM6
57eb2e1842 Update and store collateral block height and block height at which MN was last paid (scan blockchain to find out who actually was paid). Use storage limit instead of mn count to fetch enough data. Calculate new winner using info about block height at which MNs were paid instead of time. 2016-09-12 02:03:59 +03:00
UdjinM6
08f8300985 Remove deprecated masternode sync members 2016-09-11 21:00:45 +03:00
UdjinM6
bc80d7e2a5 Merge #969: Masternode sync improvements
da406e3 Masternode sync improvements
    - add simple helpers for few more sync states (use them where appropriate instead of old code + rpc output)
    - use new helpers to avoid meaningless message processing
    - actually fail if sync shouldn't continue due to lack of info, make sure Reset is used to quit failed state
2016-08-29 21:11:34 +02:00
UdjinM6
7b10f9aaa6 Refactor CMasternodeSync (#956) 2016-08-28 14:12:14 +04: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
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
b4cb1e2610 Merge #911: Fix sync process: (#911)
- mn hash compatibility with 70103
- ignore some requests while syncing
- fix locking/initializing in sync
- do not ban for old mnw
- split budget/governance messages/invs
2016-08-05 18:25:03 +02:00
Evan Duffield
95ba71570b Merge #864: govobj sync
487674f Governance object/vote syncing fixes
- disable fCached values
- use two maps for storing votes, by hash and parent-hash/type
- disable part of flatdb.dump (still overwriting)
- fixed govobj/votes relay and sync

15821fe various fixes
- Added const where possible
- Uncommented sync block
- Protocol min 70201
- Fixed bug which flags invalid votes incorrectly
- Formatting

aa8fdd7 fix curly braces

d8e39b1 Fix GetTypeHash bug
- Should not collide based on the outcome

732a8a3 fixed mismatched index for vote map
2016-06-08 08:57:16 +02:00
UdjinM6
989317c036 fix mnw sync issues (#825) 2016-05-29 20:35:09 +02:00
Evan Duffield
5e990d3859 fixed cleanup for sync 2016-05-24 13:14:47 -07:00
Evan Duffield
349e750e73 Cleanup
- removed some old comments
- renamed sync tracking requests to friendlier names
2016-05-24 13:12:20 -07:00
Evan Duffield
c6e0643d9e enabled governance item syncing 2016-05-24 12:25:33 -07:00
Evan Duffield
ac913c0258 Removed unimplemented commands / mnquorum / mnscanerror
- Scanning errors should be implemented via sentinel
2016-05-24 12:20:10 -07:00
Evan Duffield
60e048071f added budget item func 2016-05-09 09:31:11 -07:00
Evan Duffield
aee86618cd fixed greedy find/replace (opps) 2016-05-05 10:30:28 -07: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
Evan Duffield
6a68aea461 cleanup 2016-04-14 19:54:11 -07:00
Evan Duffield
019eb07ac0 almost compiles 2016-04-12 09:00:19 -07: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
04efdd1150 Fix mn sync: - reset lasttime* right before switching to next asset - adjust target block count by 1.2 coeff - lower MASTERNODE_SYNC_TIMEOUT 120 -> 30
Closes #728
2016-03-09 07:22:54 +01:00
UdjinM6
a611fc3b1b Introduce CDSNotificationInterface - validation interface to listen to tip updates and trigger updates in DS, payments and budgets. Should significantly reduce number of references to chainActive.Tip() i.e.we should have less cs_main in dash-darksend thread and potential deadlocks. 2016-03-04 12:10:37 +03:00
Evan Duffield
89ff8a6d7e merged and fixed messages 2016-03-03 06:55:32 -07:00
Evan Duffield
a2fdef43e2 merged 2016-02-22 12:53:52 -07:00
UdjinM6
b654a6a320 refactor sync progress ui to use signals, remove lock from masternode str ui 2016-02-19 21:09:54 +03:00
UdjinM6
c676748beb Replace all hardcoded network message strings with NetMsgType:: constants, log unknown commands (net debug category only) 2016-02-19 07:59:00 +03:00
UdjinM6
a4aef837bd Merge remote-tracking branch 'origin/v0.12.1.x' into mergebtc0.12 + fix 2016-02-16 03:17:25 +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
Evan Duffield
5a04fb6a2f Syncing is working quite nice :) 2016-02-04 15:55:07 -07:00
Evan Duffield
8628cb7992 removed printf debugging for syncing process 2016-02-04 15:54:35 -07:00
Evan Duffield
65e480fc62 Syncing is working quite nice :) 2016-02-04 15:48:23 -07:00
Evan Duffield
eeb53b9682 Vastly faster syncing process / small budget system changes
- Syncing process is now event based, rather than timeout based. This means the system can tell when it's done with each step and moves on between phases much faster. In initial testing it seems to be about 10-15x faster and has synced everytime successfully.
- Please remove print debugging when the syncing system is proven to be debugged.
2016-02-04 12:29:09 -07:00
UdjinM6
8d1609f0a5 translations 20150902 2015-09-03 00:32:34 +03:00
Evan Duffield
25894972c1 reduce memory usage 2015-09-02 05:13:32 -07:00
UdjinM6
8dd638423c Fixes for sync:
- lower MASTERNODE_SYNC_THRESHOLD (4->2)
- higher wait MASTERNODE_SYNC_TIMEOUT*2  and fail  MASTERNODE_SYNC_TIMEOUT*5 timeouts for each step
- ask at most MASTERNODE_SYNC_THRESHOLD*3 nodes for sync data
- sync again 1 minute after last fail

So we will ask at most 6 nodes and stop updating lastTime...s when we had data from at least 2 of them but will fail if we had nothing in 25 sec since current step start.
In case of fail resync again faster.
2015-08-25 18:25:19 +03:00
UdjinM6
9d3dc79b91 add masternodeSync.GetSyncStatus() / refactor mn sync status UI updates 2015-08-15 18:53:55 +03:00
UdjinM6
d1e189fb57 add mn list and mnw timeouts / use gettime / lower base timeout 2015-08-15 16:30:30 +03:00
Evan Duffield
dc70f73221 add budget timeout 2015-08-13 20:56:58 -07:00
Evan Duffield
7bdb18a602 fixed parameters for IsBlockChainSynced 2015-08-13 08:04:25 -07:00
UdjinM6
840a50a089 cleanups:
- typos
- remove `mnodeman.` inside `CMasternodeMan::`
2015-08-12 23:54:01 +03:00
Evan Duffield
c86e68c785 Move superblock check 2015-08-11 14:54:42 -07:00
UdjinM6
d79ac2bd60 define masternode sync treshold 2015-08-11 15:54:44 +03:00
UdjinM6
903970d0cf clear mapSeenSync... on Reset 2015-08-05 05:10:47 +03:00
UdjinM6
6b74652b01 track hashes and update "last..." only twice per hash 2015-08-05 04:18:37 +03:00
UdjinM6
3f7e62e2bf cleanup CMasternodeSync a bit 2015-08-05 00:49:14 +03:00
UdjinM6
174f8a7644 merge IsBlockchainSynced and WakeUp 2015-08-05 00:15:24 +03:00
Evan Duffield
743f7fc5eb new wakeup/sleep sync code 2015-08-04 11:21:27 -07:00
UdjinM6
2235671775 use fBlockchainSynced right on IsBlockchainSynced start 2015-08-04 02:23:36 +03:00
UdjinM6
2e8445e741 refactor IsBlockchainSynced 2015-08-04 00:09:27 +03:00
UdjinM6
9ab4a72454 cleanups/fixes:
- use map.insert instead of [] (should be safer)
- debug output / comments / spaces / names
- fix few long strings / make translatable one more label in UI
2015-07-30 19:12:05 +03:00
UdjinM6
afd715286a fix all kind of lock issues 2015-07-30 16:44:18 +03:00
Evan Duffield
3f4727716a disable sync-retry 2015-07-30 06:27:57 -07:00
Evan Duffield
3a72bea5b3 fixed sync edge case 2015-07-30 06:27:57 -07:00
Evan Duffield
f82a028869 Budget prop empty / version bump 2015-07-29 01:08:47 -07:00
Evan Duffield
0edb236801 Fixed item count functionality and sync with no budegt 2015-07-29 01:06:30 -07:00
Evan Duffield
dc829e9d2c added syncing counts 2015-07-28 21:16:11 -07:00
Evan Duffield
08de7c3bc4 try activation immediately after sync 2015-07-28 20:26:08 -07:00
Evan Duffield
8acfd77750 Fixed HaveBudget, allow failure after 3 tries 2015-07-28 13:14:32 -07:00
Evan Duffield
a069a5df5e Update isBlockchainSynced requirements 2015-07-28 13:07:40 -07:00
Evan Duffield
7b480ac74d Eliminate false positives for syncing process 2015-07-26 20:41:57 -07:00
Evan Duffield
597c2b299d new masternode start strategy - only check blockchain sync status 2015-07-26 13:09:52 -07:00
Evan Duffield
d227f28621 allow masternodes to turn on pre-sync - udjin 2015-07-26 12:37:01 -07:00
Evan Duffield
145c845d1f Changed vote restrition model
- Masternodes can only vote once per hour now, instead of 100 times a day total
- UI reports back errors now
2015-07-26 07:01:49 -07:00
Evan Duffield
c0a5dfba61 Masternode inv messages / save seen in mncache 2015-07-25 12:07:30 -07:00
Evan Duffield
8187228be1 Fixed budget syncing issues / forking issues / syncing issues
- Budgets now store the seen objects locally so they're not overwritten when saving/loading to check validity of budget.dat
- Added safer sync "failure" mode, that will retry an hour later if the sync fails for some reason. This will stop the client from thinking it has budget data and rejecting blocks when they're valid.
- protocol bump
- version bump
2015-07-25 09:29:29 -07:00
UdjinM6
491c46c412 remove sync forcing and count already seen as a success instead 2015-07-24 21:35:11 +03:00
Evan Duffield
5281c48f70 Fix syncing issues
- if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
-- && allowed skipping in various situations, which caused blocks to be rejected because of lack of mnfinalbudget data
2015-07-24 09:10:08 -07:00
UdjinM6
f8f4bff9a1 do not sync while IBD 2015-07-24 01:35:59 +03:00
UdjinM6
f0ccd2b8cb fix resync 2015-07-24 01:35:11 +03:00
Evan Duffield
814f8e3f17 delete comment 2015-07-23 15:05:47 -07:00
Evan Duffield
9fb56d9479 Various improvements
- Use INV messages where possible in syncing process
- Ask 4 peers intend of 2 to send of inventory of mnw, and budgets
- Special regtest sync mode
- Fix mnw freezing issue (maybe)
2015-07-23 14:35:14 -07:00
Evan Duffield
18a908065f Fixed mnbudget suggestion 2015-07-22 18:53:17 -07:00
Evan Duffield
c2a23c5beb Fix sync-spork logic 2015-07-22 16:51:51 -07:00
Evan Duffield
388f22c576 Version 26 / New masternode consensus system
- Consensus system selects 1/10 of the oldest masternodes by payment, then selects payee by score from those. This fixes various race conditions when blocks are close together or inconsistant historical winner lists.
- Ask for up to 2 cycles of history
- Keep up to 5 cycles of history locally
2015-07-21 20:07:23 -07:00
Evan Duffield
18fc14e03c Improved mnw sync 2015-07-21 15:14:54 -07:00