When you broadcast the signed payment, nodes pass it to each other over the peer-to-peer (P2P) network. A miner can then include it in a block.
Discover peers and open a P2P connection
- A node learns peer addresses from its saved peers, DNS seeds, address relay, or explicit configuration. Use the Bitcoin Cash mainnet parameters.
- Connect over TCP and exchange
versionmessages. These carry the protocol version and service flags, among other fields. Each side acknowledges withverack. - Every message starts with a network identifier, called network magic, followed by the command, payload length, and payload checksum. Once the handshake is complete, peers can exchange headers, blocks, and transaction inventory.
Relay, mempools and zero confirmations
A wallet can send raw bytes to a node or to a relay endpoint. A node checks the transaction against the active chain, its relay rules, and the mempool, where it keeps accepted transactions that are waiting for a block. In ordinary P2P relay, a peer advertises an item with inv, an interested peer requests it with getdata, and the sender returns a tx message for a transaction.
A wallet can show a payment in its node’s mempool as pending, with zero confirmations. Other nodes may never see it, may evict it, or may accept a different transaction spending the same outpoint.
A Double Spend Proof can provide evidence of certain conflicts. When supported by the wallet's data source, watch for proofs for unconfirmed incoming payments. The absence of a proof cannot establish that no conflicting spend exists. Mempool reference · Double Spend Proof specification
Blocks, confirmations and reorgs
Miners can include transactions from their mempools in blocks. A block header commits to the previous header hash and to its transactions through a Merkle root, one hash derived from their transaction IDs. Nodes verify proof of work, transaction validity, and the other block rules. They follow the valid chain with the most accumulated work. Peers learn about competing blocks from headers and announcements, then request the data they need to validate them.
The first transaction in a block is the coinbase. It lets the miner claim newly issued BCH, called the block subsidy, and the fees from the other transactions, including the 300 sats from our payment. Once the block containing the payment becomes part of the active chain, the payment has one confirmation. Each block on top adds one. A stronger chain can replace one or more blocks in a reorganization. If the payment's block is removed, the wallet reconciles its state. The payment may already be included on the new branch, return to the mempool, or conflict with a spend in the new chain.
Block reference · Proof of work
Try broadcast and confirmation on Mocknet
Open the Transaction Lab in Mocknet mode. Broadcast the 50,000-sat payment and open the explorer to see it in the mempool. Select Mine a block and check that the same transaction now has one confirmation and that its funding UTXO has been spent.
Where applications connect
Use Fulcrum for indexed wallet queries and notifications. Use full-node RPC for local verification and operations. Use P2P when your software needs to exchange data directly with peers. The infrastructure guide shows where to run each service.
The network protocol nodes use to exchange information such as transactions, block headers, and blocks directly with peers.A shareable identifier a wallet decodes into a payment’s locking script, usually in CashAddr format on BCH.The public Bitcoin Cash blockchain on which payments use BCH.A value derived from data to help detect errors, such as a mistyped CashAddr.A Bitcoin Cash record that defines new outputs and, for a payment, identifies the UTXOs being spent.Software or a device that manages addresses and tracks UTXOs, with signing wallets also holding private keys to authorize payments.A node’s local pool of transactions it has accepted and that are waiting to be included in a block.A transaction has zero confirmations while it has yet to appear in a block on the active chain.A transaction ID and zero-based output index that together identify the UTXO an input spends.Evidence a node can provide for certain conflicts between transactions trying to spend the same UTXO.The 80-byte record that links a block to its predecessor and commits to its transactions and proof of work.A fixed-length digest used to identify data or commit to its contents, such as a transaction ID or public-key hash.The hash in a block header that commits to the block’s transactions and lets you verify inclusion using a Merkle proof.A transaction’s double-SHA-256 hash, displayed in reverse byte order and used to identify it in an outpoint.Verifiable work represented by finding a block-header hash that meets the network’s difficulty target.The cumulative proof of work represented by a chain’s headers, used to compare eligible valid chains.The first transaction in a block, which pays the miner’s reward into outputs that must mature before they can be spent.The currency unit of Bitcoin Cash, equal to 100,000,000 satoshis.The smallest unit of BCH, equal to 0.00000001 BCH.A transaction has one confirmation when included in a block on the active chain and gains another for each subsequent block.The replacement of previously active blocks when a node adopts a competing branch, which can change which transactions are confirmed.BCH Ninja’s isolated browser chain for building and inspecting transactions using its own keys and UTXOs.The basic unit of spendable value on Bitcoin Cash, holding satoshis and any attached tokens under the spending rules defined by its locking bytecode.A request that calls a method on another service, such as asking a node to read a block or query an outpoint.