<?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[Suredbits - Medium]]></title>
        <description><![CDATA[A Lightning application company building the future of data - Medium]]></description>
        <link>https://medium.com/suredbits?source=rss----57089e916479---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Suredbits - Medium</title>
            <link>https://medium.com/suredbits?source=rss----57089e916479---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 09:38:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/suredbits" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Crypto Hedging With Discreet Log Contracts]]></title>
            <link>https://medium.com/suredbits/crypto-hedging-with-discreet-log-contracts-aac180489710?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/aac180489710</guid>
            <category><![CDATA[suredbits]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[discreet-log-contract]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[crypto-finance]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Wed, 01 Apr 2020 19:40:15 GMT</pubDate>
            <atom:updated>2020-04-01T19:39:46.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0EOarSZtPp-U6XVn.jpg" /></figure><p>Investors trade options and forwards to make money. However, businesses use these financial instruments as a means to reduce and mitigate exposure to risks. The most common methods of are through derivative instruments such as swaps, futures and options.</p><p>As we have written previously, <a href="https://medium.com/@gertjaap/discreet-log-contracts-invisible-smart-contracts-on-the-bitcoin-blockchain-cc8afbdbf0db">Discreet Log Contracts </a>(DLCs) can offer some novel opportunities for hedging risk unique to the crypto economy. Specifically, for <a href="https://suredbits.com/discreet-log-contracts-blockstream-crypto-garages-contract/">mining operations and block fees.</a></p><p>A Discreet Log Contract is a “simple” oracle contract scheme proposed by <a href="https://adiabat.github.io/dlc.pdf">Tadge Dryja of MIT </a>. DLCs can be executed using almost any blockchain, including Bitcoin. An oracle contract starts with users locking up the funds involved. Then those funds are spent based on some external outcome broadcasted by an oracle.</p><p>Here is a quick review of some possible hedges using Discreet Log Contracts:</p><ul><li>Total Transaction Fee Levels — This is a hedge by exchanges- or anyone — looking to move large amounts of bitcoin. We know increase as the volume of bitcoin increases and if you are moving your funds on-chain, it can make sense to hedge against high fee periods.</li><li>Hash Rate Derivative — As it becomes increasingly difficult and expensive to mine bitcoin, mining operations could hedge to protect against potential downside and risk of their infrastructure investments becoming obsolete. Additionally, the ability to hedge this risk could have upstream benefits in the amount of risk capital necessary to begin mining operations.</li><li>Energy Pricing Hedge — Mining bitcoin consumes a lot of energy. A contract could be constructed that enables miners to hedge — using bitcoin — against rising energy costs.</li></ul><p>Creating these types of crypto industry specific financial products would have benefits beyond mitigating risks.</p><p>It would incentivize additional capital into the bitcoin market as more investors and speculators trade for profit. And as with any market, the smarter and more savvy the investor, the more profit they stand to gain. The person or group that understands energy markets and bitcoin production best, will have an advantageous position in that market.</p><p>Moreover, the greater crypto market as a whole benefits by the creation of additional liquidity and greater price discovery.</p><p>Consider blockchain fees. We are currently in a low-fee environment. But we have seen when congestion hits that fees can spike rapidly — as high as $37.00 in December of 2017. Also consider more and more funds being moved on-chain. This will result in greater competition for transaction confirmation in the next block. Thus, higher fees. We also know that fees must go higher in order for the bitcoin blockchain to sustain its security model.</p><p>It isn’t far fetched to believe fees could reach into the hundreds of dollars — or more — as they compete for confirmation in an increasingly more expensive mining process.</p><p><a href="https://suredbits.com/crypto-hedging-with-discreet-log-contracts/#why-discreet-log-contracts"><strong>Why Discreet Log Contracts?</strong></a></p><p>With DLC hedges, individual investors, miners and speculators can protect against the volatility of both of these factors i.e. transaction fee movements as well as mining costs. This can bring critical stability to a growing network of global, decentralized yet interconnected actors in the crypto economy.</p><p>While the launch of Bitcoin Options and Futures on and offer more hedging options available through traditional exchanges, Discreet Log Contracts offer some unique advantages.</p><p>With Discreet Log Contracts, crypto investors can speculate while taking advantage of the <a href="https://suredbits.com/discreet-log-contracts-part-4-security-and-trust-model/">privacy and security </a>offered by bitcoin. DLCs are designed to minimize the trust required to execute a transaction between parties. Likewise, it extends by essentially obscuring from external parties that two parties are contracting at all. We wrote an extensive review of the DLC security and trust model you can read .</p><p>Further, DLCs offer almost unlimited flexibility and extensibility. All that is required from a technology perspective are <a href="https://suredbits.com/discreet-log-contracts-part-3-why-they-are-great/">multi-signature contracts and timeouts </a>. This means any blockchain and layer 2 solution can create a contract from a single Oracle. The result is a larger pool of market participants and greater opportunity for profit-making, risk mitigation and price discovery.</p><p>If you are interested in learning ore about Discreet Log Contracts, check out our full Discreet Log Contracts series <a href="https://suredbits.com/category/discreet-log-contracts/">here</a> for additional background information and in-depth technical analysis.</p><p>Contact us <a href="https://twitter.com/Suredbits">@Suredbits</a></p><p>Contact <a href="https://twitter.com/GOdansmith">Dan</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><p><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></p><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/crypto-hedging-with-discreet-log-contracts/"><em>https://suredbits.com</em></a><em> on February 6, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aac180489710" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/crypto-hedging-with-discreet-log-contracts-aac180489710">Crypto Hedging With Discreet Log Contracts</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lightning 201: Lightning Latency — Suredbits]]></title>
            <link>https://medium.com/suredbits/lightning-201-lightning-latency-suredbits-65f1ef8b1cb4?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/65f1ef8b1cb4</guid>
            <category><![CDATA[crypto-exchange]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency-news]]></category>
            <category><![CDATA[lightning-201]]></category>
            <category><![CDATA[lightning-network]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 16:17:05 GMT</pubDate>
            <atom:updated>2020-02-06T16:16:52.823Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lightning 201: Lightning Latency</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E2SvMbc9r333w9Lr.jpg" /></figure><p>In previous Lightning 201 articles we have written about changing how our Lightning nodes database works. Currently both Eclair and C-lightning use a SQLite3 database by default to store information related to their channels. Since SQLite cannot be used as a remote database, we added support for <a href="https://github.com/ACINQ/eclair/pull/1249">PostgreSQL in Eclair </a>.</p><p><a href="https://suredbits.com/lightning-201-high-frequency-trading/">High Frequency Trading</a></p><p><a href="https://suredbits.com/lightning-201-safely-accessing-remote-lightning-databases/">Safely Access Remote Lightning Databases</a></p><p><a href="https://suredbits.com/failover-strategies-for-lightning-nodes/">Failover Strategies For Lightning Nodes</a></p><p>The next question is; what is the performance impact of switching to a different database?</p><p>Lightning is meant to be a fast way to send bitcoin between two parties. At Suredbits we think a successful use case for Lightning will be high frequency trading in cryptocurrency. Performance matters with trading software, so we thought we would begin benchmarking Eclair to get an idea of its performance profile.</p><p>The latest release of eclair as of this writing is which is what we are using to benchmark. Our code that we are using for PostgreSQL support is an open PR on eclair. It can be found .</p><h4>Setup</h4><p>This benchmark involves 11 eclair nodes. 10 of these nodes are attempting to send 2,000 payments to one node. It is important to note that all of the nodes and their respective databases were on one machine. There is no network latency simulated in this benchmark. There are two types of network latency to be worried about with a lightning node:</p><ol><li>Latency between peers</li><li>Latency between the node and the database</li></ol><p>We expect that network level latency would dominate any “real world” payment. Database latency will not be an issue if your database is local, if it is remote you should make sure that the node and database are not too far apart geographically.</p><p>Each node only has one channel open with the destination, therefore all payments from a single node are sent across a single channel. However, each of the 10 nodes can be sending payments at the same time to the server node.</p><p><strong>Eclair v0.3.2 no backups</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*DL8XyXIzAcXx_0u9n3QKRA.png" /></figure><p><strong>Eclair v0.3.2 with backups</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*MuaVyl4xVKyCWcjl7jd-cQ.png" /></figure><p><strong>PostgreSQL</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*k3oDD2KVd3des9KWMU5QZQ.png" /></figure><p>As you can see, there is a dramatic decrease in performance if you have backups enabled with eclair. The median payment is 4x slower, while the average payment is 4.3x slower with backups. It is unclear why performance suffers as much as it does when backups are enabled in eclair.</p><p>PostgreSQL performs slightly better than eclair with backups enabled. On average, it is 102 milliseconds faster, while the median is 71 milliseconds faster. It is important to note that during this benchmark Postgres is not being backed up or replicated. The worst case performance of PostgreSQL is 1.75 seconds which is dramatically worse than any version of SQLite.</p><p>If backups are not enabled on eclair, PostgreSQL is much slower than sqlite, which is what we expected to find. On average, PostgreSQL is 3x slower than eclair with SQLite and no backups.</p><p>While Postgres is slower than SQLite, it does give other benefits such as the ability to create multiple lightning nodes that have compatible invoices. You can read more about that</p><h4><a href="https://suredbits.com/lightning-201-lightning-latency/#areas-for-further-research">Areas for further research</a></h4><p>In future blog posts, will be researching how time to process a payment is effected by</p><ol><li>Different locking schemes on the database</li><li>Latency between the node and database</li><li>Latency between lightning nodes</li></ol><p>It takes <a href="https://suredbits.com/lightning-101-for-exchanges-security-part-2%e2%80%8a-%e2%80%8abacking-up-your-lightning-wallet/">4 round trips on the network </a>to fully settle a lightning transaction which means that will likely be a huge performance cost. We expect this to be the largest constant that we have to deal with when thinking about performance.</p><p>We will be researching both of these areas in further blog posts.</p><p>Get in touch with the team on Twitter:</p><p><a href="https://twitter.com/Chris_Stewart_5">Chris Stewart</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/lightning-201-lightning-latency/"><em>https://suredbits.com</em></a><em> on January 16, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65f1ef8b1cb4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/lightning-201-lightning-latency-suredbits-65f1ef8b1cb4">Lightning 201: Lightning Latency — Suredbits</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lightning 201: Safely Accessing Remote Lightning Databases]]></title>
            <link>https://medium.com/suredbits/lightning-201-safely-accessing-remote-lightning-databases-c272026ac7d2?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/c272026ac7d2</guid>
            <category><![CDATA[crypto-exchange]]></category>
            <category><![CDATA[cryptocurrency-news]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[lightning-201]]></category>
            <category><![CDATA[lightning-network]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 16:09:48 GMT</pubDate>
            <atom:updated>2020-02-06T16:09:34.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*uY1jjwydjvnRNMKa.png" /></figure><p>Additional Lightning 201 articles:</p><p><a href="https://suredbits.com/lightning-201-high-frequency-trading/">High-Frequency Trading</a></p><p><a href="https://suredbits.com/lightning-201-lightning-latency/">Lightning Latency</a></p><p><a href="https://suredbits.com/failover-strategies-for-lightning-nodes/">Failover Strategies for Lightning Nodes</a></p><p>Previously in our Lightning 201 series we discussed <a href="https://suredbits.com/failover-strategies-for-lightning-nodes/">failover strategies for a Lightning node </a>. The first thing necessary to safely failover a Lightning node is move the database to a remote machine. This means that if the machine that is running the Lightning node fails, the database won’t fail as well. Now another Lightning node can connect to your remote database and resume operations.</p><p>Node backups and failovers leave us with another problem though: What happens if two “shadow” lightning nodes are trying to access the database at the same time? The consequences could be dire. This could create an internally inconsistent state in the Lightning database that could cause you to publish a <a href="https://suredbits.com/lightning-101-for-exchanges-security-part-1%e2%80%8a-%e2%80%8abackground/#lightning-penalty-scheme">revoked state</a> on the Lightning network leading to a loss of funds.</p><p>This can be solved by having an application level database “LOCK” that only allows one of our shadow nodes to access the database at a single time. The idea is that every time a new “shadow” lightning node is started up. We read from a table in the shared Lightning database to see if any other node currently owns the “lease” to the database. If another node does own the lease to the database, then the shadow node stops attempting to connect to the database. If there is no active lease for the database, the “shadow” can create a row in the table that gives it ownership of the lease.</p><p>We have implemented this locking scheme in eclair .</p><p>An important design consideration when implementing this locking scheme is of the system. Currently we ensure liveness by giving each of our leases a timeout. If the current lease owner does not renew their lease after 5 minutes another node can create a new lease.</p><p>However, our locking scheme does have a tradeoff. If the current lease owner were to terminate 1 minute into their lease ownership, it will be another 4 minutes until another node can take ownership of the lease for the Lightning database. This means there is potentially 4 minutes of downtime for the Lightning system.</p><p>In the worst case there can be 5 minutes of unavailability for our default configuration of leases in Eclair. The lease duration is a configurable parameter that you can adjust for what you think is an appropriate amount of downtime.</p><p>*Special thanks to <a href="https://twitter.com/Snyke">Christian Decker</a> for the insights and conversation around locking schemes.</p><p>Get in touch with the team on Twitter:</p><p><a href="https://twitter.com/Chris_Stewart_5">Chris Stewart</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/lightning-201-safely-accessing-remote-lightning-databases/"><em>https://suredbits.com</em></a><em> on January 9, 2020.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c272026ac7d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/lightning-201-safely-accessing-remote-lightning-databases-c272026ac7d2">Lightning 201: Safely Accessing Remote Lightning Databases</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2019 Year In Review]]></title>
            <link>https://medium.com/suredbits/2019-year-in-review-22ded0cf0a4e?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/22ded0cf0a4e</guid>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[crypto-trading]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[cryptocurrency-news]]></category>
            <category><![CDATA[suredbits]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 16:07:34 GMT</pubDate>
            <atom:updated>2020-02-06T16:07:20.832Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RAmqEFC2oyVRo_hp.png" /></figure><p>It was a busy and hectic, but productive, year at Suredbits. We released a number of new services and technologies in 2019 that furthers the goal of democratizing data. We are proud of our accomplishments and humbled by the support and growth of the Lightning community. Here is a brief review of some of the milestones and achievements of 2019.</p><h4><a href="https://suredbits.com/api/#crypto-spot-exchange-api">Crypto Spot Exchange API</a></h4><p>We started the year adding more depth and breadth to our Spot Exchange API service. We wanted to provide crypto traders and investors data from the most liquid trading pairs from the most reputable exchanges. We iteratively added additional exchanges and trading pairs.</p><p>Below is the list of exchanges we added in 2019 for our <a href="https://suredbits.com/api/#crypto-spot-exchange-api">Crypto Spot Exchange API</a>:</p><ul><li><a href="https://suredbits.com/crypto-exchange-api-update-bitstamp/">Bitstamp</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-gemini/">Gemini</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-kraken/">Kraken</a></li><li><a href="https://suredbits.com/crypto-exchange-api-binance-update/">Binance Order Books</a></li></ul><p>As mentioned, we wanted to add the most popular and liquid trading pairs for customers. We launched with support for Bitcoin and Ethereum. We then added the following pairs, including support for Euros.</p><p>Additional Trading Pairs</p><ul><li><a href="https://suredbits.com/crypto-exchange-api-update-litecoin-support/">Litecoin</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-bcash-support/">BitcoinCash</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-ripple-support/">Ripple</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-eos-support/">EOS</a></li><li><a href="https://suredbits.com/crypto-exchange-api-update-euro-trading-pairs/">Euro Trading Pairs</a></li></ul><h4><a href="https://suredbits.com/announcement-crypto-futures-api-release/">Crypto Futures API</a></h4><p>In March, we launched our <a href="https://suredbits.com/api/#crypto-futures-exchange-api">Crypto Futures API </a>. and futures, particularly the perpetual swaps, are incredibly popular among crypto traders. We knew we wanted to offer this data for Lighting users. Our Futures API offer now supports 10 different trading pairs across 21 different contracts (perpetual, quarterly and biquarterly).</p><h4><a href="https://suredbits.com/bitcoin-s-0-1-0-release/">Bitcoin-S</a></h4><p>On May 31st, we released version 0.1.0 of Bitcoin-S. Bitcoin-S is a feature-rich toolkit for making Bitcoin and Lightning Applications, written in Scala. It can be used on all JVM platforms, such as Java, Scala, Kotlin, Groovy and Clojure.</p><h4><a href="https://suredbits.com/api-websocket-playground/">Data Playground</a></h4><p>While Suredbit’s isn’t a web application company, we wanted to present a clear and easy to use interface for people interested in checking out how our application works. Using Lightning to buy custom data is new to experience developers and traders as well as novices.</p><p>The playground is intended to assist developers explore, test and familiarize themselves with our API services. We made all of our data services — Crypto data including historical and Sports APIs — available.</p><p>On the Playground, developers can construct requests to our API easily and see responses in real-time. For requests that require payment, we display a QR code you can either click on to open your Lightning wallet or scan with your mobile phone.</p><p>Our goal is to always make it as easy as possible to build on our platform. Using the <a href="https://suredbits.com/ws-playground/">Playground </a>along with our to develop your application, developers and traders should be able to start building in a matter of minutes.</p><h4><a href="https://suredbits.com/announcement-historical-crypto-prices-api/">Historical Crypto Prices API</a></h4><p>One of the most exciting services we released in 2019 was our <a href="https://suredbits.com/api/#historical-prices-data-api-2">Historical Prices API </a>. Rolled out in August, our Historical prices service has proven to be consistently one of our most popular. It offers full support for all API trading pairs and perpetual contracts going back to 2018 and 2019 for some trading pairs. As with our Spot and Futures service, customers can query for the exchange they want, the trading pair, what year and by three different periods: daily, weekly or monthly.</p><h4><a href="https://suredbits.com/paid-apis/">PAID APIs</a></h4><p>In August, we rolled out a new and innovative way to pay for services using Lightning known as Payment Atomic Information Decryption a.k.a. “PAID” APIs. This new method allows for more efficient payment on the Lightning Network by reducing latency. It also guarantees delivery for a buyer of data as well as payment for the seller. For more details, check out this <a href="https://suredbits.com/paid-apis/">post</a>.</p><p>We are working to improve our PAID API and advocate its wider adoption as a new standard for Lightning Payment. We believe the Network will benefit from improved user experience and interoperable, seamless payments.</p><h4><a href="https://suredbits.com/lightning-conference-2019/">Lightning Conference</a></h4><p>We were happy to participate in the first ever Lightning Conference in Berlin in October. The conference and complementary events were full of energy, creativity and collaboration as developers, entrepreneurs, investors and Lightning enthusiasts gathered to share ideas, challenges and demonstrate applications and projects.</p><p>Suredbits Founder Chris Stewart gave a talk on how crypto exchanges can manage security through effective <a href="https://suredbits.com/lightning-101-for-exchanges-security-part-3-private-key-management/">private key management </a>. And Suredbits developer Nadav Kohen presented on <a href="https://suredbits.com/payment-points-part-1/">Payment Points </a>.</p><h4><a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">Neutrino</a></h4><p>Though it is still in production, we have been working diligently to implement Neutrino for Bitcoin-S. Neutrino offers the ability to scale the advantages of bitcoin on the Lightning Network; easier onboarding, more privacy and security that comes with greater decentralization.</p><p>For more details about the benefits of Neutrino and to learn about some of our experiences implementing it, check out our Neutrino series of posts <a href="https://suredbits.com/category/neutrino/">here</a>.</p><h4><a href="https://suredbits.com/category/discreet-log-contracts/">Discreet Log Contracts (DLC)</a></h4><p>Since Blockstream and Crypto Garage executed a <a href="https://suredbits.com/category/discreet-log-contracts/">proof-of-concept </a>DLC, we have been excited about the potential of this new technology and what it could mean for decentralized financial services. We have been actively working on our own proof-of-concept — binary constructions and validation, test vectors, and so forth — with ideas for what innovative this could lead to. Specific to Lightning, we have built a Lightning powered Oracle service.</p><p>Follow us or get in touch with the team on Twitter:</p><p><a href="https://twitter.com/Chris_Stewart_5">Chris Stewart</a></p><p><a href="https://twitter.com/nadav_kohen">Nadav Kohen</a></p><p><a href="https://twitter.com/GOdansmith">Dan Smith</a></p><p><a href="https://twitter.com/nadav_kohen">Nadav Kohen</a></p><p><a href="https://twitter.com/benthecarman">Ben Carman</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/2019-year-in-review/"><em>https://suredbits.com</em></a><em> on December 19, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22ded0cf0a4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/2019-year-in-review-22ded0cf0a4e">2019 Year In Review</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lightning 201: Failover Strategies For Lightning Nodes]]></title>
            <link>https://medium.com/suredbits/lightning-201-failover-strategies-for-lightning-nodes-aa4526068a71?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/aa4526068a71</guid>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[lightning-node]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[lightning-201]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:59:52 GMT</pubDate>
            <atom:updated>2020-02-06T15:59:41.627Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dc74YrxX9Q7ojiYx.png" /></figure><p>Additional Lightning 201 articles you might find interesting:</p><p><a href="https://suredbits.com/lightning-201-high-frequency-trading/">High-Frequency Trading</a></p><p><a href="https://suredbits.com/lightning-201-safely-accessing-remote-lightning-databases/">Safely Access Remote Lightning Databases</a></p><p><a href="https://suredbits.com/lightning-201-lightning-latency/">Lightning Latency</a></p><p>Lightning Network adoption continues to proliferate in 2019. Last week <a href="https://www.bitfinex.com/posts/440">Bitfinex</a> was the first major exchange to adopt Lightning as a way to transfer BTC. Now you can deposit and withdraw BTC from their exchange in seconds.</p><p>One thing exchange operators have asked is how to safely “ “ their Lightning node. The ability to failover pieces of your infrastructure is critical in providing high availability web services that customers can access at any time.</p><p>Unlike bitcoin, Lightning is an interactive protocol that requires you to be online to accept payments from your customers. This means if your Lightning node goes offline a customer cannot deposit or withdraw funds until it is back up and running. With bitcoin wallets and addresses, customers can still deposit into the exchange even if your node is not online.</p><p>Currently if the machine a Lightning node is running on is corrupted, it could be 10s of minutes to get it up and running again if you have followed proper <a href="https://suredbits.com/lightning-101-for-exchanges-security-part-2%e2%80%8a-%e2%80%8abacking-up-your-lightning-wallet/">backup protocols</a> .</p><p>One way to provide the ability to failover Lightning nodes is to spin up a large amount of Lightning nodes all with different node ids. If one of the nodes does fail, at least your customers can access other nodes that you may have spun up.</p><p>This gets a little tricky. It adds complexity on clients of the exchange to manage node connections. They now need the ability to find all N of the lightning nodes the exchange has spun up. They also must have sufficient liquidity to all N of the nodes to continue deposits and withdrawals from the exchange which leads to more capital inefficiency in the ecosystem.</p><p>Additional complexity is the fact that invoices that are created on one node are not compatible with other Lightning nodes the exchange is running. This is because each node signs the invoice and provides the digital signature for the client to validate that this invoice hasn’t been forged. While the exchange may be the rightful owner of two nodes, the client will not be able to pay an invoice to another node that the exchange operates which defeats the purpose of this redundancy in the first place.</p><p>Our solution to this problem involves having a remote database that you can use to spin up replicas for existing Lightning nodes.</p><p>There are two things that need to be considered when failing over a Lightning node:</p><ol><li>The database that holds all relevant information to channels</li><li>The private keys associated with the bitcoin in the Lightning channels</li></ol><p>Currently all Lightning implementations use local databases by default to store information related to their channel. This is antithetical to failover strategies as we must have the data available remotely to be able to spin up a new server.</p><p>At Suredbits, we forked <a href="https://github.com/ACINQ/eclair/pull/1249">Eclair</a> to add support for a remote database. <a href="https://github.com/ElementsProject/lightning/pull/3057">C-lightning</a> has implemented support for PostgreSQL . This does incur some latency as now every time a channel is updated, you need to write to a remote database. With this change, if your eclair node were to fail on the machine you could spin up a new eclair node with all of the same channel information on a separate machine.</p><p>This would allow for the ability for a business to failover the node.</p><p>There is some risk with remote databases</p><ol><li>Failure to write to the remote database due to network level issues</li><li>Multiple nodes reading from the same database that can cause loss of funds via the <a href="https://suredbits.com/lightning-101-for-exchanges-security-part-1%e2%80%8a-%e2%80%8abackground/#lightning-penalty-scheme">penalty mechanism</a></li></ol><p>With Eclair, channel operations cannot continue if writing to the database fails. This mitigates issue #1 since you can use database level locks to make sure only one machine can read/write from the database, which in turn, mitigates issue #2.</p><p>Now you can safely failover your Lightning node in a matter of seconds.</p><p>Get in touch with the team on Twitter:</p><p><a href="https://twitter.com/Chris_Stewart_5">Chris Stewart</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/failover-strategies-for-lightning-nodes/"><em>https://suredbits.com</em></a><em> on December 12, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa4526068a71" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/lightning-201-failover-strategies-for-lightning-nodes-aa4526068a71">Lightning 201: Failover Strategies For Lightning Nodes</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing Neutrino — Suredbits]]></title>
            <link>https://medium.com/suredbits/implementing-neutrino-suredbits-79974e3e0b5b?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/79974e3e0b5b</guid>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[neutrinos]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:55:22 GMT</pubDate>
            <atom:updated>2020-02-06T15:55:09.152Z</atom:updated>
            <content:encoded><![CDATA[<h3>Implementing Neutrino</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LwQZwianAy-No1ZT.jpg" /></figure><p>Thus far in our Neutrino series we’ve taken a deep dive into the details of what Neutrino is, why it’s great for users, how filters work, and how Neutrino uses them. At Suredbits, we have been implementing a Neutrino node in our own open-source library <a href="https://bitcoin-s.org/">bitcoin-s</a>. In this post we will discuss how that process has gone and what new things we’ve learned about Neutrino.</p><p><em>Many thanks to Suredbits Software Engineer Roman Taranchenko who was the lead person on our Neutrino implementation.*</em></p><ul><li><a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">What Is Neutrino And Why We Need It</a></li><li><a href="https://suredbits.com/neutrino-benefits-for-wallets/">Benefits for Wallets</a></li><li><a href="https://suredbits.com/how-neutrino-works/">How Neutrino Works Part 1</a></li><li><a href="https://suredbits.com/how-neutrino-works-part-2/">How Neutrino Works Part 2</a></li></ul><p>We began by implementing a simple version of <a href="https://suredbits.com/how-neutrino-works/">BIP 158</a> block filters where matching was done by simply deserializing the entire filter and then doing a binary search on its contents. After implementing <a href="https://suredbits.com/how-neutrino-works-part-2/">BIP 157</a> block filter headers, our implementation was good enough to pass the BIP 158 test vectors.</p><p>At the time that we were implementing our Neutrino node, bitcoin-core had not yet published a branch or binary with support for BIP 157 P2P messages enabled. They were done with implementation however, and so we modified and built our own modified binary for bitcoin-core that allowed Neutrino peering. We began by doing the simplest thing and downloading block filter headers and then block filters sequentially from this Bitcoin node and writing to a database. This worked, but took around 4 hours to complete.</p><p>The major bottleneck for syncing filter headers turned out to be disk IO (meaning writing to the database too often). So we implemented batching database writes for every 2000 block filter headers and this brought our header sync time from 1–2 hours down to 10–20 minutes on mainnet! It also brought our 15+ minute testnet header sync <em>down to 1 or 2 minutes</em>. Unfortunately, batching hardly made a dent in the block filter download time. It only improved things by <em>5%</em> and at a huge cost of overhead and complexity. So we left block filter download to being sequential. In the future, when we have implemented support for multiple peers, downloading block filters should get much faster.</p><p>At this point we added many tests including property based tests for our data structures as well as integration tests that peered against our modified bitcoin-core node on a local regtest network.</p><p>With most of the P2P work completed, we moved on to integrating a simple Neutrino node with a wallet (backend) so that it could be useful and interface with users.</p><p>The first step was to add filter matching to the block filter download process, as well as downloading full blocks over the P2P network when a match was found. With this done, our very simple wallet could now track addresses on the blockchain.</p><p>We then implemented wallet rescans to support importing keys from elsewhere into the wallet. Neutrino is meant to support really fast blockchain rescans after all. But our initial implementation took an hour and a half to rescan mainnet (on a 2.6 GHz Intel Core i7 6 core CPU). The major bottleneck this time was CPU usage, so we made rescans a multi-threaded process and this gave us a 6x improvement (as expected on a 6 core machine) bringing rescans — for 50+ new keys — down to <em>15 minutes</em> on mainnet (and even faster when doing partial rescans).</p><p>To further improve rescans speeds — we returned to the BIP 158 matching code and remade it more in line with the BIP. Instead of deserializing the whole filter, we now matched all addresses as we went and stopped when we were done, rather than decoding the entire filter and searching within it. This doubled mainnet rescans of a single new address down to 7 minutes but had little to no tangible effect when rescanning for 10 or more new addresses. This makes sense because when searching for only a couple new keys within a filter, it is very likely that we can stop early since max_hash(key1, key2) is likely to be much less than max_hash(all keys in a block) very often. However when looking to match a large set of keys, the difference is much less and you essentially end up decoding every filter almost entirely anyway.</p><p>Last, we finished wallet integration so that on updates, balances get updated and filters get stored. That leads to the minimal viable Neutrino node we have at the time of this post. The Bitcoin-S Neutrino node currently supports fast initial block header and block filter syncs, fast wallet rescans for importing new keys as well as sending and receiving funds. We also support Bech32 addresses.</p><p>Along with optimizing and generally improving our Neutrino node, the main piece of technical work still ahead of us is support for peering with multiple bitcoin nodes as specified in BIP 157. We plan on adding this support to improve privacy and security, as well as download speeds, in the near future. We will also work on improving the user interface to the node which is currently very minimal and focused on technical users.</p><p>You can try our node on Testnet now:</p><p>Sample Configuration:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7c31e8df460038e3473bbad5c71279df/href">https://medium.com/media/7c31e8df460038e3473bbad5c71279df/href</a></iframe><p>To sync our Neutrino node:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f7d939abbfe106a7df0d3138b3a468d3/href">https://medium.com/media/f7d939abbfe106a7df0d3138b3a468d3/href</a></iframe><p>Example wallet rescan:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/07a337fe92d68656543eec03fc5971bc/href">https://medium.com/media/07a337fe92d68656543eec03fc5971bc/href</a></iframe><p>This completes our series on Neutrino. We hope that this has been informative and helped people get excited about Bitcoin’s new light client solution, as well as given insight on how Neutrino works, why we need it and what it takes to develop a node. With bitcoin-core recently adding full Neutrino support in the most recent release (v0.19.0.1), we look forward to more Neutrino implementations entering the community.</p><p>Get in touch with the team on Twitter:</p><p><a href="https://twitter.com/Chris_Stewart_5">Chris Stewart</a></p><p><a href="https://twitter.com/nadav_kohen">Nadav Kohen</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/implementing-neutrino/"><em>https://suredbits.com</em></a><em> on December 5, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79974e3e0b5b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/implementing-neutrino-suredbits-79974e3e0b5b">Implementing Neutrino — Suredbits</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Neutrino Works Part 2]]></title>
            <link>https://medium.com/suredbits/how-neutrino-works-part-2-237d113f3d37?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/237d113f3d37</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[neutrinos]]></category>
            <category><![CDATA[suredbits]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:47:33 GMT</pubDate>
            <atom:updated>2020-02-06T15:47:18.260Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GtEiHIFtdtHDWJjk.jpg" /></figure><p>At the beginning of this series we discussed Neutrino at a high level and looked at benefits for wallets. In the last post, we started our deep dive into the inner workings of Neutrino clients by detailing how probabilistic filters are constructed as specified by BIP 158. In this post, we will continue our detailed tour by discussing how these filters are used by clients in their operations.</p><p><a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">What is Neutrino And Why We Need It</a></p><p><a href="https://suredbits.com/neutrino-benefits-for-wallets/">Benefits For Wallets</a></p><p><a href="https://suredbits.com/how-neutrino-works/">How Neutrino Works Part 1</a></p><p><a href="https://suredbits.com/implementing-neutrino/">Implementing Neutrino</a></p><p>Before diving into the P2P messages that were introduced in BIP 157, we must first talk about another “new” construct, block filter headers. Bitcoin blocks have block headers that are bare-bones, 80-byte piece of meta-data, sufficient to allow clients to ensure that they are tracking a single longest chain. Likewise, <a href="https://suredbits.com/how-neutrino-works/">block filters</a> have 32-byte headers aid clients in following a single longest block filter chain. Block filter headers are simply a hash of their block filter’s hash concatenated with the previous block filter header:</p><p>Block Filter Header n := Hash(Hash(Block Filter n) || Block Filter Header n-1).</p><p>Now that we have block filters and block filter headers at our disposal, let’s look at Neutrino’s P2P messages. BIP 157 defines three new request messages: <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#getcfilters"><em>getcfilters </em></a>, <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#getcfheaders"><em>getcfheaders </em></a>, and <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#getcfcheckpt"><em>getcfcheckpt </em></a>as well as their corresponding response messages: <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#cfilter"><em>cfilter </em></a>, <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#cfheaders"><em>cfheaders </em></a>, <a href="https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki#cfcheckpt"><em>cfcheckpt </em></a>(note: cf stands for compact filter). Unsurprisingly, <em>getcfilters </em>and <em>getcfheaders </em>are requests for a range of filters and filter headers respectively. And <em>getcfcheckpt </em>is a request for every 1000 th block filter header, i.e. “Please send me block filter headers numbered 1000, 2000, 3000, …” up to some specified end. Note that these new messages are available to all nodes on the Bitcoin P2P network, not just Neutrino nodes.</p><p>We now have all the tools needed to run a Neutrino node: block filters, block filter headers, and P2P messages to send and receive these over the network.</p><p>So how exactly does a Neutrino client operate?</p><p>Let’s say that I’m turning on a fresh Neutrino client. It will first download the block header chain and validate Proof of Work. This is the first step taken by all Bitcoin nodes (full, BIP 37, or Neutrino). Neutrino will also download the block filter header chain from its peers. Specifically, the client will ask all peers it wishes to download from for their checkpoint headers (every 1000 th header) and ensure that all peers agree. The node can then download different 1000 header intervals from different peers concurrently. Once these two steps are done, the node can begin downloading block filters (from multiple peers) and verify that they match the block filter headers. And of course, with these filters a client is able to see whether a given block mentions outputs that this node is interested in tracking. When a match occurs, the node will download the full block using the Bitcoin P2P network — from a random peer that it is not using for filters.</p><p>If at any point during this process, or after, two peers send conflicting block filter headers or block filters, the Neutrino client must interrogate those peers and discover the truth. This is accomplished by finding the first block filter that the two nodes disagree on by doing a binary search on the relevant 1000 block filter header interval. Once this first disagreement is found, the Neutrino client downloads that full block (from a random peer that it is not using for filters) and computes the block filter and block filter header from scratch. It is then able to determine which peer is lying and ban that peer.</p><p>In this manner, Neutrino nodes are assured that so long as they have one truthful peer, all fraudulent peers will be discovered and banned!</p><p>BIP 157 does not specify exactly how many block filters and block filter headers should be persisted by a node. Rather, every node can decide how much or how little it wants to store. For many nodes (for example, on mobile phones), it may make a lot of sense to only persist the last 100 or so filters. This allows Neutrino wallets to stay extremely light on storage.</p><p>On the other hand, if a node has the capability to keep around all or many of its block filters — which is still much less than keeping <a href="https://suredbits.com/neutrino-benefits-for-wallets/">full blocks</a> around — then it has the ability to do really fast wallet rescans. This is a trade-off that each wallet or wallet user must consider: storage space vs. fast rescans. For most light clients that won’t ever contain any old addresses but rather only generate new ones, it will make a lot of sense to simply throw away old block filters.</p><p>As mentioned previously, the new P2P messages defined in BIP 157 are available to all Bitcoin P2P nodes. I expect that in the future most full nodes will support Neutrino server functionality. This is important because it is vital to Neutrino’s privacy model that the nodes serving filters not also be the nodes serving full blocks to client nodes. This is because if a node receives a request for a block filter, then soon after it receives a request for the corresponding full block from the same peer, it can safely infer that the client matched an output mentioned in that block. If this happens a couple different times, or during a rescan, then this can very quickly lead to a privacy breach. The best practice to avoid this is to have a large enough set of block filter servicing peers, a disjoint large enough set of full block servicing peers and to pick from the latter set at random when a full block is required. In the future, when feasible, some nodes may support downloading full blocks using <a href="https://en.wikipedia.org/wiki/Private_information_retrieval">Private Information Retrieval </a>which should essentially “solve” this problem/concern.</p><p>And that is all there is to a Neutrino node! They validate block filters by keeping track of block filter headers. They then use those block filters to see when their outputs are referenced in blocks and privately download those full blocks. Lastly, they are able to interrogate and ban any malicious peers so long as any one of their peers is truthful.</p><p>In our next and last post in this series, we will tell our own story about the experience of implementing Neutrino in <a href="https://bitcoin-s.org/">Bitcoin-S</a> and reflecting on what we learned in the process.</p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/how-neutrino-works-part-2/"><em>https://suredbits.com</em></a><em> on November 21, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=237d113f3d37" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/how-neutrino-works-part-2-237d113f3d37">How Neutrino Works Part 2</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Historical Crypto Data On Lightning]]></title>
            <link>https://medium.com/suredbits/historical-crypto-data-on-lightning-5c421b057eee?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/5c421b057eee</guid>
            <category><![CDATA[crypto-trading]]></category>
            <category><![CDATA[crypto-data]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:45:36 GMT</pubDate>
            <atom:updated>2020-02-06T15:45:23.086Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*35RadModPdtFfTSL.jpg" /></figure><p>Whether an advanced <a href="https://www.investopedia.com/articles/trading/11/indicators-and-strategies-explained.asp">technical trader </a>with years of experience or someone who is just starting out, one thing is critical to successful trading strategies: data. Specifically, historical data. Regardless if one is trading equities, bonds, currencies, derivatives or crypto assets, the ability to easily and reliably access historical data is fundamental to executing trading strategy and managing a portfolio.</p><p>Investors commonly use <a href="https://www.investopedia.com/terms/b/backtesting.asp">backtesting </a>before trading in live markets. Backtesting is the process of applying your trading hypothesis against historical data to determine how it performed. In order to do this, investors need data from a variety of sources over multiple time periods. Depending on the asset and the strategy, the data required could be cover multiple years, weeks, months or even simply days.</p><p>For our <a href="https://suredbits.com/announcement-historical-crypto-prices-api/">Historical Crypto Data</a> API service, we began ingesting data directly from exchanges in 2018 and continued into 2019. We now support six exchanges:</p><p>2018 — Binance, Coinbase and Bitfinex</p><p>2019 — Gemini, Bitstamp, Bitmex, Kraken</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*J8mF4rR5Dt5jgR-s.png" /></figure><p>It’s also critical that data offer granularity and accuracy. We know investors require the ability to slice data a number of ways. However, for some people, they simply need to know the price of Bitcoin on a specific date. This often is the case when someone is calculating potential tax obligations or simply updating their financial records.</p><p>For our API, since we ingest data directly from exchanges, it offers the highest accuracy. And we have built the ability to quickly filter by Year as well as Daily, Weekly or Monthly. So whether it’s an investor testing their strategy against years of data or someone simply looking up prices of a crypto asset to determine a tax bill, they can quickly find the data they need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dl6uB8ZeUXxD3biT.png" /></figure><p>The last point to address is cost. We have written previously about how <a href="https://suredbits.com/market-data-fees-and-lightning/">expensive data</a> is on traditional exchanges. Our goal is to provide investors, developers and users with the flexibility to consume the data they want when they want it. More importantly, leveraging Lightning technology, our application allows users to <a href="https://suredbits.com/paid-apis/"><em>only pay </em></a>for the data they want. This also allows us to price data at very atomic level with individual historical data calls costing a single satoshi.</p><p>Along with custom, micro-pricing, by providing data over the Lightning Network we are able to give people the option of avoiding credit cards. That means no fees to credit card companies. There are no recurring monthly or annual fees for the data. It also means no overpaying for data you don’t want or don’t use.</p><p>And it needs to be mentioned, with no credit card fees and no account creation, there is no personally identifiable information collected and stored.</p><p>Ultimately, investors require reliable historical data to explore and test their investment strategies. But historical data can also be used by developers to build applications or individuals to manage their taxes or financial records. By providing historical crypto data prices over the Lightning Network, investors and others can now acquire the volume and type of data they need. Further, they customize it by not only what data they want, but how much they wish to pay for. Historical data on Lightning puts the control in the hands of the user.</p><p>Follow us <a href="https://twitter.com/Suredbits">@Suredbits</a> for feedback and updates.</p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/historical-crypto-data-on-lightning/"><em>https://suredbits.com</em></a><em> on November 14, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c421b057eee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/historical-crypto-data-on-lightning-5c421b057eee">Historical Crypto Data On Lightning</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Neutrino Works Part 1]]></title>
            <link>https://medium.com/suredbits/how-neutrino-works-part-1-445b250a87a3?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/445b250a87a3</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[suredbits]]></category>
            <category><![CDATA[lightning-network]]></category>
            <category><![CDATA[neutrinos]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:42:30 GMT</pubDate>
            <atom:updated>2020-02-06T15:42:18.265Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2BQGrhNE18cjrMUs.jpg" /></figure><p>Previously we have discussed what Neutrino is and what it has to offer wallets as Bitcoin’s new light client. In this post we’ll dive into the details of how Neutrino works its magic.</p><p><a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">What Is It And Why We Need It</a></p><p><a href="https://suredbits.com/neutrino-benefits-for-wallets/">Benefits for Wallets</a></p><p><a href="https://suredbits.com/how-neutrino-works-part-2/">How Neutrino Works Part 2</a></p><p><a href="https://suredbits.com/implementing-neutrino/">Implementing Neutrino</a></p><h4>BIP 158</h4><p>Neutrino is specified over BIPs 157 and 158. BIP 158 will be the topic of this post and details the data structures that Neutrino uses which allow clients to privately detect when they need to download more blockchain data. BIP 157 specifies the P2P messages used by Neutrino clients as well as what the operation of those clients and their servers should be. BIP 157 will be the topic of the next post in this series.</p><p>A filter is a data structure which has one main function called matching which returns or given some input data. Given some set of data, one constructs a filter for that returns when fed any input from that set, and with some small probability — called the false-positive rate — even if the data was not in the set for which the filter was constructed. This probability is configurable but Neutrino nodes currently use a false-positive rate of 1/784,931. <em>False</em> otherwise. The simplest example of a filter is simply keeping all of the data in a list where matching is simply going through your list sequentially and seeing if you find a match. Probabilistic filters are very similar to normal filters except that they are allowed to return</p><p>While there is the down-side of having a false-positive rate, the upside is well worth it since probabilistic filters are generally really small when compared to the underlying data. They also tend to be quite efficient to use, all of which makes them perfect for Bitcoin light clients. (Fun fact: Bitcoin Core now actually uses these filters as an internal data structure for full nodes, used for testing to see if certain data is in a block).</p><p>BIP 158 defines a new (to Bitcoin) probabilistic filter using Golomb-Coded Sets of hashes (more on this later). At a high level, here is how these filters are used in Neutrino. For each Bitcoin block, one of these filters is deterministically constructed. A block filter is around 10 times smaller than the block from which it was constructed, and matches all script public keys (think addresses) used in the block’s inputs and outputs. These filters are then passed from servers (full nodes) to clients (Neutrino nodes) who can match against the addresses they are interested in monitoring. If this results in a positive match, they can download the full block and do further validation.</p><p>Now that we have some idea of how these filters are used, let’s discuss how they work. If you are not familiar with hash functions, I suggest doing some <a href="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Hash_function&amp;sa=D&amp;ust=1573000991768000&amp;usg=AFQjCNGjE_uWUxIVH9TUhGJDk8v4pNTFlQ">high-level reading</a> on them and returning to this post.</p><p>BIP 158 filters use the Siphash function which takes in a key and some data and outputs 64 seemingly random bits. We then squish this hash into a much smaller range (size of data set * 784,931). The Siphash function is optimized for speed. However, with only 64 bits of output (and even fewer after squishing), this hash function is not collision resistant, which is what will ultimately cause false positives at a rate of 1/784,931. A false positive happens in Neutrino filters when there is an item in the filter’s set with the same hash as an item not in the set that is being queried for.</p><p>With this in mind, here is how BIP 158 block filters are constructed: First, run all relevant block data through Siphash using the block hash as the key. This ensures determinism while still rotating keys every block. Second, sort these hashes in ascending order. Third, compute the differences between these hashes. Under the assumption that the Siphash function behaves as a hash function should, we expect these differences to be near a <a href="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Geometric_distribution&amp;sa=D&amp;ust=1573075137288000&amp;usg=AFQjCNFbJG4m01RRMocvaixemspgNu2LAg">geometric distribution</a>. This makes them ideal targets for Golomb-Rice coding which is a technique that optimally compresses geometrically distributed values. I will elaborate on this in a moment but our fourth step is to do this compression. After these four steps we have ourselves a compact block filter that can be passed to a Neutrino light client!</p><p>To match data with a block filter, we simply go in reverse. First decode the Golomb-Rice coded set. Then add up the differences to get the hashes. If you are looking to match a specific hash, you don’t even have to decode the whole set as you can just go through the filter sequentially until you either match your hash or go over it (since it is a sorted set). Furthermore if you are looking to match against multiple items, it should take just as long as you can simply sort those items and go through the filter just one time!</p><h4>BIP 158 Golomb-Rice Coding</h4><p>Golomb-Rice coding with the parameters specified in BIP 158 goes as follows. You take your number — in this case it is a difference of two hashes — and find its quotient and remainder when divided by 2 19 . That is, find and r such that the number is equal to This is actually a really fast computation since our numbers are in binary. This is done by splitting the number into two ( and ) at the 2 19 th place. Thus, that the last 19 bits are the remainder, just like the last 19 digits are the remainder when dividing a base 10 number by 10 19 . Next, you take (which will be quite small) and rewrite it in unary, which is fancy jargon for tally marks (e.g. 7 = 1111111), followed by a zero, and then the remainder r. This encoding allows us to write down each hash in sequence without needing to separate them or detail their length. We can just read each number until we hit a 0, and then read 19 more bits.</p><p>Let’s review this all with a small example. Say that we have two binary numbers that we want to encode: <em>011|0110000011010110001</em> and <em>100|0011010011010001110</em> (the vertical bars separate the last 19 bits from the rest of the number).</p><p>We re-write the quotient — 011 = 3 — in unary followed by a zero, 1110, followed by the remainder, <em>0110000011010110001</em>. Then we do the same with the second number, whose quotient is 100 = 4, so that we get <em>111100011010011010001110</em> as the encoded number.</p><p>Then we simply put these two together for the Golomb-coded set of <em>11100110000011010110001111100011010011010001110</em>.</p><p>That is a lot of 1s and 0s but this is actually much more compact than how data is normally held in a computer which is with leading 0s that pad every number to 64 bits. Meaning that what we originally started with before compression was this space-consuming number:</p><p><em>00000000000000000000000000000000000000000001101100000110101100010000000000000000000000000000000000000000001000011010011010001110</em>.</p><p>I think we can all agree that what we have now is much better. And for larger number sets, the gains are even greater. While it is true that filters constructed in this way are still linear in the number of data elements, Golomb-coding is the optimal <a href="https://www.google.com/url?q=https://en.wikipedia.org/wiki/Prefix_code&amp;sa=D&amp;ust=1573088249156000&amp;usg=AFQjCNFhPJ9LcpbAFsY66gGudVCPMxMGpA">prefix-code</a> for data in a geometric distribution. In practice, for light clients this is good enough as it reduces any block to a small number of KB.</p><p>To decode our set we start reading until we hit our first zero. Then we read the next 19 bits: <em>1110|0110000011010110001</em>. We then translate from unary by counting the number of 1s and retrieve our first number, <em>0110110000011010110001</em>. We repeat the same process of going until we hit a zero and then reading 19 more bits. If the set was larger we would continue this process over and over until all elements were decoded.</p><p>This is how BIP 158 probabilistic filters are constructed and how they work to match data. In the next post we will discuss how Neutrino clients actually operate using these filters to download as little data as possible while knowing they aren’t missing anything. Stay tuned for the last post in this series where we will discuss our experiences in implementing a Neutrino node.</p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote><em>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</em></blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com.</p><p><em>Originally published at </em><a href="https://suredbits.com/how-neutrino-works/"><em>https://suredbits.com</em></a><em> on November 7, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=445b250a87a3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/how-neutrino-works-part-1-445b250a87a3">How Neutrino Works Part 1</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neutrino: Benefits For Wallets]]></title>
            <link>https://medium.com/suredbits/neutrino-benefits-for-wallets-a3c12c2cc3e9?source=rss----57089e916479---4</link>
            <guid isPermaLink="false">https://medium.com/p/a3c12c2cc3e9</guid>
            <category><![CDATA[suredbits]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[neutrinos]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[lightning-network]]></category>
            <dc:creator><![CDATA[Suredbits]]></dc:creator>
            <pubDate>Thu, 06 Feb 2020 15:27:36 GMT</pubDate>
            <atom:updated>2020-02-06T15:27:04.936Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FTAPw2ox7GcebZQ9.jpg" /></figure><p>In our <a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">first post</a> on Neutrino, we discussed the state of Bitcoin light clients. Specifically we introduced Neutrino nodes and contrasted them to traditional Simplified Payment Verification (SPV) nodes. At Suredbits, we’re currently working on adding Neutrino support to <a href="https://bitcoin-s.org/">Bitcoin-S</a>. For this post, I would like to further explore Neutrino nodes and their tangible effects on wallets.</p><p><a href="https://suredbits.com/how-neutrino-works/">How Neutrino Works Part 1</a> <a href="https://suredbits.com/how-neutrino-works-part-2/">How Neutrino Works Part 2</a> <a href="https://suredbits.com/implementing-neutrino/">Implementing Neutrino</a> <a href="https://suredbits.com/neutrino-what-is-it-and-why-we-need-it/">What Is Neutrino And Why We Need It</a></p><p>The first benefit is that Neutrino has a fast initial sync. After all, it wouldn’t be a very good light client if it wasn’t fast to get started on. In practice this means that you could have a Neutrino node running on your phone that could accept payments in under half an hour without trusting any centralized server! In conjunction with <a href="https://www.bitrefill.com/thor-turbo-channels/?hl=en">turbo channels </a>this means that you could be sending and receiving lightning payments without a centralized server in minutes. Furthermore if there is a server you are willing to trust, just for a short while, then you can actually get started instantly by accepting the current state and validating in the background.</p><p>And what if you want to import existing funds into your Neutrino wallet? Then this will require you to scan the blockchain from the point where your oldest key was created to the present. This sounds like a daunting task for a light client to overcome seeing as it does not have access to all 250+ GB of the blockchain at its disposal for fear of destroying your phone plan. But all a Neutrino node does is match against highly compact block filters. If you were to go through the entire Bitcoin blockchain, even for many addresses, this should still take less than 30 minutes. Realistically, most keys are not very old and rescan time will be much much shorter than 30 minutes. But do note that all this is done trusting only that at least one of your many peers is not malicious!</p><p>Another important benefit of Neutrino nodes is they drastically reduce bandwidth usage when compared to full nodes as you must only download blocks that contain your own addresses (with a false positive download rate of 1/784931). Nodes must also download block headers (80 bytes), block filter headers (32 bytes), and block filters (&lt;10 KB on average) but these are all quite small, especially when compared to blocks which are around 1 MB in scale.</p><p>Arguably the best new feature that Neutrino gives us is light clients. Current light clients have virtually zero privacy in that BIP 37 nodes essentially leak your addresses to all peers who serve you data. Neutrino should give peers no information about your addresses since they are sending you filters rather than the other way around. This means that we can finally start using light clients in privacy-sensitive applications.</p><p>Last, I should note that the trust model for Neutrino is essentially the same as the existing one of current light clients and really most P2P networks. That is, so long as you have one trust-worthy peer you will have a valid state and you will be able to detect liars.</p><p>In the next post, we’ll dive into the details of BIPs 157 and 158 and describe how Neutrino works. And stay tuned for later in this series where we will discuss our experiences in implementing a Neutrino node!</p><p>Contact us <a href="https://twitter.com/Suredbits">@Suredbits</a></p><p>Contact Nadav <a href="https://twitter.com/nadav_kohen">@nadav_kohen</a></p><p>All of our API services, for both <a href="https://suredbits.com/api/?javascript#crypto-spot-exchange-api">Cryptocurrency APIs</a> as well as <a href="https://suredbits.com/api/?json#nfl-data-api">Sports APIs</a>, are built using <a href="https://suredbits.com/category/lightning-101/">Lightning technology</a> and the Lightning Network. All API services are live on Bitcoin’s <a href="https://suredbits.com/pricing/">mainnet</a>. Our fully customizable data service allows customers to stream as much or as little data as they wish and <a href="https://suredbits.com/pricing/">pay using bitcoin</a>.</p><p>You can connect to our Lightning node at the url:</p><blockquote>038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com</blockquote><p>To learn more about how our Lightning APIs work please visit our <a href="https://suredbits.com/api/#lightning-api-v0-beta-documentation">API documentation</a> or checkout our <a href="https://suredbits.com/ws-playground/">Websocket Playground</a> to start exploring fully customized data feeds.</p><p>If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us at sales@suredbits.com<a href="https://suredbits.com/cdn-cgi/l/email-protection#5b283a373e281b282e293e3f39322f2875383436"> </a>.</p><p><em>Originally published at </em><a href="https://suredbits.com/neutrino-benefits-for-wallets/"><em>https://suredbits.com</em></a><em> on October 31, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3c12c2cc3e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/suredbits/neutrino-benefits-for-wallets-a3c12c2cc3e9">Neutrino: Benefits For Wallets</a> was originally published in <a href="https://medium.com/suredbits">Suredbits</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>