Homework on Blockchain and Mining Visually - Questions

  1. The cryptographic linking of blocks ensures that the level of effort required to change blocks would be easily recognizable outside of one node or a small cluster. This is no small effort.

  2. [Block Structure] Below

  • Magic number: value always 0xD9B4BEF9|4 bytes
  • Blocksize: number of bytes following up to the end of block|4 bytes
  • Blockheader: consists of 6 items 80 bytes
  1. Version: Block version number
  2. hashPrevBlock: 256-bit hash of the previous block header
  3. hashMerkleRoot: 256-bit hash based on all of the transactions in the block
  4. Time: Current block timestamp as seconds since 1970-01-01T00:00 UTC
  5. Bits: Current difficulty target in compact format
  6. Nonce: 32-bit number (starts at 0)
1 Like
  1. To stop someone changing a previous block and therefore altering the blockchain. This is done by using the hash of the previous block as part of the pow in the mining process. When you are mining you use 1) the hash of the previous block, 2) the transaction list, and 3) the nonce to determine the target.

  2. The structure of a block in bitcoin contains, the hash of the previous block, the transaction list, and the nonce.

1 Like

The linking of all the blocks together is what secures the immutability of the blockchain. Nobody can change any confirmed transactions, and since the longest blockchain rules, it is infeasible to change the past in the blockchain. The linking also ensures the consensus. That is, everybody agrees on the transaction record.
The link to the previous block is part of every block (except the first block, I suppose). This link consists of the hash of the previous block. Every block also contains a number of bitcoin transactions. A recent one on the blockchain had 2,342 transactions in it. The transactions are lumped together and hashed and this hash is also part of every block. There are also technical parts of every block like the nonce - which I understand is the nonce that resulted in the miner getting the winning hash. There is also always the coinbase transaction that gives the miner the block reward of currently 6.25 BTC.

1 Like

Homework on Blockchain and Mining Visually - Answers

  1. It creates an incredible amount of security. Any change in transaction data in a block affects the hash of all blocks moving forward. This is important because it makes it virtually impossible for someone to go back in time and steal. Contrast that with the traditional monetary system where it is pretty easy to steal. Long term if it is all about adoption and user trust, this immutability is a critical feature.
  2. The block structure is a block of data based on hash of previous block (known) + transactions in the block (known) + nonce (has to be solved by guessing). The block also contains other data such as version, timestamp, block size, and other identifying features.
1 Like

1.It is important for the blocks to be cryptographically linked to ensure the security and integrity of the blockchain. If one block was changed in relation to another then all subsequent blocks in the chain would have to be changed. This makes it practically impossible to change a transaction.

  1. A block contains
  • The hash from the previous block

  • The transaction list

  • The nonce.

2 Likes
  1. To ensure the integrity and the finality of the data stored in the blockchain. If someone changes a previous block, all the subsequent blocks would have to be re-mined as well, which is impossible.

  2. A block contains (at least) the previous blockā€™s hash, a set of data (transactions, etc) and the nonce.

1 Like
  1. this prevents the previous block to be changed & no double spend
  2. the block structure has the has of the previous block, the current transactions to be mined and current hash
1 Like
  1. It is important that blocks are cryptographically linked together using hash functions, because this protects the security of the network, and add the property of immutability. If a user or miner wants to modify or alter a transaction in a previous block, lets say to double spend some coins, it would be nearly impossible because it would require for all subsequent blocks to be re-mined.

2.- The block structure consists of encrypted transactions, the previous blockā€™s hash, a nonce, and the blockā€™s unique hash using the first three elements.

1 Like

Any change in a block will change itā€™s hash, and the hash of all subsequent blocks. Tampering with the chain is immediately apparent (Unless you find a collision for a Txn number which is also a valid Txn. If youā€™d put in a collision that is not a valid transaction youā€™d just cause everyone a big headache until theyā€™d comb through the block-chain for it).

1,A ā€˜magic numberā€™ -always the same.
2,The size of the block
3,The block header
4,The transaction counter
5, Full list of transactions

The block header consists of:
1,Version number
2,Hash of previous header
3,Hash of the Merkle root (iterative pairwise hash of all Txn-s in the block)
4,The timestamp
5,Target the header hash is matched against
6,The nonce with which the header hash was less than the target.

Btw, who sets the current target? Canā€™t I just lie about the target ā€¦ no I canā€™t . The name of the game is Proof of Work, not get-in-the-block-first. One solve for an easy puzzle, but the chain will likely get thrown out because it will still have less work. And by work they probably mean the sum of the number of zeros at the beginning of the hashes.

2 Likes

To preserve data immutability, if changes occur in the chain the hash change will not fit into the cryptographic puzzle
The block is made out of data, previous block hash and a nonce, which is used to calculate a hash that fits the requirement (difficulty)

1 Like
  1. This ensures the integrity of the blockchain. This is how immutability is achieved.
  2. In a bitcoin block, it has Block header, Block Size, Transaction Counter, Transactions.
1 Like

1 So that there is no double spending and previous blocks canā€™t be altered.
2. A heavy duty chain one link added at a time and welded together. Or Square blocks containing transactions a hash and a nonce

1 Like
  1. It is important for the security of the blockchain. That way no transactions can be changed in previous blocks because it would break the link to the next block and so on making it difficult to attack this way.
    2.The hash of the block is based on the transactions in the block plus the previous hash and the nonce (puzzle solution).
1 Like
  1. to make sure everyon is following the rules and that nothing can be modifed in the previous link.

  2. the structure of the block contains a list of transaction data, nonce, previous and current block hash.

1 Like

1- It is a strategy to keep the chain immutable, because modifying a block would completely alter the following ones. As we explained previously, the slightest alteration in a block would alter the hash of all subsequent blocks and break the connections.

2- block number/Nonce/Previous Hash/ Tx / Hash Block

1 Like
  1. Its important that they are cryptographically linked for the upmost security in the network. Once anything is changed that change will break the link, rejecting the block.

  2. The block structure consists of the Algorithm sha256, Hash, prev hash, merkle root hash, timestamp, difficulty target, nonce, block size, block header, transaction counter, transaction.

1 Like
  1. Because doing so makes it tremendously difficult to modify any single block without having to re-validate the rest of the blockchain. As a result we avoid issues such as double spending, deletion/alteration of any previous transaction and the blockchain is robust and secure.

  2. A block has a nonce, data (consisting of transactions), the hash value of the previous block it is linked to and the hash value of its own block.

1 Like

Do you know whatā€™s in the block header? :slight_smile:

Technically they are just a series of bits :stuck_out_tongue:

1 Like
  1. Why is it important that the blocks are cryptographically linked together?
  • So that it becomes practically impossible to change previous blocks without validation
  1. What does the block structure look like in bitcoin?
  • Hash of block, Hash of previous block, List of Transactions, Nonce (random number)
1 Like