Commit Graph

6801 Commits

Author SHA1 Message Date
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
crowning-
76c4cfc0de UI: Limit display of Sendcoins-popup to 10 entries. 2015-07-26 18:43:22 +02:00
Evan Duffield
da21fed1f5 version bump 2015-07-26 07:36:40 -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
f82b34f3f2 better sorting algorithm
-- sort props by votes then nFeeHashTX
2015-07-26 05:26:15 -07:00
Evan Duffield
2b3edff435 Only relay good budget items 2015-07-25 21:23:38 -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
04fc6e1fb4 Change rest of sync process to direct inv messages / reduced sync timeout 2015-07-25 20:17:53 -07:00
Evan Duffield
61becf2f11 directly send inv messages 2015-07-25 19:27:40 -07:00
Evan Duffield
c0a5dfba61 Masternode inv messages / save seen in mncache 2015-07-25 12:07:30 -07:00
Evan Duffield
43101ebeca Implement planned hard forks, August 24, 2015 2015-07-25 11:02:38 -07:00
Evan Duffield
0b9d761a38 only take newest votes 2015-07-25 09:59:59 -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
evan82
24183b156b Merge pull request #456 from UdjinM6/v0.12.0.x_info_mn_count
V0.12.0.x more info for masternode count output/rpcconsole dialog
2015-07-25 06:32:41 -07:00
evan82
26b2c3243c Merge pull request #455 from UdjinM6/v0.12.0.x_mnb_hash_lastPing
V0.12.0.x include lastPing in mnb hash calculation
2015-07-25 06:31:51 -07:00
UdjinM6
8079967cc5 more info for masternode count output/rpcconsole dialog 2015-07-25 11:18:22 +03:00
UdjinM6
5a6e474ec6 include lastPing in mnb hash calculation 2015-07-25 09:22:58 +03: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
38cd9bd679 Improve portability of mn ranking algos 2015-07-24 09:44:46 -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
c137a204fb Added calcscore cmd 2015-07-24 08:21:02 -07:00
Evan Duffield
85e1280bc3 limit mnw votes-per-mn 2015-07-24 07:12:48 -07:00
Evan Duffield
48f9e277f9 changed min ver back to 70066 2015-07-23 18:55:39 -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
ac947444da protocol bump 2015-07-23 15:02:15 -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
fa6216f115 Check for existing budget hash before submitting 2015-07-23 11:48:19 -07:00
Evan Duffield
9aca541200 inc min peer version to 70094 for testing 2015-07-23 11:36:07 -07:00
Evan Duffield
5c935c8c86 version bump 2015-07-23 11:16:49 -07:00
Evan Duffield
f727b2dbd7 Fixed RemainingPayments display bug
- When proposal hasn't started yet, remaining payment is calculated incorrectly.
2015-07-23 07:36:41 -07:00
Evan Duffield
35cc21edf3 New masternodes must wait till end of queue 2015-07-23 07:16:55 -07:00
Evan Duffield
cd862ac1ea Disable multisig proposals / IsScheduled read ahead 8 blocks 2015-07-23 06:46:38 -07:00
evan82
5cccd2b269 Merge pull request #447 from crowning-/UI_Enhancements
UI: fixed width of wallet-repair-buttons for longer locales
2015-07-23 06:31:09 -07:00
evan82
516c5fff0f Merge pull request #450 from UdjinM6/v0.12.0.x_active_mn
V0.12.0.x active masternode fixes
2015-07-23 06:30:46 -07:00
evan82
9e879d5e8d Merge pull request #451 from UdjinM6/v0.12.0.x_fix_rpc
V0.12.0.x small fixes for rpc
2015-07-23 06:29:33 -07:00
UdjinM6
ae48f0984e small fixes for rpc 2015-07-23 05:32:13 +03:00
UdjinM6
6123770bf8 active masternode fixes 2015-07-23 05:19:37 +03:00
Evan Duffield
18a908065f Fixed mnbudget suggestion 2015-07-22 18:53:17 -07:00
Evan Duffield
b9d47a0c6f Submit finalized budget 2 days before payment 2015-07-22 17:54:47 -07:00
Evan Duffield
c2a23c5beb Fix sync-spork logic 2015-07-22 16:51:51 -07:00
Evan Duffield
dec45ac67a Fixed bug with remotely enabled masternodes and wrong protocol version 2015-07-21 20:54:58 -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
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
de485fe93d Allow peers to ask for budget votes on testnet more than once 2015-07-21 07:05:35 -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
1eab82ae2b Erase seen masternode broadcasts when masternode drops from list 2015-07-20 16:48:57 -07:00
crowning-
49afaa0557 Merge remote-tracking branch 'upstream/v0.12.0.x' into UI_Enhancements 2015-07-21 01:21:23 +02: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
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
UdjinM6
8198291c7b Force sync progress:
If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
and we still have nothing, assume there is nothing to sync but give it another
MASTERNODE_SYNC_TIMEOUT seconds until we move further
2015-07-20 22:33:18 +03:00
Evan Duffield
d193cc2d91 Clean up broadcast list when nodes are removed 2015-07-20 12:20:15 -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
crowning-
52b930329d UI: fixed width of wallet-repair-buttons for longer locales 2015-07-20 20:52:49 +02:00
Evan Duffield
f36e4251ab mnb/mnp debugging 2015-07-20 11:43:10 -07:00
evan82
aa996b2615 Merge pull request #446 from UdjinM6/v0.12.0.x_fix_mnb_ping_acceptance
V0.12.0.x fix mnb ping acceptance
2015-07-20 11:21:15 -07:00
UdjinM6
cc26cff893 do not require active MN on ping check from UpdateFromNewBroadcast 2015-07-20 20:46:22 +03:00
evan82
a683078867 Merge pull request #445 from crowning-/UI_Enhancements
UI: allow "," in "Min amount" field of Transaction-View
2015-07-20 10:45:37 -07:00
Evan Duffield
77af4fb6ad MNP ping changes
- Ping every 5 minutes
- Nodes will propagate pings every 10 minutes
2015-07-20 10:44:27 -07:00
crowning-
fb5f80a06a UI: allow "," in "Min amount" field of Transaction-View 2015-07-20 18:28:49 +02:00
UdjinM6
753297ea99 drop -masternodeminprotocol/nMasternodeMinProtocol, use masternodePayments.GetMinMasternodePaymentsProto() 2015-07-20 08:03:36 +03:00
UdjinM6
5f9c676e05 fix condition for a recent block in mn sync 2015-07-20 04:54:03 +03:00
UdjinM6
b1f19c7e82 process checks we can without waiting for full sync 2015-07-20 04:54:02 +03:00
UdjinM6
4bcd548b62 slightly refactor 2015-07-20 04:54:02 +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
e6327e5546 Disable coinbase payee cache 2015-07-19 17:06:52 -07:00
Evan Duffield
57df98b38a Force chain reprocess on load for coinbase-payee index 2015-07-19 15:40:40 -07:00
Evan Duffield
e1279ebf1d Reprocess best chain for coinbase payee on each block 2015-07-19 11:19:11 -07:00
Evan Duffield
60f7428585 Disabled coinpayee cleanup 2015-07-19 10:56:45 -07:00
Evan Duffield
9668befdf4 Dont ask for mnb of known masternodes 2015-07-19 09:38:23 -07:00
Evan Duffield
c95111476c vesion bump 2015-07-19 08:51:02 -07:00
Evan Duffield
898fbcae02 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-19 08:50:01 -07:00
Evan Duffield
9c34930680 Disable nDos on early ping / sync regtest changes 2015-07-19 08:49:46 -07:00
Evan Duffield
143c80789c rebuild index when switching chains 2015-07-19 06:45:35 -07:00
Evan Duffield
2e6eb9f2b6 incremental update of coinbase cache 2015-07-19 06:28:23 -07:00
crowning-
19d698529e UI: Persist Darksend+InstantX settings (Cut'n'paste error fixed) 2015-07-19 14:42:38 +02:00
crowning-
c8c83af2f5 UI: Persist Darksend+InstantX settings and default to Darksend=false on first start (revert screen-size change) 2015-07-19 14:29:18 +02:00
crowning-
63c8ae1516 UI: Persist Darksend+InstantX settings and default to Darksend=false on first start 2015-07-19 14:25:55 +02:00
Evan Duffield
9a4914e6c1 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-18 12:52:23 -07:00
Evan Duffield
e82e5339f9 Better NewBlock sync check 2015-07-18 12:52:12 -07:00
evan82
e2257c844b Merge pull request #440 from UdjinM6/v0.12.0.x_rpc_masternode
V0.12.0.x few small masternode rpc fixes
2015-07-18 12:34:53 -07:00
Evan Duffield
841c7c270b version/proto bump 2015-07-18 12:29:19 -07:00
Evan Duffield
7aa9676118 Only check vote sigs once / payee cache update on newblock 2015-07-18 12:24:06 -07:00
UdjinM6
27dd4ccf06 move only 2015-07-18 22:17:17 +03:00
UdjinM6
a3dfd86058 Code cleanups for masternode rpc
- drop boost/lexical_cast
- drop c_str() where applicable
- slightly prettify descriptions and some output
2015-07-18 21:20:22 +03:00
UdjinM6
aa96d701af tabs to spaces 2015-07-18 20:40:19 +03:00
Evan Duffield
90f508c67e Pay masternodes when no valid budget 2015-07-18 08:53:40 -07:00
Evan Duffield
956d85c59b Change variable naming for rpc commands
- Added MonthlyPayment and TotalPayment
2015-07-18 08:48:44 -07:00
Evan Duffield
637805b2de Require 7 confirmations for finalized budget 2015-07-18 07:49:39 -07:00
Evan Duffield
853863ae86 Only check budget block payees after sync is complete 2015-07-18 06:46:54 -07:00
Evan Duffield
f9e2b18e57 version bump 2015-07-17 21:38:56 -07:00
Evan Duffield
916deaa398 Small syncing improvement 2015-07-17 21:38:15 -07:00
evan82
494afeef50 Merge pull request #439 from UdjinM6/v0.12.0.x_revert_lower_fee
V0.12.0.x revert attempts to lower fee
2015-07-17 20:15:04 -07:00
evan82
45cd565f6c Merge pull request #438 from UdjinM6/v0.12.0.x_register_MN
V0.12.0.x more checks on MN register (start-many/alias)
2015-07-17 20:14:49 -07:00
UdjinM6
990e32f3c0 revert all changes regarding attempts to lower fee 2015-07-18 03:35:59 +03:00
UdjinM6
bf1ec73357 more checks on MN register 2015-07-18 03:10:47 +03:00
Evan Duffield
59024b1b46 Resync on sleep/wake or failure 2015-07-17 16:49:41 -07:00
evan82
d9f3102313 Merge pull request #435 from UdjinM6/v0.12.0.x_ref_rpc_budget
V0.12.0.x few rpc budget fixes
2015-07-17 11:10:39 -07:00
evan82
a8e79ecd16 Merge pull request #434 from UdjinM6/v0.12.0.x_fix_fees
V0.12.0.x Fix fees
2015-07-17 11:09:24 -07:00
evan82
8ec3b473c1 Merge pull request #432 from UdjinM6/v0.12.0.x_ref_mn_statuses
V0.12.0.x Slightly refactor masternode statuses
2015-07-17 11:09:00 -07:00
Evan Duffield
d5c4f3bea4 Only ask for missing masternodes/budget items after sync is complete 2015-07-17 11:03:49 -07:00
evan82
f9ada02a7d Merge pull request #433 from UdjinM6/v0.12.0.x_ref_budget
V0.12.0.x Budget module refactor
2015-07-17 10:29:59 -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
1282f676e5 Fixes for budget rpc
- readability
- drop c_str()
- drop boost/lexical_cast
- ValueFromAmount for money
- fValid as bool
- fix/simplify descriptions
- more info on vote-many
- feedback on mnbudget vote
2015-07-17 19:28:25 +03:00
UdjinM6
31e703dfcd Fix fees
ref https://dashtalk.org/threads/v12-testing-thread.5484/page-62#post-59368
2015-07-17 18:33:15 +03: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
b6001065ae Set fValid=true when receiving new votes 2015-07-17 07:40:26 -07:00
Evan Duffield
d60f3f6984 Added more information to getvotes 2015-07-17 07:38:35 -07: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
ac488262c2 version bump 2015-07-16 12:13:42 -07:00
Evan Duffield
e5f37b8c98 New Spork : Reconsider X Blocks
- This allows us to fix forks remotely without anyone having to reindex. It remains trustless, because all nodes will simply find the longest chain.
2015-07-16 11:06:45 -07:00
Evan Duffield
017217f423 Added IsTransactionValid for finalized budgets 2015-07-16 10:47:51 -07:00
Evan Duffield
fc54241441 Default txindex to true 2015-07-16 07:34:40 -07:00
Evan Duffield
3c8b335594 Force txindex when a Mastenode 2015-07-16 03:00:16 -07:00
Evan Duffield
e65a1edce3 version / proto bump 2015-07-16 02:43:53 -07:00
Evan Duffield
f139dbbc74 Fixed prepare -- shouldn't check collateral 2015-07-15 15:56:40 -07:00
Evan Duffield
ffed6dc948 Added CBudgetManager::ToString 2015-07-15 14:21:21 -07:00
Evan Duffield
21769085ec Test feeTX in IsValid 2015-07-15 07:18:03 -07:00
Evan Duffield
db080fec22 version bump 2015-07-14 19:49:01 -07:00
Evan Duffield
6e0a468701 Highly improved syncing process 2015-07-14 19:48:02 -07:00
Evan Duffield
9e9e01b5f6 Fixed GetBudget 2015-07-14 16:06:00 -07:00
Evan Duffield
a4e3031db1 Refactored CleanAndRemove Proposals 2015-07-14 15:52:07 -07:00
Evan Duffield
50d1b827eb Fixed proposal fee IX confirmations 2015-07-14 12:52:46 -07:00
Evan Duffield
30ea44322e Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-14 08:04:18 -07:00
Evan Duffield
c2d4b553c5 version bump 2015-07-14 08:04:07 -07:00
evan82
eb7ca6fdef Merge pull request #430 from UdjinM6/v0.12.0.x_mergebtc
V0.12.0.x merge latest fixes from bitcoin 10.0.2
2015-07-14 07:55:38 -07:00
Evan Duffield
d228b4bf47 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-14 07:55:07 -07:00
Evan Duffield
665a93cd4f Merge branch 'v0.12.0.x_lower_mn_reuse' of https://github.com/UdjinM6/dash into UdjinM6-v0.12.0.x_lower_mn_reuse 2015-07-14 07:44:22 -07:00
evan82
a0a4940097 Merge pull request #428 from UdjinM6/v0.12.0.x_fix_IsBudgetCollateralValid_log
V0.12.0.x Fix CBudgetProposalBroadcast::IsBudgetCollateralValid log output / strError
2015-07-14 07:43:08 -07:00
evan82
eb9aa2cb87 Merge pull request #427 from UdjinM6/v0.12.0.x_change_sync_activemn_start
V0.12.0.x Start all DS, mnodeman, IX related checks and activate mn only after sync is over
2015-07-14 07:41:57 -07:00
evan82
d98a6fae23 Merge pull request #426 from UdjinM6/v0.12.0.x_mnb_mnp
V0.12.0.x major (incompatible) masternode broadcast/ping changes
2015-07-14 07:41:09 -07:00
Evan Duffield
e57f2d4003 Check IsValid when preparing fee 2015-07-14 07:05:33 -07:00
Suhas Daftuar
c2ffbe5bdd Ignore getheaders requests when not synced.
Rebased-From: a1ba0778dd
Github-Pull: #6172
2015-07-14 13:19:47 +03:00
Alex Morcos
09a4cb65fc Fix removing of orphan transactions
We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans.  Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.

