Skip to content

Commit 92eaefb

Browse files
authored
fix docs (#1404)
- fix info about files - add info about InstantSend
1 parent 8b6a06c commit 92eaefb

File tree

2 files changed

+66
-3
lines changed

2 files changed

+66
-3
lines changed

doc/files.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11

22
* banlist.dat: stores the IPs/Subnets of banned nodes
3-
* bitcoin.conf: contains configuration settings for bitcoind or bitcoin-qt
4-
* bitcoind.pid: stores the process id of bitcoind while running
3+
* dash.conf: contains configuration settings for dashd or dash-qt
4+
* dashd.pid: stores the process id of dashd while running
55
* blocks/blk000??.dat: block data (custom, 128 MiB per file); since 0.8.0
66
* blocks/rev000??.dat; block undo data (custom); since 0.8.0 (format changed since pre-0.8)
77
* blocks/index/*; block index (LevelDB); since 0.8.0
88
* chainstate/*; block chain state database (LevelDB); since 0.8.0
99
* database/*: BDB database environment; only used for wallet since 0.8.0
1010
* db.log: wallet database log file
11-
* debug.log: contains debug information and general logging generated by bitcoind or bitcoin-qt
11+
* debug.log: contains debug information and general logging generated by dashd or dash-qt
1212
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation; since 0.10.0
13+
* governance.dat: stores data for governance obgects
14+
* masternode.conf: contains configuration settings for remote masternodes
15+
* mncache.dat: stores data for masternode list
16+
* mnpayments.dat: stores data for masternode payments
17+
* netfulfilled.dat: stores data about recently made network requests
1318
* peers.dat: peer IP address database (custom format); since 0.7.0
1419
* wallet.dat: personal wallet (BDB) with keys and transactions
1520
* .cookie: session RPC authentication cookie (written at start when cookie authentication is used, deleted on shutdown): since 0.12.0

doc/instantsend.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
##InstantSend Technical Information
2+
3+
InstantSend has been integrated into the Core Daemon in two ways:
4+
* "push" notifications (ZMQ and `-instantsendnotify` cmd-line/config option);
5+
* RPC commands.
6+
7+
####ZMQ
8+
9+
When a "Transaction Lock" occurs the hash of the related transaction is broadcasted through ZMQ using both the `zmqpubrawtxlock` and `zmqpubhashtxlock` channels.
10+
11+
* `zmqpubrawtxlock`: publishes the raw transaction when locked via InstantSend
12+
* `zmqpubhashtxlock`: publishes the transaction hash when locked via InstantSend
13+
14+
This mechanism has been integrated into Bitcore-Node-Dash which allows for notification to be broadcast through Insight API in one of two ways:
15+
* WebSocket: [https://github.com/dashpay/insight-api-dash#web-socket-api](https://github.com/dashpay/insight-api-dash#web-socket-api)
16+
* API: [https://github.com/dashpay/insight-api-dash#instantsend-transactions](https://github.com/dashpay/insight-api-dash#instantsend-transactions)
17+
18+
####Command line option
19+
20+
When a wallet InstantSend transaction is successfully locked a shell command provided in this option is executed (`%s` in `<cmd>` is replaced by TxID):
21+
22+
```
23+
-instantsendnotify=<cmd>
24+
```
25+
26+
####RPC
27+
28+
Details pertaining to an observed "Transaction Lock" can also be retrieved through RPC, it’s important however to understand the underlying mechanism.
29+
30+
By default, the Dash Core daemon will launch using the following constant:
31+
32+
```
33+
static const int DEFAULT_INSTANTSEND_DEPTH = 5;
34+
```
35+
36+
This value can be overridden by passing the following argument to the Dash Core daemon:
37+
38+
```
39+
-instantsenddepth=<n>
40+
```
41+
42+
The key thing to understand is that this value indicates the number of "confirmations" a successful Transaction Lock represents. When Wallet RPC commands are performed (such as `listsinceblock`) this attribute is taken into account when returning information about the transaction. The value in `confirmations` field you see through RPC is showing the number of `"Blockchain Confirmations" + "InstantSend Depth"` (assuming the funds were sent via InstantSend).
43+
44+
There is also a field named `bcconfirmations`. The value in this field represents the total number of `"Blockchain Confirmations"` for a given transaction without taking into account whether it was InstantSend or not.
45+
46+
**Examples**
47+
* InstantSend transaction just occurred:
48+
* confirmations: 5
49+
* bcconfirmations: 0
50+
* InstantSend transaction received one confirmation from blockchain:
51+
* confirmations: 6
52+
* bcconfirmations: 1
53+
* non-InstantSend transaction just occurred:
54+
* confirmations: 0
55+
* bcconfirmations: 0
56+
* non-InstantSend transaction received one confirmation from blockchain:
57+
* confirmations: 1
58+
* bcconfirmations: 1

0 commit comments

Comments
 (0)