<p><strong>Blockchain</strong> is the state of the bitcoin network. It is unanimously accepted as the correct state. </p>

<p>Each <strong>bitcoin full node</strong> stores its own copy of the blockchain. These copies can rarely differ in couple of last blocks, so bitcoin full nodes can have slightly different view of the same blockchain (only of couple of last blocks though). By adding new blocks on the end of the blockchain (this happens every 10 minutes) any possible differences in blockchain copies resolve (full nodes come to consensus about the state of the blockchain). Bitcoin full nodes are connected in a network and exchange their copies regularly.</p>

<p>The <strong>wallet</strong> is either implemented as part of the bitcoin full node application or as a separate small application that is then connected via Internet to some bitcoin full node. </p>

<p>Bitcoin wallet must be able to:</p>

<p>a) Generate public address and respective private key.</p>

<p>b) Calculate the balance of public addresses you control. To do this bitcoin wallet must read one small part of the blockchain, the one that holds unspent transactions (and possibly a pool of unconfirmed transactions - the transactions that are broadcasted but not yet added on the blockchain).</p>

<p>c) make a transacion using coins from your public addresses, sign those coins with private keys related to public addresses used, and broadcast this transaction to the bitcoin node that will spread this transaction to other full nodes in bitcoin network. This transaction will eventually end on the blockchain.</p>

<hr>

<p>So b) requires reading data stored on the blockchain, and c) requires sending new data on the blockchain. Remember that the blockchain is a copy in a bitcoin full node. So the wallet reads from and writes to the blockchain by either communicating internally when being part of the full node application or communicating through Internet with some full node. </p>

<p>Full nodes communicate between themselves to spread and gather blockchain changes.</p>

CC BY-SA 3.0
2017-12-06T15:33:59.670Z
2017-12-06T16:21:20.093Z
2017-12-06T16:21:20.093Z
croraf
<p>I am thinking about buying some bitcoin buy first I want to understand some theoretical aspects of the technology behind it.</p>

<p>The wallet holds my private keys right? But how s me wallet connected to the blockchain?</p>

<p>Thanks,</p>

CC BY-SA 3.0
2017-12-06T08:57:01.650Z
See [What is a good way to concisely explain Bitcoin?](https://bitcoin.stackexchange.com/questions/336/what-is-a-good-way-to-concisely-explain-bitcoin)
meshcollider
<blockchain><wallet><buy-bitcoins>
How's the blockchain connected to a Bitcoin Wallet?
Tomás Santiago
# How's the blockchain connected to a Bitcoin Wallet?

(Asked by: username_0 on 2017-12-06)

I am thinking about buying some bitcoin buy first I want to understand some theoretical aspects of the technology behind it.

The wallet holds my private keys right? But how s me wallet connected to the blockchain?

Thanks,

**Tags:** blockchain, wallet, buy-bitcoins

> **Comments:**
> **username_1**: See [What is a good way to concisely explain Bitcoin?](https://bitcoin.stackexchange.com/questions/336/what-is-a-good-way-to-concisely-explain-bitcoin)  

---

## 1 answers

### Answer by username_2 on 2017-12-06. Score: 3

**Blockchain** is the state of the bitcoin network. It is unanimously accepted as the correct state.

Each **bitcoin full node** stores its own copy of the blockchain. These copies can rarely differ in couple of last blocks, so bitcoin full nodes can have slightly different view of the same blockchain (only of couple of last blocks though). By adding new blocks on the end of the blockchain (this happens every 10 minutes) any possible differences in blockchain copies resolve (full nodes come to consensus about the state of the blockchain). Bitcoin full nodes are connected in a network and exchange their copies regularly.

The **wallet** is either implemented as part of the bitcoin full node application or as a separate small application that is then connected via Internet to some bitcoin full node.

Bitcoin wallet must be able to:

a) Generate public address and respective private key.

b) Calculate the balance of public addresses you control. To do this bitcoin wallet must read one small part of the blockchain, the one that holds unspent transactions (and possibly a pool of unconfirmed transactions - the transactions that are broadcasted but not yet added on the blockchain).

c) make a transacion using coins from your public addresses, sign those coins with private keys related to public addresses used, and broadcast this transaction to the bitcoin node that will spread this transaction to other full nodes in bitcoin network. This transaction will eventually end on the blockchain.

---

So b) requires reading data stored on the blockchain, and c) requires sending new data on the blockchain. Remember that the blockchain is a copy in a bitcoin full node. So the wallet reads from and writes to the blockchain by either communicating internally when being part of the full node application or communicating through Internet with some full node.

Full nodes communicate between themselves to spread and gather blockchain changes.


---

