DEV Community

Cover image for What is a blockchain?
AbhayPatel98
AbhayPatel98

Posted on

What is a blockchain?

A blockchain has a list of blocks. It starts with a single block, called the genesis block.

๐Ÿ‘€ index: the position of the block in the chain.

๐Ÿ‘€timestamp: a record of when the block was created. This is typically a UNIX timestamp, aka: the number of seconds since January 1st, 1970. This data is important since it establishes a blockchain as a chronological time-based structure.

๐Ÿ‘€hash: this is commonly referred to as the block hash or block header. As opposed to what the demo says, this piece of data is NOT stored in the block but is actually a digital fingerprint representing the block's contents.

๐Ÿ‘€previous hash: the hash of the previous block.

๐Ÿ‘€nonce: the nonce is the number used to find a valid hash.

The number of leading zeros required is the difficulty.
The process of finding valid hash outputs, via changing the nonce value, is called mining.

A miner starts a "candidate block" with a nonce of 0 and keeps incrementing it by 1 until we find a valid hash.

Top comments (1)

Collapse
 
abhaypatel profile image
AbhayPatel98

POS //