<p>Bitcoins P2P network is a flooding design, new transactions and blocks are broadcast to every connected peer, and they broadcast to every one of their peers. Valid data reaches all participants very quickly due to the random selection of peers that all nodes make. All validating participants keep a 'mempool', a collection of unconfirmed transactions they believe are valid, miners collect transactions they wish to include in blocks from their mempool and turn them into a candidate template to mine against. </p>

CC BY-SA 3.0
2015-09-28T13:15:34.950Z
2015-09-28T13:15:34.950Z
Claris
<p>Under the hood,  Bitcoin has something called <a href="https://en.bitcoin.it/wiki/Raw_Transactions#JSON-RPC_API" rel="nofollow">json-rpc</a>.  That is used within the software and with other software that you wish to integrate into bitcoin to send and receive payments, to generate wallet addresses, and to get network data.  Bitcoin Core and any other software that stores a full copy of the blockchain (spv wallets like multi-bit, mycelium, and the android bitcoin wallet are light weight and <strong>do not</strong> put 60GB of blockchain transaction data on your phone).  </p>

<p>They talk to each other through port 8333 and bitcoin transactions are sent to each other, broadcasted.  If you had custom software on your computer where bitcoin core was running, you could program a script to have your application talk to bitcoin to first get inputs, then create a raw transaction, sign the transaction with the private key that holds spendable inputs, then to broadcast it. Looking at the process we see that sign transaction returns a Json array with the hex-encoded signed data, and a result code (most Bitcoin Op_Code script returns either 0 or 1 at the protocol level to signify failure (0) or success (1).  Then the software sends the data (broadcasts it) to connected peers through port 8333 with that signed hex value.   The protocol then returns either a transaction ID or an error, again as a Json object.</p>

CC BY-SA 3.0
2015-09-30T11:51:27.210Z
2015-09-30T11:51:27.210Z
Frankenmint
<p>I am bit confused about transaction broadcast on the internet.How does a miner know a transaction has been broadcasted? The internet network is very huge.Or how does my bitcoin client collects the blocks broadcasted?</p>

<transactions><bitcoind><client>
Bitcoin transaction broadcast
Ishan Arora
# Bitcoin transaction broadcast

(Asked by: username_0 on 2015-09-28)

I am bit confused about transaction broadcast on the internet.How does a miner know a transaction has been broadcasted? The internet network is very huge.Or how does my bitcoin client collects the blocks broadcasted?

**Tags:** transactions, bitcoind, client


---

## 2 answers

### Answer by username_1 on 2015-09-28. Score: 5

Bitcoins P2P network is a flooding design, new transactions and blocks are broadcast to every connected peer, and they broadcast to every one of their peers. Valid data reaches all participants very quickly due to the random selection of peers that all nodes make. All validating participants keep a 'mempool', a collection of unconfirmed transactions they believe are valid, miners collect transactions they wish to include in blocks from their mempool and turn them into a candidate template to mine against.


---

### Answer by username_2 on 2015-09-30. Score: 1

Under the hood, Bitcoin has something called [json-rpc](https://en.bitcoin.it/wiki/Raw_Transactions#JSON-RPC_API). That is used within the software and with other software that you wish to integrate into bitcoin to send and receive payments, to generate wallet addresses, and to get network data. Bitcoin Core and any other software that stores a full copy of the blockchain (spv wallets like multi-bit, mycelium, and the android bitcoin wallet are light weight and **do not** put 60GB of blockchain transaction data on your phone).

They talk to each other through port 8333 and bitcoin transactions are sent to each other, broadcasted. If you had custom software on your computer where bitcoin core was running, you could program a script to have your application talk to bitcoin to first get inputs, then create a raw transaction, sign the transaction with the private key that holds spendable inputs, then to broadcast it. Looking at the process we see that sign transaction returns a Json array with the hex-encoded signed data, and a result code (most Bitcoin Op\_Code script returns either 0 or 1 at the protocol level to signify failure (0) or success (1). Then the software sends the data (broadcasts it) to connected peers through port 8333 with that signed hex value. The protocol then returns either a transaction ID or an error, again as a Json object.


---

