paint-brush
How Velocity Can Change Data Storage And Propagation In Blockchain Nodes?by@rohanvaidya
214 reads

How Velocity Can Change Data Storage And Propagation In Blockchain Nodes?

by RohanVaidyaDecember 10th, 2019
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Bitcoin offers transactions of small atomic data through shared data structure or ledgers. The decentralized structure of the data transactions ensures a highly efficient system. With the use of Blockchain technologies in the IoT(Internet of Things) paradigm, a new field of application emerged known as Autonomous Decentralised Peer-to-Peer Telemetry (ADEPT) This is yet another autonomous communication approach among the devices that eliminates the mediator and which is quite similar to the Blockchain approach. The blockchain paradigm has shifted from financial usage towards application development usages.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - How Velocity Can Change Data Storage And Propagation In 
Blockchain Nodes?
RohanVaidya HackerNoon profile picture

Blockchain technologies have been disruptive and propagate the democratization of the data. This has led to its wider usage and popularity. The blockchain paradigm has shifted from financial usage towards application development usages.

Among the apps that use Blockchain technology, game apps are the most widely developed apps through Blockchain technology. Bitcoin offers transactions of small atomic data through shared data structure or ledgers. The decentralized structure of the data transactions ensures a highly efficient system.

With the use of Blockchain technologies in the IoT(Internet of Things) paradigm, a new field of application emerged known as Autonomous Decentralised Peer-to-Peer Telemetry (ADEPT),

This is yet another autonomous communication approach among the devices that eliminates the mediator and which is quite similar to the Blockchain approach.

So the question here is “what are nodes?”

Nodes are the ones with which data is stored and shared through the blocks, which are batches of data used for better speed and scalability of the transactions. The conventional data propagation occurs through blocks towards several nodes throughout the network.

But, if the data is huge, the block size is large and the data is shared to every node in the network by the block until all the nodes do have new information and this renders slow data propagation.

That is where “Velocity” can do wonders and speed up the data propagation rates. Velocity uses fountain codes for efficient and fine-grained transactions that prevent any transmission over the interrupting channels. It provides much-needed transaction throughput.

Before moving further, let us first understand the basic propagation process.

Blockchain Protocol and Data Propagation:

We all know that Blockchain is a network of data shared in batches through several nodes with untrusted participants stored in a ledger and the same data is validated through the consensus algorithm by these participants.

When this information reaches the nodes, then it is popularly known as bootstrapping and further when such bootstrapped nodes are used for data exchange, such an exchange is known as Block Propagation.

There are several different approaches to Block Propagation:

Compact Blocks:

This is an approach validated by BIP(Blockchain Improvement Protocol) for payload reduction. This approach works on the assumption that the necessary set of information has been already sent to the peers and only the set differences need to be exchanged with the nodes.

Image Source: High Bandwidth Compact Block Propagation

Image Source: Low Bandwidth Compact Block Propagation

This approach provides an effective relay process though high and low bandwidth. It utilizes the extra bandwidth to stop the round-trip time(RTT). This approach reduces the payload size. Though there two major setbacks to ths approach:

  • Needs “short IDs” to identify the missing transactions, which need more space for storage.
  • Whenever a single node processes many transactions, there are discrepancies due to a lack of optimization for unknown transactions.

Thinblocks(Xthin):

Developed and proposed by Bitcoin Unlimited Improvement Protocol(BUIP), this approach uses bloom filters to compare the set differences more efficiently. It allows the detection of unknown transactions more efficiently and yet it adds overhead to the process of propagation through encoded membership information. There are security issues as the malicious nodes can send falsified filters to create a collision attack.

Image Source : Xtremethin block propagation

Graphene:

A new approach was proposed to mitigate the drawbacks of the Xthin Block method. It re-transmits the blocks to receive failures. It utilizes the single peer as the pivotal point with the node sending all the data at one go, instead of several nodes sharing partial data. These blocks are used only for block propagation and not for the node bootstrapping.

Distributed Hash Tables(DHT): 

DHTs are used mainly for peer-to-peer discovery. The system involving the DHTs as the “initial seeder” - which is a single node responsible for the construction of the entire system, where a bootstrapping process allows the sharing of common DHT among several participants.

This approach reduces the issues that are observed in the above three approaches and utilizes the partial information possessed by nodes to be served as the new resource and mitigate the bottleneck or discrepancies of unknown transaction detection. Though there are two vital drawbacks:

  • Corporate participation is an issue due to the proof-of-work mining protocol, which has been an obstruction for mobile app development usage with issues of protocol adherence and revenue models.
  • The system requires a common central node for bootstrapping discovery and that itself violates the decentralized structure of Blockchains.

Velocity Through Fountain Codes:

Fountain codes- popularly known as the rateless erasure codes provides a unique way of encoding the information into segments that can be re-assembled as the original data, whenever the number of segments reaches the threshold.

As the reconstruction of the data is based on segments and not individual blocks, it renders a more robust and smooth transmission of data than the DHTs. Though the concept of fountain codes is quite useful in the Blockchain paradigm, it is not yet used in the Blockchain realm.

For Blockchain application, fountain codes can be ideal with a single piece of information being split into equally-sized elements. These elements are then encoded into specific “Symbols”.  These symbols are specific to the task and transmitted to the one or more sources, with a recipient aggregating the information. 

This recipient encodes an algorithm for each symbol. Though the possibility of decoding an algorithm is almost zero and this is the sole reason. “Velocity” is used with fountain codes.

“Velocity”  uses the error-correcting properties of these fountain codes to allow Block propagation that is originated from multiple sources and has a simultaneous broadcast. 

Step by step Block Propagation through Fountain Codes:

  1. An
    Inv
    is sent to the nearby nodes by a sender node, on the realization of a new node. Blocks are encoded as symbols of pre-determined sizes.
  2. A receiver receives the
    Inv
    message and requests any unknown blocks using a
    get_sym
    request to all the nodes.
  3. Peer nodes possessing the information on the requested blocks provide a response through
    sym
    responses repeatedly, encoding each block in the symbol. 
  4. The receiver collects all the symbols and forms a class of symbol pairs using a map provided by block header IDs. This process ensures the security of the blocks as each block must possess a header to avoid a DOS attack.
  5. Receivers have a pre-determined threshold of symbol volume and as these symbols reach the threshold, receivers start the reconstruction of the blocks.
  6. As the reconstruction process is conducted, if the same fails, the receiver tries to detect the non-complying symbol pairs.
  7. If the process of reconstruction is successful, a
    received
    message is sent to the transmitting node to stop the transmission of symbols.
  8. Image Credit: behrens

Understanding the revenue point for Velocity usage:

Mining pools often use historical data to determine the optimal size of the blocks for the revenue model. Sometimes the transaction fee does not justify the orphaning of the blocks. To mitigate these issues and decide the size of blocks in line with its transaction fee we can use two parameters:

Symbol Size:

The ratio of block size and symbol size is important to determine the symbol size as we look to aggregate the symbols in peer-to-peer communication. 

Orphan Rates:

These are Orphan Blocks not accepted due to the time latency of Block in the question during the Blockchain operation.

Conclusion:

With “Velocity”,  the Block propagation can be optimized for better revenues that can leverage the financial incentives of Blockchain enhancement for corporates and enterprises. This method can certainly change the Blockchain processes to optimize the Block size, helping miners to achieve smoother and faster transactions with higher security.