Dash Core

Dash Core Developer Documentation

Welcome to the Dash Core developer documentation. You'll find guides and documentation to help you start working with Dash Core as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Guides

Instantsend

Dash Core's InstantSendInstantSend - InstantSend is a service that allows for near-instant transactions. Through this system, inputs can be locked to specific transactions and verified by consensus of the masternode network. feature provides a way to lock transaction inputsinputs - An input in a transaction which contains three fields: an outpoint, a signature script, and a sequence number. The outpoint references a previous output and the signature script allows spending it. and enable secure, instantaneous transactionstransactions - A transaction spending satoshis.. The networknetwork - The Dash P2P network which broadcasts transactions and blocks. automatically attempts to upgrade any qualifying transaction to InstantSend without a need for the sending walletwallet - Software that stores private keys and monitors the block chain (sometimes as a client of a server that does the processing) to allow users to spend and receive duffs. to explicitly request it.

  • To qualify for InstantSend, each transaction input must meet at least one of the following criteria:
    • Be locked by InstantSend
    • Be in a block that has a ChainLockChainLock - ChainLocks are a feature enabling near instant consensus on the valid chain. ChainLocks use Long-Living Masternode Quroums to mitigate 51 percent attacks and reduce uncertainty when receiving funds.
    • Have at least the number confirmationsconfirmations - A score indicating the number of blocks on the best block chain that would need to be modified to remove or modify a particular transaction. A confirmed transaction has a confirmation score of one or higher. (block depth) indicated by the table below
NetworkConfirmations Required
Mainnet6 Blocks (normal transactions)
100 Blocks (mining/masternode rewards)
Testnet / Regtest / Devnet2 Blocks

The introduction of the Long-Living Masternode QuorumLong-Living Masternode Quorum - Long-Living Masternode Quorums (LLMQs) are a Dash innovation that enable masternodes to perform threshold signing of consensus-related messages (e.g. InstantSend transactions). LLMQs provide a more scalable, general use quorum system than the ephemeral ones used prior to Dash Core version 0.14. feature in Dash Core 0.14 provided a foundation to scale InstantSend. The transaction input locking process (and resulting network traffic) now occurs only within the quorum. This minimizes network congestion since only the islock message produced by the locking process is relayed to the entire Dash network. This message contains all the information necessary to verify a successful transaction lock.

Sporks 2 (SPORK_2_INSTANTSEND_ENABLED) and 20 (SPORK_20_INSTANTSEND_LLMQ_BASED) are used to manage InstantSend. SporkSpork - A spork is a mechanism unique to Dash used to safely deploy new features to the network through network-level variables to avoid the risk of unintended network forking during upgrades. 2 enables or disables the entire InstantSend feature. Spork 20 was used to support the transition to LLMQ-based InstantSend and is currently retained for backward compatibility. It will be deprecated in a future release.

Note: A transaction will not be included in the block template (from the getblocktemplate RPC) unless it:

  1. Has been locked, or
  2. Has been in the mempool for >=10 minutes (WAIT_FOR_ISLOCK_TIMEOUT)

A minerminer - Mining is the act of creating valid Dash blocks, which requires demonstrating proof of work, and miners are devices that mine or people who own those devices. may still include any transaction, but blocksblocks - One or more transactions prefaced by a block header and protected by proof of work. Blocks are the data stored on the block chain. containing only locked transactions (or ones older than the timeout) should achieve a ChainLock faster. This is desirable to miners since it prevents any reorgs that might orphan their block.

InstantSend Data Flow

InstantSend ClientDirectionPeersDescription
tx messageClient sends InstantSend transaction
LLMQ Signing SessionsQuorums internally process locking
Quorum(s) responsible for the transaction's inputs lock the inputs via LLMQ signing sessions
Once all inputs are locked, the quorum responsible for the overall transaction creates the transaction lock (islock) via an LLMQ signing session
LLMQ ResultsQuorum results broadcast to the network
inv message (islock)Quorum responds with lock inventory
getdata message (islock)Client requests lock message
islock messageQuorum responds with lock message

Once a transaction lock is approved, the instantlock field of various RPCs is set to true (e.g. the getmempoolentry RPC).

Updated 9 months ago


What's Next

Chainlocks

Instantsend


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.