4 ms·
What would have happened if the information was in an append only log like git history (where a rebase would be inappropriate) or a blockchain (where it can't o
by purpleidea 8y ago
What would have happened if the information was in an append only log like git history (where a rebase would be inappropriate) or a blockchain (where it can't occur)?
- cesarb 8y agoFor efficiency reasons, the append-only part of both git and blockchains does not contain the content, but instead a hash of the content. Furthermore, they always use cryptographic hashes with strong preimage resistance (https://en.wikipedia.org/wiki/Preimage_resistance https://en.wikipedia.org/wiki/Preimage_resistance), so just knowing the hash does not allow one to obtain the content (other than through brute force). Therefore, they might not be able to remove "746308829575e17c3331bbcb00c0898b" from the append-only log, but they might be able to remove the mapping "746308829575e17c3331bbcb00c0898b -> Hello, world!" from the repository, without breaking the chain of the append-only log.
- gruez 8y agoThis doesn't really answer the parent's question though. In a blockchain with a client doing full validation, removing/altering the data would cause the that block to be invalid. You'd need to hardfork the network to accept the altered history. I suspect git also checks the integrity of each commit, at least when pulling/cloning, so that would probably cause git to think the objects/packfiles are corrupt.