Skip to content

Commit

Permalink
Documentation: Add spork message / details to protocol-documentation.…
Browse files Browse the repository at this point in the history
…md (#1493)

* Protocol doc update - add missing command placeholders
Add spork command details

* Add message type for ssc and govsync

* Typo fixes

* Integrate UdjinM6's suggestions
  • Loading branch information
thephez authored and UdjinM6 committed Jun 26, 2017
1 parent a109a61 commit 5d27950
Showing 1 changed file with 72 additions and 3 deletions.
75 changes: 72 additions & 3 deletions dash-docs/protocol-documentation.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Protocol Documentation - 0.12.1
=====================================

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
This document describes the protocol extensions for all additional functionality build into the Dash protocol. This doesn't include any of the Bitcoin protocol, which has been left intact 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

Expand Down Expand Up @@ -60,10 +60,10 @@ Whenever a masternode comes online or a client is syncing, they will send this m
| Field Size | Field Name | Data type | Description |
| ---------- | ----------- | --------- | -------- |
| 41 | vin | CTxIn | The unspent output which is holding 1000 DASH
| # | addr | CService | Address of the main 1000 DASH unspent output
| # | addr | CService | IPv4 address of the masternode
| 33-65 | pubKeyCollateralAddress | CPubKey | CPubKey of the main 1000 DASH unspent output
| 33-65 | pubKeyMasternode | CPubKey | CPubKey of the secondary signing key (For all other messaging other than announce message)
| 71-73 | sig | char[] | Signature of this message
| 71-73 | sig | char[] | Signature of this message (verifiable via pubKeyCollateralAddress)
| 8 | sigTime | int64_t | Time which the signature was created
| 4 | nProtocolVersion | int | The protocol version of the masternode
| # | lastPing | CMasternodePing | The last known ping of the masternode
Expand Down Expand Up @@ -215,3 +215,72 @@ Masternodes use governance voting in response to new proposals, contracts, setti
| 4 | nVoteSignal | int | ???
| 8 | nTime | int64_t | Time which the vote was created
| 71-73 | vchSig | char[] | Signature of the masternode

### SPORK - "spork"

Spork

Spork

| Field Size | Field Name | Data type | Description |
| ---------- | ----------- | --------- | -------- |
| 4 | nSporkID | int |
| 8 | nValue | int64_t |
| 8 | nTimeSigned | int64_t |
| 66* | vchSig | char[] | Unclear if 66 is the correct size, but this is what it appears to be in most cases

#### Defined Sporks (per src/sporks.h)

| Spork ID | Number | Name | Description |
| ---------- | ---------- | ----------- | ----------- |
| 10001 | 2 | INSTANTSEND_ENABLED | Turns on and off InstantSend network wide
| 10002 | 3 | INSTANTSEND_BLOCK_FILTERING | Turns on and off InstantSend block filtering
| 10004 | 5 | INSTANTSEND_MAX_VALUE | Controls the max value for an InstantSend transaction (currently 2000 dash)
| 10007 | 8 | MASTERNODE_PAYMENT_ENFORCEMENT | Requires masternodes to be paid by miners when blocks are processed
| 10008 | 9 | SUPERBLOCKS_ENABLED | Superblocks are enabled (the 10% comes to fund the dash treasury)
| 10009 | 10 | MASTERNODE_PAY_UPDATED_NODES | Only current protocol version masternode's will be paid (not older nodes)
| 10011 | 12 | RECONSIDER_BLOCKS |
| 10012 | 13 | OLD_SUPERBLOCK_FLAG |
| 10013 | 14 | REQUIRE_SENTINEL_FLAG | Only masternode's running sentinel will be paid

## Undocumented messages

### MASTERNODEPAYMENTBLOCK - "mnwb"

Masternode Payment Block

*NOTE: Per src/protocol.cpp, there is no message for this (only inventory)*

### MNVERIFY - "mnv"

Masternode Verify

### DSFINALTX - "dsf"

Darksend Final Transaction

### DSCOMPLETE - "dsc"

Darksend Complete

### TXLOCKREQUEST - "ix"

Tx Lock Request

### MNGOVERNANCESYNC - "govsync"

Governance Sync

### DSEG - "dseg"

Masternode List/Entry Sync

Get Masternode list or specific entry

### SYNCSTATUSCOUNT - "ssc"

Sync Status Count

### MASTERNODEPAYMENTSYNC - "mnget"

Masternode Payment Sync

0 comments on commit 5d27950

Please sign in to comment.