<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Huzaifa Rahman on Medium]]></title>
        <description><![CDATA[Stories by Huzaifa Rahman on Medium]]></description>
        <link>https://medium.com/@huzaifa_696?source=rss-cee69dc03f1d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*F4IVHO0XIypHWGmY</url>
            <title>Stories by Huzaifa Rahman on Medium</title>
            <link>https://medium.com/@huzaifa_696?source=rss-cee69dc03f1d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 09:26:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@huzaifa_696/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploring Solana: A Deep Dive into Its Core Components]]></title>
            <link>https://medium.com/rakurai-io/exploring-solana-a-deep-dive-into-its-core-components-7c0d1bce7e28?source=rss-cee69dc03f1d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c0d1bce7e28</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[gossip-protocol]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[rakurai]]></category>
            <category><![CDATA[solana-network]]></category>
            <dc:creator><![CDATA[Huzaifa Rahman]]></dc:creator>
            <pubDate>Wed, 07 Feb 2024 12:37:33 GMT</pubDate>
            <atom:updated>2024-02-07T12:37:33.723Z</atom:updated>
            <content:encoded><![CDATA[<p>Solana is a distributed system with focus on consistency and security. It can not compromise on these traits because the stakes are very high, literally. In order to meet these high standards Solana’s design has some innovative features which everyone can learn from. This series of posts is an effort to encompass all the major components of a Solana node which can develop better understanding of Solana’s inner working and give rise to innovative ideas. <strong>This particular blog is about Solana gossip protocol.</strong></p><h3>Who can benefit</h3><p>This will be a high-level description about the components’ purpose and working logic (in plain English without going into the nitty gritty of the design) and its place in the overall system.</p><p>If you want to learn about Solana, want to understand its basic workings or want to contribute to it with your amazing ideas, this blog is for you.</p><h3>Overview</h3><p>Starting from the very basics, when we say Solana is doing this and that, what we actually mean is that, a network of thousands of nodes working together as a single cluster to maintain a ledger, is doing something. This network consists of individual machines running a piece of intelligent software called a validator.</p><p>This software process is responsible for maintaining the ledger and coordination between other nodes as well as responding to the outsiders’ requests about the state of the ledger.</p><p>To fulfill its roles, the node has several subsystems which are responsible for different tasks. Some components rely on other components while some don’t. Some are crucial for the continuous maintenance of the blockchain record while others do peripheral tasks.</p><h3>Gossip protocol</h3><p>We will discuss the “<em>gossip service</em>” as our first component. We are starting from gossip because this component of Solana is independent of other components so it will be a good starter before we try to untangle the whole architecture of Solana.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzC95OEBs610cHK_OTa7-g.jpeg" /></figure><h3>Why do we need Gossip</h3><p>Let’s agree that for any network that is trying to accomplish a goal, communication is a must. There are so many things to learn from others. Like, it is necessary to know your neighbors’ contact info and their resources so you can benefit from them in the network, get to know about the state of the whole network etc</p><p>A network of computers solving the same problem is a distributed system. And when you can’t trust anyone in the network then it’s called a blockchain. In a blockchain network, for communication’s sake you can’t trust any single source of information or some central registry or server to reply to all the nodes about certain information.</p><p>So, here comes the need for a peer-to-peer communication method where nodes store and share information they have with their peers and then the peers share that information with their peers and so on. This way no single node is responsible for serving accurate information to all other nodes, instead all the nodes have a replicated data store of the same information. Whenever there is an update, they will share that information in the above mentioned fashion.</p><p>So gossip protocol solves this problem for Solana to propagate information about the network state without relying on any central source</p><h3>What is Gossip protocol</h3><p>Gossip protocol is a peer-to-peer communication method. Nodes connecting via this protocol constitute a gossip network. You can think of the gossip network as the control plane for the Solana network. Unlike the data plane where actual transactions flow at lightning speeds, in the control plane metadata about the blockchain state is shared.</p><p>Gossip protocol is a modified version of <a href="https://www.dpss.inesc-id.pt/~ler/reports/srds07.pdf?ref=blog.syndica.io">Plumtree algorithm</a> which is a way of propagating data in a tree-like fashion. The main differences can be attributed to the adversarial nature of the blockchain network.</p><p>Gossip service is the component in the wider Solana validator that is responsible for interfacing with the gossip network. It acts as a gateway or entrypoint to nodes in the control plane. Validators continuously( at every 1/10th of a sec) share data objects with other nodes to ensure that information is available to all other nodes in the cluster.</p><p>Gossip service runs at a well defined UDP/IP port (default is 8001). Nodes advertise their gossip endpoints once the cluster is bootstrapped so other nodes would know where to communicate</p><h3>How it works</h3><p>All the information shared via gossip protocol is stored in a data structure called Cluster Replicated Data Store, short form name is <em>CrdsTable</em>. This data structure is continuously updated with gossip protocol messages. These messages contain gossip records which are essentially the incremental updates to the <em>CrdsTable</em>. So, there are two main aspects of how the gossip service:</p><ol><li><strong>Gossip records:</strong> The data object which updates the shared gossip information</li><li><strong>Gossip messages:</strong> Message types for efficient communication</li></ol><h3>Gossip records</h3><p>Gossip records are the actual data objects which are shared between nodes. There are only a handful (like 10–11) different types of records which serve different purposes in Solana nodes. For example, one type of record is <em>LegacyContactInfo</em> which tells about all the different socket addresses for different services of a particular validator which is essential for communication.</p><p>Gossip records are signed and versioned (with timestamps) to ensure integrity and for keeping the record value up to date.</p><h3>Gossip messages</h3><p>Gossip has 4 types of messages based on the nature of communication:</p><ol><li>Push message</li><li>Pull message</li><li>Prune message</li><li>Ping/Pong message</li></ol><h3>Push message</h3><p>A node sends the push message to tell the cluster that it has information to share. The message is sent to a subset of the cluster nodes called push peers.</p><h3>Push message reception</h3><p>Upon receiving the push message, a node performs three steps:</p><ol><li><strong>Check for duplication:</strong> If the message is seen before, the message is dropped and the receiving node may respond with a Prune message if the push message was forwarded by a low stake node. This is done to minimize duplication of messages.</li><li><strong>New data:</strong><br>a. Store latest value and purge any older values<br>b. Retransmit the message to its own push peers</li><li><strong>Expiration:</strong> Nodes drop push messages that are older than a specific amount of time.</li></ol><h3>Pull message</h3><p>Periodically, nodes send pull messages to ask for any new information from the cluster. It is sent to a single peer at random and contains a Bloomfilter that represents things it already has. Bloomfilter is a space-efficient probabilistic data structure designed to test whether a given element is a member of a set.</p><p>Upon receiving the pull request, a response is constructed while looking for things in the local CrdsTable that are not present in the arrived bloomfilter.</p><p>The pull message response is handled like a push message response.</p><h3>Prune message</h3><p>When a prune message is received, the sending node is dropped from the push peers indicating a higher stake weighted path is available to that node. It also takes into account the number of duplicate messages sent from a particular node and a minimum number of nodes to retain in push peers.</p><h3>Ping/Pong message</h3><p>Periodically, nodes send ping messages to other nodes and expect a pong back. If the pong is not received then the node is labeled as inactive and is not sent any push/pull messages.</p><h3>Push peers</h3><p>Randomly selected from an active set of known peers. However, the known peers are chosen in such a way that high-stake nodes are more likely to send push messages to other high-stake nodes, while low-stake nodes send push messages to random nodes</p><p>To keep it fresh by rotating, a new node is added into the set at regular intervals</p><h3>Bounding Memory Size</h3><p>As previously mentioned, the CrdsTable contains the shared gossip information. It is essential to understand the high level structure of CrdsTable to understand why it regularly needs trimming. So the CrdsTable contains 10–11 different types of information pertaining to a specific Public( ID of a node). Plus it also retains some older values which it uses in the construction of pull messages.</p><p>So at times the size of this data structure can grow very large and thus it needs to be bounded.The CrdsTable is periodically trimmed(starting with the smallest stake weighted nodes) to maintain a maximum number of unique Pubkeys and remove values with old timestamps so that memory growth is bounded, preventing out-of-memory errors.</p><h3>Solana gossip CLI</h3><p>Solana has two very similar CLI commands pertaining to gossip.</p><ol><li>solana gossip: prints basic information(like IP,gossip port, version etc) of all nodes in a cluster that are registered in the gossip network.</li><li>solana-gossip: to monitor the gossip entrypoint</li></ol><h3>Summary</h3><p>The blog details the necessity of gossip, its protocol, components, and operation, providing a foundation for exploring Solana’s broader architecture. The gossip protocol facilitates peer-to-peer communication in Solana’s network of nodes, forming the control plane. Essential for blockchain networks where trust is limited, gossip ensures information propagation without relying on a central source. The modified Plumtree algorithm serves as the basis for the gossip protocol, with the gossip service acting as an entry point to the control plane.</p><h3>References</h3><ul><li><a href="https://docs.solana.com/validator/gossip"><strong>https://docs.solana.com/validator/gossip</strong></a></li><li><a href="https://blog.syndica.io/introducing-sig-by-syndica-an-rps-focused-solana-validator-client-written-in-zig/"><strong>https://blog.syndica.io/introducing-sig-by-syndica-an-rps-focused-solana-validator-client-written-in-zig/</strong></a></li><li><a href="https://blog.syndica.io/sig-engineering-1-gossip-protocol/"><strong>https://blog.syndica.io/sig-engineering-1-gossip-protocol/</strong></a></li><li><a href="https://docs.solana.com/validator/get-started/setup-a-validator#gossip-protocol"><strong>https://docs.solana.com/validator/get-started/setup-a-validator#gossip-protocol</strong></a></li><li><a href="https://docs.solana.com/cli/usage#solana-gossip"><strong>https://docs.solana.com/cli/usage#solana-gossip</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c0d1bce7e28" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rakurai-io/exploring-solana-a-deep-dive-into-its-core-components-7c0d1bce7e28">Exploring Solana: A Deep Dive into Its Core Components</a> was originally published in <a href="https://medium.com/rakurai-io">rakurai.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>