Commit Graph

58 Commits

Author SHA1 Message Date
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
UdjinM6
d335c1ebbe MOVE: group classes` implementation together; REMOVE: GetMasternodeBudgetEscrow (not used) 2015-06-03 19:10:11 +03:00
UdjinM6
6e0a64bc5d simplify few IFs 2015-06-03 18:42:37 +03:00
Evan Duffield
439679f5bc Finalized Budget Voting and Payment
- Added strBudgetMode with modes of "auto", "output-vin" and "suggest". Auto votes for what the masternode sees as the most popular proposals, output-vin is a delegation mode to another party and "suggest" sends a message to the network, suggesting the most popular proposals
2015-06-01 12:06:03 -07:00
Evan Duffield
a93ceed090 Finalized Budget Changes
- Finalized budgets now pass proposal hash, payee and amount. This keeps them completely separate from the proposal system to aid in consensus.
- Added status messages for badly formed finalized budgets (probably attacks). If users see messages like this they should check the proposals to see if something is wrong with them before voting.
2015-05-30 13:12:12 -07:00
Evan Duffield
eaf7b940a6 Complete rewrite of consensus code for mn/budget payments
- Added FindProposal and FindFinalBudget to budgeting class
- Added 2 new sporks for Proposals and Budget payment enforcement. This is outside of the decentralized code so we can turn it off if there's a problem.
- Detect budget blocks and pay correct amounts in super blocks
2015-05-30 10:27:51 -07:00
Evan Duffield
d470eddc01 fixed hashing issues with mnw messages 2015-05-27 15:07:53 -07:00
Evan Duffield
fe55b12a1f added improvements for finding next masternode to get paid 2015-05-27 12:47:01 -07:00
Evan Duffield
66dcf6bbc7 cleaned up naming of budget functions 2015-05-27 10:11:00 -07:00