0

I am learning Ethereum using Geth, and I am testing PoA-Clique networks. Now I have a conceptual doubt about old blocks integrity. Suppose I have a private blockchain network of only one miner node and the current block is the number 1000. Now let's suppose clients save document hashes in the blockchain and they get the transaction hashes to validate its existence later. They can send the doc hash and the transaction hash and they can proves the document existed since the transaction creation using the block timestamp.

Now my question is, can a client detect an attack to that block? When the block is created is validated agains the previous one, but what about blocks already in the chain? If my supposed block is the number 20 and I remove the transaction and redo the block, and also de previous, the client searchs for the transaction but he can't find it. The blockchain was tampered but how can he know that? I may be messing something obvious but it seems to me hard to prove every block from the genesis block every time one transaction is checked.

The Full-Sync is made only one time as I understand. The usual response is that blocks will be banished during synchonization with other nodes (like here) but what about nodes already synchronized if I change some old blocks in one of them?

I can't see a solution if the network has 10 independent miners. I can change old blocks in my personal blockchain copy (my miner node) from block 10 to block 30 for example, while current sealers validation "head" is on block number 1000. If the client is connected only to my node using some library (e.g. web3.py) he can't know about tampering in the network because only can see my node. Maybe every some time network resynchronizes old blocks or is impossible to change old blocks but I can't see why. Some clarification will be appreciated, thanks.

1 Answer 1

1

If your node changes a block, the hash of that block changes and probably the state root.

A few things happen.

Every block after is invalid. You would need to remine them all.

The blocks your node receives from others would appear invalid and blocks your node sends would appear invalid to them. It's a fork unless all nodes agree.

The threshold for successfully executing a retroactive change is much lower on such networks but the same rules that secure the public chain still apply.

I might add that a premise is the notion that user is supposed to trust their own node. While is might be possible to hack away at it, the network is mostly concerned with ignoring nodes that start to malfunction.

Hope it helps.

1
  • Thanks @Rob Hitchens - B9lab, but my question is, if current block is number 1000 and I only change the blocks from 10 to 30 (with the consecuent invalidation) this changes all the blocks from 1 to 1000? Can the network know this is an invalid chain because of old blocks errors? Is not necessary to check the entire chain to see the old errors? If the miner/sealer only verifies block 1000 to mine the number 1001, how can he knows there is an error in blocks 10-30? Is like if I remove the first 20 blocks, how can the network protocol know that? It verifies all the chain periodically?
    – RobertGG
    Jan 20, 2020 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.