Github-Pull: #5985
Rebased-From: 14d4eef799
2015-07-14 13:19:47 +03:00
Wladimir J. van der Laan
850dcb9334 Add option -alerts to opt out of alert system
Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Conflicts:
	src/init.cpp
	src/main.cpp

Github-Pull: #6274
Rebased-From: 02a6702a82
2015-07-14 13:19:09 +03:00
Tom Harding
84b483e3c3 Fix getbalance *
Chance "getbalance *" not to use IsTrusted.  The method and result
now match the "getbalance <specific-account>" behavior. In
particular, "getbalance * 0" now works.

Also fixed a comment -- GetGalance has required 1 confirmation
for many years, and the default "getbalance *" behavior matches
that.

Github-Pull: #6276
Rebased-From: 7d6a85ab5b
Rebased-By: @trasher-
2015-07-14 13:19:09 +03:00
Wladimir J. van der Laan
c709b86a5d json: fail read_string if string contains trailing garbage
Change `read_string` to fail when not the entire input has been
consumed. This avoids unexpected, even dangerous behavior (fixes #6223).

The new JSON parser adapted in #6121 also solves this problem so in
master this is a temporary fix, but should be backported to older releases.

Also adds tests for the new behavior.

Github-Pull: #6226
Rebased-From: 4e157fc60d
2015-07-14 13:19:08 +03:00
Luke Dashjr
2fc7256f72 Remove P2SH coinbase flag, no longer interesting
Github-Pull: #6203
Rebased-From: d449772cf6
2015-07-14 13:19:08 +03:00
Wladimir J. van der Laan
d2ccd08ef1 Parameter interaction: disable upnp if -proxy set
To protect privacy, do not use UPNP when a proxy is set. The user may
still specify -listen=1 to listen locally (for a hidden service), so
don't rely on this happening through -listen.

Fixes #2927.

Conflicts:
	src/init.cpp

Rebased-From: 8c35b6f3be
Github-Pull: #6153
2015-07-14 13:19:08 +03:00
Wladimir J. van der Laan
07053c3ada Fix two problems in CSubNet parsing
Fix two CSubNet constructor problems:

- The use of `/x` where 8 does not divide x was broken, due to a
  bit-order issue

- The use of e.g. `1.2.3.4/24` where the netmasked bits in the network
  are not 0 was broken. Fix this by explicitly normalizing the netwok
  according to the bitmask.

Also add tests for these cases.

Fixes #6179. Thanks to @jonasschnelli for reporting and initial fix.

Rebased-From: b45c50ce51
Github-Pull: #6186
2015-07-14 13:19:07 +03:00
Wladimir J. van der Laan
bd3ed5c280 Simplify code for CSubnet
Simplify the code by using CAddress.ip directly, instead of the reversed
GetByte() semantics.

Rebased-From: 19e8d7be42
Github-Pull: #6186
2015-07-14 13:19:07 +03:00
UdjinM6
59271beabd Fix CBudgetProposalBroadcast::IsBudgetCollateralValid log output / strError 2015-07-14 11:32:49 +03:00
UdjinM6
6651abe343 lower mn reuse rate 2015-07-14 10:38:04 +03:00
UdjinM6
f2c5653379 Start all ds, mnodeman, ix related checks and activate mn only after sync is over 2015-07-14 09:16:19 +03:00
UdjinM6
3ef2cec49d proto bump 2015-07-14 08:59:08 +03: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
Evan Duffield
bee6941195 Fixed Propagation Of Budgets / Proto Bump 2015-07-13 20:03:08 -07:00
Evan Duffield
6fa0d23714 Commit collateral transaction correctly for finalized budget 2015-07-13 06:34:54 -07:00
Evan Duffield
40a14cb802 version bump / proto bump 2015-07-12 16:39:37 -07:00
Evan Duffield
acf09d1bc1 Collateral is now checked for age 2015-07-12 16:37:55 -07:00
Evan Duffield
8e7c4e7491 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-12 14:04:00 -07:00
Evan Duffield
304ab6c7ab Various improvements to the proposal system
- Proposal scripts are now checked correctly
- Fee transactions are created correctly for IX and non-IX types
2015-07-12 14:02:39 -07:00
crowning-
9b170483b7 Minor Options-Dialog enhancements 2015-07-12 20:23:38 +02:00
crowning-
3f19365d2a Minor Coincontrol-Dialog enhancements 2015-07-12 20:04:52 +02:00
evan82
82bb9617ee Merge pull request #424 from UdjinM6/v0.12.0.x_fix_progress
V0.12.0.x calculate ds progress from 3 parts
2015-07-12 10:48:05 -07:00
evan82
bacd3e456f Merge pull request #423 from crowning-/UI_Enhancements
De-selecting all transactions resets computed sum to 0 now.
2015-07-12 10:47:52 -07:00
Evan Duffield
2885f9e6ca protocol bump / version bump 2015-07-12 10:47:28 -07:00
Evan Duffield
6b7ab34d30 Budget collateral changes
- Use OP_RETURN >> BudgetHash, with an output the size of BUDGET_FEE_TX. This will allow us to burn coins, that will be recreated and avoid hitting the "insane fee" checks
2015-07-12 10:38:32 -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
UdjinM6
e7b00b8b7e calculate ds progress from 3 parts 2015-07-12 19:18:03 +03:00
crowning-
604914c15e De-selecting all transactions resets computed sum to 0 now. 2015-07-12 18:00:48 +02:00
Evan Duffield
0a02fa00bb removed vote from prepare/submit and fixed some help strings 2015-07-12 08:09:06 -07:00
evan82
635a5fbf97 Merge pull request #422 from crowning-/v0.12.0.x
Fix Darksend completion UI
2015-07-12 07:46:23 -07:00
Evan Duffield
a59c5d9edd fixed issues with rpc commands 2015-07-12 07:45:58 -07:00
crowning-
60358c28e2 Fix Darksend completion UI 2015-07-12 12:57:59 +02:00
UdjinM6
2dbf8290f7 Few fixes for mnbudget rpc
- do not ask for vote on prepare and submit
- fix bug found by @thelazier
- fix command descriptions to avoid confusions
- tiny refactoring for tx/ix
2015-07-12 09:39:22 +03:00
Evan Duffield
640e721487 fixed spork show 2015-07-11 16:17:03 -07:00
Evan Duffield
03d6f3c140 Merge branch 'v0.12.0.x' of https://github.com/dashpay/dash into v0.12.0.x 2015-07-11 13:26:22 -07:00
Evan Duffield
c701839a43 Proposal Security Overhaul
Submissions to the network now require a fee to be paid to the network (mining fee) using a special transaction with a OP_RETURN && ProposalHash in one of the outputs. This allows the network to filter spam quickly, while also allowing anyone to submit a proposal to the network.

To implement these changes we've introduced a few new commands:

mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]
- To create the special transaction

mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX
- After the transaction is accepted by the network and has 3 confirmations, you can submit the transaction to the network here

mnbudget show
- Get the proposal hash from here

mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN
- You can now simply vote by hash using this command
2015-07-11 13:20:12 -07:00
UdjinM6
1f978f561c Temporary unlock MN coins locked by -mnconflock on masternode start-alias/many and immediately lock them back right after finding all available coins 2015-07-10 19:53:51 +03:00
evan82
4a514b7e7c Merge pull request #420 from UdjinM6/v0.12.0.x_masternode.conf_err_verbose
V0.12.0.x make masternode.conf parsing more verbose on errors / translate strings
2015-07-10 09:18:37 -07:00
UdjinM6
7a09989195 make masternode.conf parsing more verbose on errors / translate strings 2015-07-10 19:08:50 +03:00
UdjinM6
d597653615 fix alternative units in send dialog 2015-07-09 06:54:30 +03:00
Evan Duffield
2d118769f0 version/proto bump 2015-07-08 10:27:26 -07:00
Evan Duffield
8a5ebeaa62 added spork for reseting budget 2015-07-08 10:25:47 -07:00
Evan Duffield
a351456c17 Fixed invalid saved budget.dat issue 2015-07-08 10:17:16 -07:00
Evan Duffield
91a0887a0d Fix active removal of proposals 2015-07-08 08:55:52 -07:00
Evan Duffield
a8f5472037 fixed compile error 2015-07-08 08:19:07 -07:00
evan82
246037abdb Merge pull request #415 from UdjinM6/v0.12.0.x_budgets_var_naming_logging
V0.12.0.x use proper naming for variables in masternode-budget
2015-07-08 07:35:20 -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
evan82
2a3b96e020 Merge pull request #411 from UdjinM6/v0.12.0.x_various_small_fixes
V0.12.0.x various small fixes
2015-07-08 07:19:41 -07:00
evan82
dea8f15668 Merge pull request #413 from UdjinM6/v0.12.0.x_relayinv
V0.12.0.x introduce RelayInv
2015-07-08 07:17:47 -07:00
evan82
69aced6378 Merge pull request #409 from UdjinM6/v0.12.0.x_fix_GetInputDarksendRounds
V0.12.0.x Fix GetInputDarksendRounds
2015-07-08 07:16:29 -07:00
evan82
87207fbc36 Merge pull request #410 from UdjinM6/v0.12.0.x_fix_progress
V0.12.0.x (Yet) another attempt to get DS progress displayed right
2015-07-08 07:15:39 -07:00
evan82
5914a24f47 Merge pull request #408 from crowning-/v0.12.0.x
satoshi(s) -> duff(s) in locales
2015-07-08 07:15:29 -07:00
evan82
ede21b01fd Merge pull request #407 from UdjinM6/v0.12.0.x_satoshi_duff_dash
V0.12.0.x satoshi(s) -> duff(s)  &  Satoshi:x.x.x -> Dash Core:x.x.x
2015-07-08 07:15:09 -07:00
evan82
1a3975eab0 Merge pull request #406 from UdjinM6/v0.12.0.x_safer_PrepareDarksendDenominate
v0.12.0.x Implement safer version of CWallet::PrepareDarksendDenominate
2015-07-08 07:14:36 -07:00
UdjinM6
2fdb5b01f7 use proper naming for variables in masternode-budget 2015-07-08 05:35:58 +03: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