In blockchain each user's data stored in seperate block, right? If I have created my own blockchain and i want to alter some user's data then I would need to alter some perticular block as I have stored data in that perticular block. but it will break proof-of-work. So how to change block in blockchain to alter user's data? If I create new block with updated details then what happened to old data and next time how to know which block to refer?
1 Answer
In blockchain each user's data stored in seperate block, right?
No, blocks do not store user data, they store transactional data.
A user of bitcoin can create a wallet using software of their choosing, and the wallet will store their keys that allow them to spend coins. The blockchain simply has a record of transactions, but no accounts/personally identifying information.
Instead the blockchain just specifices where the coins exist (in a certain address as a UTXO), and then users can spend coins if their wallet software contains the keys to that address.
So you never have to go and change an old block in order to spend coins. If you're trying to spend coins that were last sent 10 blocks ago, then you just need to sign using the key that corresponds to the address those coins exist at. This will create a new UTXO, with your transaction specifying which new address the coins will be locked into.