Commit Graph

123 Commits

Author SHA1 Message Date
Alexander Block
f235b6a6ac Apply review suggestions/fixes 2017-12-20 07:51:20 +01:00
Wladimir J. van der Laan
11ac70af9e Merge #7542: Implement "feefilter" P2P message
0371797 modify release-notes.md and bips.md (Alex Morcos)
b536a6f Add p2p test for feefilter (Alex Morcos)
5fa66e4 Create SingleNodeConnCB class for RPC tests (Alex Morcos)
9e072a6 Implement "feefilter" P2P message. (Alex Morcos)
2017-12-19 13:18:30 +01:00
Pieter Wuille
23eeaeef8f Merge #7662: remove unused NOBLKS_VERSION_{START,END} constants
7d2f84c remove unused NOBLKS_VERSION_{START,END} constants (Pavel Vasin)
2017-12-19 12:55:48 +01:00
UdjinM6
362becbcce
Bump MIN_PEER_PROTO_VERSION to 70208 (#1772)
Drop old (pre-v0.12.2.x) peers
2017-12-12 04:24:10 +03:00
UdjinM6
3028af19f1
post-DIP0001 cleanup (#1763)
* post-DIP0001 cleanup

also fixes tests

* bump nMinimumChainWork and defaultAssumeValid
2017-12-07 12:43:23 +03:00
UdjinM6
02e882c3d8 bump MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 and PROTOCOL_VERSION to 70208 (#1636) 2017-09-17 20:43:58 +03:00
gladcow
a439e98408 Replace watchdogs with ping (#1491)
* Add hassentinelping to governanceinfo

* sentinelping rpc call

* additional fields in mnp

* sentinel ping implementation

* change sentinel state to byte in mnp

* use adjusted time in sentinel ping

* update nTimeLastWatchdogVote if sentinel ping is actual

* remove unused fields

* bump protocol to 70207

* Fix small issues

 - fix the error message text in CActivbeMasternodeUpdateSentinelPing;
 - add empty string before public: in CActiveMasternode class declaration;
 - rename field sentinelPing in CMasternodePing to sentinelIsActual and change $
 - decrease sentinelVersion field size to uint16_t;

* revert proto bump for MIN_... consts

* revert changes in getgovernanceinfo

* Update mn vote time for remote masternodes

 - call UpdateWatchdogVoteTime in CMasternodeMan::ProcessMessage
 - deserialize masternodeping from the previous version archive without exception
 - add ability to set time in UpdateWatchdogVoteTime
 - set nTimeLastWatchdogVote to masternode ping sigTime if sentinel is actual
 - bump CMasternodeMan::SERIALIZATION_VERSION_STRING

* remove mn state checks and add correct rpc param convertion

* fix var names

* Helper class for version in string and integer form

* String version in sentinel ping

Version format is "x.x.x"

* test for bacward compatibility in serialization

* Change VersionInfo class to convert functions
2017-07-04 20:31:57 +03:00
UdjinM6
9ed9474a9e Drop support for pre-12.1 nodes (#1394) 2017-03-14 09:22:00 +03:00
UdjinM6
cfc8954b42 Shift PS denoms (#1292)
* Shift PS denoms

* fix ui PS restrictions
2017-02-02 12:50:21 +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
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 2f60c280f3.
2016-12-20 07:25:20 +04:00
UdjinM6
9c4e019c36 bump proto (#1162)
70202 -> 70203
2016-11-22 19:14:28 +04:00
UdjinM6
1eb399cf34 bump proto 70202 (#1054) 2016-09-30 22:19:26 +04:00
UdjinM6
231532d6d0 Align governance proto logic with logic for similar proto for other modules (#1049)
i.e MSG_GOVERNANCE_PEER_PROTO_VERSION -> MIN_GOVERNANCE_PEER_PROTO_VERSION (to check other peers) + PROTOCOL_VERSION (to announce own version)
2016-09-29 00:03:54 +04:00
UdjinM6
b7e81cb2bd Decouple mn payments from version.h, drop MIN_MNW_PEER_PROTO_VERSION (#960)
* Decouple min mnw versions from version.h, drop MIN_MNW_PEER_PROTO_VERSION in fav of GetMinMasternodePaymentsProto()

* Split min protocol validation for new and old winners in IsValid
2016-09-08 16:04:45 +04:00
UdjinM6
625b5ebb09 Merge #936: Bump NO_BLOOM_VERSION and SENDHEADERS_VERSION to match PROTOCOL_VERSION
411ad29 Bump NO_BLOOM_VERSION and SENDHEADERS_VERSION to match PROTOCOL_VERSION
2016-08-12 07:41:23 +02: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
Evan Duffield
95ba71570b Merge #864: govobj sync
487674f Governance object/vote syncing fixes
- disable fCached values
- use two maps for storing votes, by hash and parent-hash/type
- disable part of flatdb.dump (still overwriting)
- fixed govobj/votes relay and sync

15821fe various fixes
- Added const where possible
- Uncommented sync block
- Protocol min 70201
- Fixed bug which flags invalid votes incorrectly
- Formatting

aa8fdd7 fix curly braces

d8e39b1 Fix GetTypeHash bug
- Should not collide based on the outcome

732a8a3 fixed mismatched index for vote map
2016-06-08 08:57:16 +02:00
UdjinM6
d705da741c fix masternode signatures, bump PROTOCOL_VERSION
strMessage for masternode broadcast (which we sign and verify) looks like this currently:
[2001:1608:45:3::242:ac11:6]:199991464464536
                                  ?~}&?Q?S?Ǚ?q	?0??????O?I/Y?(
?f?jJF??m??bssknN??9鲜JXVs?ә?5T?8??????~70200
which I believe in some cases leads to "Got bad Masternode ping signature" errors and banning.

I propose to change the way strMessage is composed so that it looks like this:
[2002:82ff:c04:2:a90f:2261:43c4:2745]:1999514645552319591ec70225aacadfafa4ab5d21e87cdce641fd4030d029485434533c5e481578a9d471089fb5ec170200

Further more nDos for old masternodes is set to 0 to stop false positives (message still gets rejected though).
2016-05-30 11:37:35 +03:00
Evan Duffield
860d29f9c4 Budget system -> Governance System
- Changed Action -> Signal for clarity
- CBudgetVote -> CGovernanceVote
2016-05-23 10:53:05 -07: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
Suhas Daftuar
50262d8953 Allow block announcements with headers
This replaces using inv messages to announce new blocks, when a peer requests
(via the new "sendheaders" message) that blocks be announced with headers
instead of inv's.

Since headers-first was introduced, peers send getheaders messages in response
to an inv, which requires generating a block locator that is large compared to
the size of the header being requested, and requires an extra round-trip before
a reorg can be relayed.  Save time by tracking headers that a peer is likely to
know about, and send a headers chain that would connect to a peer's known
headers, unless the chain would be too big, in which case we revert to sending
an inv instead.

Based off of @sipa's commit to announce all blocks in a reorg via inv,
which has been squashed into this commit.

Rebased-by: Pieter Wuille
2015-11-29 11:59:23 +01:00
Matt Corallo
afb0ccaf9c Add NODE_BLOOM service bit and bump protocol version
Lets nodes advertise that they offer bloom filter support explicitly.
The protocol version bump allows SPV nodes to assume that NODE_BLOOM is
set if NODE_NETWORK is set for pre-70011 nodes.

Also adds an option to turn bloom filter support off for nodes which
advertise a version number >= 70011. Nodes attempting to use bloom
filters on such protocol versions are banned, and a later upgade
should drop nodes of an older version which attempt to use bloom
filters.

Much code stolen from Peter Todd.

Implements BIP 111
2015-09-05 23:29:13 -07: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
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
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
48f9e277f9 changed min ver back to 70066 2015-07-23 18:55:39 -07:00
Evan Duffield
ac947444da protocol bump 2015-07-23 15:02:15 -07:00
Evan Duffield
9aca541200 inc min peer version to 70094 for testing 2015-07-23 11:36:07 -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
3fae250190 Dont accept MNW from older masternodes 2015-07-21 08:09:17 -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
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
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