Homework on Blockchain and Mining Visually - Questions

I think it only takes the previous block hash. But they are all linked either way. :wink:

1 Like
  1. True. But the question was regarding the links between blocks. Difficulty is a big part in the immutability of the bitcoin. It is important to note that miners put work behind blocks, and that they would want to link it to a previous one by adding the previous hash as a part of an input. in a way, they are securing their work by doing this. Because next time someone wants to change that block they have to do their work all over again, and all the work behind that block.

  2. Besides the previous hash, the most important ones would be: transactions, nonce and the current hash.

1 Like

1 That’s important because in this way nothing can be changed or altered .The minimum alteration will lead to a complete change transmitted to the other blocks.This make things really safe.

2 it’s structured as follow:
Previous Block hash
Merkle root hash
Nonce
Block header
Transactions

1 Like

Why is it important that the blocks are cryptographically linked together?
By linking the blocks, any miner changing the integrity of a previously mined block alters all subsequent mined blocks in the string thereby breaking the string.

What does the block structure look like in bitcoin?
The structure of the block contains the previous block’s hash, transactions going into the block chain (UTXOs), the nonce and eventually, the current block’s hash.

1 Like

Why is it important that the blocks are cryptographically linked together?

  • Because it ensure the blocks are never altered, thus uploading the transparency and security of the network and the proof of legitimacy of the ledger.

What does the block structure look like in bitcoin?

  • Read from Bitcoin Wiki the block structure includes

    • a magic number (why magic and always constant? anyone?)
    • block size (make sense from previous lecture where bigger transaction size translate to bigger fees calculated as Satoshi/Byte. Is the block size constant or is there a minimum or maximum size?)
    • block header (consisting of version, previous hash, current hash of the transactions, timestamp, target, and nonce)
    • transaction counters (total of transaction in the list)
    • transaction list
1 Like
  1. Why is it important that the blocks are cryptographically linked together?
    A block being based on the previous blocks hash creates the chain in block chain. This is vital to the security of the networks because if anything was out of place in the slightest way, we would all know.

  2. What does the block structure look like in bitcoin?
    The hash of a bitcoin block includes the nonce, the data (TXs), and the previous blocks hash.

1 Like
  1. to make it difficult (maybe impossible) to cheat on txs
  2. nonce + txs + (previous) hash = block (new hash)
1 Like
  1. To protect the integrity and validity of the transactions in the block.
  2. Hash of current block, TX data, previous hash, and nonce.
1 Like
  1. Why is it important that the blocks are cryptographically linked together?
    It is important as it means if a single bit of data is changed in a previous block, it will automatically invalidate all the following blocks, so nobody can go back and tamper with previous blocks.

  2. What does the block structure look like in bitcoin?
    A block is made up of:

  • Block number
  • Previous block hash
  • Nonce
  • Transaction data
  • Current block hash
1 Like
  1. Because this way each new block adds further guarantee of the integrity of the previous blocks.

  2. [ hash + previous hash + transactions + nonce ]

1 Like
  1. To break the chain if someone changes anything.

  2. A Headed table with Nonce at top filled with transactions, Prev HASH and HASH of the current block.

1 Like

1. Why is it important that the blocks are cryptographically linked together?

The chain will be broken if anything in a previous block is changed, meaning that the onward chain needs remining at a high enough rate to catch up with the longer original chain.

2. What does the block structure look like in bitcoin?

The TXs are hashed in a Merkle tree fashion. The Merkle root (hash of all of the hashes of the data/TXs) is then hashed with the hash of the previous block and a nonce to form the hash of the current block.

1 Like
  1. Why is it important that the blocks are cryptographically linked together?
    It is important that the blocks be cryptographically linked together so as to maintain the integrity of the transaction or data structure. This have links and as soon as you change or tamper with one link, all content and links from previous blocks will be broken.

  2. What does the block structure look like in bitcoin?
    A block structure has previous hash, data/transaction, and nonce (random number).

1 Like

The magic number is not something specific to bitcoin.

Magic numbers are used in computer science for both files and protocols. They identify the type of the file/data structure. A program receiving such a file/data structure can check the magic number and immediately know the supposed type of that file/data structure.

This is what the Unix/Linux command file uses to quickly identify the type of file. It only requires to check only the first bytes of a file to determine its (supposed) type. A list of files and their magic numbers can be found here.

Protocols like bitcoin use data structures to talk to each other (e.g. propagating blocks through the network). Nodes check the first bytes to identify the type of data structure.

Another use of magic numbers is that you can check the type of the file or data structure on a text editor. E.g. while a png image is binary if you open it with a text editor you will notice that it starts with .PNG… Another example, the SMB protocol replies start with FFSMB. Note, however, that this is not always the case.

Other files/structures have magic numbers that do not make much sense; they may be some geeky code or inside joke of the developers that chose it.

So that is what it is used for. As far as I can tell 0xD9B4BEF9 is quite arbitrary… but maybe there is some meaning for its creator.

2 Likes
  1. Why is it important that the blocks are cryptographically linked together?
    security reasons. When they are linked together they make chain unbreakable for anyone who might want to change anything in it. Lets imagine you did that. Problem is that everybody sees it was changed because other links are not compatible like before.

  2. What does the block structure look like in bitcoin?
    data from previous block, new hash and nonce of new block

  1. By linking all the blocks together cryptographically, it creates an impenetrable security measure where no information can be removed or manipulated or the links will break and will not be accepted into the blockchain, thus keeping the integrity of the network.

  2. The bitcoin block structure consists of the:

  • Block number.
  • Previous blocks hash.
  • Tx list.
  • Nonce.
  • New hash value.
1 Like

— My answers —

  1. Because this secures the network and makes the previous blocks immutable.

  2. Previous hash, transactions tree hash, time stamp, nonce, transactions.

2 Likes

1- The difficulty of having to break the links and re-mine the links will cause the blockchain to be invalidated. This also allows the miners to mine the blocks in the correct protocol and follow the rules as it is near impossible to go back and re-mine and catch up as compared to others the shortest block will be disregarded.

2- Hash of current block based on previous block hash + transaction list of current block + nonce

1 Like

1 Because it makes almost impossible to to change blockchain. changing one block you have to change many next blocks in the blockchain which is still growing
2 it include
hash from previous block
transactions list
nonce

1 Like

1.Blocks must be cryptographically linked in order to preserve the integrity of transactions and ensure that no one has gone back and manipulated data in a previous block.
2. Blocks include transactions, the hash of the previous block, and a nonce or random number which miners need to guess through brute force