Commit Graph

186 Commits

Author SHA1 Message Date
UdjinM6
9a74543d83 fix ds bugs 2015-08-22 06:36:21 +03:00
UdjinM6
f119afb43b it’s ok to be banned for dseg, you’ll just find another peers 2015-08-18 23:46:47 +03:00
UdjinM6
a723c2148e fix DS bug - endless collateral creation until one of them confirms 2015-08-16 03:29:16 +03:00
UdjinM6
628d281209 refactor names and select logic for ONLY_ coins enum members 2015-08-16 03:26:20 +03:00
Evan Duffield
6ff903f27b Wait for DS confirmation 2015-08-12 15:54:21 -07:00
UdjinM6
d9383e3ead fixes for more then 1 ds action per block 2015-08-11 08:09:56 +03:00
Evan Duffield
44e002f5d0 allow more than 1 action per block 2015-08-10 19:27:07 -07:00
evan82
a7fa7e28b0 Merge pull request #503 from UdjinM6/v0.12.0.x_ds_fixes
V0.12.0.x ds fixes
2015-08-10 18:56:51 -07:00
Evan Duffield
dcec36af85 allow users to anon all their coins each block 2015-08-10 18:56:14 -07:00
UdjinM6
6b80448427 ds fixes 2015-08-11 02:06:17 +03:00
UdjinM6
4046900499 Use single random denom in new DS session 2015-08-10 02:28:43 +03:00
UdjinM6
84264b0327 millisleep 10->50 on trylock+wait 2015-08-09 00:48:09 +03:00
UdjinM6
ec3848c5dd Locks fixes:
- trylock for updateDarksendProgress, checkBalanceChanged, "block"
- trylock+wait for UnlockCoins, SendDarksendDenominate, ProcessNewBlock, ActivateBestChain
- move trylock in DoAutomaticDenominating lower
2015-08-08 10:34:41 +03:00
UdjinM6
8063bcc8aa process DS,IX,MN,DGBB on IsBlockchainSynced, not on IBD 2015-08-07 07:48:55 +03:00
evan82
e05622037c Merge pull request #477 from UdjinM6/v0.12.0.x_locks
V0.12.0.x more locks fixes
2015-08-05 14:31:29 -07:00
UdjinM6
9a9e7b7644 strings/translation source fixes 2015-08-06 00:12:01 +03:00
UdjinM6
54ac44e60b relay dstx to everyone 2015-08-05 22:43:00 +03:00
UdjinM6
7d78c98f0d Few more lock-related fixes:
- do not lock cs_main for mnodeman.CheckAndRemove() - we have trylock inside CMasternode.Check, should be enough
- fast cs_main lock for ix
- use RelayInv instead of manually locking nodes / pushing inv
- do not lock cs_vNodes / ClearFulfilledRequest on every 100th block, CMasternodeSync should already handle resync by itself better now
2015-08-05 01:54:31 +03:00
UdjinM6
ff159ad7e7 ConnectNode/FindNide:
- Use FindNode instead of explicit loops
- Do not use FindNode where we can grab node right from ConnectNode (slightly less cs_vNodes)
2015-08-05 01:38:54 +03:00
UdjinM6
240bb10d33 fix rpc for darksend 2015-08-03 23:14:19 +03:00
UdjinM6
18635f0979 fix debug output 2015-08-03 19:24:23 +03:00
UdjinM6
dd8fa7c365 Continue work on more debug categories
- rebased to latest v12
- masternode, mnpayments, mnbudget and keepass categories
- remove c_str in logprint(f)
2015-07-31 19:01:18 +03:00
UdjinM6
f0923de04c add darksend debug category 2015-07-31 18:52:19 +03:00
UdjinM6
9ab4a72454 cleanups/fixes:
- use map.insert instead of [] (should be safer)
- debug output / comments / spaces / names
- fix few long strings / make translatable one more label in UI
2015-07-30 19:12:05 +03:00
Evan Duffield
7a9028631a Revert "Disable CheckAndRemove on file dumps"
This reverts commit 3fc9ea4adf.
2015-07-30 07:41:14 -07:00
UdjinM6
afd715286a fix all kind of lock issues 2015-07-30 16:44:18 +03:00
Evan Duffield
3fc9ea4adf Disable CheckAndRemove on file dumps
- Testing theory for lockups
2015-07-30 06:27:57 -07:00
UdjinM6
36bb9d6e27 FindRandomNotInVec - should give less failures then FindRandom on doauto 2015-07-30 06:27:29 -07:00
UdjinM6
c99af0bc63 More DS refactoring/fixes:
- move ds rounds calculation to wallet
- add cache to / rework anon/denom balance functions
- fix updates on new blocks for ds status on overview page
- fix after rebase
2015-07-30 06:27:29 -07:00
UdjinM6
976bd7853f Refactor DS:
- always clear entries, do not try to reuse them
- unlock coins only when needed (do not unlock them every 10 blocks)
- make logic a bit more strightforward in few places
- clear all expired on timeout (not just the first found)
- add 2 additional statuses on doauto
- run DS checks when mn list sync started, do not wait for full sync
- move most class members to private
2015-07-30 06:27:28 -07:00
Evan Duffield
cddbda994f Fixed DarkSend dstx propagation issues 2015-07-27 12:34:02 -07:00
UdjinM6
6123770bf8 active masternode fixes 2015-07-23 05:19:37 +03:00
UdjinM6
dba572ac96 use specific protocols 2015-07-20 04:54:02 +03:00
Evan Duffield
9c34930680 Disable nDos on early ping / sync regtest changes 2015-07-19 08:49:46 -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
6e0a468701 Highly improved syncing process 2015-07-14 19:48:02 -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
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
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
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
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
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
7eee9f15ec Fix GetInputDarksendRounds:
- show user and use in external calculations rounds that are calculated respecting current settings while use "real" rounds in internal calulation to store correct results in cache and easily provide user with updated info on settings change
- fix max real rounds limit (16)
2015-07-07 10:16:22 +03:00
Evan Duffield
1af0fa5098 Only sync masternode assets after new block 2015-07-06 11:12:56 -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
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
a89b0e705f Fixed syncing code for stuck clients 2015-07-01 16:46:03 -07:00
Evan Duffield
94493bee63 fixed compile issues 2015-06-24 12:42:01 -07:00