Commit Graph

94 Commits

Author SHA1 Message Date
UdjinM6
46744394a2 More instantx->instantsend (few more ds->privatesend) (#984) 2016-09-02 16:17:32 +04:00
UdjinM6
0597900c16 Changes for sporks: (#981)
- rename all 3 instantsend sporks
- remove SPORK_7_MASTERNODE_SCANNING (not used anymore)
- change `_DEFAULT` for spork 2 and 3, adjust comments for for them
- fix GetSporkNameByID() (should not return smth_DEFAULT)
2016-09-01 18:55:25 +04:00
UdjinM6
bc80d7e2a5 Merge #969: Masternode sync improvements
da406e3 Masternode sync improvements
    - add simple helpers for few more sync states (use them where appropriate instead of old code + rpc output)
    - use new helpers to avoid meaningless message processing
    - actually fail if sync shouldn't continue due to lack of info, make sure Reset is used to quit failed state
2016-08-29 21:11:34 +02:00
UdjinM6
67def9ef2e Merge #948 Refactor CDarkSendSigner
f0ed400 darkSendSigner.SignMessage() should not return error message

154f1b6 darkSendSigner.VerifyMessage() should return non-localized message, its callers should populate error to debug.log

b130c32 darkSendSigner.GetKeysFromSecret() should not return error message, its callers should handle it
2016-08-19 05:50:04 -06:00
UdjinM6
e20e1dc5da Merge #939: More IS refactoring
149f27a More IS refactoring
2016-08-12 07:55:41 +02:00
UdjinM6
ee266f2d01 Merge #938: Fix bug in #895
68ff166 Fix bug in #895
2016-08-12 07:45:06 +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
d514ee7f9a Merge #922: Refactor/fix spork
42bdf42 Refactor/fix spork:
- move ProcessSpork, GetSporkValue, IsSporkActive, ExecuteSpork and mapSporksActive to CSporkManager
- move Sign, CheckSignature, Relay to CSporkMessage
- move ReprocessBlocks out of sporks to main.cpp / rename DisconnectBlocksAndReprocess to DisconnectBlocks
- rename SporkKey to SporkPubKey
- bugfix: only set strMasterPrivKey if spork signature produced by that key was verified successfully
- few log format changes, cleaned up includes
2016-07-30 13:04:27 +02:00
UdjinM6
90adb89233 Merge #903: Implement transaction lock zmq notifications
15a6a16 Implement transaction lock zmq notifications
3bc86a6 always push zmqpubhashtxlock even if tx is not from/to our wallet
568315b fix typo
b6d41d2 fix data size for notification name
339be11 implement zmqpubrawtxlock
70f44f9 update zmq_sub.py with hashtxlock and rawtxlock
2016-07-15 08:38:33 +02:00
UdjinM6
175508d6b7 Merge #908: Remove global strMasterNodePrivKey
00743b8 Remove global strMasterNodePrivKey - no need to extract keys all the time, store them in CActiveMasternode and reuse when needed
2016-07-15 08:36:00 +02:00
UdjinM6
9764e22ed8 Merge #893: Cleanup
3249a63 Fix logging - CTransaction::ToString() always has `\n` at the end of a string, avoid adding empty line
ec03753 make mnw errors and ThreadCheckDarkSendPool less spammy
5b678af fix errorMessage - it should not have `\n`, let output code handle line endings instead
a81cdf7 rename `dash-darksend` thread to `dash-privatesend`
5e4f468 fix/remove outdated code
f1c9678 Break tooltip about third party urls in 2 lines
2016-06-27 17:25:22 +02:00
UdjinM6
f5e3042b7a create INSTANTSEND_MIN_FEE to manage IS fee in one place (#829) 2016-05-30 08:22:15 +02:00
crowning-
7ee810d3b6 [UI] Rebranding: PrivateSend/InstantSend (update 2) (#804)
* [UI] Rebranding: PrivateSend/InstantSend (update 2)
* [UI] Changed name of sendtoaddress parameters: use_ix -> use_is and use_ds -> use_ps
2016-05-25 07:25:16 +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
f679e24316 Refactor IX/DSTX messages handling:
- Fix CreateTransaction and GetDepthInMainChain for IX compatibility
 - Prepare IsIXTXValid for the next update (see FIXME in CreateTransaction)
 - Unify processing of TX/IX/DSTX a bit more
 - Clean up some code
2016-03-22 02:24:36 +03:00
UdjinM6
8e560080a1 Fix comments, remove ._str() from LogPrintfs, few trivial changes 2016-03-06 18:21:06 +01: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
95dab0b541 Remove unnecessary locks and chainActive.Tip() references 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
a5ac60b868 Merge remote-tracking branch 'bitcoin/0.12' into HEAD
+ merge fixes
+ keepass on evhttp
2016-02-06 16:48:04 +03: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
UdjinM6
657bd1103e Few cleanups:
- compiling errors
- output
- CBitcoinAddress usage cleanup
- refresh qt project file
- fix typo in `masternode` debug category
2015-08-28 23:16:58 +03:00
evan82
dac2b0fae5 Merge pull request #490 from UdjinM6/v0.12.0.x_process_on_IsBlockchainSynced
V0.12.0.x process DS,IX,MN,DGBB on IsBlockchainSynced, not on IBD
2015-08-07 06:18:50 -07:00
UdjinM6
8063bcc8aa process DS,IX,MN,DGBB on IsBlockchainSynced, not on IBD 2015-08-07 07:48:55 +03:00
UdjinM6
f57c470f95 ask for mn / lower ban score for mnw 2015-08-07 06:07:40 +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
Evan Duffield
c770283371 Lower IX conf minimum
- 1 less than the "send IX" gui requires, incase of a block propagating the network at the time
2015-08-04 10:42:05 -07:00
Evan Duffield
334c3ea971 Added ReprocessBlocks 2015-08-02 16:08:37 -07:00
evan82
718c7f14f9 Merge pull request #384 from UdjinM6/v0.12.0.x_debug_categories
V0.12.0.x additional debug categories
2015-08-01 15:48:03 -07:00
Evan Duffield
fa9a0ec037 Use reconsider blocks for IX instead of disconnect 2015-07-31 12:39:02 -07:00
UdjinM6
1c7c81afb3 cleanup other incorrect ix log outputs 2015-07-31 18:52:19 +03:00
UdjinM6
184611f2ac add instantx debug category 2015-07-31 18:52:19 +03:00
UdjinM6
afd715286a fix all kind of lock issues 2015-07-30 16:44:18 +03: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
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
evan82
2a3b96e020 Merge pull request #411 from UdjinM6/v0.12.0.x_various_small_fixes
V0.12.0.x various small fixes
2015-07-08 07:19:41 -07:00
UdjinM6
9cfdaffee5 introduce RelayInv 2015-07-08 04:31:10 +03:00
UdjinM6
d94967d958 small fixes 2015-07-07 15:47:22 +03:00
Evan Duffield
f1b868f098 Removed PoSe due to consensus issues
- With nodes coming and going on the network, the network could come to different opinions about who should get paid next in line due to some nodes being flagged as failing a PoSe check. This will have to be fixed by introducing a blockchain based PoSe system, but that's out of the scope of this release. To fix the issues in the interrim, I'm removing PoSe checks for the time being.
2015-06-23 16:44:31 -07:00
UdjinM6
d53968ea56 fix ix comments 2015-06-04 21:54:33 +03:00
UdjinM6
64eebc3316 0.12 dirty merge'n'fix (bitcoin 0.10) 2015-04-04 19:24:37 +03:00
Evan Duffield
e5267319ef Complete implementation of Proof-of-Service
- Ensures ports remain open and client are responsive to IX requests.
- Completely 100% decentralized. This farms out the work of checking the masternode network to the masternode network. 1% of the network is determistically selected to check another 1% of the network each block. It takes six separate checks to deactivate a node, thus making it tamper proof.
- Nodes are kept in the masternode list if they fail enough PoSe checks to deactivate. They will continue to be checked until the operator fixes them. However they will not be paid while they're failing checks.
2015-03-16 09:32:18 -07:00
UdjinM6
2e0d7ab0b6 fix even more console spam 2015-03-05 19:40:17 +03:00
UdjinM6
1ded1b9ec2 Few fixes for processing extra messages:
- call ProcessMessageMasternodePayments on ProcessBlock (lost after moving mnodeman functionality)
- do not process extra functionality messages (DS, IX, spork) on initial download / reindex
2015-02-26 17:40:43 +03:00
UdjinM6
0d51e1c90d better naming/readability (Find) 2015-02-25 14:54:03 +03:00
UdjinM6
adddff85a2 CMasternodeMan - masternode manager class - part1(broken) 2015-02-23 23:01:21 +03:00
Evan Duffield
23ea75f737 Add maximum out value for IX via spork 2015-02-11 08:08:55 -07:00
Evan Duffield
257078d2a4 Full Spork Implementation
Many sporks are supported at once, with efficient broadcasting
via inventory messages.
2015-02-09 12:49:00 -07:00