Commit Graph

73 Commits

Author SHA1 Message Date
UdjinM6
bd3978fd4b Fix IS vote expiration/cleanup: (#1316)
- vote should be removed when corresponding orphan vote expires
- fix CInstantSend::SyncTransaction: mapTxLockVotes is indexed by vote hash, not by tx hash (use votes from candidates and from orhpan vote map to avoid looping through the whole vote map)
2017-02-04 22:17:45 +04:00
UdjinM6
1486acfb99 remove IS number of inputs limit, add warning instead (#1308) 2017-02-03 02:38:33 +04:00
UdjinM6
60409df822 InstantSend overhaul (#1288)
* Multi-quorum InstantSend, complete refactoring
+ cleanup for IS and partial protobump

* more changes:
- allow InstantSend tx to have 10 inputs max
- store many unique tx hashes in mapVotedOutpoints
- more checks in AcceptToMemoryPoolWorker (moved from ProcessMessage + CTxLockRequest(tx).IsValid() )

* More changes:
- let multiple lock candidates compete for votes
- fail to vote on the same outpoint twice early

* More changes:
- notify CInstantSend on UpdatedBlockTip -> remove cs_main from CheckAndRemove()
- notify CInstantSend on SyncTransaction -> count expiration block starting from the block corresponding tx was confirmed instead of the block lock candidate/vote was created
- fixed few locks

* add comments about nConfirmedHeight

* Fix "Block vs Lock" edge case

* Fix "Block vs Lock" edge case, p2

* Fix issues:
- fix logic for locking inputs and notifying - see UpdateLockedTransaction, TryToFinalizeLockCandidate
- add missing hash inserting in ProcessTxLockVote
- add nMaxBlocks param to ResolveConflicts to limit max depth allowed to disconnect blocks recursively
- fix false positive mempool conflict
- add missing mutex locks
- fix fRequireUnspent logic in CTxLockRequest::IsValid
2017-01-29 12:22:14 +04:00
UdjinM6
a0c93ebaa5 cleanup/fix includes: (#1214)
- some were not used, some were included twice, some were in the wrong place, some were missing (but it compiled because some were in the wrong place)
- organized a bit better, grouped dash specific includes in original bitcoin files, should save some time solving conflicts when/if merging patches later
2016-12-20 17:27:59 +04:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
Tim Flynn
8c16880b15 Fix governance hash (#1208)
* Add vinMasternode to governance object hash and bump protocols

* Add collateral hash to governance object hash

* Added signature to object hash

* Revert "Add collateral hash to governance object hash"

This reverts commit 2f60c280f3ce1e26cb4ab12f8287424b200aab83.
2016-12-20 07:25:20 +04:00
UdjinM6
470239bbc5 Fix IS: (#1161)
- TXLOCKREQUEST should be processed as normal tx plus some custom logic, should not "fake" inventory
- should not create "fake" local lock, should instead keep track of orphan votes and reprocess them when corresponding TXLOCKREQUEST arrives
- orphan vote time map should be indexed by full outpoint, not by txid of mn collateral

bump MIN_INSTANTSEND_PROTO_VERSION
2016-11-22 18:54:26 +04:00
UdjinM6
785adad57e Slightly refactor/fix IS (#1153)
* slightly refactor IS:
- the only place where logic is changed: `ProcessTxLockVote()` - it should first try to find mn and fail if none was found and only then try to call `GetMasternodeRank()` (which is heavy)
- fixed few `cs_main`
- slightly optimized number of `tx.GetHash()` calls
- lots of `const` (fixed few related functions in main.cpp)
- few smaller fixes: iterators, log output, comments, etc
- use thread safe methods of mnodeman
- safety check in GetAverageUnknownVoteTime
2016-11-22 00:40:32 +04:00
UdjinM6
ce88ab3144 Refactor IS - rename only (+related log messages) (#1146) 2016-11-17 04:31:35 +04:00
UdjinM6
1eb399cf34 bump proto 70202 (#1054) 2016-09-30 22:19:26 +04:00
CHAE-PIL LIM
2f93a0d208 V0.12.1.x - reduce IS/PS fees 10x (#1039) 2016-09-27 11:49:45 +04:00
UdjinM6
36c4b6dc2e Trivial refactoring/cleanup (#990) 2016-09-05 20:09:25 +04:00
UdjinM6
46744394a2 More instantx->instantsend (few more ds->privatesend) (#984) 2016-09-02 16:17:32 +04:00
UdjinM6
e20e1dc5da Merge #939: More IS refactoring
149f27a More IS refactoring
2016-08-12 07:55:41 +02:00
UdjinM6
7f89bba83e Refactor InstantSend to use block count instead of local time to set expiration limit - nInstantSendKeepLock. Also make it (and number of blocks to reprocess in case of a conflict) a part of Consensus params and set it to lower numbers for testnet/regtest to be able to break things easier there.
Bump MIN_INSTANTX_PROTO_VERSION
2016-08-08 16:43:15 +03:00
UdjinM6
5a8c0c9b9d Merge #928: Refactor All The Things - part1
86d8505 Refactor CActiveMasternode
+ move strMasterNodeAddr to CActiveMasternode

a005c79 Refactor InstantSend
+ new lock cs_instantsend to protect maps on CleanTransactionLocksList()
+ new DEFAULT_INSTANTSEND_DEPTH constant
+ rename MIN_INSTANTX_PROTO_VERSION to MIN_INSTANTSEND_PROTO_VERSION and bump it

d24182c Refactor Privatesend
+ decouple from util.h and version.h
+ more functions for CDarksendBroadcastTx: constructors, signing, serialization
+ move from rand() to insecure_rand() in general but to GetRand() for session id
+ fix defaults
2016-08-05 21:49:45 +02:00
UdjinM6
f5e3042b7a create INSTANTSEND_MIN_FEE to manage IS fee in one place (#829) 2016-05-30 08:22:15 +02:00
UdjinM6
00915ca31a Fix IX (locks arrive faster then the lock request itself) and add ixnotify to trigger external script 2016-03-24 19:05:44 +03:00
UdjinM6
5e7496ee5e More refactoring for IX:
- move ix internal logic out of CMerkleTx
- fix bug in GetInputAgeIX
2016-03-23 17:51:41 +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
4727d92d1f protocol bump 2015-08-13 16:35:38 -07:00
Evan Duffield
5e1a6afe7f Send nLastDsq with MasternodeBroadcast 2015-08-11 15:43:19 -07:00
UdjinM6
f57c470f95 ask for mn / lower ban score for mnw 2015-08-07 06:07:40 +03:00
Evan Duffield
57599e07e3 protocol bump 2015-08-04 11:22:31 -07:00
Evan Duffield
8b62e590df version bump / proto bump / try mining lock 2015-07-31 19:18:26 -07:00
Evan Duffield
fa9a0ec037 Use reconsider blocks for IX instead of disconnect 2015-07-31 12:39:02 -07:00
Evan Duffield
b6222a9ae9 change req sigs to 6 of 10 2015-07-27 17:33:57 -07:00
Evan Duffield
bf18699ade client bump /proto bump 2015-07-27 12:35:17 -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
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
Evan Duffield
61745d7724 Filter SigTime modes / version / proto bump 2015-07-24 16:10:44 -07:00
Evan Duffield
ac947444da protocol bump 2015-07-23 15:02:15 -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
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
Evan Duffield
841c7c270b version/proto bump 2015-07-18 12:29:19 -07:00
Evan Duffield
e65a1edce3 version / proto bump 2015-07-16 02:43:53 -07:00
UdjinM6
3ef2cec49d proto bump 2015-07-14 08:59:08 +03:00
Evan Duffield
bee6941195 Fixed Propagation Of Budgets / Proto Bump 2015-07-13 20:03:08 -07:00
Evan Duffield
40a14cb802 version bump / proto bump 2015-07-12 16:39:37 -07:00
Evan Duffield
2885f9e6ca protocol bump / version bump 2015-07-12 10:47:28 -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
2d118769f0 version/proto bump 2015-07-08 10:27:26 -07:00
Evan Duffield
6c6a280df8 Version bump / more fixes 2015-07-06 13:37:43 -07:00
Evan Duffield
13bd6a15eb version/proto bump 2015-07-02 09:45:28 -07:00
Evan Duffield
2b75faefee Various fixes improvements
- Implemented spork for only paying new nodes after a period of time on mainnet
- protocol bump
- fixed a few issues with sporks. Spork show now shows all sporks, instead of the changed ones. IsSporkActive now supports sporks set to 0 as on.
2015-06-25 12:59:11 -07:00
Evan Duffield
cf53f2f897 protocol bump 2015-06-24 07:41:52 -07:00
Evan Duffield
3eeb33e577 version / proto bump 2015-06-23 10:53:22 -07:00
UdjinM6
a049348110 bump ix min proto 2015-06-22 20:51:28 +03:00
UdjinM6
64eebc3316 0.12 dirty merge'n'fix (bitcoin 0.10) 2015-04-04 19:24:37 +03:00
Evan Duffield
35bb210c6b Dash rebranding 2015-03-17 16:06:58 -07:00