Commit Graph

30 Commits

Author SHA1 Message Date
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
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
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
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
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
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
UdjinM6
840a50a089 cleanups:
- typos
- remove `mnodeman.` inside `CMasternodeMan::`
2015-08-12 23:54:01 +03:00
UdjinM6
d79ac2bd60 define masternode sync treshold 2015-08-11 15:54:44 +03:00
UdjinM6
6b74652b01 track hashes and update "last..." only twice per hash 2015-08-05 04:18:37 +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
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
8acfd77750 Fixed HaveBudget, allow failure after 3 tries 2015-07-28 13:14:32 -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
04fc6e1fb4 Change rest of sync process to direct inv messages / reduced sync timeout 2015-07-25 20:17:53 -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
33ee068d6a Slightly refactor masternode statuses:
- better names (MASTERNODE_INITIAL was defined twice before that)
- move to proper header
2015-07-17 20:01:54 +03:00
UdjinM6
91eda7e21c Few sync improvements:
- do not call Added....() inside CMasternodeSync::Process() - that was "faking" sync process
- unify "RequestedMasternodeAttempt <= ..." logic and define MASTERNODE_SYNC_TIMEOUT
- add missing masternodeSync.AddedMasternodeList() to CMasternodeMan::ProcessMessage()
- fix "include"s
- don't check vecMasternodesUsed while not synced
2015-07-17 13:08:15 +03:00
Evan Duffield
7101c951f8 Budget Improvements
- Client bump
- Improved syncing logic (sholud stop hanging issues)
- New spork for turning on super blocks
- Fixed issue with sending old/invalid finalized budgets
- Fixed issue with syncing clients and lack of confirmations with budget items (for IX)
2015-07-16 20:03:42 -07:00
Evan Duffield
6e0a468701 Highly improved syncing process 2015-07-14 19:48:02 -07:00