update wp_posts set post_content = replace(post_content,'spacebot.ltd','spacebot.app');

Bitcoin: what is a hash function

Bitcoin protocol is rapidly using so-called ‘hash function’ for adding new blocks to the block chains in the process of mining.

Hash-function and mining complexity In terms of technical characteristics, hash function represents an algorithm which constitutes a fixed-length hash on the basis of data of a fixed-length. This hash represents a hexadecimal code of the initial data package that was used for its generation but, as a rule, it is much shorter.

The main purpose of this function is creating a synthetic, relatively short code that constitutes a much larger package of data. Considering that this process may lead to information leakage in case there has been some errors, it is also irreversible: a hash cannot be tracked back to the data package used for its generation. The algorithm that is being used by crypto for hash-function is

SHA-256 which creates a 256 bit hash and requires a certain processing power of a computer. In order to add a new block to BTC blockchain the system uses a transaction package in line for mempool confirmation.

Miner’s job is not only to create an input hash but to calculate a hash that starts from a series of additional zeroes and corresponds to the package of input data.

The amount of additional zeroes changes every two weeks or so and depends on so-called complexity: the more zeroes are required, the more difficult it would be to get a hash, and the longer the process will take.