Commit Graph

65 Commits

Author SHA1 Message Date
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
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
Evan Duffield
e4a0e8340c Masternode payment cache and mnget changes
- Cache saves masternode payment history
- On startup, the client will find the most recent block and calculate the amount of entries to ask for. The other peer will then send that amount of entries to save bandwidth on restarts.
2015-07-20 19:24:43 -07:00
Evan Duffield
6df7519e02 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-20 15:14:18 -07:00