This document describes the protocol extensions for all additional functionality build into the Dash protocol. This doesn't include any of the Bitcoin procotol, which has been left in tact in the Dash project. For more information about the core protocol, please see https://en.bitcoin.it/w/index.php?title#Protocol_documentation&action#edit
## Common Structures
### Simple types
uint256 => char[32]
CScript => uchar[]
### COutpoint
Bitcoin Input
| Field Size | Description | Data type | Comments |
| 36 | prevout | COutPoint | The previous output from an existing transaction, in the form of an unspent output
| 1+ | script length | var_int | The length of the signature script
| ? | script | CScript | The script which is validated for this input to be spent
| 4 | nSequence | uint_32t | Transaction version as defined by the sender. Intended for "replacement" of transactions when information is updated before inclusion into a block.
### CPubkey
Bitcoin Public Key
| Field Size | Description | Data type | Comments |
| 33-65 | vch | char[] | Encapcilated public key of masternode in serialized varchar form
### Masternode Winner
When a new block is found on the network, a masternode quorum will be determined and those 10 selected masternodes will issue a masternode winner command to pick the next winning node.
| Field Size | Description | Data type | Comments |
| 41+ | vinMasternode | CTXIn | The unspent output of the masternode which is signing the message
| 4 | nBlockHeight | int | The blockheight which the payee should be paid
| ? | payeeAddress | CScript | The address to pay to
| 71-73 | sig | char[] | Signature of the masternode)
## Message Types
### Masternode Winner
When a new block is found on the network, a masternode quorum will be determined and those 10 selected masternodes will issue a masternode winner command to pick the next winning node.
| Field Size | Description | Data type | Comments |
| 41+ | strBudgetName | CTXIn | The unspent output of the masternode which is signing the message
| 4 | nBlockStart | int | The blockheight which the payee should be paid
| ? | vecBudgetPayments | CScript | The address to pay to
| 32 | nFeeTXHash | uint256 | Hash of the collateral fee transaction
### Masternode Announce
Whenever a masternode comes online or a client is syncing, they will send this message which describes the masternode entry and how to validate messages from it.
| Field Size | Description | Data type | Comments |