Skip to main content

Producer

Producers introduce the blocks of relevant blockchain into the Marlin Relay network.

Producers establish connections with all the registered clusters and identify the best relayers in the cluster to connect to based on the location of the producer. If another relayer in the cluster is identified to be better in terms of latency, then the producer disconnects from the current worst relayer and connects to the identified relayer.

Since it is possible for clusters to be malicious, sending the block to a single cluster might result in the block getting dropped and hence not propagating to the receivers. A naive solution to this is to increase the redundency by sending the block to multiple clusters hoping that the probability of all clusters being malicious is negligible. Though this approach solves the problem, it significantly increases the amount of data that needs to be propagated in the network.

Marlin uses erasure coding to ensure that the data is not replicated excessively while still maintaining enough redundancy that a group of malicious clusters cannot stop the propagation of block with a very high probability. When a block is to be introduced by the producer into the Marlin relay network for the blockchain, the block is divided into multiple chunks by the producer. Each chunk is propagated through a cluster specified by the below function.

ClusterIndex = Keccak256(BlockHash, ChunkIndex) mod(Number_of_Clusters)

The stake is used as a deterrant against producers sending invalid blocks to the network. In case a producer does send an invalid block with his signature, then that acts as a proof with which the producer can be slashed.

Once block is submitted to the network, the Marlin network ensures that the block is propagated to all other receivers in the network in a low latency fashion, as we will explore in futher sections.