<?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[Whiteblock - Medium]]></title>
        <description><![CDATA[A distributed systems development and testing sandbox for the masses. - Medium]]></description>
        <link>https://medium.com/whiteblock?source=rss----946abab9582b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Whiteblock - Medium</title>
            <link>https://medium.com/whiteblock?source=rss----946abab9582b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:38:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/whiteblock" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Whiteblock X Splunk at ETHDenver]]></title>
            <link>https://medium.com/whiteblock/whiteblock-x-splunk-at-ethdenver-147bf6a9795?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/147bf6a9795</guid>
            <category><![CDATA[denver]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Trenton Van Epps]]></dc:creator>
            <pubDate>Wed, 26 Feb 2020 21:45:40 GMT</pubDate>
            <atom:updated>2020-02-28T17:27:29.330Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/622/0*2765JJjuTqEw8jKv.png" /><figcaption>Team Splunk!</figcaption></figure><p>The third <a href="https://www.ethdenver.com/">ETHDenver </a>hackathon took place over February 14–16, resulting in an amazing assortment of projects submitted by hackers. For the second year running, the organisers constructed a pop-up economy for a few days that let attendees transact with vendors or donate to charities. Splunk and Whiteblock worked together to support and visualise this payment network. Watch the video below or read on to see how it all worked.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttps%2Fwww.youtube.com%2Fembed%2F2pxJ84Zvm9Q%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttps%2Fwww.youtube.com%2Fwatch%3Fv%3D2pxJ84Zvm9Q&amp;image=https%3A%2F%2Fround-lake.dustinice.workers.dev%3A443%2Fhttps%2Fi.ytimg.com%2Fvi%2F2pxJ84Zvm9Q%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd8c11b18c90140a599d7073bed5a17b/href">https://medium.com/media/cd8c11b18c90140a599d7073bed5a17b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/194/0*Qw9eqWaJs3SbFBaV.png" /><figcaption>the Bufficorn</figcaption></figure><h4><strong>Why a pop-up Economy?</strong></h4><p>By creating an event specific currency, hackers can interact with sponsors, vendors, and charities, all without having t o worry about credit cards or cash. This was crucial for ETHDenver, an event that prides itself on creating a comfortable environment for hackers. Each hacker was allocated $24 USD in BuffiDAI, named after the mythical mascot of the event. This currency lives on the <a href="https://www.xdaichain.com/">x-DAI network </a>, which is a Proof of Authority (POA) sidechain anchored to Ethereum. This means lower blocktimes, faster transactions, and generally a much better user experience.</p><p>Interacting with the pop-up economy went like this: First, login to your mobile wallet. Next, order food from one of the food trucks. To pay, use the wallet to scan a QR code, and confirm the transaction. Wait for payment to confirm, and in a few minutes, receive delicious food! The same flow worked for donating to the many charities that were working at the event, or buying swag from the swag shop.</p><h4><strong>How Whiteblock Supported The Event</strong></h4><p>Our contribution was to provide a local xDai infrastructure, peered with the xDai mainnet, to make all of this possible. For <a href="https://twitter.com/whiteblock">Whiteblock </a>, that meant on-prem servers which acted as local caching for transaction data as well as node redundancy in case of network issues. The Whiteblock team worked closely with <a href="https://twitter.com/austingriffith">Austin Griffith </a>, who pioneered the Burner Wallet, as well as <a href="https://twitter.com/dmihal">David Mihal </a>and (last name). This team was responsible for putting out fires before they started, as well as tracking recurring issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DYeLdQvLXi-WQh9V.jpg" /><figcaption>where the magic happened</figcaption></figure><p>The Splunk team made all of these efforts visible to attendees. Using <a href="https://splunkbase.splunk.com/app/4857/">Splunk Connect for Ethereum </a>, the team took the live event economy data and translated it into an easy to understand interface. This made for an interactive experience where, for example, attendees donating to any of the charities could see their value being transferred and subsequently displayed on any of the venue screens.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lcuVHx2MAkoIRHyB.png" /><figcaption>charity data at the Maker sponsor booth</figcaption></figure><p>In total, Splunk infrastructure supported:</p><ul><li>3,306 Buffidai transactions</li><li>685 XP transactions</li><li>18,964 Buffidai spent on food</li><li>1,218 wallets active wallets</li></ul><p>The visualisation also continued after the event, at the Dappy Hour put on by <a href="https://makerdao.com/">Maker</a>. There, attendees were given a fresh burner wallet with preloaded funds that they could use for drinks. Alternatively, they could send it to any of the charities. Totals included:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kEU4_gdRCadFTHNt.png" /></figure><p>It was great to return to ETHDenver and help the organisers pull off such an amazing event. We had an amazing time and are already looking forward to next year’s event.</p><p>Learn more about <a href="https://www.splunk.com/">Splunk</a>.</p><p>Learn more about <a href="https://twitter.com/whiteblock">Whiteblock</a> and <a href="https://whiteblock.io/genesis/">Genesis</a>.</p><p><em>Originally published at </em><a href="https://whiteblock.io/whiteblock-x-splunk-at-ethdenver/"><em>https://whiteblock.io</em></a><em> on February 26, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=147bf6a9795" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/whiteblock-x-splunk-at-ethdenver-147bf6a9795">Whiteblock X Splunk at ETHDenver</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing Gossipsub with Genesis]]></title>
            <link>https://medium.com/whiteblock/testing-gossipsub-with-genesis-6f89e845b7c1?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/6f89e845b7c1</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[p2p]]></category>
            <category><![CDATA[protocol]]></category>
            <dc:creator><![CDATA[Trenton Van Epps]]></dc:creator>
            <pubDate>Fri, 31 Jan 2020 19:41:28 GMT</pubDate>
            <atom:updated>2020-01-31T19:41:28.113Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-H6ZvfzFN1l4dlDWYTLYw.jpeg" /></figure><p>At the end of August 2019, Whiteblock received a joint grant from the <a href="https://ethereum.org/">Ethereum Foundation</a> and <a href="https://consensys.net/">ConsenSys</a>. Read our <a href="https://whiteblock.io/whiteblock-receives-ethereum-foundation-grant-to-assist-with-ethereum-2-0-networking/">blog post</a> for more details and find the official announcement from the <a href="https://blog.ethereum.org/2019/08/26/announcing-ethereum-foundation-and-co-funded-grants/">EF here</a>.</p><p>Specifically, our work was to focus on benchmarking <a href="https://github.com/libp2p/specs/tree/master/pubsub/gossipsub">Gossipsub</a>, a general purpose pubsub protocol. Gossipsub works with <a href="https://libp2p.io/">Libp2p</a>, the networking stack for many Web3 projects, including Eth2. These projects are maintained by a set of contributors shepherded by <a href="https://protocol.ai/">Protocol Labs</a>.</p><p>The main output of our research was a detailed report, which can be accessed <a href="https://github.com/whiteblock/gossipsub-testing">on our GitHub</a>. Read on for a high level overview of the research findings. We ran tests in a variety of conditions to prove the gossipsub’s viability as a key networking component.</p><h4>Initial Parameters and Peer Topology</h4><p>Here are the parameters and their settings:</p><ul><li>Number of Gossip Nodes: 95</li><li>Global Msg/Sec: 200</li><li>Warm-up Time: 60s</li><li>Test Time: 180s</li><li>Cool-Down Time: 600s</li><li>Msg Size: 1000 bytes</li><li><a href="https://github.com/agencyenterprise/go-libp2p-pubsub-benchmark-tools/blob/588f32beeda7db9ec160c3f4f06c094e8adf6542/pkg/host/host.go#L292">Discovery</a> (mDNS): Off</li><li><a href="https://github.com/agencyenterprise/go-libp2p-pubsub-benchmark-tools/blob/588f32beeda7db9ec160c3f4f06c094e8adf6542/pkg/host/host.go#L132">Routing</a> (kad-DHT): Off</li><li>Security: SECIO</li><li>Peering: Barabasi-Albert (seed=42, varying input degree-parameters) - { 2, 6, 12, 16 }</li></ul><p>The <a href="https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model">Barábasi-Albert (B-A) model</a> is a way to describe the connections between nodes in a distributed network. The topology works with a degree parameter, <em>m</em>, as input. The graph below illustrates how the power-law node connection plays out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MmAOyL0OyISDUgeq.png" /><figcaption><a href="https://commons.wikimedia.org/w/index.php?curid=64122479">By HeMath — Own work, CC BY-SA 4.0</a></figcaption></figure><p>It is important to note that Eth2’s topology will depend on the discovery protocol implemented. That being said, it’s still useful to test a known network topology model like B-A.</p><h4>Topology Test</h4><p>Now let’s get into some of the results. The first test run kept all parameters as constants except the B-A input degree parameters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/0*nUzf7Wo4cEHUBNnG.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/0*w_KTWrlTNtgdx0DB.png" /></figure><p>For each increase in B-A degree inputs, the general shape of the message dissemination time distribution stayed the same. While there are slight differences in each histogram, the initial spike of short nano times and heights of the first lobe did not follow a particular trend. The effects of degree distributions on message dissemination time are inconclusive. The presence of lobes cannot be explained by the GossipSubHeartbeatInterval[6], which was left set at the default of 1 second. A larger set of test runs would be needed to determine the effects of degree distributions on message dissemination time.</p><h4>Test Series</h4><p>Following the control tests, 6 additional tests were run which introduce gossipsub to various network impairments. See the <a href="https://github.com/whiteblock/go-libp2p-pubsub-benchmark-tools">full report </a>to explore test parameters:</p><ul><li>General topology baseline</li><li>Latency</li><li>Packet loss</li><li>Bandwidth</li><li>High Latency</li><li>Stress Test</li></ul><p>These tests present some stress to the protocol to uncover any issues of the go-libp2p implementation. Tests were run via the Whiteblock Genesis platform using a fork (with many changes) of the <a href="https://github.com/whiteblock/go-libp2p-pubsub-benchmark-tools">Phase 1 Libp2p Host implementation</a>, and random topologies generated using Barabasi-Albert model. Generally speaking, the degree distribution of a network affected the Last Delivery Hop (LDH). The LDH is the number of hops a single gossip message has made when it reached the absolute last receiving node (i.e., to complete message dissemination). There is a correlation between the degree of connectivity and last delivery hop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/0*nP3G31-r1qogGiyP.png" /></figure><p>As shown in the graph above, we can see that as the degree was increased, the average delivery hop count decreased. We suggest that the Eth2 peering technology should avoid a power law degree distribution resulting in edge nodes with peer sets of 2. This will avoid the low performance seen in all Phase 2 tests with B-A input m = 2 (the first column).</p><h4>Message Dissemination (“Total Nano Time”) Results</h4><p>The total message dissemination times logged indicate the amount of time each message takes to reach its final destination. The network paths gossip messages take is entirely dictated by the gossipsub protocol as well as the generated network topology. The message time varies from test to test, as shown in the results, and the sparser networks (lower degree of connectivity) are found to have longer times to reach its destination than the tests that had denser network topologies.</p><p>Dissemination times for each of the test series are overlaid in the graph below, each a different color. It’s clear to see that different network impairments have a direct relationship to the time it takes for a message to traverse the network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*tt3JXITtg3SGUPU3.png" /></figure><h4>Next Steps — Community Solicited Research</h4><p>While the first two phases of this testing effort shows that the Libp2p Gossipsub protocol performs sufficiently well for Ethereum 2.0 specifications, testing with a larger network size should be the primary focus for future work. Before testing larger network sizes, various improvements to the go-libp2p-pubsub implementation as well as the testing methodology should be completed. Below is a non-exhaustive list of todos for the community:</p><ul><li>Permanent fix which does not require manually increasing Golang channel queue sizes in go-libp2p-pubsub should be implemented.</li><li>go-libp2p-pubsub-tracer should be integrated into the node implementation for tests</li><li>Erratic message interarrival times should be investigated and fixed</li><li>Testing methodology should port to the next version of Whiteblock Genesis for larger scale tests</li><li>Integrate floodsub into testing methodology for comparison.</li><li>With these additional features, a richer set of future tests can be performed. Lastly, future work should include the variation of gossipsub parameters (e.g. GossipSubD, GossipSubHeartbeatInterval, etc.) at different network sizes.</li></ul><p>We’d like to again thank ConsenSys and the Ethereum Foundation for funding this research. Additional thanks to Protocol Labs, <a href="https://twitter.com/raulvk">Raúl</a> and <a href="https://twitter.com/protolambda">Proto</a> for consistent feedback on our strategy.</p><p>If you’d like to try out the gossipsub tests on your own, the yaml can be accessed in our sample repo:</p><p><a href="https://github.com/whiteblock/genesis-examples/blob/master/gossipsub/gossip.yaml">whiteblock/genesis-examples</a></p><p>We’d love to see some additional testing from other community members with other parameter settings. If you have any feedback to share, please join the discussion on our <a href="https://community.whiteblock.io/">community forum </a>or our <a href="https://t.me/whiteblockio">telegram</a>.</p><p><em>Originally published at </em><a href="https://whiteblock.io/testing-gossipsub-with-genesis/"><em>https://whiteblock.io</em></a><em> on January 31, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f89e845b7c1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/testing-gossipsub-with-genesis-6f89e845b7c1">Testing Gossipsub with Genesis</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sidecars in Distributed Systems]]></title>
            <link>https://medium.com/whiteblock/sidecars-in-distributed-systems-2b2a3a460bab?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2b2a3a460bab</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[kevin castro]]></dc:creator>
            <pubDate>Fri, 10 Jan 2020 22:25:32 GMT</pubDate>
            <atom:updated>2020-01-10T22:31:14.534Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xIZ_BzIt9L5HGaZ9.jpeg" /><figcaption><em>Photo by </em><a href="https://unsplash.com/@hdsfotografie95"><em>Hidde Schalm</em></a><em> on </em><a href="https://unsplash.com/s/photos/cereal?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Unsplash</em></a><em>.</em></figcaption></figure><p><em>This article was a collaboration between </em><a href="https://medium.com/u/9e3f4ade4009"><em>Antoine</em></a><em> and </em><a href="https://medium.com/u/ad7160c5b671"><em>kevin</em></a><em>.</em></p><p><strong>Define Sidecar<br></strong>Distributed systems require careful attention to overall architectures. Fortunately, there are popular design patterns that can be followed so that we don’t have to reinvent the wheel. In particular, the sidecar (or sidekick) pattern involves deploying components of an application into a separate process or container in order to provide isolation and encapsulation. Similar to a motorcycle and a sidecar, the child (component) shares the same lifecycle as the parent application.</p><p><strong>Related functionality vs Different services<br></strong>In the sidecar pattern, tasks like logging, networking services, and configuration can run in the same process as the parent application, making use of shared resources. This can also introduce vulnerabilities. Its purpose is to provide better isolation so that a component outage will not jeopardize an entire application or other components. This decomposition pattern allows us to separate our application into separate services which can individually be built using different languages and technologies. Although more flexibility can be obtained by implementing this method, it also means that each component will have its own dependencies and require language-specific libraries to access the underlying platform or resources shared with the parent application. Unfortunately, this can add latency and complexity for hosting or deployment.</p><p><strong>How to approach this dichotomy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*Xy3uG4PAa1-IWFH_.png" /></figure><p>We can directly approach this issue by co-locating a cohesive set of tasks with the primary application, but place them inside their own process or container, providing a homogeneous interface for platform services across languages. The sidecar pattern is often used with containers and referred to as a sidecar container or sidekick container. This way the sidecar service is not truly part of the application, however, it remains loosely coupled to it. Sidecars act as supporting processes or services that are deployed with the primary application.</p><p><strong>Advantages:</strong><br>No significant latency when communicating between the sidecar and primary application because of its proximity.</p><p>A sidecar can monitor its own system resources in addition to the primary application’s.</p><p>Applications that don’t provide extensibility can use a sidecar to extend functionality by attaching it as its own process in the same host or sub-container as the primary application.</p><p><strong>Potential pitfalls</strong><br>Before putting functionality into a sidecar it’s important to consider whether the service you’re seeking to isolate would work better as a traditional daemon. Alternatively, the functionality could be implemented as a library or using a traditional extension mechanism. Keep in mind that language-specific libraries may have a deeper level of integration and less network overhead. Perhaps your app will benefit from less complexity, in some cases it’s better to bake in the functionality you’re looking for.</p><p><strong>Identifying the best time to use this pattern</strong><br>This design approach can be used when a component is owned by a remote team. If you need a service that shares the overall lifecycle of your main application, but can be independently updated the sidecar pattern is also recommended.</p><p>It’s not advisable to use this pattern when the service needs to scale differently than or independently from the main applications. If so, it may be better to deploy the feature as a separate service.</p><p><strong>A real-world example courtesy of </strong><a href="https://blog.davemdavis.net/2018/03/13/the-sidecar-pattern/"><strong>Dave’s Two Cents</strong></a><strong>:</strong></p><p>“Say you have a web application that uses HTTP to host it and you want to secure it with SSL. You could dig into the application and make the necessary changes; perhaps resources were hardcoded. That may be too much work, or maybe you don’t even have the source code. What can you do then? First, host the web application in a container and expose a local host endpoint (127.0.0.1). Now host the <a href="http://nginx.org/">NGINX service</a> in a Sidecar container. Configure NGINX to terminate the SSL connection and forward the requests to the web application. Because the Sidecar is on the same host, it can access the local endpoint. The web application didn’t have to change to support this new functionality.”</p><p>With this common distributed system design pattern you’re decoupling your system in different parts. Each part has its own responsibilities, and each solves a different problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GP_-VTv_X8vl1rH2.jpg" /></figure><p>At Whiteblock, we’re actively working on providing the best tools to test and optimize distributed systems. Join us for our official launch on January 15th and stay tuned on all of our upcoming updates via <a href="https://t.me/whiteblockio">telegram</a>.</p><p><em>Originally published at </em><a href="https://whiteblock.io/sidecar-pattern-blockchain/"><em>https://whiteblock.io</em></a><em> on Jan 10, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b2a3a460bab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/sidecars-in-distributed-systems-2b2a3a460bab">Sidecars in Distributed Systems</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Byte Serialization in Blockchains]]></title>
            <link>https://medium.com/whiteblock/byte-serialization-in-blockchain-e147347ab578?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/e147347ab578</guid>
            <category><![CDATA[serialisation]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Antoine Toulme]]></dc:creator>
            <pubDate>Fri, 20 Dec 2019 16:13:06 GMT</pubDate>
            <atom:updated>2019-12-20T18:10:28.958Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UPAmoAUI9mY4CCPQ.jpg" /><figcaption>Cereal photo by <a href="https://unsplash.com/@nyanastoica?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Nyana Stoica</a> on <a href="https://unsplash.com/s/photos/cereal?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>This article was a collaboration between Antoine and Kevin.</em></p><p>In this post, we’ll discuss byte serialization in blockchain, why it matters, as well as how different chains approach it, including:</p><ul><li>Ethereum 1</li><li>Ethereum 2.0</li><li>Bitcoin</li><li>Secure Scuttlebutt (Bonus!)</li></ul><p>Serialization is the process of converting an object into a stream of bytes to store the object or transmit it to memory, a database, or a file using a common set of rules a system can understand. Its main purpose is to save the state of an object in order to be able to recreate it when needed. The reverse process is called deserialization. In this process, you’d use the same set of rules to decode the translated data back into its original form. Serializing data is also known as marshaling and deserialization is known as unmarshaling.</p><h3>Why is byte serialization important for blockchains?</h3><p>Serialized data does not have to be in bytes as long as it’s in a format that is efficient for the particular system the data will live in. For example, in WWII data was serialized into morse code in order to transmit data via voice radio systems. Bytes happen to be the most convenient format for computers to operate in. Inherently, blockchains maintain a state of the world to reach consensus. Blockchain based protocols like Bitcoin and Ethereum leverage this technology but in order for nodes to communicate across a network in order to maintain the state, they need to send packets of byte encoded data via peer to peer networking using some sort of standard serialization algorithm.</p><p>This is why serialization plays a very important role in distributed systems. When you represent a domain object in a blockchain, you will want to generate a proof of it. The object may be inserted into a data structure, which itself needs to generate a proof. A good way to prove your message is authentic is to sign it with a key or to include the hash of the message into a block. It’s the essence of a blockchain’s function, sending around hashes of transactions and blocks and making sure they match. Let’s take a look at some of the different implementations.</p><h3>Ethereum 1x: Recursive Length Prefix</h3><p>Ethereum uses a Patricia Merkle tree based on this byte serialization down to the point a single hash can identify the particular state of the tree. The purpose of <a href="https://github.com/ethereum/wiki/wiki/RLP">RLP</a> (Recursive Length Prefix) is to encode arbitrarily nested arrays of binary data, and RLP is the main encoding method used to serialize objects in Ethereum.</p><p>“… Data in Ethereum is <a href="https://stackoverflow.com/questions/3784143/what-is-the-difference-between-serializing-and-encoding">serialized</a> and deserialized as a <a href="https://stackoverflow.com/questions/4019837/what-do-we-mean-by-byte-array">byte-array</a>. Put, an array of bytes is a <a href="https://stackoverflow.com/questions/4019837/what-do-we-mean-by-byte-array">byte-array</a>.”</p><p><a href="https://github.com/ethereum/wiki/wiki/RLP">RLP</a> is like a binary encoding of JSON, if JSON were restricted only to strings and arrays. The RLP encoding function takes in an item. An item is defined as follows：</p><ul><li>A string (ie. byte array) is an item</li><li>A list of items is an item</li></ul><p><strong>Examples of item and items</strong></p><ul><li>“crypto”</li><li>[ [] ]</li><li>[ “Lion” ]</li><li>[ [ “cat”, 123, ‘d’, ‘o’, ‘g’] ]</li></ul><h3>Ethereum 2.0: Simple SerialiZe</h3><p>As part of the upgrade to Ethereum 2.0, researchers and developers have been working on significant improvements to the Ethereum protocol in addition to its network architecture. Based on what was learned with RLP, Simple SerialiZe (SSZ) was developed as the culmination of this hard work. This is the serialization algorithm standard for all data structures common across Ethereum 2.0 client implementations. It is outlined in the official<a href="https://github.com/ethereum/eth2.0-specs/blob/dev/specs/simple-serialize.md"> Ethereum 2.0 specification</a>. SSZ is poised to be the new standard for marshaling consensus data into bytes.</p><p>Specifically, the SimpleSerialize (SSZ) <a href="https://github.com/ethereum/eth2.0-specs/blob/dev/specs/simple-serialize.md">specification</a> defines how different types should be serialized and represented as a merkle tree. Building on RLP, SSZ offers a few more abilities:</p><ul><li>Deterministic lookup of an element in bytes–this means you can look at the bytes of the SSZ output, and if you know what the data structure is, you can look up the bytes of one of the fields of the data structure directly.</li><li>Merkle hash partial computation aka SSZ partials allow us to update the SSZ representation and recompute the hash without recomputing from scratch, optimizing the hashing process.</li></ul><h3>Bitcoin Serialization</h3><p>Let’s take a look at Bitcoin’s approach. Under the current <a href="https://btcinformation.org/en/glossary/consensus-rules">consensus rules</a>, a block is not valid unless its serialized size is less than or equal to 1 MB. The following fields also determine the serialized size:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*XQ_lkhPIrQr0US-Xy5iPKQ.png" /></figure><p>All data structures in Bitcoin use a custom Bitcoin specific serialization format. The standard that is followed is the Bitcoin defined standard, not any other standard. Two formats are currently supported by the Bitcoin community, the non-segwit format (click <a href="https://btcinformation.org/en/developer-reference#raw-transaction-format">here</a>). The segwit format is described in <a href="https://github.com/bitcoin/bips/blob/master/bip-0144.mediawiki">BIP 144</a>. Segwit implements a new serialization format for tx messages to the peer-to-peer protocol. Arguments have been made about supporting this new serialization method but some point out that it is an improvement over the current bitcoin blockchain which reduces the size needed to store transactions in a block. This is done by removing certain signatures with counting serialized witness data as one unit and core block data as four units.</p><h3>SSB: Secure Scuttlebutt (bonus!)</h3><p>Different forms of serialization are being used in <a href="https://scuttlebutt.nz/about/">Secure Scuttlebutt</a>, a global cryptographic social network. Here, they’re using JSON for its messages which configures messages to a specific format to allow signing.</p><p>Here’s an example from their docs:</p><p><strong>Message format</strong></p><p><strong>To create a message to post in a feed, start by filling out these fields:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/0*Op6lMhm-6yHZTkJQ.png" /></figure><p>All messages in a feed are signed by that feed’s long-term secret key, enabling recipients to verify that the message was truly posted by a particular identity and not tampered with as it gets gossiped and replicated throughout the Scuttlebutt network. Before signing a message, it must be serialized according to a specific canonical JSON format. Making it so that for any given message there is exactly one way to serialize it as a sequence of bytes, which is necessary for signature verification to work. The reference implementation verifies that all messages it receives are in the canonical format and rejects messages that aren’t. To read more about the specific rules for this serialization, check out their <a href="https://ssbc.github.io/scuttlebutt-protocol-guide/#message-format">docs</a>.</p><p>Although different networks approach serialization differently, it’s an important feature of a distributed system. At Whiteblock many of us are excited to continue assisting in the development of Ethereum 2.0 and hope to share more details about these improvements soon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oakDRbZQMsL6Ffb6.jpg" /></figure><p>At Whiteblock, we’re actively working on providing the best tools to test and optimize distributed systems. Join us for our official launch on January 15th and stay tuned on all of our upcoming updates via <a href="https://t.me/whiteblockio">telegram</a>.</p><p><em>Originally published at </em><a href="https://whiteblock.io/byte-serialization-in-blockchain/"><em>https://whiteblock.io</em></a><em> on Dec 20, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e147347ab578" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/byte-serialization-in-blockchain-e147347ab578">Byte Serialization in Blockchains</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No-Tag-Back Gossiping]]></title>
            <link>https://medium.com/whiteblock/no-tag-back-gossiping-c8b99906e891?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/c8b99906e891</guid>
            <category><![CDATA[gossiping]]></category>
            <category><![CDATA[p2p]]></category>
            <category><![CDATA[protocol]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Antoine Toulme]]></dc:creator>
            <pubDate>Wed, 11 Dec 2019 21:42:08 GMT</pubDate>
            <atom:updated>2019-12-11T21:42:07.906Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*BAvUBNU9C_1D0iZF2RQAOg.gif" /><figcaption>Tag!</figcaption></figure><p>In this blog post, I’d like to introduce you to an evening ramble with <a href="https://twitter.com/deaneigenmann">Dean Eigenmann</a> called No-Tag-Back Gossiping, or NTB-G. This post came about as we worked through ideas to make gossiping more reliable.</p><p>Make sure to <a href="https://hackmd.io/owviUNfeRkmSlgtJQcaQFg?view"><strong>read the spec</strong></a> first, as it clearly lays out the important components. Below, I’ll talk about the whys and hows of some of the requirements we establish.</p><p>When you gossip a message, the idea is that the message will traverse the whole network and eventually be sent to everyone. But not everyone cares about your message and the network might be bigger than you think. Before you know it, you clogged the network and pissed off everyone, and worst of all, they don’t know how to let you know about it or to shut you out. All they get is your message, one after the other, like an acid drip that just won’t stop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*khbAsDkrSve993lDxdmHoA.gif" /></figure><p>At the same time, what if you’d like to trigger reorgs of your network to make it easier to communicate with distant peers (in terms of number of hops)? And get them some messages in time? We’re going to cover all this.</p><p>Before we get started, please consider reading the <a href="https://www.gsd.inesc-id.pt/~ler/reports/srds07.pdf">Plumtree paper</a>. Otherwise not much of what follows will make sense to you. If we’re both going to pretend you read it, here are some coping strategies:</p><ul><li>Print it on tissues so you can read it, one sentence at a time, when you blow your nose.</li><li>Print it on cotton. Make a pillow of it. Many pillows even. Then splurge on Plumtree whenever you have TV night.</li><li>Note that paper is from 2007 and people must have come up with something better. Become outraged that the author of this article came up with such an old paper for what is a seminal topic, well-researched by academics. Get an acm.org membership. Research the subject. Map out all papers about it. Eventually take to Twitter and in 2 tweets put an end to this author’s career, bringing an end to his indigence in fact checking.</li><li>Live tweet the whole paper, one paragraph at a time. Add comments in the voice of Bob Ross or Neil de Grasse Tyson.</li><li>Or read below the cliff notes, which won’t replace reading the paper:</li></ul><p>Plumtree: A bunch of peers get connected. They send each other messages. You send to everyone. You get a new message, you broadcast to everyone (except the sender, doh). Eventually some of them reply to you saying, “hey, I got it already, thanks” and let you know to just send a signature or hash of the message going forward. But sometimes their paper boy is late, they don’t get the right news with Fox, so they come back and say “hey, thanks for that hash, can you give me the full message again?” in which case you start sending them full messages again.</p><p>Plumtree has been equated to epidemic broadcast trees. It allows the network over time to get better at circulating messages. And we’re going to riff on it through this whole post.</p><p>A few definitions for you, dear reader:</p><ul><li>Full message: all the bytes of the original message, as the sender intended.</li><li>Headers: the hash of the message, possibly signed by you (spoiler), so they can check they got it. Others call those attestations or metadata.</li><li>Eager peers: the unfortunate peers that get your whole messages.</li><li>Lazy peers: the peers who get just the headline, ie the signature or hash.</li></ul><p>OK, that was the hard part. Now let’s engage on the standard components of NTB-G.</p><h3>Identity through handshake</h3><p>First and foremost, you have to have some notion of identity. Take any peer-to-peer system; it’s usually a public key. And to show that you have the private key somewhere, you use that public key as part of the handshake process, meaning when you first connect to a peer. This notion of identity is going to be helpful down the road.</p><p>Note what we didn’t say: You can implement a system where your software has more than one identity. Actually that sounds fun. You can change your identity as often as you like. More power to you.</p><h3>Rate limiting</h3><p>You’re in this beautiful new world of peer-to-peer communications, and looking forward to blasting your entire collection of genuine gifs of german metal bands. But here’s the thing, not everybody likes your content or is even looking for it.</p><p>So they are going to apply rate limiting, which means they will slow down pushing or outright stop passing around your message if you send more than your quota. Here’s how it works:</p><p>We’re going to define a window of time relative to the two peers. Note we don’t use clocks, because clocks never work across computers very well. We’re going to apply a sliding window of time, defined usually in seconds, for how many messages we’re going to deal with from you. We’re going to allow a certain number of full messages, and an even greater number of headers. This way, if you all of the sudden have a million messages to send, you can first send all the full messages you are allowed, and then start sending headers.</p><p>We set those parameter limits at handshake time. This is important, because it gives you an idea of the throughput your peer can experience on the network — and therefore you know how many peers you’ll need.</p><h3>Blacklist</h3><p>If your node goes over the limits, the peer may decide to blacklist you. That’s pretty harsh. It means you get disconnected from the peer, and cannot reconnect, for a period up to the peer (and not advertised, so you can’t really guess or play it).</p><h3>New rules in NTB-G</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H7ecOyKJNTn2p891sROHSg.jpeg" /></figure><p>o far, we haven’t defined anything groundbreaking, so let’s go and play with our parameters a bit.</p><p>New rule:</p><ul><li>We are going to add metadata to each message, full or headers.</li><li>The metadata is the trail of the peers the message went through (or just a counter if you’re constrained for size). Each peer is signing the message with their pub key (including the previous metadata), so you can verify it’s legit.</li><li>We’re going to create a notion of max hops for the messages. We’ll go into that some more.</li><li>And we’re going to add, optionally, that any message can have a target or a trail of peers as targets.</li></ul><p>Let’s unpack.</p><p>First, during handshake, you add two new limits: the number of hops for full messages, and the number of hops for headers. Hopefully you’re more likely to keep repeating headers more than full messages, so your max hops for headers should be much higher than the max hops for full messages. Then, when your node receives a message, it verifies the validity of the message by checking the last peer signed it properly and signs it. It checks the list of peers — anybody blacklisted in there? If yes, your peer may decide to stop right there and then and stop propagating the message.</p><p>Your node changes the message to sign it with its own public key — you know the one we talked about earlier? Your node then sends the new message to all its eager peers and sends the headers to all lazy peers — just like Plumtree intended.</p><p>With a twist..</p><p>By counting the trail of peers or looking at the counter, your node may decide to stop propagating a message if it reached the maximum number of hops. Your node can stop propagation. In the case of a full message, it can switch over to headers and send them instead.</p><p>If the node gets headers and wants the full message, it can request the full message from the sender of the message, which may pass it back along. Note in that case you embed the path into the request, and any peer in that path with the full message can stop the request and send back the message.</p><h3>Routing optimization #1</h3><p>Now you’ve got a system where peers talk to each other, and have a remote idea of how they’re tied together. So as part of that request for a full message, your node may also give its personal information (“here’s my number”). That allows any remote peer in the trail to opportunistically connect directly, if that makes sense (and it does, here’s a distant peer who wants your message, you should optimize routing for them).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*WrBCbG9eJrtKo7iTyuxaCA.gif" /></figure><h3>Routing optimization #2</h3><p>A full message comes in, and you send to all your peers. Well, not the sender, right? You can also look at all the peers the message went through. If any of them are your peers, you can avoid sending them the full message. Send them the header’s message instead.</p><h3>Routing optimization #3</h3><p>You get a message, and it’s intended for a specific peer. It’s one of your peers. You send it to that peer and you stop propagating the message once you get an ACK back (or none, I never said we had to be transactional about this). You get a message and it’s for <em>you</em>. You don’t send that message to everyone you know.</p><h3>Gossiping as a gateway drug</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLfPaxfj91SF0iuIi_i6wA.jpeg" /></figure><p>Gossiping is noisy and messy. So sooner or later, you should specialize your comms. While it’s ok to blast everyone with consensus related info, it’s likely other peers will want to communicate with you directly. This type of reallocation of connections allows just that.</p><p>Step 1: send all your peers a free sample</p><p>Step 2: watch them send back a response asking for the real thing, alongside their connection info</p><p>Step 3: connect to them, either directly and/or gossiping over other peers (think TCP holepunching). You can encrypt messages using their public key if you feel particularly shy.</p><p>Step 4: Profit?</p><h3>In conclusion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*RllJ1pwI3JEIOQ7HdtuaKg.gif" /></figure><p>In this blog post, I outlined some ramblings I had with Dean over Telegram and HackMD. We want to allow gossip communications to be resilient to spam, so we introduced rate limiting, and realism to the way they propagate to the network (gotta stop at some point). By introducing those limits, we discover new fun ways that allow us to optimize routing messages, which may make the system more viable under load with many, many participants.</p><p><em>Originally published at </em><a href="https://whiteblock.io/no-tag-back-gossiping/"><em>https://whiteblock.io</em></a><em> on Dec 11, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8b99906e891" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/no-tag-back-gossiping-c8b99906e891">No-Tag-Back Gossiping</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Maintaining Apache Tuweni — the 6 months mark]]></title>
            <link>https://medium.com/whiteblock/maintaining-apache-tuweni-the-6-months-mark-a4853813ffe7?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/a4853813ffe7</guid>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[open-source]]></category>
            <dc:creator><![CDATA[Antoine Toulme]]></dc:creator>
            <pubDate>Mon, 02 Dec 2019 15:59:25 GMT</pubDate>
            <atom:updated>2019-12-02T17:36:57.928Z</atom:updated>
            <content:encoded><![CDATA[<h3>Maintaining Apache Tuweni — the 6 month mark</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*bQ192hC6IFURf6QZ2x8waw.png" /></figure><p>I have maintained in one form or another open source for close to 10 years.</p><p>I recently helped form the <a href="https://tuweni.apache.org">Apache Tuweni project</a>, and the project is slowly making its way through the baptism of fire of issuing <a href="https://github.com/apache/incubator-tuweni/releases">its first releases</a> and reaching complete legal compliance.</p><p>Along the way, I get asked by other developers what this project will become and how long I will maintain it.</p><p>I find both questions incongruous. While I happen to have been around to push the project to the ASF, I don’t have a leadership position and I certainly don’t dictate a roadmap. All I can do is put my best code forward and review contributions from others to make the project a success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*mOrFg8baBiUlu4Uq-TIX7A.jpeg" /><figcaption>Your patch is important. We will be right with you.</figcaption></figure><p>As for my role as a maintainer, I certainly plan to maintain the project forever. That however doesn’t mean what folks in traditional software development projects imagine. Everything I do is under my own time on a best effort basis, with no guarantee of quick fixes, or a rapid response on the lists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-I5arIyDF-IMe-DMQCtqng.gif" /><figcaption>Let a thousand flowers bloom</figcaption></figure><p>It’s not what you think. It’s never about code. My measure of success is to see the code of Apache Tuweni used elsewhere and allowing a thousand flowers, or p2p apps, to bloom. What is absolutely critical to me is to foster adoption and grow a community of developers and projects using this code — already spotted in the wild several times!</p><p>One of the greatest barriers of Tuweni to succeed is to encourage users, contributors and the community at large to communicate and start building things together. It looks like email in 2019 is just not cutting it anymore. Not one contributor or user used email to reach out, preferring Keybase, Telegram or Twitter.</p><p>It also looks like reassessing how the projects runs and <a href="https://www.apache.org/theapacheway/">the ideals of the Apache Way</a> need to be explained to new entrants. Amazingly, the blockchain crowd seems to lack understanding of open source old beards like me have been accustomed to. I have been enjoying a regimen of legal advice, patent troll encounters, copyright vs license discussions and even a taste of various open source foundations models to situate myself. I feel like this is lost on the new generation.</p><p>I’m excited for the future of this project. We have at hand the ability to unleash ground breaking, peer to peer applications that will reshape Internet. <a href="http://tuweni.apache.org/community/">Join us!</a></p><p><em>Originally published at </em><a href="https://whiteblock.io/maintaining-apache-tuweni-the-6-month-mark/"><em>https://whiteblock.io</em></a><em> on Dec 2, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4853813ffe7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/maintaining-apache-tuweni-the-6-months-mark-a4853813ffe7">Maintaining Apache Tuweni — the 6 months mark</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[High Availability in Distributed Systems]]></title>
            <link>https://medium.com/whiteblock/high-availability-in-distributed-systems-2d3325e4ee33?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/2d3325e4ee33</guid>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[high-availability]]></category>
            <dc:creator><![CDATA[Antoine Toulme]]></dc:creator>
            <pubDate>Tue, 26 Nov 2019 14:01:04 GMT</pubDate>
            <atom:updated>2019-11-26T14:01:04.152Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iqoLCgRmHhJ2N66efFN7Zw.png" /></figure><p><em>This article was a collaboration between </em><a href="https://medium.com/u/9e3f4ade4009"><em>Antoine</em></a> <em>and Kevin (</em><a href="https://medium.com/u/39d1dce2815c"><em>Bapecoin</em></a><em>).</em></p><h3>Definition of high availability</h3><p>High availability (HA) can be achieved when systems are equipped to operate continuously without failure for a long duration of time. The phrase suggests that parts of a system have been thoroughly tested and accommodated with redundant components to remain functional when a failure occurs.</p><p>Numerous modern applications are often distributed and cloud-based. Highly-available architectures facilitate scaling in order to meet demand and make them more resilient to failure. These applications usually have frequent deployments. The increased amount of moving parts during this process also increases the risk of something going wrong. To meet these challenges, application and infrastructure teams may adopt a deployment strategy suitable for their use case such as Blue-Green or Canary deployment. However, we will not be discussing high-availability as part of the development process in this article.</p><h3>History of HA and when it became important</h3><p>HA is a relatively new term that matches the expansion and professionalization of Web 2.0 companies. Back in 2004, it was common to take down websites for maintenance. The story of how HA became important is synonymous with the story of distributed databases. Historically, a database was either up or down, there was no such thing as a partial failure. As the internet was adopted globally, downtime began to directly impact users and business. Concurrently, there was a disconnect between development and operation teams. They worked as two independent squads, each with its own objective. Operators had little understanding of the code base and developers had little understanding of the operational practices. Developers were concerned with shipping code and operators were concerned with reliability.</p><p>This lack of communication between teams impacted the product and ultimately, end users. Since reliability is the single most important feature of any system today, a set of practices and culture coined as DevOps was created to improve communication and build better products. It subsequently became one of the most critical positions in every company, along with Site Reliability Engineers. The SRE role is a very opinionated concrete implementation of DevOps principles. Without reliability, users will not trust the system and thus not use it, leaving organizations with an expensive system that’s useless.</p><h3>HA in traditional client-server architecture</h3><p><strong>Middleware HA — load balancer<br></strong>A number of high-availability solutions exist such as load balancing and basic clustering. Load balancing also known as horizontal scaling can be achieved by adding new nodes with identical functionality to existing ones, redistributing the load amongst them all. By exclusively redirecting requests to available servers, reliability and availability can be maintained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*NjGWtbBRtxXUVe_O.png" /></figure><p><strong>Database master/slave set up<br></strong>Other solutions such as PostgreSQL Master-Slave architectures enable us to maintain a master database with one or more standby servers ready to take over operations if the primary server fails. Replication is established between the master and slave via SQL statements or via internal data structure modifications. When a main server fails, a standby server that is now equipped with almost all of the data of the main server can swiftly act as the new master database server.</p><p>Learn more at the official PostgreSQL site, <a href="https://www.postgresql.org/">https://www.postgresql.org/</a>.</p><p><strong>Database clustering<br></strong>A data cluster is when multiple nodes or instances connect to a single database. Database clustering enables redundancy, availability, scalability and monitoring. Several tools from IBM and Oracle exist to manage a variety of configurations that can be used to provide high availability. For example, if a node or Oracle instance process fails in an Oracle RAC configuration, other Oracle instances can provide service as they have access to a common database file system across <em>interconnect, </em>a private high-speed network for messaging between nodes.</p><h3>NoSQL revolution towards modern web architecture</h3><p><strong>MongoDB</strong><br>Different database technologies have been developed in response to a rise in volume of data stored about users, objects and products. To handle the scale and agility challenges that face modern applications and capitalize on the cheap storage and processing power available today, architectures like MongoDB’s sharded cluster were developed. This architecture consists of three main components: a shard, mongos and config servers. A shard is a replica set or a single Mongod instance that holds the data subset used in a sharded cluster. If you directly connect to a shard, only a fraction of the data contained in a cluster can be viewed. Consider deploying a sharded cluster when your system’s dataset outgrows the storage capacity of a single mongodB instance otherwise it will add unnecessary complexity.</p><p>Learn more about MongoDB’s sharded clusters here: <a href="https://docs.mongodb.com/manual/core/sharded-cluster-components/">https://docs.mongodb.com/manual/core/sharded-cluster-components/</a></p><p><strong>Cassandra<br></strong>Apache Cassandra is another notable example of a “NoSQL database.” By using the peer to peer gossip communication protocol, Cassandra enables every node in the cluster to communicate state information about itself and other nodes.</p><p>More details can be found in the official documentation here:<a href="http://cassandra.apache.org/">http://cassandra.apache.org/</a>. It’s also important to point out that Cassandra is a distributed open source database so we encourage you to contribute as well.</p><p><strong>ElasticSearch</strong><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html"><br></a>Equipped to handle large amounts of data, ElasticSearch is an open source analytics and full text search engine. It’s often used to enable search functionality for web applications as well. It does this by facilitating shard allocation and cluster-level routing. Indexes are split into shards and every shard is a self contained instance of Apache Lucene. Shards are spread across multiple nodes so when more capacity is needed, one can simply add more machines so that the load can be spread more efficiently. By communicating what document you’re interested in with a given server on your cluster for ElasticSearch, it can hash that into a particular shard ID. A mathematical function is performed that can very quickly figure out which shard owns the queried document.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*0hn116qThOR9C2XV.png" /><figcaption>Sundog Education with Frank Kane</figcaption></figure><p>In the example above we can view how ElasticSearch maintains resilience to failure. If node 1 fails we’ll lose primary shard 1, and replica shard 0. If this took place, ElasticSearch would elect one of the replica nodes on 2 or 3 to be the new primary. We can then continue to service read requests and accept new data.</p><p>Learn more at <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-cluster.html">Elastic.co</a>.</p><p><strong>Redis<br></strong>Redis cluster is a data sharding solution with automatic management, failover and replication. In cluster mode all nodes are communicating with each other. Note that every redis cluster node requires two TCP connections open, the standard Redis port used to serve a client plus the port obtained by adding 10,000 to the TCP port. “Redis Cluster uses a master-slave model where every hash slot has from 1 (the master itself) to N replicas (N-1 additional slaves nodes).” In the example below, there is a cluster of three masters, A, B, C, each with 1 slave used to replicate each master. The final cluster is then composed of A, B, C that are masters nodes, and A1, B1, C1 that are slaves nodes, the system is able to continue if node B fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*wBMG68jEZFmQyk2s.png" /></figure><p>Learn more at Redis.io: <a href="https://redis.io/topics/cluster-tutorial">https://redis.io/topics/cluster-tutorial</a>.</p><h3>Big Data and high throughput systems</h3><p><strong>Apache Kafka<br></strong>Streaming technology processes new data as it’s generated into your cluster. Instead of dealing with it in batches, big data can be handled in real-time and published directly to your cluster. Kafka streams is an easy data processing and transformation library that offers data parallelism, distributed coordination, fault tolerance, and operational simplicity. Kafka servers can be set up so that they store messages from publishers and publish them to anyone that wants to consume them. Messages are associated with topics and they represent a specific stream. A consumer subscribes to one or more topics and receives data as it’s published. Kafka can then be spread out on a cluster of its own avoiding a single point of failure. Multiple servers can then run multiple processes and distribute the storage of the data on your topics and the processing of all the producers and consumers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*1FcQ-EqQDd8F0fwj.png" /></figure><p>- The anatomy of an application that uses the Kafka Streams library. (kafka.apache.org)</p><p>Learn more at <a href="https://kafka.apache.org/23/documentation/streams/architecture">https://kafka.apache.org/23/documentation/streams/architecture</a></p><p><strong>Apache Spark</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*SZj9v4ffUCn4SKeW.png" /></figure><p>The Spark framework is used for the distributed processing of large datasets. A driver program is developed and built around the SparkContext object. A cluster manager is ran on top of that which is responsible for distributing the work defined by the driver script among multiple nodes. The node might have an executor process with its own cache and list of tasks which is then given back to the cluster manager which is responsible for deciding what happens next.</p><p>Learn more at <a href="https://spark.apache.org/docs/latest/cluster-overview.html">https://spark.apache.org/docs/latest/cluster-overview.html</a>.</p><h3>Distributed systems</h3><p><strong>Bitcoin and Ethereum clients<br></strong>Blockchain technology has changed the way we think about data and privacy. Notably, blockchains allow all actors on the network to have access to the entire data set on their computer. Ethereum is a distributed public blockchain network like Bitcoin, however, they have different purposes and capabilities. In both cases, the nature of this distributed network enables high availability. If one node fails, all of the other nodes in the network are equipped with the full data set, therefore bringing down the network would require bringing down every node providing computation power.</p><p><strong>Light clients and quick response time<br></strong>Light clients expose a browser to the web3 interface that allows decentralized applications to access the Ethereum network or other distributed systems. These are useful if one is operating under volume constraints. In order to achieve quick response time light clients do not interact directly with the blockchain. Instead, they use full nodes as intermediaries. Another advantage is that it takes significantly less resources and storage in comparison to running a full node to run a light node without comprising that much security. Currently, Parity Ethereum and Geth are the most popular light clients. As mentioned by the Parity team, “They help users access and interact with a blockchain in a secure and decentralized manner without having to sync the full blockchain.” Learn more about light clients here: <a href="https://www.parity.io/what-is-a-light-client/">https://www.parity.io/what-is-a-light-client/</a></p><p><strong>The future of HA<br></strong>The emergence of blockchain technology and development of distributed systems has introduced several capabilities that we’re still creating use cases for. Today, mobile applications can run offline. As the demand for highly available applications increases, offline applications like Scuttlebutt are redefining the term itself. Unlike Twitter or Discord, there is no social separation created by those who run servers and those who use the application. Instead, every user runs the application directly on the device. There are some tradeoffs as messages can only be passed directly between friends via peer-to-peer. As we contemplate the future of high-availability, it’s a good idea to take a closer look at events such as Fortnite’s final showdown. The entire game was down and although no one could play, millions still remained connected waiting for the rumored new map to be uploaded. This poses the question — is high availability the end all goal?</p><p><em>Originally published at </em><a href="https://whiteblock.io/high-availability-in-distributed-systems/"><em>https://whiteblock.io </em></a><em>on November 25, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d3325e4ee33" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/high-availability-in-distributed-systems-2d3325e4ee33">High Availability in Distributed Systems</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sharding in Distributed Systems]]></title>
            <link>https://medium.com/whiteblock/sharding-in-distributed-systems-29ba2f7f135b?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/29ba2f7f135b</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[sharding]]></category>
            <category><![CDATA[p2p]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <dc:creator><![CDATA[Zak Cole]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 19:54:20 GMT</pubDate>
            <atom:updated>2019-10-24T16:08:29.329Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z7dyuXLe3hPo4LH4zbOFWA.jpeg" /><figcaption>image credit to Devvio: <a href="https://devv.io/">https://devv.io/</a></figcaption></figure><p>While the concept of sharding as a scaling solution has been a hot topic in the Ethereum community for a while now, it’s important to understand that this sort of database architecture isn’t specific to blockchain technology. Computer nerds haven’t shut up about this pattern for quite some time as a method of improving performance, increasing availability, and ensuring the redundancy of data. In this article, we’re going to provide a high-level overview for sharding as a database architecture within distributed systems to help understand how it can be applied to build more performant blockchains in the future.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*RgdYoQ62zF0LCXGnQI7qRg.png" /><figcaption>A disheartened Vitalik shares his valuable insight during the peak bull market.</figcaption></figure><h3>How does one shard?</h3><p>Sharding is a computational storage technique in which large independent datasets are broken up into smaller units that are easier to manage. Doing so ensures a certain degree of data redundancy as well as an increase in overall performance. For example, handling all of the data required of a search engine within a single database may not be the most practical solution and if this data only exists on a single storage device, it can be easily lost or corrupted should the system encounter some degree of failure.</p><p>In the event a single node fails, replicated chunks of data can be retrieved and consolidated — mitigating risk because redundant data exists across a cluster of separate nodes. While one of the design motivations within distributed systems is to reduce single points of failure, <a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">“almost all modern databases are natively sharded. Cassandra, HBase, HDFS, and MongoDB are popular distributed databases.”</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*p-CvRzFdJYjprZ9qvEH03g.jpeg" /><figcaption>Sharding made Ultima Online one of the greatest MMORPGs in the history of video games.</figcaption></figure><p>This database architecture pattern has been in use for quite some time, which explains how video games can handle millions of players simultaneously. Sharding is also referred to as <em>horizontal partitioning</em> — the practice of separating one table’s rows into multiple different tables across different machines. By distributing the data among multiple machines, a cluster of database systems can store larger datasets and handle additional requests. The data held in each shard is unique and independent of the data held in other partitions. They also don’t share any of the same computing resources and this increases the degree of fault tolerance.</p><h3>Pros &amp; Cons</h3><p>An advantage of sharding is that it can assist in <em>horizontal scaling</em>, also known as <em>scaling out</em>. In distributed system architecture, horizontal scaling means adding more computers rather than upgrading the hardware of a single one in order to efficiently scale and increase query speed. <a href="https://blog.wallaroolabs.com/2018/11/horizontal-scaling-reasons/">“Adding more nodes to better cope with failures is often called “high-availability” or “HA.”</a> There’s no cap on how big you can go — whenever performance degrades you simply add another machine.</p><p>Depending on an unsharded database means that a failure can potentially make your entire application unavailable. With a sharded database, however, a failure affects one shard. If a shard is affected, it can still become unavailable, but the event will impact fewer users in comparison to a complete database outage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*Pe_0xr7iaaMmsP7nhNc9jg.jpeg" /><figcaption>image credit to xkcd at <a href="https://xkcd.com/1718/">https://xkcd.com/1718/</a></figcaption></figure><p>Sharding isn’t a magic band aid though and there are still some drawbacks of If there is an imbalance in data accrual, one of your shards can become what’s known as a <em>database hotspot</em>. For example, let’s say you have a database with two separate shards, one for customers whose date of births range from 1950 through 1980 and another for those whose date of birth range from 1981 through 2001. If your application serves an inordinate amount of people who were born in 1993 the shard that stores data ranging from 1981 through 2001 will accrue more data than the 1950–1980 one, causing a significant lag or crash for a large portion of your users.</p><h3>Sharding Methods</h3><p>There are also a number of different sharding methods, such as key based sharding and range based sharding. <em>Key based sharding</em> is the same as <em>hash based sharding</em>. This occurs when a value taken from newly provided data, like a customer’s ID number, email address or ZIP code, for example, is interpreted by a <em>hash function</em> to determine which shard the data should be stored in. A hash function takes as input a piece of data and outputs a discrete value, known as a <em>hash value</em>. “In the case of sharding, the hash value is a shard ID used to determine which shard the incoming data will be stored on.”</p><p>Another method called <em>range based</em> <em>sharding</em> is easier to implement, which can make it an attractive option initially, however, this method won’t prevent database hotspots. The application code can be as simple as reading which range the new data falls into and stores it in the corresponding shard. Unfortunately, if you have a range of products priced between $1–10 in one shard and another priced $11–20, you run the risk of having an uneven distribution of data in a specific shard if a product in one of the two ranges happens to be more popular. Only fine grained partitions can reduce hotspots like these.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHQ_L2bXHCE2IRxGFS7csw.png" /><figcaption>Blockchains = Money Legos</figcaption></figure><h3>Blockchain Sharding</h3><p>Today, blockchain protocols like Ethereum are researching how to leverage a scaling solution by using sharding as a scaling solution to increase the amount of transactions per second the system can process as well as the amount of computational power it requires. Implementing these techniques within a decentralized P2P network, however, presents some unique challenges.</p><p>A lot of contemporary blockchain projects, including Ethereum, want to leverage sharding in order to transition from a reliance on one primary blockchain to multiple relatively autonomous blockchains that can interoperate and communicate between one another. By leveraging sharding methods within these systems, blockchain can potentially scale to meet the growing demands of future users. <a href="https://blockonomi.com/sharding/">“This attempt at state sharding for a vast, decentralized network is an impressive endeavor and will be an enormous feat of accomplishment if successfully implemented.”</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uJNFaW0pIIfIgUwUwAPfkg.jpeg" /><figcaption>Wow, edgy.</figcaption></figure><h3>Say it one more time.</h3><p>Sharding can add a great deal of complexity to your application’s storage workflow, but it’s a powerful tool for scaling and can provide long-term benefits. Nonetheless, sharding is usually considered after an application has outgrown simpler methods of storing data. Along with complexity, it can add more points of failure if not implemented correctly. <a href="https://www.digitalocean.com/community/tutorials/understanding-database-sharding">“Some see sharding as an inevitable outcome for databases that reach a certain size, while others see it as a headache that should be avoided unless it’s absolutely necessary, due to the operational complexity that sharding adds.</a>” It’s usually recommended to exhaust all possible optimization options before considering a sharded architecture for your application’s data.</p><p><strong>References:<br></strong><a href="https://www.digitalocean.com/community/tutorials/understanding-database-sharding">https://www.digitalocean.com/community/tutorials/understanding-database-sharding</a></p><p><a href="https://techterms.com/definition/partition">https://techterms.com/definition/partition</a></p><p><a href="https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6">https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6</a></p><p><em>Originally published at </em><a href="https://whiteblock.io/sharding-in-distributed-systems/"><em>https://whiteblock.io</em></a><em> on October , 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29ba2f7f135b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/sharding-in-distributed-systems-29ba2f7f135b">Sharding in Distributed Systems</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whiteblock at Devcon 5]]></title>
            <link>https://medium.com/whiteblock/draft-1-5c6b272556e9?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/5c6b272556e9</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[whiteblock]]></category>
            <category><![CDATA[devcon5]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Antoine Toulme]]></dc:creator>
            <pubDate>Fri, 18 Oct 2019 14:47:46 GMT</pubDate>
            <atom:updated>2019-10-25T19:32:01.888Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*noWCD9sToH17ep5B.jpg" /></figure><p>Just last week, Whiteblock attended Ethereum’s premier community event, <a href="https://devcon.org/">Devcon 5</a>. This year saw over 3,000 crypto folks descend on Osaka, Japan for a week of technical talks and workshops largely aimed at developers. Myself, Rene and Trent represented the rest of the Whiteblock team, who have been heads down working on Genesis, our distributed systems testing platform.</p><p>Read on for my retelling of event takeaways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LmkdDvPe_nm6GgSG.jpeg" /></figure><p><strong>Monday — before it happened</strong></p><p>We decided to meet and work and visit Osaka together. First stop was the fish market, where we ate at small stands all sorts of local delicacies: unagi, shrimp, salmon sashimi, tempura, tokoyaki — just hot enough to burn your mouth on. We then walked to a Hawaiian-themed cafe in the Dontonburi district. There we worked on slides and discussed the agenda. Later on, Oskar and Dean from Status joined us and we worked there until we were kicked out by the Japanese staff — probably for being too loud.</p><p>We proceeded to ramble down the busy street lined up with restaurants, taking a second to visit an arcade where we witnessed how staking works in real life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9-TLMT9hiQ90iQPU.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*n-g-Mu-77keYmeVU.jpg" /></figure><p>Dean saw a Gucci hat, but could not bring himself to buy it. Later during the conference, he would convert to a pink Andrew Yang hat, and a fancy cap from the Solana cycling team. We eventually went to a Yakiniku place where we all ate delicious meats and filled up on curry and rice. In the afternoon, we walked among the streets up to a Starbucks, where we worked some more, before heading to our respective hotels. Trent pushed to the venue and scoped out a few interesting elements.</p><p><strong>Day 1</strong></p><p>We showed up bright and early, and just a little jetlagged to a large labyrinthian conference hall. After multiple false starts, we found our way to a large hall where we found no coffee. We had been contacted the week prior to participate to a P2P summit, so we headed to B10. We sat down on the 3rd row. Little did we know that we’d be seated there, our mouths agape, for the next 4 hours.</p><p>We’re network geeks, and we saw some of the <a href="https://twitter.com/ponarunkumar/status/1181371998707994624">best projects out there</a> presenting in lightning talk format. It kept on piling on. We gave our own version — <a href="https://drive.google.com/file/d/1JGvc2PlUcTSFNC-iExFvmgSCkjWjswAR/view?usp=sharing">available here</a> — that we modified to give a nod to the previous talk by Matt Slipper on <a href="https://www.scuttlebutt.nz/">SecureScuttlebutt</a>. The last half hour was interesting as it showed a lot of convergence with all the actors in the space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bpPJwHUyC4pYPYI2.jpg" /></figure><p>In the afternoon, we started collecting stickers in the sponsor hall. We have quotas to respect and insatiable coworkers who need their fix. We met a lot of friends along the way. Rene and Trent also sat in on the ETH Magician’s Roadmap session for a few of the topics.</p><p><strong>Day 2</strong></p><p>Wednesday was keynote day. A combination of fervor, crowd size and <a href="https://twitter.com/internetarchive/status/1181738069747105793?s=20">loud drum noises</a> drove me out to safety and gave me the satisfaction of enjoying plenty of coffee right outside the doors. From there, meetings piled on, but I managed to squeeze some time to get into Raul’s excellent talk and showcase of libp2p documentation on gossipsub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rEPaQGGoZeo7m_FF.jpg" /></figure><p>I left the conference with the distinct impression that I’d lost a bone in my foot, which doubled as a stone in my shoe.</p><p><strong>Day 3</strong></p><p>We set out to be present for the ETH 2.0 client summit. where each of the clients would go one by one and explain their particulars. We particularly enjoyed the talks from <a href="https://twitter.com/trent_vanepps/status/1182098232454742017">Joe Delong</a> and <a href="https://twitter.com/_tmio/status/1182108125920292864">Preston</a>.</p><p>The one thing I asked during Q&amp;A: are we ready for the multi-client testnet? Can Whiteblock get started? We’ve been pushing hard on our gossipsub testing framework, and it’s about time we offer a proper CI/CD pipeline. We’ll talk more about this soon.</p><p>The afternoon was spent in countless meetings and demos, along with a few intriguing discussions along the way.</p><p><strong>Day 4</strong></p><p>Started the day listening to Alistair talk about Polkadot, which was awesome. Unfortunately, I had to exit the room and message Rene, as she was reporting her tram was blocked due to the typhoon preparations. It turned out to be a dud in the end. I then spent some time with Dmitryi trying to drink a weird beverage closed by a marble — a <a href="https://www.google.com/search?q=ramune+drink&amp;oq=ramune+drink&amp;aqs=chrome..69i57.1918j0j1&amp;sourceid=chrome&amp;ie=UTF-8">Ramune</a>. 3/10 I need drinks to not pull pranks on me.</p><p>We then went to a nice room with 40 wonderful folks here to learn about Ethereum 2.0 networking. Part of this is related to our grant work supported by the Ethereum Foundation and Consensys. We delivered a 20-minute presentation <a href="https://drive.google.com/file/d/1UhDfNp4KYoYGGpA6SLgSvndEKB6Oo4RW/view">available here,</a> followed by insightful questions from the audience. How has networking in ETH 2.0 came to be — maybe worth a story of its own. We also learned Trinity has a discv5 solution we can start testing!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*78LNTiEHi4wymN-g.jpg" /></figure><p>I ran for the fifth time to the sponsor hall, grabbed a libp2p T-shirt (thanks Raul!) and an Infura hoodie (yay Dani!). At the same time, I received a notification that my flight had been canceled. I therefore bought a set of tickets to SFO:</p><ul><li>KIX&gt;HND&gt;SFO (changing my return flight)</li><li>KIX&gt;TAO&gt;SFO (through Eastern China Airlines)</li><li>KIX&gt;TPE&gt;CDG (wrong direction, but I have to get to Paris soon anyway)</li></ul><p>While cooling my credit card on a pack of soba, I listened to the panel discussing the state of P2P.</p><p>Our last event during the venue’s closing hours was a workshop for the DevCon scholars (or like Coogan couldn’t stop himself saying, the kids).</p><p>My hat’s off to the organizers, the “kids” were energized and eager to learn. I bashed their brains with 40 minutes of content on our testing methods. Given the poor Wifi, we’ll need to follow up and give them access to our environment so they can run tests from there. We were excited to see them get it right away and ask insightful questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*63UYuRGC2Zm9b2hw.jpg" /></figure><p>On the steps of the venue, under a menacing sky, we bid adieu to each other.</p><p>Rene joined <a href="https://twitter.com/helsfoftroy/status/1182560491601686528">a techno parade</a> of Louis Vuitton models, Trent disappeared in the bowels of the crypto community, and I ran off to the station. From there, I took a Shinkanzen to Fukuoka, mostly standing for 4 hours. Fukuoka was just right outside the mess. The next day, I flew to Seoul, slept in the airport almost comfortably, and flew home after using my baggage allowance for duty free.</p><p>Thanks for reading along to the end. Our team had an amazing experience making new connections within the community, we’re already looking forward to Devcon 2020! For more recaps on the event, read <a href="https://twitter.com/LefterisJP/status/1182865924728086529">this summary</a> from Lefteris of Raiden. Or perhaps, a more <a href="https://coinjazeera.news/massive-hurricane-hits-devcon-5-as-god-attempts-to-rid-the-world-of-ethereum-community/">light-hearted take</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c6b272556e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/draft-1-5c6b272556e9">Whiteblock at Devcon 5</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum 2.0 Grant Update #2: Interop Lockin]]></title>
            <link>https://medium.com/whiteblock/ethereum-2-0-grant-update-2-interop-lockin-36b604c837fa?source=rss----946abab9582b---4</link>
            <guid isPermaLink="false">https://medium.com/p/36b604c837fa</guid>
            <category><![CDATA[consensys]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[interoperability]]></category>
            <dc:creator><![CDATA[Trenton Van Epps]]></dc:creator>
            <pubDate>Wed, 02 Oct 2019 15:11:19 GMT</pubDate>
            <atom:updated>2019-10-02T15:11:19.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NlbcQufNIM4qdWa6rcMRFQ.jpeg" /></figure><p><em>Written by Antoine, Rene, Daniel and Trent.</em></p><p><em>At the end of August, Whiteblock received a joint grant from the </em><a href="https://ethereum.org/"><em>Ethereum Foundation</em></a><em> and </em><a href="https://consensys.net/"><em>ConsenSys</em></a><em>. Read our </em><a href="https://whiteblock.io/whiteblock-receives-ethereum-foundation-grant-to-assist-with-ethereum-2-0-networking/"><em>blog post</em></a><em> for more details and find the official announcement from the </em><a href="https://blog.ethereum.org/2019/08/26/announcing-ethereum-foundation-and-co-funded-grants/"><em>EF here</em></a><em>.</em></p><p>In the second week of September, the ETH2 implementer teams met in Canada for the “Interop Lock-In”. This was a significant event in pushing the roadmap forward, with the end result being that all 7 client teams in attendance achieved interoperability. Check out detailed summaries from a few of the other teams:</p><ul><li>Ethereum Foundation Blog: <a href="https://blog.ethereum.org/2019/09/19/eth2-interop-in-review/">ETH2 Interop in Review</a></li><li>Prysmatic: <a href="https://medium.com/prysmatic-labs/ethereum-2-0-development-update-35-prysmatic-labs-d1f7515000cd">Development Update #35</a></li><li>Chainsafe: <a href="https://medium.com/chainsafe-systems/lodestar-post-interop-update-be2caebb39e6">Lodestar Post-Interop Update</a></li><li>Consensys, Ben Edgington: <a href="https://media.consensys.net/how-30-eth-2-0-devs-locked-themselves-in-to-achieve-interoperability-175e4a807d92">How 30+ ETH 2.0 Devs Locked Themselves in to Achieve Interoperability</a></li></ul><p>Antoine Toulme, Rene Lubov, and Daniel Choi were in attendance representing Whiteblock. We are very proud of what this collaborative effort was able to produce in a short time period, and anticipating continued progress in the near future. Thanks to Consensys for sponsoring and Joseph DeLong for organizing a great week.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8UK9CNxHFRkwxApy.jpg" /></figure><p><strong>Goals and Outcomes</strong></p><p>We went in with a list of goals that we wanted to hit. Central to this was getting individual clients to work properly within <a href="https://whiteblock.io/blockchain-testing-with-whiteblocks-genesis-platform/">Genesis</a>, our testing platform for distributed systems that allows the simulation of real-world network conditions and scenarios.</p><p>To accomplish this, we asked all client teams to write a simple bash script capable of starting up their clients and passing in five parameters:</p><ul><li>identity of the node</li><li>port to listen on</li><li>nodes to peer with</li><li>genesis state ssz file</li><li>validator keys yaml file</li></ul><p>Once clients were ready to go, we were able to kickstart test networks in Genesis. Check out the <a href="https://notes.whiteblock.io/EBV_n3b6SWy6GZ76ZrApmA">testing methodology + instruction </a>we developed during the week.</p><p>We had some issues with variations in private key formatting, file paths, working with outdated docker images or alpine-based images, and debugging. This last one due in no small part to the limited internet, but we pushed through.</p><p>At the end of the week, we were able to dockerize and build / append nodes in an agnostic environment. Prysm, Lighthouse, Harmony, and Trinity successfully peered with themselves in the platform. On top of that, these same clients peered with each other and started gossiping blocks and attestations, which was an awesome milestone to hit.</p><p><strong>Next steps</strong></p><p>We will continue working with client teams towards a successful 9-client testnet. Once short lived interop testnets are stable, our engineering team will iterate towards larger scale testnets, hosted through Genesis. This allows us to introduce impairments like latency, bandwidth, packet loss and more to fully stress test the clients. Stay on the look-out for an external roadmap in the next few weeks.</p><p>We’ve continued our work towards in-depth analyses of <a href="https://github.com/libp2p/specs/tree/master/pubsub/gossipsub">gossipsub</a>, the pubsub protocol used in Libp2p. This includes preparing how to test gossipsub per client, and trying to find any optimisations.</p><p>Rene, Antoine and Trent will be at DevCon in Osaka! We’re looking forward to meeting many of you in person. Rene and Antoine will be sharing a talk called “Networking in ETH2.0” on day four. Find the specifics and more talks at the <a href="https://devcon.org/agenda">DevCon agenda </a>.</p><p>Work continues on the joint grant we received from Consensys and the Ethereum Foundation. Here is the <a href="https://whiteblock.io/whiteblock-receives-ethereum-foundation-grant-to-assist-with-ethereum-2-0-networking/">initial announcement </a>and the <a href="https://whiteblock.io/ethereum-2-0-networking-grant-update-1/">first update </a>.</p><p><em>Originally published at </em><a href="https://whiteblock.io/ethereum-2-0-grant-update-2-interop/"><em>https://whiteblock.io</em></a><em> on October 2, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36b604c837fa" width="1" height="1" alt=""><hr><p><a href="https://medium.com/whiteblock/ethereum-2-0-grant-update-2-interop-lockin-36b604c837fa">Ethereum 2.0 Grant Update #2: Interop Lockin</a> was originally published in <a href="https://medium.com/whiteblock">Whiteblock</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>