Bitcoin Basics - Discussion

Welcome to the discussion thread about this lecture section. Here you can feel free to discuss the topic at hand and ask questions.

31 Likes

Question about using different mediums to send a transaction to a miner

So, in the scenario that you donā€™t use the internet to get a transaction to a miner and instead use a handwritten letter or SMS, youā€™d have to flat out give them your private key, correct? So in that case youā€™d want to generate a new address and then have only the funds you want to send within that address? On top of that, couldnā€™t the miner turn around and just steal your funds? Is this only a situation youā€™d do if you knew the miner and trusted them? Thanks to anyone that can maybe help.

17 Likes

Got answers here if anyone else wants to know in the future: https://bitcointalk.org/index.php?topic=5185236.0;topicseen

Furthermore, here are some more links to help with the understanding, since I had to do more research after getting those clues from Bitcoin Talk.

You can create raw transactions in hex, by following this format: https://medium.com/coinmonks/how-to-create-a-raw-bitcoin-transaction-step-by-step-239b888e87f2

This shows you how you can get hex data of transactions: https://bitcoin.stackexchange.com/questions/70825/are-there-any-blockchain-explorers-that-provide-raw-tx-data-and-block-headers

Raw hex code transaction decoder: https://live.blockcypher.com/btc/decodetx/

33 Likes

@filip

In the video lecture on hosted wallets, it explains how the private keys are stored on the exchangeā€™s server and also in cold storage wallets. Does this mean there are two sets of private keys? Are there private keys linked more directly to individual customers and stored on the server (exposed to the internet) to provide quick access to funds and meet short-term customer demand? Are the majority of funds pooled and held in cold storage as a security measure in case the server is hacked?

6 Likes

Hi guys. So far itā€™s looking clear. I like the explanation on functions and hashes. Regarding the private and public keys, there is a good example from the book about the Winklevoss twins on how they generated their random private key using dice. Itā€™s very interesting to read.

16 Likes

@filip

When I send and receive bitcoin with my Ledger hardware wallet, there is a count of confirmations. As Iā€™m operating an SPV, when Iā€™m receiving funds, are these confirmations the number of full nodes that have confirmed the transaction now exists in their copy of the blockchain? And when Iā€™m sending funds, are they the number of full nodes that have validated my sent transaction (i.e. that I own the funds Iā€™m spending) before propagating it further to other nodes in the network, and before it is added to the blockchain within a mined block?

Iā€™m trying to think about how Ivanā€™s explanation in the videos relates to what I see actually happening in practice, in my wallet.

If I operated a full node, would I only see confirmations like this for sent transactions? Iā€™m thinking that with a full node I would have a copy of the entire blockchain, so my wallet would just need to check this for any received funds, rather than having to query other nodes (as an SPV has to). :thinking:

7 Likes

Iā€™m not 100% sure what @ivan was talking about in the video. Generally when you have hosted wallets you donā€™t have your own private key. The exchange keeps track of which funds belong to who but has them stored in a few wallets.

Some of the coins of an exchange or hosted wallet are stored in hot storage. These are coins that is needed for daily liquidity that are easily accessible for the exchange in order to serve customers that want to trade or withdraw.

Some of the coins are stored in cold storage. This means they are stored in for example hardware wallets, that are not connected to the internet. This is a safety measure. Then they will transfer funds from the cold wallet to the hot wallet if it runs empty and vice versa.

6 Likes

Once again, Iā€™m not 100% sure what @ivan was talking about in the video. But I can answer parts of the question at least.

The confirmation number you see is how many blocks have passed since your transaction was put into the blockchain. So it has nothing to do with the amount of nodes that have received your tx.

When your tx get put into the blockchain, it is in the newest block. Then it has 0 confirmations. When the next block has been created you have 1 confirmation, since now there has been another block appended after your tx, meaning the miners are continuing to build on the chain which your tx is in.

When you are up to about 6 confirmations, you are generally safe from double spend attacks. Which is why you are recommended to wait for confirmations.

4 Likes

Regarding the topic on number of confirmations, SPVs and Full Nodes.

The number of confirmations doesnā€™t have anything to do with the number of nodes an SPV is talking to.

The number of confirmations is how many blocks were appended to the blockchain after the block in which your transaction was included.

If a full node and an SPV both check the number of confirmations for the same transaction they both get the same answer. The only difference is that the full node will read the information about how many blocks have been appended after the block with the transaction from the blockchain it has in memory while an SPV will request that same information from other nodes.

Hope that clarifies.

9 Likes

Thatā€™s exactly what @ivan explained in the video. Your additonal comments on the difference between the exchangeā€™s hot and cold wallets has now clarified that part for me, and is pretty much what I suspected :+1:

4 Likes

In case anyone couldnā€™t find the blockchain simulator website that @ivan uses in video 17 Mining Visually Demonstrated, I think this is the one:

https://anders.com/blockchain/

The URL isnā€™t visible in the video and, correct me if Iā€™m wrong, but I donā€™t think he mentions it.

Click on Blockchain in the menu bar for the simulator Ivan uses.

21 Likes

So far my understanding on Public key cryptography is better. Thanks. Can anyone tell me will Bitcoin blockchain going to have storage issue once everything is on the blockchain ? I can imagine nodes having to ever increase their storages as the chain becomes ever larger or have I got it conceptually wrong? - Let alone other issues like scalability, block size etc

1 Like

The blockchain is getting bigger and bigger. But you can also enable ā€˜prune modeā€™. Running wallet in prune mode simply throws away previous transaction and old chain history which in turn saves disk space.

https://coinguides.org/bitcoin-blockchain-pruning/

5 Likes

Thanks for the information

Eric

2 Likes

Loving the term ā€œprune modeā€ ā€” cracks me up! :rofl: :rofl: :rofl:

4 Likes

Hi Ziomanzo

   I went to the link but I have still have one question though perhaps you can help me out. The article did mention about pruning. My question is - must there be at least one node in the entire blockchain to maintain the integrity of the chain ie a node having all the blocks right up to the genesis block? I foresee if everything is coming  to utilise blockchain in the future, at least a few nodes will have to maintain full node status. How are they going to handle their storage problem? its like a case of forever expanding!

   Thanks

p/s Sorry for the format, I dont seem to be able to return to usual viewing format.

Hi,

There should be as much full (non pruning) nodes as possible.
Pruning is just for people who are limited in hardware.
Pruning is good if you use a laptop or something as a full node to verify or broadcast transactions.

For the lightning network you still require a full (non pruning) node.

4 Likes

Ok. Thank you very much Ziomanzo

2 Likes
  1. If miners are financially incentivised, then what is the incentive for other nodes who have a copy of the ledger but they are not miners?

  2. If the network waits 6 blocks before confirming a transaction, and each block takes 10 minutes to be created; does this mean it will take 60 minutes to confirm a transaction?
    If this is true, then how come when I make a transaction through my Bitcoin wallet, it takes only seconds to go through?

3 Likes
  1. Full non mining nodes donā€™t have a financial incentive, but more of a security incentive. If you run a full node, you are sure that you can validate everything yourself.

  2. It takes second to go to the mempool. But this doesnā€™t mean that the transaction is in the blockchain and immutable. If you have 6 confirmations then you are pretty sure that your transaction is forever on the blockchain.

6 Likes