官术网_书友最值得收藏!

  • Ripple Quick Start Guide
  • Febin John James
  • 421字
  • 2021-07-02 14:32:02

Introduction to blockchain

The word blockchain itself is descriptive. Here, blocks of digital information are linked back to one another like a chain of blocks. In the following image, we can see blocks that contain a series of transactions:

If someone tampers with the first transaction of the second block by altering $300 to $3,000, Ashin's balance would have an additional $2,700. Such tampering would lead to disastrous consequences. Hence, blockchain uses cryptography to make itself tamper-proof.

In the following blocks, we have added an additional attribute, the hash:

A hash is a set of characters that represents the contents of the block. It's calculated using a cryptographic hash function. For the sake of simplicity, we have made a simple hash by taking the first letters from the names of senders and beneficiaries. We also added the amount transferred in the middle of those first letters, and hence the hash for the first block is J500JJ450A. (Technically, this is not how a hash function works, but you get the idea.)

Since the first block has no preceding block, its previous hash field is not applicable. However, from the second block, all successive blocks have stored the hash of its previous block.

If someone tries to tamper with the first block and change John's transfer from $500 to $5,000, the hash of that block changes from J500JJ450A to J5000JJ450A. However, the successive block has already stored the hash as J500JJ450A. This mismatch would break the chain. Hence, the purpose of the hash is to ensure that blocks are not tampered with.

What if someone tries to change a block and the hash of all the succeeding blocks?

Different blockchains have different mechanisms to protect themselves from such situations. In the Bitcoin system, before a block is added to the chain, certain computationally intense tasks must be carried out.

Blocks are only confirmed once proof of running such intensive tasks or proof-of-work is shown. Hence, if a hacker wants to modify the hashes of n blocks, they need to run such computationally intense tasks n times to show the proof-of-work. Considering the present limits in computation, this scenario are highly unlikely.

Secondly, blockchain systems are decentralized. This means that a blockchain program isn't executed by a single computer, but all the computers in its network work collectively in executing its instructions. The data in the blockchain is also replicated in all the computers present in the network. Hence, the system would consider only what the majority say is correct.

主站蜘蛛池模板: 永泰县| 江永县| 安国市| 桓台县| 湾仔区| 同心县| 德江县| 句容市| 无锡市| 江安县| 化德县| 安福县| 琼海市| 延庆县| 衡东县| 同德县| 宁德市| 武鸣县| 蓝田县| 三河市| 鹿泉市| 阿坝| 铁岭县| 红桥区| 天峻县| 萨迦县| 理塘县| 新余市| 平阳县| 宣恩县| 阳山县| 岗巴县| 万全县| 安义县| 乐昌市| 雅江县| 永顺县| 西安市| 威海市| 九江市| 岢岚县|