Governance Messages#
The following network messages enable the Governance features built in to Dash. For additional details on the governance system, see this Budget System page.
For additional details, refer to the Developer Guide Governance section.
govobj#
The govobj
message contains a governance object that is generally a proposal, contract, or setting. Masternodes ignore this request if they are not fully synced.
Bytes |
Name |
Data type |
Required |
Description |
---|---|---|---|---|
32 |
nHashParent |
uint256 |
Required |
Parent object (a hash of all zeros here indicates this is the root object, not a child object). |
4 |
nRevision |
int |
Required |
Object revision in the system |
8 |
nTime |
int64_t |
Required |
Time which this object was created |
32 |
nCollateralHash |
uint256 |
Required* |
Hash of the collateral fee transaction for proposals. |
0-16384 |
strData |
string |
Required |
Data field - can be used for anything (leading varint indicates size of data) |
4 |
nObjectType |
int |
Required |
Type of governance object: |
36 |
masternode |
outPoint |
Required* |
The unspent outpoint of the masternode (holding 1000 DASH) which is signing this object. |
97 |
vchSig |
char |
Required* |
BLS Signature of the masternode (Length (1 byte) + Signature (96 bytes)) |
Governance Object Types (defined by src/governance-object.h
)
Type |
Name |
Description |
---|---|---|
0 |
|
|
1 |
|
Submitted proposal (requires a collateral transaction - 1 Dash) |
2 |
|
Masternode generated. Removed after activation/execution. Used for superblocks. |
The following annotated hexdump shows a govobj
message for a Proposal object. Notice the presence of a non-zero collateral hash, a masternodeOutPoint that is an empty Outpoint (hash of all zeros), and no vchSig. (The message header has been omitted.)
00000000000000000000000000000000
00000000000000000000000000000000 ..... Parent Hash (0 = root)
01000000 ............................. Revision: 1
c8dfd65900000000 ..................... Create timestamp: 2017-10-06 01:43:31 UTC
633611d2f3e7481325242f200c7f3485
e3a9b4b6301e7f7d18d87d8231f3880b ..... Collateral Hash
Data
| 3e02 ............................... Data length: 574
| 356235623232373 ... 376435643564 ... Data (truncated)
01000000 ............................. Object Type: GOVERNANCE_OBJECT_PROPOSAL (1)
Masternode Unspent Outpoint
| 00000000000000000000000000000000
| 00000000000000000000000000000000 ... Outpoint TXID
| ffffffff ........................... Outpoint index number: 0
00 ................................... Signature length: 0
| .................................... Masternode Signature (None required)
The following annotated hexdump shows a govobj
message for a Trigger object. Notice the collateral hash of all zeros. (The message header has been omitted.)
00000000000000000000000000000000
00000000000000000000000000000000 ..... Parent Hash (0 = root)
01000000 ............................. Revision: 1
911ea85900000000 ..................... Create timestamp: 2017-08-31 14:34:57 UTC
00000000000000000000000000000000
00000000000000000000000000000000 ..... Collateral Hash (None required)
Data
| ae11 ............................... Data length: 4526
| fdae11356235623 ... 376435643564 ... Data (truncated)
02000000 ............................. Object Type: GOVERNANCE_OBJECT_TRIGGER (2)
Masternode Unspent Outpoint
| ffefbe4959085907bcd2ba29e357a441
| fa7b6e26e25896d8127332bba2419e97 ... Outpoint TXID
| 00000000 ........................... Outpoint index number: 0
60 ................................... Signature length: 96
06516fa3b38d29fca6194e5d2c929666
d59d2d105bbbc30a1e5d144e708a610a
2e0ab3c759988b13ff098ab3dbd4e01d
129827ef1e1996c211d6d5ecd5199f60
cf028b1cdb2f7240e33981b16d1270e9
d289fca20905fd453620238a505582fa ..... Masternode BLS Signature
govobjvote#
The govobjvote
message is used to indicate the voting status of a governance object. Voting status is comprised of the vote outcome (how the masternode voted) and the vote signal (the network support status). A sufficient number of yes votes results in the proposed funding being payed out in the next superblock (assuming their are sufficient funds available in the budget).
The initial govobjvote
message is created by a masternode to vote on a governance object (proposal, etc.). When the masternode votes, it broadcasts the govobjvote
message to all its peers.
When a node receives a valid, new govobjvote
message, it relays the message to all its connected peers to propagate the vote.
Additionally, nodes can request govobjvote
messages for specific governance objects via a govsync
message. Masternodes ignore requests for votes if they are not fully synced.
📘 Vote rate limiting
Dash Core limits how frequently a masternode can vote on a governance object. A masternode’s vote will not be processed if it has been less than 60 minutes since its last vote on that object. Additionally, invalid votes can result in the node being banned.
Bytes |
Name |
Data type |
Required |
Description |
---|---|---|---|---|
36 |
masternode |
outPoint |
Required |
The unspent outpoint of the masternode (holding 1000 DASH) which is voting |
32 |
nParentHash |
uint256 |
Required |
Object ( |
4 |
nVoteOutcome |
int |
Required |
None (0), Yes (1), No (2), Abstain (3) |
4 |
nVoteSignal |
int |
Required |
None (0), Funding (1), Valid (2), Delete (3), Endorsed (4) |
8 |
nTime |
int64_t |
Required |
Time the vote was created |
97 |
vchSig |
char[] |
Required |
BLS Signature of the masternode (Length (1 byte) + Signature (96 bytes)) |
Governance Object Vote Signals (defined by src/governance-object.h
)
Value |
Name |
Description |
---|---|---|
1 |
Funding |
Minimum network support has been reached for this object to be funded (doesn’t mean it will for sure though) |
2 |
Valid |
Minimum network support has been reached flagging this object as a valid and understood governance object (e.g, the serialized data is correct format, etc.) |
3 |
Delete |
Minimum network support has been reached saying this object should be deleted from the system entirely |
4 |
Endorsed |
Minimum network support has been reached flagging this object as endorsed by an elected representative body |
The following annotated hexdump shows a govobjvote
message. (The message header has been omitted.)
Masternode Unspent Outpoint
| 9425afd65ccce1d655d4dd461b8523b8
| 2577a8009c25604c65f3e78ea71d65df ... Outpoint TXID
| 01000000 ........................... Outpoint index number: 1
bc1bb26088161ff07dc09d873faa5573
9a2fd53121d315b2942f3b9db36cb475...... Parent Hash (0 = root)
01000000 ............................. Vote Outcome: VOTE_OUTCOME_NONE (1)
03000000 ............................. Vote Signal: VOTE_SIGNAL_DELETE (3)
ec3d235c00000000 ..................... Vote Create Time: 2018-12-26 08:38:04 UTC
60 ................................... Signature length: 96
06516fa3b38d29fca6194e5d2c929666
d59d2d105bbbc30a1e5d144e708a610a
2e0ab3c759988b13ff098ab3dbd4e01d
129827ef1e1996c211d6d5ecd5199f60
cf028b1cdb2f7240e33981b16d1270e9
d289fca20905fd453620238a505582fa ..... Masternode BLS Signature
govsync#
The govsync
message is used to request syncing of governance objects (govobj
message and govobjvote
message) with peers. Masternodes ignore this request if they are not fully synced.
This message responds in one of two ways depending on the request:
Object Sync - When a masternode receives a
govsync
message with a hash of all zeros, it responds with assc
message forgovobj
objects. The masternode also sends aninv
message (MSG_GOVERNANCE_OBJECT - 0x17) for all validgovobj
governance objects. Do note that Dash limits how frequently object sync can be requested. Frequent requests will result in the node being banned. Governance object votes are excluded in this type of response.Vote Sync - When a masternode receives a
govsync
message with a specific hash, it responds with anssc
message forgovobjvote
objects. The masternode also sends agovobjvote
inventory messages (MSG_GOVERNANCE_OBJECT_VOTE - 0x18) for the object requested.
Bytes |
Name |
Data type |
Required |
Description |
---|---|---|---|---|
32 |
nHash |
uint256 |
Required |
Hash of governance object to request |
# |
filter |
CBloomFilter |
Required |
Can be set to all zeros. |
The following annotated hexdump shows a govsync
message. (The message header has been omitted.)
2e46ea5418e097a3dbcccbee3cf2a911
6fb94ba635153f276dcb2123efcb73ff ..... Hash
00000000000000000000 ................. Bloom Filter