![Everything You Need To Know About Blockchain | Embarcadero RAD Studio Delphi C++Builder Blogs Everything You Need To Know About Blockchain](https://i0.wp.com/blogs.embarcadero.com/wp-content/uploads/2021/10/Everything-You-Need-To-Know-About-Blockchain-5943017.png?resize=1140%2C675&ssl=1)
Blockchain is a term utilized to represent distributed ledger technology. Blockchain is used to build a storage system for data in a distributed and immutable mode. So there are key features we need to mention.
Immutability – this means that once data is written to a blockchain data storage or ledger, it cannot be changed – so it’s there forever. For instance, in a relational database, no matter how much security you have, the data can be accessed and modified on the system.
A blockchain system guarantees that if one bit of data is altered it says it is in an invalid state, and since the data is distributed on various systems, the verified data with a justified state can be retrieved.
Distribution – is the key to trust. As long as the data you see is in the blockchain and it’s in a valid state you can trust the data to be accurate. This trust is the key and this trust is achieved in a blockchain system by replicating the datastore on several hosts on the internet. For instance, as long as the peers accept that bit of data is valid, so you can completely trust that data that is stored on that system.
In Blockchain the trust is requisite.
- Immutability – Trust
- Distribution – valid/invalid
In this article, you will learn more about the blockchain and how it works with IDE Software.
Table of Contents
How can trust issues be resolved using Blockchain?
For many industries trust is a problem. The automobile industry is one of those where trust, or lack of it, causes problems. People order used cars from other countries which do not easily share tracking information and this can mean that faking data about the car’s prevenance and history is easier. For instance, odometer fraud is one of the problems that you can seriously impact the value of a vehicle. Representing a vehicle as having been used 5,000 miles instead of 50,000 miles can mean a huge difference in perceived value and potential usable life span of the car or truck.
In many countries car service records are largely kept on paper which can of course very easy to be fake.
So, let’s imagine that pushing all service providers to a blockchain and all the readings kept on the blockchain. The integrity and immutability of the blockchain data means that a modification of the records would be detectable. Moreover, agencies such as insurance companies can also contribute by appending accident details of a car giving a much more complete picture of the vehicle’s history in a way which is very difficult or even impossible for dishonest vendors to fake.
Why does the financial Industry have trust Issues with Blockchain?
Transferring money from one country to another takes your time and can be expensive because of the need to comply with multiple different regulations and policies, but eventually, another person receives the money.
Your bank updates its records and sends them to the main clearing bank in your country where they are passed through a number of systems where it analyzes them to prevent money laundering and to comply with various trade embargoes. Assuming your transaction passes the checks, the funds are then sent them to another country’s clearing bank. They again update the record and send it to the receiver’s bank account. Even in these highly automated times, it can take several days for the money to arrive in the destination account.
This is where Bitcoin can offer an alternative to the traditional brocks and mortar financial industry. All you need to do is to give recipients’ Bitcoin wallet address and use your computer system to send funds. There are no middle parties or long waiting time.
To summarize Blockchain:
- The data store that keeps all blockchain data is called a ledger
- Each record in the ledger is called a transaction.
- These transactions are timestamped and saved in groups of blocks
- You can not update or delete anything. It’s write once and then read-only.
- The ledger is built to be immutable using cryptographic algorithms
- And the main part is ledger is replicated by multiple nodes which is why it is called Distributed Ledger Technology
How does Blockchain achieve and maintain integrity?
The system takes a huge data file and computes its unique “digest” using a hash function. Your system then sends that huge data file to your friend/receiving party along with its hashed value. The receiver recomputes the hash to ensure that the content of that file is not altered while in the transmission.
Multiple standardized hash function implementations are utilized such as SHA256 which produces a 256-bit hash value. It gives 2^256 combinations.
Furthermore, Blockchain utilizes Public Key cryptography which is a cryptographic system used for the encryption and decryption of data. You start by generating a special, related pair of keys – called a “public” and “private” key – based on a mathematical equation which uses two large prime numbers. Once encrypted, that is can be decrypted if you have the required keys. The public key of both ends of the transmission is used to encrypt the data. At your end your private key (which is not ever sent or made available to anyone else) is used in conjunction with the receiving party’s public key to encrypt the data. The receiving end uses your public key and their private key to decrypt the data. Combined with the hash value transactions like this are incredibly secure.
Public Key Cryptography is also utilized in communication to create a secure connection between hosts and for things like code signing.
What is Blockchain’s data structure?
In a blockchain system, data is stored in blocks of transactions. In effect is a huge timestamped log of transactions which is replicated on multiple peers.
For a blockchain network to be trusted and valid, most of the nodes have to be uncompromised. If 51 percent of the nodes are compromised the network is hacked and has lost integrity. Note that the Blockchain expects for things to go wrong on nodes and yet it still remains reliable!
- Each block in a blockchain represents transactions
- If a user tries to add a block containing an incorrect hash value, the block will be rejected by multiple peers and hence will not be made part of the blockchain.
Where can I learn more about Blockchain?
You can find many interesting and useful articles related to:
- Blockchain.com API
- Cryptography
- Bitcoin
- Delphi and Ethereum
- Working with smart contracts
- and more
Moreover, you can learn more about the Blockchain by exploring these topics with your favorite search engines:
- Bitcoin mining
- Hyperledger Fabric concepts
For more articles on this blog about Blockchain and cryptocurrency click on this dynamic search link: https://blogs.embarcadero.com/?s=blockchain
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition
Hi, all Delphi Developers should join https://www.pascalcoin.org/ .
A blockchain run on Pascal and C++ Code.
With a lot of community projects – also developed in Delphi.
Also check out the Discord Server … https://discord.gg/rdcgFYp334 (do not forget to invite your firends)
Go get the newest version … https://github.com/PascalCoin/PascalCoin/releases/tag/5.6
Get the wallet and get your PASA today … https://pasa.pascalcoin.io/
Thanks for pointing this out Roland. We have an interview planned with a developer in connection with the Pascal / Pascal Coin project. I agree it’s fascinating stuff and well worth people taking some time to check it out.
Thank you for the article.
We really need more and more info\articles\support on using Delphi for the “new world” of crypto.
also, I would love to have new data types that can support (accurately) very lengthy Float numbers.
I built my own Algo Trading software using Delphi, and I gave up on using some tokens that have values like 0.00000000000123456…
(I know these kinds of tokens are useless coins, but profit is profit and my app does the dirty job)