According to my study and previous question, I was made to understand that blocks and transactions are not encrypted on the blockchain. If this is so, Is it possible or allowed to make changes to a block when transactions are included during confirmation or validation?
Yes, miners simply update it on the fly.
Those selected unconfirmed transaction are arranged to build a "
Merkle Tree" and hashed in pair to get a "
Merkle Root". (
more info in the link below)
Then that merkle root hash is included to the "
Block Header" which is included to the block itself.
The block header is also hashed with SHA256x2 to generate a hash that's lower than the target (
a.k.a.: mining)
Now to the question;
If a miner added or removed a transaction included to that candidate block, the merkle root in its block header will be different from the newly computed merkle root.
In that case, a miner will just have to update the merkle root with the updated merkle tree.
And obviously, it has to be done before the block header is hashed during mining.
Read this to see how the merkle root is computed from the tree and to know why it's not computationally expensive to compute a new merkle root.
Link:
https://learnmeabitcoin.com/technical/merkle-rootAlso Since transactions are being recorded, what means prevent unauthorised data changes or modifications to ensure data integrity on the network? Because during my research I learned about cryptographic hashes being the reason why blockchain is immutable but understanding hashes and cryptography is very challenging for me I need a little help here
In the "
Block" "
Chain", the previous block's hash is included to the 'block header' of the block next to it.
So, if you change something in any of the block, its block hash will be different from the hash in the next block, that'll break the chain.