Blog Detail

  • 整合介绍#

    即时支付#

    本文档的 PDF 版本 PDF.

    InstantSend is a feature provided by the Dash network that allows for

    zero-confirmation transactions to be safely accepted and re-spent. The

    network attempts to lock the inputs of every valid transaction when it

    is broadcast to the network. Every secured transaction is included in a

    following block in accordance with standard blockchain principles.

    Transactions are typically locked by InstantSend within 3 seconds of

    being propagated to the network.

    InstantSend is enabled by the Masternode Network which comprises

    several thousand masternode servers. These nodes are differentiated

    from standard nodes by having proven ownership of 1,000 Dash, making the

    network highly resistant to Sybil attacks.

    Masternodes form Long-Living Masternode Quorums (LLMQs),

    which are responsible for providing near-instant certainty to the transaction

    participants that the transaction inputs cannot be re-spent, and that the

    transaction will be included in a following block instead of a conflicting

    transaction.

    This concept works as an extension to Nakamoto Consensus to provide additional

    security. InstantSend enables transacted funds to be immediately and securely

    re-spent by the recipient, even before the transaction is included in a block.

    接收即时发送交易#

    备注

    An "InstantSend Transaction" is simply a standard transaction

    that has been provided additional assurances by the masternode

    network. As a result, and from an integration perspective, the

    only technical difference is the InstantSend status.

    接收一个即时发送交易需要两个条件:

    确认一个交易的”即时发送状态“

    独立地调整区块确认数与”确认状态“。

    InstantSend Status is provided by the dash daemon, typically through a direct

    connection (e.g. RPC), ZMQ notification, or through the usage of an

    external wallet notification script.

    Direct Connection#

    InstantSend Status can be identified through direct connection with the Dash

    daemon using JSON-RPC protocol. The instantlock attribute of the JSON

    response reflects the status of the transaction and is included in the following

    commands:

    getrawmempool

    getmempoolancestors

    getmempooldescendants

    getmempoolentry

    getrawtransaction

    gettransaction

    listtransactions

    listsinceblock

    ZMQ Notification#

    Whenever a transaction enters the mempool and whenever a transaction is locked

    in the mempool, ZMQ notifications can be broadcast by the node. Refer to the

    list of possible ZMQ notifications for more

    details.

    以下通知与识别交易及相对的即时锁有关:

    zmqpubhashtx

    zmqpubhashtxlock

    zmqpubrawtx

    zmqpubrawtxlock

    Wallet Notification#

    The Dash Core Daemon can be configured to execute an external script whenever an

    InstantSend transaction relating to that wallet is observed. This is configured

    by adding the following line to the dash.conf file:

    instantsendnotify=/path/to/concurrent/safe/handler %s

    This is typically used with a wallet that has been populated with

    watch-only

    addresses.

    广播即时发送功能的交易信息#

    小技巧

    Because all transactions on the Dash network are automatically InstantSend,

    no procedural changes are required to broadcast transactions as InstantSend.

    自Dash v0.14.0在网络上创建长效节点仲裁链以来,仲裁链会默认锁定每一个有效交易,用户无需发送附加费用或额外操作。当每个交易输入被确认后,该交易即适用于即时支付。满足条件至少要符合以下一种情况:

    先前的交易是指由6个区块确认的交易输入

    先前的交易是由更早的即时支付锁确认

    包含先前交易的区块由 链锁锁定

    When checking the previous transaction for an InstantSend lock, it is

    important to do this on mempool (non-mined) transactions. This

    allows chained InstantSend locking.

    其它资源#

    下列资源提供即时发送功能的更多信息,以便帮助用户全面地了解它的基础技术。

    即时发送技术信息

    InstantSend Developer Documentation

    Receiving ZMQ notifications

    DIP0010: LLMQ 即时支付

    产品概述: Dash Core v0.14 发布