Commit Graph

69 Commits

Author SHA1 Message Date
UdjinM6
5d42a372cf Fix CBudgetProposal::GetRemainingPaymentCount()
Closes #729
2016-03-09 07:23:20 +01:00
UdjinM6
18afe88401 Check vote time internally
Closes #721
2016-03-06 18:23:26 +01:00
UdjinM6
a611fc3b1b Introduce CDSNotificationInterface - validation interface to listen to tip updates and trigger updates in DS, payments and budgets. Should significantly reduce number of references to chainActive.Tip() i.e.we should have less cs_main in dash-darksend thread and potential deadlocks. 2016-03-04 12:10:37 +03:00
UdjinM6
67cd10c87d Add some locks to protect chainActive.Tip() and mapBlockIndex
(fixing only few of them here, see next commit for further changes)
2016-03-04 12:10:37 +03:00
UdjinM6
c676748beb Replace all hardcoded network message strings with NetMsgType:: constants, log unknown commands (net debug category only) 2016-02-19 07:59:00 +03:00
UdjinM6
e8d9aabb62 Move many hardcoded mainnet/testnet magic numbers to consensus part of chainparams,
get rid of most `if(Params().NetworkIDString() == CBaseChainParams::MAIN)` and alike to unify formulas.
Further improvements will require testnet restart (see TODO notes in changed code) so I'm keeping few things as they are till then.
2016-02-17 21:54:24 +03:00
UdjinM6
a4aef837bd Merge remote-tracking branch 'origin/v0.12.1.x' into mergebtc0.12 + fix 2016-02-16 03:17:25 +03:00
UdjinM6
a5ac60b868 Merge remote-tracking branch 'bitcoin/0.12' into HEAD
+ merge fixes
+ keepass on evhttp
2016-02-06 16:48:04 +03:00
Evan Duffield
83f87b0f2d merged 2016-02-04 12:39:53 -07:00
Evan Duffield
eeb53b9682 Vastly faster syncing process / small budget system changes
- Syncing process is now event based, rather than timeout based. This means the system can tell when it's done with each step and moves on between phases much faster. In initial testing it seems to be about 10-15x faster and has synced everytime successfully.
- Please remove print debugging when the syncing system is proven to be debugged.
2016-02-04 12:29:09 -07:00
Evan Duffield
0b02b56672 Vote-alias draft
- other mnbudget commands need casting from str to int
2016-01-31 17:44:18 -07:00
UdjinM6
e2aaf09700 Cleanup
- lower unobvious dependency through header files, move few includes to the right places
- some trivial code cleanup

Closes #680
2016-01-31 12:08:45 +01:00
Evan Duffield
a6fbbe59eb Budget system improvements
- Remove old proposals from memory entirely
- Renamed Yea,Nay to Yes,No
- Show absolute yes count
- Fixed bug with nBlockEnd (incompatible with v12 now)
- Flag proposals that are downvoted
2016-01-29 13:41:04 -07:00
Evan Duffield
78ebf10ea2 added nextsuperblocksize command 2016-01-28 12:33:27 -07:00
UdjinM6
730c29fa47 add mnbudgetvoteraw 2015-09-23 03:15:23 +03:00
UdjinM6
6b35e97ebc Slight budgets refactor:
- cleaner blockchain-like rpc / moved logic to proposal class / cleaned help messages and redundant
- refactored proposals a bit (more straightforward constructor, IsValid)
(both parts inherit sanitization proposed/made by @crowning earlier)
2015-09-15 20:02:47 +03:00
crowning-
afa99c7f62 Security: sanitize mnbudget parameters (part 2) DASH-5 2015-09-12 17:17:03 +02:00
crowning-
5783d5b446 Sanitize mnbudget prepare|submit names and URLs 2015-09-04 05:44:02 +02:00
evan82
982226a5b3 Merge pull request #584 from crowning-/patch-1
Added "Name" to 'mnbudget show' output for easier JSON-parsing
2015-09-01 20:53:28 -07:00
Evan Duffield
eb5f8922b4 mnbudget nextblock 2015-08-29 17:07:09 -07:00
crowning-
69bd52a00c Added "Name" to mnbudget show output for easier JSON-parsing
Reference: https://github.com/dashpay/dash/issues/583
2015-08-29 08:01:12 +02:00
Evan Duffield
c5d6b8486b Drastically reduce bandwidth/cpu usage for syncing
- Only send 1 winner per block for the previous 4500 blocks (was 10 items per block for 6000 blocks)
- Send full sync for last 5 blocks and next 20 blocks
- Turn off mnb cleaning, there aren't that many broadcasts on the network and this could cause problems in some cases
- Fix budget submission collateral check
2015-08-28 14:42:23 -07:00
Evan Duffield
2ee9abd060 Drastically reduce bandwidth/cpu usage for syncing
- Only send 1 winner per block for the previous 4500 blocks (was 10 items per block for 6000 blocks)
- Send full sync for last 5 blocks and next 20 blocks
- Turn off mnb cleaning, there aren't that many broadcasts on the network and this could cause problems in some cases
- Fix budget submission collateral check
2015-08-28 14:41:58 -07:00
UdjinM6
61239dbb36 more fixes - misbehave / rpc 2015-08-14 06:18:08 +03:00
Evan Duffield
8e5c8d13d0 fix rpccommand fin budget getvotes 2015-08-08 13:10:38 -07:00
Evan Duffield
91bd9c7cf0 fValid for mnfinalbudget 2015-08-08 12:35:28 -07:00
Evan Duffield
dde2b2667a add getvotes for fin bual budget 2015-08-08 10:36:01 -07:00
Evan Duffield
d251dc6599 Keep track of immature budgets/proposals 2015-08-06 13:18:10 -07:00
Evan Duffield
a0addf20a9 check collateral tx, find masternode before vote 2015-08-04 09:31:19 -07:00
Evan Duffield
e0031a807e Add superblock checks in various places 2015-08-03 11:38:08 -07:00
Evan Duffield
d57d6f0466 disable IX for proposal fees 2015-07-30 14:27:25 -07:00
Evan Duffield
5024b7d3f6 Added sendtoaddressix for api IX support 2015-07-30 11:33:56 -07:00
Evan Duffield
805452955b Proposal nTime based on fee transaction block 2015-07-30 06:27:29 -07:00
Evan Duffield
ffaedc1829 Fixed proposal nTime calculation and usage 2015-07-28 08:55:11 -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
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
UdjinM6
ae48f0984e small fixes for rpc 2015-07-23 05:32:13 +03:00
Evan Duffield
956d85c59b Change variable naming for rpc commands
- Added MonthlyPayment and TotalPayment
2015-07-18 08:48:44 -07: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
Evan Duffield
d60f3f6984 Added more information to getvotes 2015-07-17 07:38:35 -07:00
Evan Duffield
f139dbbc74 Fixed prepare -- shouldn't check collateral 2015-07-15 15:56:40 -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
e57f2d4003 Check IsValid when preparing fee 2015-07-14 07:05:33 -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
0a02fa00bb removed vote from prepare/submit and fixed some help strings 2015-07-12 08:09:06 -07:00
Evan Duffield
a59c5d9edd fixed issues with rpc commands 2015-07-12 07:45:58 -07: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