In 2008, Lehman Brothers Holdings Inc. This affected public confidence in banks so severely that a new class of assets emerged that was managed without formal banking activity. The first bitcoin appeared in 2008. The author was an unknown person or group of people by the name of Satoshi Nakamoto. The idea was to create a decentralized, open-source digital currency, without a central bank or central management. In this article, we will explain how digital currencies work in principle, from transactions to data storage. Because bitcoin is the first and most famous cryptocurrency, in this article we will focus on it.
Topic Contents Toggle How digital currencies codes work
Digital currencies Client server architecture Blockchain Bitcoin mining SHA 256 algorithm Bitcoin The protocol gives miners a targeted hash value Block chain How digital currencies work When people use the words Bitcoin and blockchain as synonyms it is not true but people still do it, it is a common misconception. Bitcoin It is not just a coin, but also a protocol based on blockchain technology. A protocol is a set of rules by which network participants communicate with each other.
For example how digital currencies work, the Bitcoin part of the protocol governs how private and public keys are managed, how mining is performed to confirm transactions, and similar Etherium, waves, neo, ripple and some other cryptocurrencies have the same Bitcoin protocol. This protocol, for example, Bitcoin and Ethereum, includes the definition of the currency, which is usually named after the protocol. This currency is what makes the protocol fun for people to use. It is used to reward people who “mine” or “mine” for adding blocks to the blockchain and, more importantly, for buying things from each other.
Cryptocurrency tokens Tokens, in turn, exist on the third layer of architecture. They exist thanks to smart contracts, which in turn work thanks to protocols (second layer). Ethereum is currently the most popular protocol for creating smart contracts and tokens. And here the Bitcoin protocol, as a result, does not allow the creation of tokens, because it does not support the creation of smart contracts.
Is it a safe alternative to traditional banks To understand cryptocurrencies well, let's first understand how blockchain works and the usual client-server architecture. Client-server architecture The basic concept of how cryptocurrencies work for this architecture is that the client (user) makes a http request to the server, and if everything is fine, the server, in response, sends a web page to the client. The web page itself, as a rule, contains data from a central database. The fact that all the information is stored centrally, on a single server controlled by a bank or company, is a big problem. Moreover, since all the information is stored on a single server, the chance of the server being hacked increases and this in turn puts the privacy of your data at risk.
Blockchain solves two major flaws inherent in the traditional client-server architecture: privacy and data security. Blockchain is a distributed, immutable, and controllable storage. Let's break this definition down into the distributed piece that information is stored on a network of computers.
This eliminates the need to have central servers. You can think of this storage as a ledger where a list of all transactions that take place on the blockchain is kept. This storage is immutable, once information is entered into it, it cannot be deleted or changed from there. Transactions in the blockchain are pseudonymous, you can see other people's transactions, but you do not know who exactly is behind them, and you cannot change the data contained in the transaction. Some cryptocurrencies allow you to encrypt or even request data in transactions.
Bitcoin Mining Now that we've discussed how important blockchain is and how digital currencies work, let's take a look at how the bitcoin protocol works. Transactions take place. For example, 1 wants to send 1 BTC to 2. 1 makes a transaction to send money to 2. The transaction initiated by 1 is initially stored in the Mempool(the place where all unconfirmed transactions are kept). In order for a transaction for Mempool to enter the Bitcoin blockchain, miners first have to solve a mathematical problem.
Its solution, as a rule, takes 9 minutes. The miner who solves this problem first announces to other network participants that he has solved it successfully. Now other miners will check whether the mined block is really what 1 wanted to add, or whether hackers are trying to hack the network. Once everything is verified, the transaction will be successfully placed on the blockchain and you will receive 2 1 BTC from 1.
Note that the miner who solves the math problem first will receive a reward or transaction fee in the form bitcoin. Mathematical Problem Now that we understand what mining is in general, let's look at the mathematical problem that miners solve in order to add a block to the Bitcoin net. When 1 and 2 made a transaction, it looked like the one in the image below. Each transaction has a block number, a nonce, data, the previous hash, and its own hash.
Block number, as the name tells us, is the number of the current block to be added to the blockchain. Data on the details of the transaction made by 1 and 2 In the blockchain, hashes are like fingerprints, they are used to indicate the previous blocks the previous hash on the hash value of the previous block, which already exists in the blockchain. Nonce is the number that a miner can change to get a particular hash. All other data in the block i.e. block number, previous data and hash are immutable in nature no one can change them.
SHA 256 Algorithm Suppose we have a file we can process this file using SHA 256 and as a result, we will get a hash of 64 characters, each of which can be any hexadecimal character 4 bits each. The hash that is part of the block is generated when we process the block number, data, and the previous, non-repeating hash using the SHA 256 algorithm. The hashes can be compared with each other. Bitcoin The protocol gives miners a target hash value. The hash generated by miners must be less than or equal to the target value provided by
Bitcoinprotocol. In this case, the block will be added to the blockchain. Miners can change the nonce to create new hashes. The first miner to generate a hash less than or equal to the target value to successfully solve the math problem.
Above we explained a demo of the deal we discussed try it out
Observe for yourself how the hash changes when you change the block number, nonce, or data in the block. This is the behavior that prevents hackers from hacking the blockchain. We will discuss this in the following sections. Read also: Functions and types of exchange and types of Forex markets Blockchain Now that we have a basic understanding of how digital currencies work and how to do so with bitcoin and how the SHA 256 algorithm is included, let's see how a mined block is successfully added to the blockchain.
The first block in blockchain is also known as Genesis block The previous hash value in this block is 0 Our transaction, the transaction between 1 and 2, is in the third block which has been added successfully The previous hash value in this block is the hash value in block number 2.
#Bitcoin #Cryptocurrencies #Bitcoin mining #Cryptocurrency codes
DROPIDEA
We hope this article has added real value to you. At DROPIDEA, we always strive to deliver high-quality content that helps you grow and evolve in the digital space. Follow us for more useful articles and guides.
Admin
DROPIDEA
Latest Articles
“Nofollow” tag: What it is, how and where it is used, “Infographics”
ASUS ROG Flow Z13 (2025) available: Everything you could dream of in a gaming tablet.
The best 5 sites to download safe computer programs without malware!
Create a forum on WordPress using the bbPress plugin step by step