Commit Graph

67 Commits

Author SHA1 Message Date
evan82
dac2b0fae5 Merge pull request #490 from UdjinM6/v0.12.0.x_process_on_IsBlockchainSynced
V0.12.0.x process DS,IX,MN,DGBB on IsBlockchainSynced, not on IBD
2015-08-07 06:18:50 -07:00
UdjinM6
8063bcc8aa process DS,IX,MN,DGBB on IsBlockchainSynced, not on IBD 2015-08-07 07:48:55 +03:00
UdjinM6
f57c470f95 ask for mn / lower ban score for mnw 2015-08-07 06:07:40 +03:00
UdjinM6
6b74652b01 track hashes and update "last..." only twice per hash 2015-08-05 04:18:37 +03:00
Evan Duffield
e0031a807e Add superblock checks in various places 2015-08-03 11:38:08 -07:00
Evan Duffield
28fe729708 fix non-super block check 2015-08-02 09:31:12 -07: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
2ade614458 fix 2015-07-31 18:49:57 +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
Evan Duffield
ebc2591e4b Revert "lock debugging"
This reverts commit e230762d5a.
2015-07-30 07:49:08 -07:00
Evan Duffield
7a9028631a Revert "Disable CheckAndRemove on file dumps"
This reverts commit 3fc9ea4adf.
2015-07-30 07:41:14 -07:00
Evan Duffield
3fc9ea4adf Disable CheckAndRemove on file dumps
- Testing theory for lockups
2015-07-30 06:27:57 -07:00
Evan Duffield
e230762d5a lock debugging 2015-07-30 06:27:28 -07:00
Evan Duffield
dfad32272c Refactored locking for masternode winners and budgets 2015-07-29 12:29:46 -07:00
Evan Duffield
dc829e9d2c added syncing counts 2015-07-28 21:16:11 -07:00
Evan Duffield
b540068f94 enable mnw lock 2015-07-27 15:44:51 -07:00
Evan Duffield
e03879b3cf Update spork name : SPORK_10_MASTERNODE_PAY_UPDATED_NODES 2015-07-27 08:28:10 -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
c0a5dfba61 Masternode inv messages / save seen in mncache 2015-07-25 12:07:30 -07:00
Evan Duffield
61745d7724 Filter SigTime modes / version / proto bump 2015-07-24 16:10:44 -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
Evan Duffield
85e1280bc3 limit mnw votes-per-mn 2015-07-24 07:12:48 -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
cd862ac1ea Disable multisig proposals / IsScheduled read ahead 8 blocks 2015-07-23 06:46:38 -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
b2c4e14ee8 Add offset for lastpaid / seperate min mnw peer version 2015-07-21 16:11:49 -07:00
Evan Duffield
18fc14e03c Improved mnw sync 2015-07-21 15:14:54 -07:00
Evan Duffield
9e5cd419d0 Fixed compile error 2015-07-21 10:00:11 -07:00
Evan Duffield
3fae250190 Dont accept MNW from older masternodes 2015-07-21 08:09:17 -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
7aa9676118 Only check vote sigs once / payee cache update on newblock 2015-07-18 12:24:06 -07:00
Evan Duffield
853863ae86 Only check budget block payees after sync is complete 2015-07-18 06:46:54 -07:00
UdjinM6
b84bf76324 Budget module refactor
- readability (names / spaces / simplify constructions / etc)
- proper types (int for block height, CAmount for money)
- prettify log output / drop c_str() there
- read budgets on dump before writing (safety)
- microoptimization (++it)
- sort proposals by Yeas
- sort finalized budgets by votes
- fix few small bugs
2015-07-17 18:07:07 +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
Evan Duffield
0b3ef3c9fe Various fixes
- Proposal submitting now works properly
- Syncing proposals now works properly
- Finalized budgets are now created correctly
2015-07-12 10:34:21 -07:00
Evan Duffield
a8f5472037 fixed compile error 2015-07-08 08:19:07 -07:00
evan82
872ef7f9a9 Merge pull request #414 from UdjinM6/v0.12.0.x_fix_minmnpaymentsproto
V0.12.0.x fix min mnpayments proto usage
2015-07-08 07:20:31 -07:00
UdjinM6
635778f0ab use spork dependent logic to get the right minimal proto everywhere MIN_MNPAYMENTS_PROTO_VERSION was used previously 2015-07-08 05:00:09 +03:00
UdjinM6
9cfdaffee5 introduce RelayInv 2015-07-08 04:31:10 +03:00
Evan Duffield
4596e7f336 Vastly improved proposal management implementation
-Syncing now happens in stages. Masternodes and Sporks, then Masternode winners, then proposals. Some of these require the masternode signatures, otherwise there are race conditions within the syncing process itself.
-Resigning - When a proposal is sent to the network initially it's signed by a masternode, if that masternode goes inactive the proposal becomes invalid. Resigning allows other masternodes to update proposal keep it valid with the coming and going of masternodes.
-Resigning compatibility - non masternodes will scan and flag proposals as invalid to accept updated owners.
-Invalid votes are now actively removed from the proposals when they go inactive
- Remove budgets with negative votes of more than 10% of network
- Only allow proposals into budget that have more than 10% of network support
- Faster removal of inactive masternodes
2015-07-06 10:46:58 -07:00
Evan Duffield
a89b0e705f Fixed syncing code for stuck clients 2015-07-01 16:46:03 -07:00
Evan Duffield
8a4c22ec9a fixed typo 2015-06-25 11:22:11 -07:00
Evan Duffield
55dda32f34 Removed need for amounts in masternode winners protocol 2015-06-25 11:08:50 -07:00
Evan Duffield
e3963ea71c Spork changes / improvements
- New Command "Spork Active" : Show which sporks report as active
- Cleaned up the spork code and fixed some bugs with defaults
2015-06-25 08:17:53 -07:00
Evan Duffield
fd8afcc91a added masternode status info 2015-06-24 09:41:03 -07:00
UdjinM6
08a6803165 fixing all kind of typos etc 2015-06-23 23:44:20 +03: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