Commit Graph

133 Commits

Author SHA1 Message Date
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
Evan Duffield
eebb03eb13 reduce memory usage 2015-09-02 05:20:06 -07:00
Evan Duffield
47fc1e750e revert c5d6b reduced mnw bandwidth 2015-08-29 16:48:19 -07:00
evan82
82606d6322 Merge pull request #562 from UdjinM6/v0.12.1.x_cleanup
V0.12.1.x cleanup
2015-08-28 20:04:48 -07:00
Evan Duffield
c5d6b8486b Drastically reduce bandwidth/cpu usage for syncing
- Only send 1 winner per block for the previous 4500 blocks (was 10 items per block for 6000 blocks)
- Send full sync for last 5 blocks and next 20 blocks
- Turn off mnb cleaning, there aren't that many broadcasts on the network and this could cause problems in some cases
- Fix budget submission collateral check
2015-08-28 14:42:23 -07:00
UdjinM6
657bd1103e Few cleanups:
- compiling errors
- output
- CBitcoinAddress usage cleanup
- refresh qt project file
- fix typo in `masternode` debug category
2015-08-28 23:16:58 +03:00
UdjinM6
84b03d28e0 more mem fixes:
- clean mapMasternodeBlocks and mapSeenSyncMNB too
- clean mapSeenMasternodeBroadcast by lastPing sigTime nad fix clean threshold
2015-08-25 17:15:59 +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
UdjinM6
001b8cf709 more fixes - dsee updated entry 2015-08-14 08:11:57 +03: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
8c805923f9 Only relay dsee updates that are new 2015-08-11 18:39:22 -07:00
Evan Duffield
1a2f30c628 fixed compile err 2015-08-11 15:54:27 -07:00
Evan Duffield
5e1a6afe7f Send nLastDsq with MasternodeBroadcast 2015-08-11 15:43:19 -07:00
UdjinM6
6b8c6b5c1a allow mnb to be checked again if issue is (possibly) on our side 2015-08-10 03:38:00 +03:00
UdjinM6
c1aa277286 set a cooldown for MN check 2015-08-08 13:36:30 +03:00
UdjinM6
6b74652b01 track hashes and update "last..." only twice per hash 2015-08-05 04:18:37 +03:00
UdjinM6
dd8fa7c365 Continue work on more debug categories
- rebased to latest v12
- masternode, mnpayments, mnbudget and keepass categories
- remove c_str in logprint(f)
2015-07-31 19:01:18 +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
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
b04faf6e2d Update lastPing in mapSeen obj, remove ping from CMasternode hash 2015-07-25 21:13:17 -07:00
Evan Duffield
c0a5dfba61 Masternode inv messages / save seen in mncache 2015-07-25 12:07:30 -07: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
Evan Duffield
9e65749ff6 Safer calcscore implementation 2015-07-24 08:50:10 -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
cbe2bae130 Improved lastpaid and fixed votes calculation 2015-07-21 16:57:21 -07:00
Evan Duffield
b2c4e14ee8 Add offset for lastpaid / seperate min mnw peer version 2015-07-21 16:11:49 -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
37f55a3181 Refactored masternode payments system
- Replaced coinbase cache in favor of using the masternode payments voting system only
- Syncing masternode payments now supports up to the syncing the entire payment list
2015-07-20 15:09:42 -07:00
Evan Duffield
2d745eb539 Don't sync sporks in regtest, fix segfault
- segfault caused by:
-    fRequireEnabled = (fRequireEnabled && pmn->IsEnabled()) || !fRequireEnabled;
-    if(pmn != NULL && fRequireEnabled && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
2015-07-20 11:56:02 -07:00
Evan Duffield
f36e4251ab mnb/mnp debugging 2015-07-20 11:43:10 -07:00
UdjinM6
cc26cff893 do not require active MN on ping check from UpdateFromNewBroadcast 2015-07-20 20:46:22 +03:00
UdjinM6
753297ea99 drop -masternodeminprotocol/nMasternodeMinProtocol, use masternodePayments.GetMinMasternodePaymentsProto() 2015-07-20 08:03:36 +03:00
UdjinM6
86c869137f fixes for sync 2015-07-20 04:54:02 +03:00
UdjinM6
dba572ac96 use specific protocols 2015-07-20 04:54:02 +03:00
Evan Duffield
9c34930680 Disable nDos on early ping / sync regtest changes 2015-07-19 08:49:46 -07:00
UdjinM6
26fed43603 Major masternode broadcast/ping changes (incompatible with prev version, proto bump required):
- Do not rely on local lastTimeSeen and requested fRequested anymore. Use last know (signed) ping instead and base all logic on that. Should reduce mn list difference between
 nodes.
- Rework CActiveMasternode accordingly along with states, errorMessages, rpc etc.
- Clean some related code, move parts from public to private
- drop c_str in LogPrintf that were related to this functionality (todo: drop it for LogPrintf everywhere else)
2015-07-14 08:50:30 +03:00
UdjinM6
9cfdaffee5 introduce RelayInv 2015-07-08 04:31:10 +03:00
UdjinM6
189e48328d fix 2 crashes 2015-07-03 01:56:43 +03:00
Evan Duffield
f1b868f098 Removed PoSe due to consensus issues
- With nodes coming and going on the network, the network could come to different opinions about who should get paid next in line due to some nodes being flagged as failing a PoSe check. This will have to be fixed by introducing a blockchain based PoSe system, but that's out of the scope of this release. To fix the issues in the interrim, I'm removing PoSe checks for the time being.
2015-06-23 16:44:31 -07:00
Evan Duffield
3c01ffa444 fixed errors from merge 2015-06-23 10:59:14 -07:00
Evan Duffield
43e6976695 merged 2015-06-23 10:53:12 -07:00
Evan Duffield
c72355335c Coinbase Payee Cache Implementation
- Masternode nLastPaid is removed and a new caching system that keeps the last 30 days of coinbase payees replaces it
- To deal with some significant attack vectors, the masternode donation feature was removed. The donation feature was added to support developement anyway, so this will be replaced by the budgeting code.
-  This code should allow the network to come to consensus about who should be paid pretty effectively
2015-06-23 10:48:03 -07:00
UdjinM6
a6a04cb5c1 refactor: dsee -> mnb 2015-06-23 18:40:08 +03:00
Evan Duffield
947b79c8c5 Changed masternode broadcast/pinging logic
- Fixed a bug causing the broadcasts to be ignored in some situations
- Added some logic to rebroadcast new masternodes, so the rest of the network finds out about unknown nodes quickly
- should help masternode payments to work properly
2015-06-20 12:56:56 -07:00
UdjinM6
1e393d5b70 fix mnping 2015-06-18 21:41:01 +03:00
UdjinM6
91c7f66562 remove nLastPaid from CMasternodeBroadcast 2015-06-18 00:18:24 +03:00
UdjinM6
795ee119ec SecondsSincePayment (fix buffer overflow / change logic / move impl to cpp) 2015-06-17 23:03:09 +03:00