diff --git a/docs/api/remote-procedure-call-quick-reference.md b/docs/api/remote-procedure-call-quick-reference.md index 6596b69b..0303d137 100644 --- a/docs/api/remote-procedure-call-quick-reference.md +++ b/docs/api/remote-procedure-call-quick-reference.md @@ -26,6 +26,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core * [GetBlockChainInfo](../api/remote-procedure-calls-blockchain.md#getblockchaininfo): provides information about the current state of the block chain. **Updated in Dash Core 21.0.0** * [GetBlockCount](../api/remote-procedure-calls-blockchain.md#getblockcount): returns the number of blocks in the local best block chain. * [GetBlockFilter](../api/remote-procedure-calls-blockchain.md#getblockfilter): retrieves a [BIP157](https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki) content filter for a particular block. _New in Dash Core 18.0.0_ +* [GetBlockFromPeer](../api/remote-procedure-calls-blockchain.md#getblockfrompeer): attempts to fetch a specific block from a given peer. **Updated in Dash Core 22.0.0** * [GetBlockHash](../api/remote-procedure-calls-blockchain.md#getblockhash): returns the header hash of a block at the given height in the local best block chain. * [GetBlockHashes](../api/remote-procedure-calls-blockchain.md#getblockhashes): returns array of hashes of blocks within the timestamp range provided (requires `timestampindex` to be enabled). New in Dash Core 0.12.1 * [GetBlockHeader](../api/remote-procedure-calls-blockchain.md#getblockheader): gets a block header with a particular header hash from the local block database either as a JSON object or as a serialized block header. _Updated in Dash Core 0.16.0_ @@ -38,7 +39,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core * [GetMemPoolDescendants](../api/remote-procedure-calls-blockchain.md#getmempooldescendants): returns all in-mempool descendants for a transaction in the mempool. **Updated in Dash Core 20.0.0** * [GetMemPoolEntry](../api/remote-procedure-calls-blockchain.md#getmempoolentry): returns mempool data for given transaction (must be in mempool). **Updated in Dash Core 20.0.0** * [GetMemPoolInfo](../api/remote-procedure-calls-blockchain.md#getmempoolinfo): returns information about the node's current transaction memory pool. **Updated in Dash Core 20.1.0** -* [GetRawMemPool](../api/remote-procedure-calls-blockchain.md#getrawmempool): returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object. **Updated in Dash Core 20.0.0** +* [GetRawMemPool](../api/remote-procedure-calls-blockchain.md#getrawmempool): returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object. **Updated in Dash Core 22.0.0** * [GetMerkleBlocks](../api/remote-procedure-calls-blockchain.md#getmerkleblocks): returns an array of hex-encoded merkleblocks for blocks starting from which match . _New in Dash Core 0.15.0_ * [GetSpecialTxes](../api/remote-procedure-calls-blockchain.md#getspecialtxes): returns an array of special transactions found in the specified block _New in Dash Core 0.13.1_ * [GetSpentInfo](../api/remote-procedure-calls-blockchain.md#getspentinfo): returns the txid and index where an output is spent (requires `spentindex` to be enabled). New in Dash Core 0.12.1 @@ -47,7 +48,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core * [GetTxOutSetInfo](../api/remote-procedure-calls-blockchain.md#gettxoutsetinfo): returns statistics about the confirmed unspent transaction output (UTXO) set. Note that this call may take some time and that it only counts outputs from confirmed transactions---it does not count outputs from the memory pool. _Updated in Dash Core 18.1.0_ * [PreciousBlock](../api/remote-procedure-calls-blockchain.md#preciousblock): treats a block as if it were received before others with the same work. _New in Dash Core 0.12.3_ * [PruneBlockChain](../api/remote-procedure-calls-blockchain.md#pruneblockchain): prunes the blockchain up to a specified height or timestamp. _New in Dash Core 0.12.3_ -* [SaveMemPool](../api/remote-procedure-calls-blockchain.md#savemempool): dumps the mempool to disk. _New in Dash Core 0.16.0_ +* [SaveMemPool](../api/remote-procedure-calls-blockchain.md#savemempool): dumps the mempool to disk. **Updated in Dash Core 22.0.0** * [VerifyChain](../api/remote-procedure-calls-blockchain.md#verifychain): verifies each entry in the local block chain database. * [VerifyTxOutProof](../api/remote-procedure-calls-blockchain.md#verifytxoutproof): verifies that a proof points to one or more transactions in a block, returning the transactions the proof commits to and throwing an RPC error if the block is not in our best block chain. @@ -63,14 +64,15 @@ These RPCs are all Dash-specific and not found in Bitcoin Core ## [Dash RPCs](../api/remote-procedure-calls-dash.md) +* [CoinJoin](../api/remote-procedure-calls-dash.md#coinjoin): controls the CoinJoin process. _Updated in Dash Core 0.12.3_ +* [CoinJoinSalt](../api/remote-procedure-calls-dash.md#coinjoinsalt): controls the CoinJoin salt used in the process. It allows you to generate, retrieve, or set the salt. **Added in Dash Core 22.0.0** +* [GetCoinJoinInfo](../api/remote-procedure-calls-dash.md#getcoinjoininfo): returns an object containing an information about CoinJoin settings and state. **Updated in Dash Core 22.0.0** * [GetGovernanceInfo](../api/remote-procedure-calls-dash.md#getgovernanceinfo): returns an object containing governance parameters. **Updated in Dash Core 20.0.0** -* [GetCoinJoinInfo](../api/remote-procedure-calls-dash.md#getcoinjoininfo): returns an object containing an information about CoinJoin settings and state. _New in Dash Core 0.15.0_ * [GetSuperblockBudget](../api/remote-procedure-calls-dash.md#getsuperblockbudget): returns the absolute maximum sum of superblock payments allowed. * [GObject](../api/remote-procedure-calls-dash.md#gobject): provides a set of commands for managing governance objects and displaying information about them. **Updated in Dash Core 20.0.0** * [Masternode](../api/remote-procedure-calls-dash.md#masternode): provides a set of commands for managing masternodes and displaying information about them. **_Updated in Dash Core 19.2.0_** * [MasternodeList](../api/remote-procedure-calls-dash.md#masternodelist): returns a list of masternodes in different modes. **Updated in Dash Core 20.0.0** * [MnSync](../api/remote-procedure-calls-dash.md#mnsync): returns the sync status, updates to the next step or resets it entirely. _Updated in Dash Core 0.14.0_ -* [CoinJoin](../api/remote-procedure-calls-dash.md#coinjoin): controls the CoinJoin process. _Updated in Dash Core 0.12.3_ * [Spork](../api/remote-procedure-calls-dash.md#spork): shows information about the current state of sporks. _Updated in Dash Core 18.1.0_ * [SporkUpdate](../api/remote-procedure-calls-dash.md#sporkupdate): updates the value of the provided spork. _New in Dash Core 18.1.0_ * [VoteRaw](../api/remote-procedure-calls-dash.md#voteraw): compiles and relays a governance vote with provided external signature instead of signing vote internally @@ -102,7 +104,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core ## [Network RPCs](../api/remote-procedure-calls-network.md) * [AddNode](../api/remote-procedure-calls-network.md#addnode): attempts to add or remove a node from the addnode list, or to try a connection to a node once. -* [AddPeerAddress](../api/remote-procedure-calls-network.md#addpeeraddress): adds the address of a potential peer to the address manager. **New in Dash Core 20.0.0** +* [AddPeerAddress](../api/remote-procedure-calls-network.md#addpeeraddress): adds the address of a potential peer to the address manager. **Updated in Dash Core 22.0.0** * [ClearBanned](../api/remote-procedure-calls-network.md#clearbanned): clears list of banned nodes. * [ClearDiscouraged](../api/remote-procedure-calls-network.md#cleardiscouraged): clears all discouraged nodes. **_New in Dash Core 19.0.0_** * [DisconnectNode](../api/remote-procedure-calls-network.md#disconnectnode): immediately disconnects from a specified node. _Updated in Dash Core 0.15.0_ diff --git a/docs/api/remote-procedure-calls-blockchain.md b/docs/api/remote-procedure-calls-blockchain.md index b98ec3a3..460960e5 100644 --- a/docs/api/remote-procedure-calls-blockchain.md +++ b/docs/api/remote-procedure-calls-blockchain.md @@ -85,7 +85,7 @@ Name | Type | Presence | Description `result` | object/null | Required
(exactly 1) | An object containing the requested block, or JSON `null` if an error occurred →
`blockhash` | string (hex) | Required
(exactly 1) | The hash of the block encoded as hex in RPC byte order →
`height` | number (int) | Required
(exactly 1) | The height of this block on its block chain -→
`signature` | string (hex) | Required
(exactly 1) | _Added in Dash Core 0.17.0_

The BLS signature of the ChainLock +→
`signature` | string (hex) | Required
(exactly 1) | The BLS signature of the ChainLock →
`known_block` | boolean | Required
(exactly 1) | True if the block is known by this node *Example from Dash Core 0.17.0* @@ -183,7 +183,7 @@ Name | Type | Presence | Description →
`bits` | string (hex) | Required
(exactly 1) | The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass →
`difficulty` | number (real) | Required
(exactly 1) | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 →
`chainwork` | string (hex) | Required
(exactly 1) | The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex -→
`nTx` | number (int) | Required
(exactly 1) | _Added in Dash Core 0.16.0_

The number of transactions in the block +→
`nTx` | number (int) | Required
(exactly 1) | The number of transactions in the block →
`previousblockhash` | string (hex) | Optional
(0 or 1) | The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block →
`nextblockhash` | string (hex) | Optional
(0 or 1) | The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order →
`chainlock` | bool | Required
(exactly 1) | *Added in Dash Core 0.14.0*

If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) @@ -604,6 +604,52 @@ Result: * [GetBlockHash](../api/remote-procedure-calls-blockchain.md#getblockhash): returns the header hash of a block at the given height in the local best block chain. * [GetBlock](../api/remote-procedure-calls-blockchain.md#getblock): gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. +## GetBlockFromPeer + +The `getblockfrompeer` RPC attempts to fetch a specific block from a given peer. The node must +already have the header for the block (e.g., by using the [`submitheader` +RPC](./remote-procedure-calls-mining.md#submitheader)). + +*Parameter #1---the block hash to fetch* + +Name | Type | Presence | Description +-----------|----------|-------------------------|------------ +blockhash | string | Required
(exactly 1) | The block hash to try to fetch + +*Parameter #2---the peer to fetch from* + +Name | Type | Presence | Description +-----------|--------|-------------------------|------------ +peer_id | number | Required
(exactly 1) | The ID of the peer to fetch the block from. You can get peer IDs by using the [`getpeerinfo` RPC](./remote-procedure-calls-network.md#getpeerinfo). + +*Result---execution result* + +Name | Type | Presence | Description +------------|---------|-------------------------|------------ +`warnings` | string | Optional
(0 or 1) | Any warnings or issues encountered during the block fetch attempt. If there are no warnings, this field will not appear. + +Returns `{}` if a block request was successfully scheduled. + +*Example from Dash Core 22.0.0* + +Attempt to fetch block `00000021e19ebb597d74627a4df829768c3f26d3185d943a53773e4a681391bd` from peer ID `0`: + +```bash +dash-cli -testnet getblockfrompeer "00000021e19ebb597d74627a4df829768c3f26d3185d943a53773e4a681391bd" 0 +``` + +Result: + +```json +{ + "warnings": "Block already downloaded" +} +``` + +*See also* + +* [GetBlock](../api/remote-procedure-calls-blockchain.md#getblock): gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block. + ## GetBlockHash The [`getblockhash` RPC](../api/remote-procedure-calls-blockchain.md#getblockhash) returns the header hash of a block at the given height in the local best block chain. @@ -779,7 +825,7 @@ Name | Type | Presence | Description →
`bits` | string (hex) | Required
(exactly 1) | The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass →
`difficulty` | number (real) | Required
(exactly 1) | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 →
`chainwork` | string (hex) | Required
(exactly 1) | The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex -→
`nTx` | number (int) | Required
(exactly 1) | _Added in Dash Core 0.16.0_

The number of transactions in the block +→
`nTx` | number (int) | Required
(exactly 1) | The number of transactions in the block →
`previousblockhash` | string (hex) | Optional
(0 or 1) | The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block →
`nextblockhash` | string (hex) | Optional
(0 or 1) | The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order @@ -897,7 +943,7 @@ Name | Type | Presence | Description → →
`bits` | string (hex) | Required
(exactly 1) | The value of the *nBits* field in the block header, indicating the target threshold this block's header had to pass → →
`difficulty` | number (real) | Required
(exactly 1) | The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0 →
`chainwork` | string (hex) | Required
(exactly 1) | The estimated number of block header hashes miners had to check from the genesis block to this block, encoded as big-endian hex -→
`nTx` | number (int) | Required
(exactly 1) | _Added in Dash Core 0.16.0_

The number of transactions in the block +→
`nTx` | number (int) | Required
(exactly 1) | The number of transactions in the block → →
`previousblockhash` | string (hex) | Optional
(0 or 1) | The hash of the header of the previous block, encoded as hex in RPC byte order. Not returned for genesis block → →
`nextblockhash` | string (hex) | Optional
(0 or 1) | The hash of the next block on the best block chain, if known, encoded as hex in RPC byte order @@ -1234,11 +1280,11 @@ Name | Type | Presence | Description → →
`ancestorcount` | number (int) | Required
(exactly 1) | The number of in-mempool ancestor transactions (including this one) → →
`ancestorsize` | number (int) | Required
(exactly 1) | The size of in-mempool ancestors (including this one) → →
`ancestorfees` | number (int) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The modified fees (see `modifiedfee` above) of in-mempool ancestors (including this one) -→ →
`fees` | object | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Object containing fee information -→→→
`base` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee in DASH -→→→
`modified` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee with fee deltas used for mining priority in DASH -→→→
`ancestor` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool ancestors (including this one) in DASH -→→→
`descendent` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool descendants (including this one) in DASH +→ →
`fees` | object | Optional
(0 or 1) | Object containing fee information +→→→
`base` | number | Optional
(0 or 1) | Transaction fee in DASH +→→→
`modified` | number | Optional
(0 or 1) | Transaction fee with fee deltas used for mining priority in DASH +→→→
`ancestor` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool ancestors (including this one) in DASH +→→→
`descendent` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool descendants (including this one) in DASH → →
`depends` | array | Required
(exactly 1) | An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty → → →
Depends TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order → →
`spentby` | array | Required
(exactly 1) | **Added in Dash Core 20.0.0**
An array of unconfirmed transactions spending outputs from this transaction @@ -1352,11 +1398,11 @@ Name | Type | Presence | Description → →
`ancestorcount` | number (int) | Required
(exactly 1) | The number of in-mempool ancestor transactions (including this one) → →
`ancestorsize` | number (int) | Required
(exactly 1) | The size of in-mempool ancestors (including this one) → →
`ancestorfees` | number (int) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The modified fees (see `modifiedfee` above) of in-mempool ancestors (including this one) -→ →
`fees` | object | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Object containing fee information -→→→
`base` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee in DASH -→→→
`modified` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee with fee deltas used for mining priority in DASH -→→→
`ancestor` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool ancestors (including this one) in DASH -→→→
`descendent` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool descendants (including this one) in DASH +→ →
`fees` | object | Optional
(0 or 1) | Object containing fee information +→→→
`base` | number | Optional
(0 or 1) | Transaction fee in DASH +→→→
`modified` | number | Optional
(0 or 1) | Transaction fee with fee deltas used for mining priority in DASH +→→→
`ancestor` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool ancestors (including this one) in DASH +→→→
`descendent` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool descendants (including this one) in DASH → →
`depends` | array | Required
(exactly 1) | An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty → → →
Depends TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order → →
`spentby` | array | Required
(exactly 1) | **Added in Dash Core 20.0.0**
An array of unconfirmed transactions spending outputs from this transaction @@ -1456,11 +1502,11 @@ Name | Type | Presence | Description →
`ancestorcount` | number (int) | Required
(exactly 1) | The number of in-mempool ancestor transactions (including this one) →
`ancestorsize` | number (int) | Required
(exactly 1) | The size of in-mempool ancestors (including this one) →
`ancestorfees` | number (int) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The modified fees (see `modifiedfee` above) of in-mempool ancestors (including this one) -→ →
`fees` | object | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Object containing fee information -→→→
`base` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee in DASH -→→→
`modified` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee with fee deltas used for mining priority in DASH -→→→
`ancestor` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool ancestors (including this one) in DASH -→→→
`descendent` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool descendants (including this one) in DASH +→ →
`fees` | object | Optional
(0 or 1) | Object containing fee information +→→→
`base` | number | Optional
(0 or 1) | Transaction fee in DASH +→→→
`modified` | number | Optional
(0 or 1) | Transaction fee with fee deltas used for mining priority in DASH +→→→
`ancestor` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool ancestors (including this one) in DASH +→→→
`descendent` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool descendants (including this one) in DASH →
`depends` | array | Required
(exactly 1) | An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty → →
Depends TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order →
`spentby` | array | Required
(exactly 1) | **Added in Dash Core 20.0.0**
An array of unconfirmed transactions spending outputs from this transaction @@ -1571,18 +1617,25 @@ Result: The [`getrawmempool` RPC](../api/remote-procedure-calls-blockchain.md#getrawmempool) returns all transaction identifiers (TXIDs) in the memory pool as a JSON array, or detailed information about each transaction in the memory pool as a JSON object. -*Parameter---desired output format* +*Parameter #1---verbose* Name | Type | Presence | Description --- | --- | --- | --- Format | bool | Optional
(0 or 1) | Set to `true` to get verbose output describing each transaction in the memory pool; set to `false` (the default) to only get an array of TXIDs for transactions in the memory pool +*Parameter #2---mempool sequence* + +Name | Type | Presence | Description +--- | --- | --- | --- +Format | bool | Optional
(0 or 1) | If verbose=false, returns a json object with transaction list and mempool sequence number attached. + *Result (format `false`)---an array of TXIDs* Name | Type | Presence | Description --- | --- | --- | --- `result` | array | Required
(exactly 1) | An array of TXIDs belonging to transactions in the memory pool. The array may be empty if there are no transactions in the memory pool →
TXID | string | Optional
(0 or more) | The TXID of a transaction in the memory pool, encoded as hex in RPC byte order +→
mempool_sequence | number (int) | Optional
(0 or 1) | *Added in Dash Core 22.0.0*
The mempool sequence value *Result (format: `true`)---a JSON object describing each transaction* @@ -1591,24 +1644,24 @@ Name | Type | Presence | Description `result` | object | Required
(exactly 1) | A object containing transactions currently in the memory pool. May be empty →
TXID | string : object | Optional
(0 or more) | The TXID of a transaction in the memory pool, encoded as hex in RPC byte order → →
`size` | number (int) | Required
(exactly 1) | The size of the serialized transaction in bytes -→ →
`fee` | amount (Dash) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The transaction fee paid by the transaction in decimal Dash -→ →
`modifiedfee` | amount (Dash) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The transaction fee with fee deltas used for mining priority in decimal Dash +→ →
`fee` | amount (Dash) | Required
(exactly 1) | *Deprecated in Dash Core 0.17.0*
The transaction fee paid by the transaction in decimal Dash +→ →
`modifiedfee` | amount (Dash) | Required
(exactly 1) | *Deprecated in Dash Core 0.17.0*
The transaction fee with fee deltas used for mining priority in decimal Dash → →
`time` | number (int) | Required
(exactly 1) | The time the transaction entered the memory pool, Unix epoch time format → →
`height` | number (int) | Required
(exactly 1) | The block height when the transaction entered the memory pool -→ →
`descendantcount` | number (int) | Required
(exactly 1) | *Added in Bitcoin Core 0.12.0*

The number of in-mempool descendant transactions (including this one) -→ →
`descendantsize` | number (int) | Required
(exactly 1) | *Added in Bitcoin Core 0.12.0*

The size of in-mempool descendants (including this one) -→ →
`descendantfees` | number (int) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The modified fees (see `modifiedfee` above) of in-mempool descendants (including this one) -→ →
`ancestorcount` | number (int) | Required
(exactly 1) | *Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0*

The number of in-mempool ancestor transactions (including this one) -→ →
`ancestorsize` | number (int) | Required
(exactly 1) | *Added in Dash Core 0.12.3 / Bitcoin Core 0.13.0*

The size of in-mempool ancestors (including this one) -→ →
`ancestorfees` | number (int) | Required
(exactly 1) | **Deprecated in Dash Core 0.17.0**

The modified fees (see `modifiedfee` above) of in-mempool ancestors (including this one) -→ →
`fees` | object | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Object containing fee information -→→→
`base` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee in DASH -→→→
`modified` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Transaction fee with fee deltas used for mining priority in DASH -→→→
`ancestor` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool ancestors (including this one) in DASH -→→→
`descendent` | number | Optional
(0 or 1) | _Added in Dash Core 0.17.0_
Modified fees (see above) of in-mempool descendants (including this one) in DASH +→ →
`descendantcount` | number (int) | Required
(exactly 1) | The number of in-mempool descendant transactions (including this one) +→ →
`descendantsize` | number (int) | Required
(exactly 1) | The size of in-mempool descendants (including this one) +→ →
`descendantfees` | number (int) | Required
(exactly 1) | *Deprecated in Dash Core 0.17.0*
The modified fees (see `modifiedfee` above) of in-mempool descendants (including this one) +→ →
`ancestorcount` | number (int) | Required
(exactly 1) | The number of in-mempool ancestor transactions (including this one) +→ →
`ancestorsize` | number (int) | Required
(exactly 1) | The size of in-mempool ancestors (including this one) +→ →
`ancestorfees` | number (int) | Required
(exactly 1) | *Deprecated in Dash Core 0.17.0*
The modified fees (see `modifiedfee` above) of in-mempool ancestors (including this one) +→ →
`fees` | object | Optional
(0 or 1) | Object containing fee information +→→→
`base` | number | Optional
(0 or 1) | Transaction fee in DASH +→→→
`modified` | number | Optional
(0 or 1) | Transaction fee with fee deltas used for mining priority in DASH +→→→
`ancestor` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool ancestors (including this one) in DASH +→→→
`descendent` | number | Optional
(0 or 1) | Modified fees (see above) of in-mempool descendants (including this one) in DASH → →
`depends` | array | Required
(exactly 1) | An array holding TXIDs of unconfirmed transactions this transaction depends upon (parent transactions). Those transactions must be part of a block before this transaction can be added to a block, although all transactions may be included in the same block. The array may be empty → → →
Depends TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions this transaction depends upon, encoded as hex in RPC byte order -→ →
`spentby` | array | Required
(exactly 1) | _Added in Dash Core 0.17.0_
An array of unconfirmed transactions spending outputs from this transaction +→ →
`spentby` | array | Required
(exactly 1) | An array of unconfirmed transactions spending outputs from this transaction → → →
TXID | string | Optional (0 or more) | The TXIDs of any unconfirmed transactions spending from this transaction → →
`unbroadcast` | bool | Required
(exactly 1) | **Added in Dash Core 20.0.0**
True if this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) → →
`instantlock` | bool | Required
(exactly 1) | *Added in Dash Core 0.12.3*

Set to `true` for locked [InstantSend](../resources/glossary.md#instantsend) transactions (masternode quorum has locked the transaction inputs via `isdlock` message). Set to `false` if the masternodes have not approved the [InstantSend](../resources/glossary.md#instantsend) transaction @@ -2206,13 +2259,26 @@ The [`savemempool` RPC](../api/remote-procedure-calls-blockchain.md#savemempool) *Parameters: none* -*Example from Dash Core 0.16.0* +*Result---output filename* + +Name | Type | Presence | Description +--- | --- | --- | --- +`result` | object/null | Required
(exactly 1) | An object containing the filename the mempool was saved to +→
`filename` | string | Required
(exactly 1) | The directory and file where the mempool was saved + +*Example from Dash Core 22.0.0* ``` bash dash-cli savemempool ``` -Result (no output from dash-cli). +Result: + +```json +{ + "filename": "/home/phez/.dashcore/testnet3/mempool.dat" +} +``` *See also: none* diff --git a/docs/api/remote-procedure-calls-dash.md b/docs/api/remote-procedure-calls-dash.md index ce56bdfb..23415a34 100644 --- a/docs/api/remote-procedure-calls-dash.md +++ b/docs/api/remote-procedure-calls-dash.md @@ -6,6 +6,170 @@ # Dash RPCs + + +## CoinJoin + +As of Dash Core 0.12.3, this is not supported on masternodes since wallet functionality is disabled on them for security reasons. + +The [`coinjoin` RPC](#coinjoin) controls the CoinJoin process (previously named `privatesend` prior to Dash Core 0.17.0). + +| Name | Type | Presence | Description | +| ------ | ------ | ----------------------- | ---------------------------------------------------------------------------------------------------------- | +| `mode` | string | Required
(exactly 1) | The command mode to use:
`start` - Start CoinJoin
`stop` - Stop CoinJoin
`reset` - Reset CoinJoin | + +**Command Mode - `start`** + +*Result---start command return status* + +| Name | Type | Presence | Description | +| -------- | ------ | ----------------------- | --------------------- | +| `result` | string | Required
(exactly 1) | Command return status | + +*Example from Dash Core 0.17.0* + +``` bash +dash-cli -testnet coinjoin start +``` + +Result: + +```text +Mixing started successfully +``` + +**Command Mode - `stop`** + +*Result---stop command return status* + +| Name | Type | Presence | Description | +| -------- | ------ | ----------------------- | --------------------- | +| `result` | string | Required
(exactly 1) | Command return status | + +*Example from Dash Core 0.17.0* + +``` bash +dash-cli -testnet coinjoin stop +``` + +Result: + +```text +Mixing was stopped +``` + +**Command Mode - `reset`** + +*Result---reset command return status* + +| Name | Type | Presence | Description | +| -------- | ------ | ----------------------- | --------------------- | +| `result` | string | Required
(exactly 1) | Command return status | + +*Example from Dash Core 0.17.0* + +``` bash +dash-cli -testnet coinjoin reset +``` + +Result: + +```text +Mixing was reset +``` + +*See also: none* + +## CoinJoinSalt + +The [`coinjoinsalt` RPC](#coinjoinsalt) controls the CoinJoin salt used in the process. It allows +you to generate, retrieve, or set the salt. + +| Name | Type | Presence | Description | +| --------- | ------ | ----------------------- | ------------------------------------------------------------------------------------------------ | +| `command` | string | Required
(exactly 1) | The command mode to use:
`generate` - Generate new CoinJoin salt
`get` - Fetch existing CoinJoin salt
`set` - Set new CoinJoin salt | + +**Command Mode - `generate`** + +Generates a new CoinJoin salt and stores it in the wallet database. Note that a new salt cannot be +generated if CoinJoin mixing is in process or if the wallet has private keys disabled. + +| Name | Type | Presence | Description | +| ----------- | ------- | ------------------------------- | ----------- | +| `overwrite` | boolean | Optional
(default: `false`) | Allows generating new salt even if an existing salt is present and/or there is a CoinJoin balance | + +*Result---generate command return status* + +| Name | Type | Presence | Description | +| -------- | ------- | ----------------------- | ---------------------------------- | +| `result` | boolean | Required
(exactly 1) | Status of CoinJoin salt generation | + +*Examples* + +```bash +dash-cli -testnet coinjoinsalt generate +``` + +Result: + +```text +true +``` + +**Command Mode - `get`** + +Fetches the existing CoinJoin salt. Note that the salt cannot be fetched if the wallet has private +keys disabled. + +*Result---get command return value* + +| Name | Type | Presence | Description | +| ----- | ------ | ----------------------- | ------------------------- | +| `salt` | string | Required
(exactly 1) | The current CoinJoin salt (in hexadecimal format) | + +*Examples* + +```bash +dash-cli -testnet coinjoinsalt get +``` + +Result: + +```text +"c2ca...4546" +``` + +**Command Mode - `set`** + +Sets a new CoinJoin salt. The salt cannot be set if CoinJoin mixing is in process or if the wallet +has private keys disabled. This command will overwrite the existing salt, and if a CoinJoin balance +is present, the wallet will rescan. + +| Name | Type | Presence | Description | +| ----------- | ------- | ------------------------------- | ----------- | +| `salt` | string | Required
(exactly 1) | The desired CoinJoin salt value for the wallet (in hexadecimal format) | +| `overwrite` | boolean | Optional
(default: `false`) | Allows overwriting the salt even if a CoinJoin balance is present | + +*Result---set command return status* + +| Name | Type | Presence | Description | +| -------- | ------- | ----------------------- | -------------------------------------- | +| `result` | boolean | Required
(exactly 1) | Status of CoinJoin salt change request | + +*Examples* + +```bash +dash-cli -testnet coinjoinsalt set f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16 +``` + +Result: + +```text +true +``` + +*See also: none* + ## GetGovernanceInfo The [`getgovernanceinfo` RPC](#getgovernanceinfo) returns an object containing governance parameters. @@ -61,39 +225,38 @@ The [`getcoinjoininfo` RPC](#getcoinjoininfo) returns an object containing an in *Result---(for regular nodes) information about the pool* -| Name | Type | Presence | Description | -| ------------------------ | --------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------- | -| `result` | object | Required
(exactly 1) | Information about the pool | -| →
`enabled` | bool | Required
(exactly 1) | Whether CoinJoin functionality is enabled | -| →
`multisession` | bool | Required
(exactly 1) | Whether CoinJoin multisession option is enabled | -| →
`max_sessions` | number (int) | Required
(exactly 1) | How many parallel sessions can there be at once | -| →
`max_rounds` | number (int) | Required
(exactly 1) | How many rounds to process | -| →
`max_amount` | number (int) | Required
(exactly 1) | How many DASH to keep processed | -| →
`max_denoms` | number (int) | Required
(exactly 1) | **Removed in Dash Core 0.16.0**
How many inputs of each denominated amount to create | -| →
`denoms_goal` | number (int) | Required
(exactly 1) | *Added in Dash Core 0.16.0*
How many inputs of each denominated amount to target | +| Name | Type | Presence | Description | +| ------------------------ | --------------------- | ----------------------- | ----------- | +| `result` | object | Required
(exactly 1) | Information about the pool | +| →
`enabled` | bool | Required
(exactly 1) | Whether CoinJoin functionality is enabled | +| →
`multisession` | bool | Required
(exactly 1) | Whether CoinJoin multisession option is enabled | +| →
`max_sessions` | number (int) | Required
(exactly 1) | How many parallel sessions can there be at once | +| →
`max_rounds` | number (int) | Required
(exactly 1) | How many rounds to process | +| →
`max_amount` | number (int) | Required
(exactly 1) | How many DASH to keep processed | +| →
`denoms_goal` | number (int) | Required
(exactly 1) | *Added in Dash Core 0.16.0*
How many inputs of each denominated amount to target | | →
`denoms_hardcap` | number (int) | Required
(exactly 1) | *Added in Dash Core 0.16.0*
Maximum limit of how many inputs of each denominated amount to create | -| →
`queue_size` | number (int) | Required
(exactly 1) | How many queues there are currently on the network | -| →
`running` | bool | Required
(exactly 1) | Whether CoinJoin is currently running | -| →
`sessions` | array of json objects | Required
(exactly 1) | Information about session(s) | -| → →
Session | object | Optional
(1 or more) | Information for a session | -| → → →
`protxhash` | string | Required
(exactly 1) | The ProTxHash of the masternode | -| → → →
`outpoint` | string (txid-index) | Required
(exactly 1) | The outpoint of the masternode | -| → → →
`service` | string (host:port) | Required
(exactly 1) | The IP address and port of the masternode | -| → → →
`denomination` | number (int) | Required
(exactly 1) | The denomination of the session (in DASH) | -| → → →
`state` | string | Required
(exactly 1) | Current state of the session | -| → → →
`entries_count` | number (int) | Required
(exactly 1) | The number of entries in the session | -| →
`keys_left` | number (int) | Required
(exactly 1) | How many new keys are left since last automatic backup | -| →
`warnings` | string | Optional
(exactly 1) | Any warnings | +| →
`queue_size` | number (int) | Required
(exactly 1) | How many queues there are currently on the network | +| →
`running` | bool | Required
(exactly 1) | Whether CoinJoin is currently running | +| →
`sessions` | array of json objects | Required
(exactly 1) | Information about session(s) | +| → →
Session | object | Optional
(1 or more) | Information for a session | +| → → →
`protxhash` | string | Required
(exactly 1) | The ProTxHash of the masternode | +| → → →
`outpoint` | string (txid-index) | Required
(exactly 1) | The outpoint of the masternode | +| → → →
`service` | string (host:port) | Required
(exactly 1) | The IP address and port of the masternode | +| → → →
`denomination` | number (int) | Required
(exactly 1) | The denomination of the session (in DASH) | +| → → →
`state` | string | Required
(exactly 1) | Current state of the session | +| → → →
`entries_count` | number (int) | Required
(exactly 1) | The number of entries in the session | +| →
`keys_left` | number (int) | Optional
(0 or 1) | *Changed to optional in Dash Core 22.0.0*
How many new keys are left since last automatic backup | +| →
`warnings` | string | Optional
(exactly 1) | Any warnings | *Result---(for masternodes) information about the pool* -| Name | Type | Presence | Description | -| -------------------- | ------------ | ----------------------- | -------------------------------------------------- | -| `result` | object | Required
(exactly 1) | Information about the pool | +| Name | Type | Presence | Description | +| -------------------- | ------------ | ----------------------- | ----------- | +| `result` | object | Required
(exactly 1) | Information about the pool | | →
`queue_size` | number (int) | Required
(exactly 1) | How many queues there are currently on the network | -| →
`denomination` | number (int) | Required
(exactly 1) | The denomination of the session (in DASH) | -| →
`state` | string | Required
(exactly 1) | Current state of the session | -| →
`entries_count` | number (int) | Required
(exactly 1) | The number of entries in the session | +| →
`denomination` | number (int) | Required
(exactly 1) | The denomination of the session (in DASH) | +| →
`state` | string | Required
(exactly 1) | Current state of the session | +| →
`entries_count` | number (int) | Required
(exactly 1) | The number of entries in the session | *Example from Dash Core 0.17.0 (regular node)* @@ -1664,80 +1827,6 @@ success * [Masternode](#masternode): provides a set of commands for managing masternodes and displaying information about them. * [MasternodeList](#masternodelist): returns a list of masternodes in different modes. - - -## CoinJoin - -As of Dash Core 0.12.3, this is not supported on masternodes since wallet functionality is disabled on them for security reasons. - -The [`coinjoin` RPC](#coinjoin) controls the CoinJoin process (previously named `privatesend` prior to Dash Core 0.17.0). - -| Name | Type | Presence | Description | -| ------ | ------ | ----------------------- | ---------------------------------------------------------------------------------------------------------- | -| `mode` | string | Required
(exactly 1) | The command mode to use:
`start` - Start CoinJoin
`stop` - Stop CoinJoin
`reset` - Reset CoinJoin | - -**Command Mode - `start`** - -*Result---start command return status* - -| Name | Type | Presence | Description | -| -------- | ------ | ----------------------- | --------------------- | -| `result` | string | Required
(exactly 1) | Command return status | - -*Example from Dash Core 0.17.0* - -``` bash -dash-cli -testnet coinjoin start -``` - -Result: - -```text -Mixing started successfully -``` - -**Command Mode - `stop`** - -*Result---stop command return status* - -| Name | Type | Presence | Description | -| -------- | ------ | ----------------------- | --------------------- | -| `result` | string | Required
(exactly 1) | Command return status | - -*Example from Dash Core 0.17.0* - -``` bash -dash-cli -testnet coinjoin stop -``` - -Result: - -```text -Mixing was stopped -``` - -**Command Mode - `reset`** - -*Result---reset command return status* - -| Name | Type | Presence | Description | -| -------- | ------ | ----------------------- | --------------------- | -| `result` | string | Required
(exactly 1) | Command return status | - -*Example from Dash Core 0.17.0* - -``` bash -dash-cli -testnet coinjoin reset -``` - -Result: - -```text -Mixing was reset -``` - -*See also: none* - ## Spork The [`spork` RPC](#spork) shows information about the current state of sporks. diff --git a/docs/api/remote-procedure-calls-network.md b/docs/api/remote-procedure-calls-network.md index 7a6dfcb1..a441d4c8 100644 --- a/docs/api/remote-procedure-calls-network.md +++ b/docs/api/remote-procedure-calls-network.md @@ -44,8 +44,12 @@ Result (no output from `dash-cli` because result is set to `null`). ## AddPeerAddress +:::{attention} +This RPC is for testing only. +::: + The [`addpeeraddress` RPC](../api/remote-procedure-calls-network.md#addpeeraddress) adds the address -of a potential peer to the address manager. **This RPC is for testing only.** +of a potential peer to the address manager. *Parameter #1---IP address of node to add* @@ -59,6 +63,12 @@ of a potential peer to the address manager. **This RPC is for testing only.** | ---- | ---- | -------- | ----------- | | `port` | number | Required
(exactly 1) | The port of the peer | +*Parameter #3---add to tried address table* + +| Name | Type | Presence | Description | +| ---- | ---- | -------- | ----------- | +| `tried` | bool | Optional
(0 or 1) | If true, attempt to add the peer to the tried addresses table | + *Result---a list of added nodes* | Name | Type | Presence | Description | @@ -397,7 +407,7 @@ The [`getnetworkinfo` RPC](../api/remote-procedure-calls-network.md#getnetworkin | →
`connections_mn` | number (int) | Required
(exactly 1) | _Added in Dash Core 18.0.0_

The number of verified masternode connections | | →
`connections_mn_in` | number (int) | Required
(exactly 1) | _Added in Dash Core 18.0.0_

The number of inbound verified masternode connections | | →
`connections_mn_out` | number (int) | Required
(exactly 1) | _Added in Dash Core 18.0.0_

The number of outbound verified masternode connections | -| →
`socketevents` | string | Required
(exactly 1) | _Added in Dash Core 0.16.0_

The socket events mode, either `epoll`, `poll`, or `select` | +| →
`socketevents` | string | Required
(exactly 1) | The socket events mode, either `epoll`, `poll`, or `select` | | →
`networks` | array | Required
(exactly 1) | An array with three objects: one describing the IPv4 connection, one describing the IPv6 connection, and one describing the Tor hidden service (onion) connection | | → →
Network | object | Optional
(0 to 3) | An object describing a network. If the network is unroutable, it will not be returned | | → → →
`name` | string | Required
(exactly 1) | The name of the network. Either `ipv4`, `ipv6`, or `onion` | diff --git a/docs/api/remote-procedure-calls-raw-transactions.md b/docs/api/remote-procedure-calls-raw-transactions.md index adedd0c9..4b22574b 100644 --- a/docs/api/remote-procedure-calls-raw-transactions.md +++ b/docs/api/remote-procedure-calls-raw-transactions.md @@ -916,7 +916,7 @@ _Parameter #3---hash of a block to look in for the transaction_ | Name | Type | Presence | Description | | ---------- | ---- | -------------------- | --------------------------------------------------------------------------------------------- | -| Block Hash | string | Optional
(0 or 1) | _Added in Dash Core 0.16.0_

The hash of the block in which to look for the transaction | +| Block Hash | string | Optional
(0 or 1) | The hash of the block in which to look for the transaction | _Result (if transaction not found)---`null`_ @@ -985,7 +985,7 @@ _Result (if verbose=`true`)---the decoded transaction_ | →
`blocktime` | number (int) | Optional
(0 or 1) | This field is currently identical to the time field described above | | →
`instantlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is either protected by an [InstantSend](../resources/glossary.md#instantsend) lock or it is in a block that has received a [ChainLock](../resources/glossary.md#chainlock) | | →
`instantlock_internal` | bool | Required
(exactly 1) | If set to `true`, this transaction has an [InstantSend](../resources/glossary.md#instantsend) lock | -| →
`chainlock` | bool | Required
(exactly 1) | _Added in Dash Core 0.14.0_

If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | +| →
`chainlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | _Examples from Dash Core 21.1.0_ diff --git a/docs/api/remote-procedure-calls-wallet.md b/docs/api/remote-procedure-calls-wallet.md index 94911434..644cba80 100644 --- a/docs/api/remote-procedure-calls-wallet.md +++ b/docs/api/remote-procedure-calls-wallet.md @@ -932,7 +932,7 @@ _Result---a description of the transaction_ | →
`confirmations` | number (int) | Required
(exactly 1) | The number of confirmations the transaction has received. Will be `0` for unconfirmed and `-1` for conflicted | | →
`instantlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is either protected by an [InstantSend](../resources/glossary.md#instantsend) lock or it is in a block that has received a [ChainLock](../resources/glossary.md#chainlock) | | →
`instantlock-internal` | bool | Required
(exactly 1) | If set to `true`, this transaction has an [InstantSend](../resources/glossary.md#instantsend) lock. Available for 'send' and 'receive' category of transactions. | -| →
`chainlock` | bool | Required
(exactly 1) | _Added in Dash Core 0.14.0_

If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | +| →
`chainlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | | →
`trusted` | bool | Optional
(0 or 1) | Whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions | | →
`generated` | bool | Optional
(0 or 1) | Set to `true` if the transaction is a coinbase. Not returned for regular transactions | | →
`blockhash` | string (hex) | Optional
(0 or 1) | The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions | @@ -1058,7 +1058,7 @@ _Result---information about the wallet_ | →
`unconfirmed_balance` | number (dash) | Required
(exactly 1) | **Deprecated** The total unconfirmed balance of the wallet. The same as returned by the [`getunconfirmedbalance` RPC](../api/remote-procedure-calls-wallet.md#getunconfirmedbalance) with default parameters. Identical to `getbalances().mine.untrusted_pending`. | | →
`immature_balance` | number (dash) | Required
(exactly 1) | **Deprecated** The total immature balance of the wallet. This includes mining/masternode rewards that cannot be spent yet. Identical to `getbalances().mine.immature`. | | →
`txcount` | number (int) | Required
(exactly 1) | The total number of transactions in the wallet (both spends and receives) | -| →
`timefirstkey` | number (int) | Required
(exactly 1) | _Added in Dash Core 0.17.0_

The timestamp (seconds since Unix epoch) of the oldest known key in the wallet | +| →
`timefirstkey` | number (int) | Required
(exactly 1) | The timestamp (seconds since Unix epoch) of the oldest known key in the wallet | | →
`keypoololdest` | number (int) | Required
(exactly 1) | The date as Unix epoch time when the oldest key in the wallet key pool was created; useful for only scanning blocks created since this date for transactions | | →
`keypoolsize` | number (int) | Required
(exactly 1) | The number of keys in the wallet keypool | | →
`keypoolsize_hd_internal` | number (int) | Optional
(0 or 1) | How many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used) | @@ -2031,7 +2031,7 @@ _Parameter #4---include_removed_ | →
`confirmations` | number (int) | Required
(exactly 1) | The number of confirmations the transaction has received. Will be `0` for unconfirmed and `-1` for conflicted | | →
`instantlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is either protected by an [InstantSend](../resources/glossary.md#instantsend) lock or it is in a block that has received a [ChainLock](../resources/glossary.md#chainlock) | | →
`instantlock_internal` | bool | Required
(exactly 1) | If set to `true`, this transaction has an [InstantSend](../resources/glossary.md#instantsend) lock | -| →
`chainlock` | bool | Required
(exactly 1) | _Added in Dash Core 0.14.0_

If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | +| →
`chainlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | | →
`generated` | bool | Optional
(0 or 1) | Set to `true` if the transaction is a coinbase. Not returned for regular transactions | | →
`blockhash` | string (hex) | Optional
(0 or 1) | The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions | | →
`blockheight` | string (hex) | Optional
(0 or 1) | The block height containing the transaction. | @@ -2165,7 +2165,7 @@ _Result---payment details_ | → →
`confirmations` | number (int) | Optional
(0 or 1) | The number of confirmations the transaction has received. Will be `0` for unconfirmed and `-1` for conflicted. Not returned for _move_ category payments | | →
`instantlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is either protected by an [InstantSend](../resources/glossary.md#instantsend) lock or it is in a block that has received a [ChainLock](../resources/glossary.md#chainlock) | | →
`instantlock_internal` | bool | Required
(exactly 1) | If set to `true`, this transaction has an [InstantSend](../resources/glossary.md#instantsend) lock | -|
`chainlock` | bool | Required
(exactly 1) | _Added in Dash Core 0.14.0_

If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | +|
`chainlock` | bool | Required
(exactly 1) | If set to `true`, this transaction is in a block that is locked (not susceptible to a chain re-org) | | → →
`generated` | bool | Optional
(0 or 1) | Set to `true` if the transaction is a coinbase. Not returned for regular transactions or _move_ category payments | | → →
`trusted` | bool | Optional
(0 or 1) | Indicates whether we consider the outputs of this unconfirmed transaction safe to spend. Only returned for unconfirmed transactions | | → →
`blockhash` | string (hex) | Optional
(0 or 1) | The hash of the block on the local best block chain which includes this transaction, encoded as hex in RPC byte order. Only returned for confirmed transactions | diff --git a/docs/api/zmq.md b/docs/api/zmq.md index 6e16f461..c6fb85d2 100644 --- a/docs/api/zmq.md +++ b/docs/api/zmq.md @@ -41,7 +41,8 @@ Currently, the following notifications are supported: | zmqpubrawgovernancevote | Raw governance vote ([`govobjvote`](../reference/p2p-network-governance-messages.md#govobjvote)) | | zmqpubrawgovernanceobject | Raw governance object ([`govobject`](../reference/p2p-network-governance-messages.md#govobj)) | | zmqpubrawinstantsend
doublespend | Raw transaction ([`tx`](../reference/transactions-raw-transaction-format.md)) attempting to double-spend an InstantSend-locked input | -| zmqpubrawrecoveredsig | Raw recovered signatures (recovered by LLMQs) +| zmqpubrawrecoveredsig | Raw recovered signatures (recovered by LLMQs) | +| zmqpubsequence | Mempool sequence number | ## High Water Mark @@ -67,6 +68,7 @@ The option to set the PUB socket's outbound message [high water mark](https://ze | zmqpubrawgovernanceobjecthwm | Raw governance object ([`govobject`](../reference/p2p-network-governance-messages.md#govobj)) high water mark | | zmqpubrawinstantsenddoublespendhwm | Raw transaction ([`tx`](../reference/transactions-raw-transaction-format.md)) attempting to double-spend an InstantSend-locked input high water mark | | zmqpubrawrecoveredsighwm | Raw recovered signatures (recovered by LLMQs) high water mark | +| zmqpubsequencehwm | Mempool sequence number high water mark | ## Dash Core Configuration @@ -74,14 +76,14 @@ ZMQ notifications can be enabled via either command line arguments or the config ### Command Line -``` +```shell $ dashd -zmqpubhashtx=tcp://127.0.0.1:28332 \ -zmqpubrawtx=ipc:///tmp/dashd.tx.raw ``` ### Config File -``` +```conf # ZMQ zmqpubhashtx=tcp://0.0.0.0:28332 zmqpubrawtx=tcp://0.0.0.0:28332 diff --git a/docs/reference/p2p-network-data-messages.md b/docs/reference/p2p-network-data-messages.md index 08b488dc..212b996c 100644 --- a/docs/reference/p2p-network-data-messages.md +++ b/docs/reference/p2p-network-data-messages.md @@ -381,11 +381,16 @@ The [`getheaders` message](../reference/p2p-network-data-messages.md#getheaders) ## getheaders2 +:::{versionchanged} 70235 +Protocol version 70235 (Dash Core 22.0.0) expanded the maximum number of headers that this message +can request to 8000. +::: + _Added in protocol version 70223 of Dash Core._ The [`getheaders2` message](../reference/p2p-network-data-messages.md#getheaders2) requests a [`headers2` message](../reference/p2p-network-data-messages.md#headers2) that provides block headers starting from a particular point in the [block chain](../resources/glossary.md#block-chain). It allows a [peer](../resources/glossary.md#peer) which has been disconnected or started for the first time to get the [headers](../resources/glossary.md#header) it hasn’t seen yet. -The [`getheaders2` message](../reference/p2p-network-data-messages.md#getheaders2) contains the same fields as the [`getheaders` message](../reference/p2p-network-data-messages.md#getheaders). +The [`getheaders2` message](../reference/p2p-network-data-messages.md#getheaders2) contains the same fields as the [`getheaders` message](../reference/p2p-network-data-messages.md#getheaders). Since protocol version 70235, up to 8,000 headers can be requested at a time. ## getmnlistd @@ -477,13 +482,19 @@ fe9f0864 ........................... Nonce ## headers2 +:::{versionchanged} 70235 +Protocol version 70235 (Dash Core 22.0.0) expanded the maximum number of headers that this message +can send to 8000. +::: + _Added in protocol version 70223 of Dash Core._ + The [`headers2` message](../reference/p2p-network-data-messages.md#headers2) sends compressed block headers to a [node](../resources/glossary.md#node) which previously requested certain [headers](../resources/glossary.md#header) with a [`getheaders2` message](../reference/p2p-network-data-messages.md#getheaders) or indicated it wants to receive them by signaling with a [`sendheaders2` message](../reference/p2p-network-control-messages.md#sendheaders2). | Bytes | Name | Data Type | Description |----------|---------|------------------|----------------- -| _Varies_ | count | compactSize uint | Number of block headers up to a maximum of 2,000. Note: headers-first sync assumes the sending node will send the maximum number of headers whenever possible. +| _Varies_ | count | compactSize uint | Number of block headers up to a maximum of 8,000. Prior to protocol version 70235 (Dash Core 22.0.0), only 2,000 headers could be requested at a time. Note: headers-first sync assumes the sending node will send the maximum number of headers whenever possible. | _Varies_ | headers | block_header2 | Block headers in the [`block_header2`](https://github.com/thephez/dips/blob/compressed-headers/compressed-headers.md#block_header2-data-type) format
**Note**: the first header will always be uncompressed. The following annotated hexdump shows a [`headers2` message](../reference/p2p-network-data-messages.md#headers2). (The message header has been omitted.) diff --git a/docs/reference/transactions-special-transactions.md b/docs/reference/transactions-special-transactions.md index b716382c..fb9b04d8 100644 --- a/docs/reference/transactions-special-transactions.md +++ b/docs/reference/transactions-special-transactions.md @@ -1214,8 +1214,26 @@ The JSON representation of a raw transaction can be obtained with the [`getrawtr "assetLockTx": { "version": 1, "creditOutputs": [ - "CTxOut(nValue=1.00000000, scriptPubKey=76a9147c75beb097957cc09537b615)", - "CTxOut(nValue=9.00141421, scriptPubKey=76a9147c75beb097957cc09537b615)" + { + "value": 1.00000000, + "valueSat": 100000000, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 7c75beb097957cc09537b615dde9ea6807719cdf OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9147c75beb097957cc09537b615dde9ea6807719cdf88ac", + "address": "yXfXh3jFYHHxnJZVsXnPcktCENqPaAhcX1", + "type": "pubkeyhash" + } + }, + { + "value": 9.00141421, + "valueSat": 900141421, + "scriptPubKey": { + "asm": "OP_DUP OP_HASH160 7c75beb097957cc09537b615dde9ea6807719cdf OP_EQUALVERIFY OP_CHECKSIG", + "hex": "76a9147c75beb097957cc09537b615dde9ea6807719cdf88ac", + "address": "yXfXh3jFYHHxnJZVsXnPcktCENqPaAhcX1", + "type": "pubkeyhash" + } + } ] } }