Commit Graph

66 Commits

Author SHA1 Message Date
Evan Duffield
90f508c67e Pay masternodes when no valid budget 2015-07-18 08:53:40 -07:00
Evan Duffield
637805b2de Require 7 confirmations for finalized budget 2015-07-18 07:49:39 -07:00
Evan Duffield
916deaa398 Small syncing improvement 2015-07-17 21:38:15 -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
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
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
017217f423 Added IsTransactionValid for finalized budgets 2015-07-16 10:47:51 -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
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
UdjinM6
59271beabd Fix CBudgetProposalBroadcast::IsBudgetCollateralValid log output / strError 2015-07-14 11:32:49 +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
acf09d1bc1 Collateral is now checked for age 2015-07-12 16:37:55 -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
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
a59c5d9edd fixed issues with rpc commands 2015-07-12 07:45:58 -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
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
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
UdjinM6
2fdb5b01f7 use proper naming for variables in masternode-budget 2015-07-08 05:35:58 +03:00
UdjinM6
9cfdaffee5 introduce RelayInv 2015-07-08 04:31:10 +03:00
evan82
10ad24226c Merge pull request #405 from UdjinM6/v0.12.0.x_prevent_ban_for_unknown_MN
V0.12.0.x Stop banning nodes for unknown masternodes while processing budget messages
2015-07-06 15:39:42 -07:00
Evan Duffield
5b98d9db05 fixed getinfo for 0-vote proposals 2015-07-06 15:06:09 -07:00
UdjinM6
e40de28900 Stop banning nodes for unknown masternodes while processing budget messages.
Also cleanup naming/logging a bit.
2015-07-07 00:00:00 +03:00
Evan Duffield
05e126f853 Clear expired proposals / added mnbudget check 2015-07-06 13:23:09 -07:00
Evan Duffield
5f3543efa5 merged 2015-07-06 10:52:09 -07: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
UdjinM6
ce41645713 fix CFinalizedBudget::AutoCheck() crash 2015-07-05 10:37:52 +03:00
crowning-
36f65addc7 Fixed typo 2015-07-05 02:02:14 +02:00
Evan Duffield
edaf479063 Added CleanAndRemove for Proposal votes 2015-07-04 15:49:42 -07:00
Evan Duffield
b1360473b4 Budget changes
- Remove budgets with negative votes of more than 10% of network
- Only allow proposals into budget that have more than 10% of network support
2015-07-04 10:42:42 -07:00
Evan Duffield
42d9a581a1 Smarter nHeight detection for masternode payments 2015-07-03 22:05:10 -07:00
Evan Duffield
6becaf0462 Added mnbudget projection and changed "show"
- Show now shows every proposal that is known, which seems to be the general expected behavior of the users
- Added "projection" for showing what will end up in the budget if it was finalized currently
2015-07-03 10:54:10 -07:00
Evan Duffield
4420d563cb fixed proposal display functionality 2015-07-02 17:51:31 -07:00
Evan Duffield
3bd8cc1e98 fixed bug with proposals 2015-07-02 15:34:11 -07:00
Evan Duffield
28052240a5 Improvements for syncing budget votes
- New orphan object and reprocessing logic
- Added some logic for asking peers for missing proposals and finalized budgets
2015-07-02 09:41:33 -07:00
Evan Duffield
d8a6057205 Fixed issues with budget syncing 2015-07-02 08:07:30 -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
Evan Duffield
df77f56e11 Budget stability fixes
- Proposals must start on a budget block now
- Finalized budgets now enforce proposal start and end periods
- Other misc fixes
2015-06-16 10:04:35 -07:00
UdjinM6
f1debd4688 fix segfault in budgets 2015-06-10 09:49:08 +03:00
Evan Duffield
928f6edcb6 Adjusted max payment per finalized budget to 10% of the monthly block reward 2015-06-09 20:46:24 -06:00
UdjinM6
17d3df5300 fix CBudgetManager::FindProposal 2015-06-03 19:45:15 +03:00