Commit Graph

13221 Commits

Author SHA1 Message Date
TheLazieR Yip
471365bf6c Masternode Sync should be finished before mining processing (#1240)
* Reject getblocktemplate request until masternode sync is finished

* Pending internal miner until masternode sync is finished
2017-01-01 14:18:33 +04:00
TheLazieR Yip
89d14c5274 Fix Hot Masternode Starting (#1239) 2017-01-01 14:18:21 +04:00
TheLazieR Yip
7815f6e32e Provide correct warning in CheckForkWarningConditions for large worked invalid chain. (#1234) 2017-01-01 14:18:05 +04:00
Holger Schinzel
275b95cb8e update to 2017 (#1228)
Happy New Year :-)
2017-01-01 10:06:48 +01:00
UdjinM6
7544a70e1b display chainwork for every tip in getchaintips (#1237) 2016-12-30 20:38:53 +04:00
Holger Schinzel
96dda2790c added testnet checkpoint (#1235) 2016-12-30 08:05:29 +01:00
Holger Schinzel
eddfa5a097 fix Bitcoin ref (#1229) 2016-12-28 11:09:04 +01:00
UdjinM6
32d5f4b013 Ignore payments and governance cache when mncache is empty (#1227) 2016-12-26 19:33:28 +04:00
UdjinM6
cda28d3c72 fix mnb renewal (#1226) 2016-12-26 10:44:48 +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
UdjinM6
70b374062b [WIP] Few mn list sync changes (#1223)
* Few mn list sync changes:
- add more mn states
- only remove spent
- send mn ping in addition to mn announce on sync
- manage mn announces more carefully
- expire mns created from broadcasts with invalid ping
- old fWaitForPing logic for old nodes, should be helpful during migration period

This also adjusts active mn auto-start logic accordingly.
2016-12-24 06:49:13 +04:00
Tim Flynn
c438e74563 Improve governance debugging information (#1221)
* Add missing MN vin to error message for missing masternodes

* Added creation time and masternode vin to gobject output
2016-12-22 07:20:05 +04:00
UdjinM6
1c6c0d8b7e fix AskForMN (#1217)
Should also store/check node we asked for mn list entry, not outpoint only. This should help to get mn list in sync when some nodes refuse to answer thus blocking such requests for the same outpoint for the next 3h and increasing mn list inconsistency.
2016-12-21 03:55:55 +04:00
Holger Schinzel
0e65968384 fix Qt 5.5 download path (#1216) 2016-12-20 17:31:54 +04:00
UdjinM6
a0c93ebaa5 cleanup/fix includes: (#1214)
- some were not used, some were included twice, some were in the wrong place, some were missing (but it compiled because some were in the wrong place)
- organized a bit better, grouped dash specific includes in original bitcoin files, should save some time solving conflicts when/if merging patches later
2016-12-20 17:27:59 +04:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
Tim Flynn
8c16880b15 Fix governance hash (#1208)
* Add vinMasternode to governance object hash and bump protocols

* Add collateral hash to governance object hash

* Added signature to object hash

* Revert "Add collateral hash to governance object hash"

This reverts commit 2f60c280f3ce1e26cb4ab12f8287424b200aab83.
2016-12-20 07:25:20 +04:00
UdjinM6
fa301ecb49 local nLastDsq (#1211)
* Revert behaviour introduced in 5e1a6afe7f, make nLastDsq local variable instead of being network-wide one. Should fix mixing for new clients and for those who was offline for too long.

* fix docs
2016-12-20 03:09:38 +04:00
UdjinM6
ff12698ed5 Clean up rpcgovernance (#1213) 2016-12-20 03:06:06 +04:00
UdjinM6
b04f67546d GetBudgetSystemCollateralTX should use "this" wallet, not "main" (#1212) 2016-12-20 03:05:24 +04:00
UdjinM6
88ee7a372e better local address discovery for active mn (#1203)
* Make local address discovery more robust in CActiveMasternode

* parameter interaction: -masternode=1 -> setting -listen=1

*  slightly postpone first run to give net thread a chance to connect to some peers

* make sure local address detected in CActiveMasternode::ManageStateInitial is valid

* Simplified address detection logic
2016-12-15 20:27:24 +04:00
Tim Flynn
84c242fc8c Restore relaying and fix rate threshold (#1206)
* Restore object relaying during orphan processing

* Relay votes during orphan processing

* Allow relaying of objects and votes during syncing

* Double rate check threshold
2016-12-15 20:27:09 +04:00
Tim Flynn
8fc8e6c8c2 Implement rate check using buffer (#1202)
* Implemented buffer for masternode rate checks

* Change upper limit on object timestamp to 1 hour in the future
2016-12-14 19:28:55 +04:00
Tim Flynn
711a5fbf20 Deletion time fix (#1205)
* Fix deletion time bug
* Only set deletion time if it has not already been set
2016-12-14 19:27:46 +04:00
UdjinM6
072b0fd708 fix annoying compiler warnings (#1204) 2016-12-14 17:33:46 +04:00
UdjinM6
30da3f56a7 gobject rpc changes: (#1201)
- added description for 'deserialize'
- added 'type' filter to 'list'
- added 'count' command (changed CGovernanceManager::ToString to output a bit more detailed info)
2016-12-12 05:44:46 +04:00
UdjinM6
8f20c3ba46 fix future time bug (#1200) 2016-12-11 15:08:10 +04:00
UdjinM6
e9125835b7 Don't increase PoSe ban score when can't connect (#1197) 2016-12-11 10:18:52 +04:00
Tim Flynn
df5abf1468 Convert masternode rate checks to use object timestamp (#1198)
* Change rate check logic to avoid DoS attacks

* Convert rate check to use object timestamp instead of arrival time

* Update cached variables before checking for superblocks

* Ensure that last times are monotonically non-decreasing

* Bump governance manager serialization format

* Improved rate check error reporting
2016-12-11 10:17:38 +04:00
UdjinM6
a11bd2c5ba small ix fixes: (#1193)
- make script verification a part of IsInstantSendTxValid()
- relax nLockTime for IS txes since we don't have compatibility with 12.0 IS txes anyway now (fee is lower in 12.1)
2016-12-09 00:03:57 +04:00
UdjinM6
cf57c5ca93 adjust variable names and log messages in IsBlockValueValid (#1192) 2016-12-09 00:03:46 +04:00
Tim Flynn
15bb93d5e8 Rate check fixes (#1196)
* Fix rate checks for governance objects

* Do not update last vote time when rate checks are disabled

* Bump governance serialization version
2016-12-09 00:00:49 +04:00
Tim Flynn
4dac0025a7 Governance relaying fixes (#1195)
* Vote relaying changes
 - Remove vote relaying from ProcessVote
 - Remove vote relaying from orphan vote processing
 - Relay vote in ProcessMessages (only)

* Do not relay governance objects during orphan processing

* Restore relaying of local votes

* Changed overloaded function name: ProcessVote->ProcessVoteAndRelay
2016-12-07 08:16:34 +04:00
UdjinM6
32ab9f2624 changes in CMasternode::Check (#1194)
* add log output when mn state changes (debug mode only)

* trigger FlagGovernanceItemsAsDirty only when mn state actually changes
2016-12-06 23:50:54 +04:00
TheLazieR Yip
3914f4a1c4 Update superblock valid checking to allow block creation by p2pool (#1190)
* Update superblock valid checking to allow block creation by p2pool

* Comment correction for superblock payment not found.

* Comment correction
2016-12-06 21:26:44 +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
Tim Flynn
9f2d79d920 Fix masternode rate checks (#1187)
* Added logging to PushInventory

* Fix LogPrint format

* Log errors found during governance syncing

* Turn off rate checks during syncing

* Turn off rate check during maintenance
2016-12-05 00:33:39 +04:00
UdjinM6
3ebcb78e12 do not conect trayIconActivated on mac (#1184) 2016-12-05 00:33:23 +04:00
UdjinM6
80444ea8e4 optimize PS (#1180)
* move HasCollateralInputs out of the loop

* optimize HasCollateralInputs
2016-12-05 00:33:11 +04:00
Tim Flynn
786f17e1f2 Merge #1186: Added logging of sent inv messages 2016-12-03 22:33:30 +01:00
Tim Flynn
8126e92441 Merge #1185: Trigger removel changes
- Do not expire superblock triggers on execution
  - Expire trigger objects about 1 day (576 blocks) after their event height is past
2016-12-03 20:46:08 +01:00
UdjinM6
bc3b349cc1 expired masternodes should not be auto-re-enabled on start, should keep expired state (#1182) 2016-12-02 21:42:45 +04:00
UdjinM6
d9b1e7734a Few mn payments fixes: (#1183)
- avoid processing same vote multiple times
- do not relay votes until synced
- do not ban for wrong signature of old votes
- do not check masternode ranks for old votes on regular (non-MN) nodes
2016-12-02 21:15:37 +04:00
UdjinM6
b847642428 bug: int -> int64_t (#1179) 2016-12-02 16:53:28 +04:00
Tim Flynn
8c12ab2b47 Don't penalize nodes during orphan processing (#1181) 2016-12-02 16:53:18 +04:00
UdjinM6
c3e5757c25 fix relay bug (#1178) 2016-12-02 14:32:28 +04:00
UdjinM6
d9fb724943 Refactor IsBlockValueValid (#1177)
* refactor IsBlockValueValid to return actual error string, use it in error message for bad-cb-amount

* make error messages in IsBlockValueValid even more verbose
2016-12-02 01:58:55 +04:00
Tim Flynn
d88249b787 Merged #1176: Added log message to print block height when IsBlockValueValid returns false 2016-12-01 14:58:17 +01:00
UdjinM6
6d9e414c6a Split CheckAndUpdate: (#1175)
- SimpleCheck - to verify only future time and unknown blockhash
- CheckAndUpdate - to verify everything
2016-11-30 23:32:36 +04:00