-
Notifications
You must be signed in to change notification settings - Fork 1
Blockchain useful information
There are many ways to implement software systems. However, one of the fundamental decisions when implementing a system concerns its architecture, the way in which its components are organized and related to one another.
The two major architectural approaches for software systems are centralized and distributed.1In centralized software systems, the components are located around and connected with one central component. In contrast, the components of distributed systems form a network of connected components without having any central element of coordination or control.
- Higher computing power
- Cost reduction
- Higher reliability
- Ability to grow naturally
- Coordination overhead
- Communication overhead
- Dependency on networks
- Higher program complexity
- Security issues
When designing a software system, one can choose which architectural style will be used. The architectural decision can be done independently from the functional aspects of the application layer. As a result, one can create distributed as well as centralized systems with identical functionality on the application layer.
Each of the two major architectural concepts (central and distributed) has its own advantages and disadvantages and their own specific way of doing things. Choosing a specific architecture has consequences on how you will achieve the functional and nonfunctional aspects of a system. In particular, both architectural concepts have very different approaches to ensure integrity. And this is the point where the blockchain enters the picture.
The blockchain is a tool for achieving integrity in distributed software systems, partically the peer-to-peer systems as all node are equal concerning their rights and roles.
-
Hashing: Its goal is to determine whether data (e.g., a file or transaction data) was changed after a certain date or after sending it to someone or after it was stored in a database.
-
Asymmetric cryptography: Using public keys for identifying accounts to which everyone can transfer ownership, while access is restricted to those who possess the corresponding private keys.
-
Digital signatures: The goal is to ensure that only the owner of an account can transfer the property associated with it to other accounts.
-
Merkle tree: It's is a tree in which every leaf node is labeled with the hash of a data block, and every non-leaf node is labeled with the cryptographic hash of the labels of its child nodes. Hash trees allow efficient and secure verification of the contents of large data structures.
- New transaction data as well as new blocks are forwarded to all nodes.
- Each node collects new transaction data in an inbox and selects them for processing.
- Each node processes new blocks immediately with highest priority.
- Each node processes new transaction data by validating them for authorization and formal and semantic correctness.
- Each node collects only valid transaction data and starts creating a new block by solving its hash puzzle.
- As soon as a node finishes the hash puzzle, it sends the newly created block to all other nodes.
- Each node processes new blocks by verifying the solution of its hash puzzle and by verifying all its containing transaction data for formal correctness, semantic correctness and authorization.
- Each node adds valid blocks to its own copy of the blockchain-data-structure.
- If a newly arrived block has been identified as invalid, it will be discarded and the nodes continue with processing transaction data or with finishing the hash puzzle of a new block.
- If a newly arrived block has been identified as valid, the node removes those transactions that are contained in the new block from its own inbox and starts with processing transaction data and the creation of a new block.
- If a block that was added to the blockchain-data-structure is identified as invalid or useless later on, that block as well as all its subsequent blocks will be removed from the blockchain-data-structure and their transactions will be added to the inbox to be processed again.
- The node whose block was accepted will receive the fees for all transactions contained in the block as reward.
- If a block is removed from the blockchain-data-structure, then the reward for adding it is withdrawn from the node that initially received it.
-
Privacy: Details of all transactions in the blockchain that were made such as assets, implied accounts, date when the transaction was made.. are all visible to everyone. This is necessary in order to verify ownership and validate new transactions, but still, this level of privacy can cause problems in certain applications.
-
Security: The Blockchain uses asymmetric cryptography to identify accounts and to authorize transactions. In fact account numbers are public cryptographic keys. Only with the corresponding private key, one can access the associated property or transfer it from one account to another. The private key is the only security measurement that authorizes the lawful owner. As a result, losing the private key means breaking the account's security.
-
Scalability and costs: The blockchain makes writing data or adding blocks to its history costly, by requiring a solution for a hash puzzle, in order to prevent untrusted nodes from manipulating it Solving the hash puzzle is computationally expensive.
There are two things to choose from :
• Transparency vs Privacy
• Security vs Speed
Choosing transparency or privacy is actually deciding to whom to grant read access. Granting read access and creating new transactions to all peers or restricting it to a group of nodes. So 2 type of the blockchain :
• Public blockchain
• Private blockchain
Choosing security or speed is to decide to whom to grant the write access. Granting the right to create new blocks to everyone but making the proof of work expensive or restricting the rigth to add new blocks to trusted preselected group and making the proof of work less-expensive. So 2 type of the blockchain :
• Permissionless blockchain
• Permissioned blockchain
As a result, we have 4 types of the blockchain:
• Public & Permissionless blockchain
• Private & Permissionless blockchain
• Public & Permissioned blockchain
• Private & Permissioned blockchain
The blockchain is a purely distributed peer-to-peer data store, with following properties:
1. Immutable
2. Append-only
3. Ordered
4. Time-stamped
5. Open and transp
6. Secure
7. Eventually consistent
Based on these properties, we can come up with the following generic use cases or applications:
• Proof of existence
• Proof of nonexistence
• Proof of time
• Proof of order
• Proof of identity
• Proof of authorship
• Proof of ownership