Connect with us

Uncategorized

Why Bitcoin Wallets Need Block Filters

Most Bitcoin wallets leak your private information to the wallet provider, block filters can help fix that.

Published

on

With the advent of software development kits like BDK and LDK, building a bitcoin wallet has never been easier. However, as much as easier development is necessary, it's important to build in a way that protects user security and privacy by default. For example, how a light wallet connects to a third-party server to receive and send transaction data is an important issue to address.

I believe that bitcoin wallets need block filters to respect a user's privacy. Why? It's the only way to keep data from leaking to the server, which would allow it to link a user's transaction data beyond what is publicly available.

In this article, we will explore why bitcoin wallets need block filters by first looking at how many bitcoin users run full nodes, how API wallets offer good user experience but ultimately lead to all your transactions being linked together, how bloom filters have failed to protect privacy, how block filters are the only lightweight wallet network privacy solution, and finally how this can all be implemented using Tor-only communication to also protect a user's IP address.

Only a Few Users Run Full Nodes

Running and using a Bitcoin node is the best thing you can do because you’re part of the network and you don’t need any intermediaries to receive and broadcast transaction data. However, It’s obvious that running a full node is not for everyone; the existence and need for light clients (Simple Payment Verification) was even envisioned by Satoshi in the Bitcoin whitepaper.

We can’t know how many users are running a full node, we can only know how many nodes there are. Conservative estimates that count only listening nodes would put this number at around 16,000, as seen on the Bitnodes.io site. More accurate estimates that count both listening and non-listening nodes such as Luke Dashjr’s node count tool put this number higher, at around 53,000.

It's also important to be aware of the historical context of the number of full bitcoin nodes. According to the Bitcoin Node Count History by Luke Dashjr, we can observe that the usage of bitcoin nodes is far from its peak. On January 13, 2018, the count reached 205,000. This was highly related to the fact that bitcoin had reached its previous all-time high a few weeks earlier. In 2021, we can observe that the node count also increased when the price went up, but it only reached close to 90,000.

We can confirm that there are few users running bitcoin nodes, and that this number is not increasing over time. Light wallets are much easier to use than a bitcoin node, and we need to find the right network privacy solution to implement. Let's take a look at the most used technology today, which is API wallets.

API Wallet Service Providers Collect Your Data by Default

Most bitcoin wallets use APIs (Application Specific Interface) to send and receive user transaction data. This technology is highly scalable and provides the best user experience, as requests are instantaneous. However, it has an inherent privacy caveat. Let's break down how it works and how service providers collect your data by default.

When you initialize a standard bitcoin wallet, you import or create a mnemonic seed phrase and set the desired derivation path (often automatically). This gives you a master public key, often called an xpub. Here's what it looks like:

xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz

Once that's done, the xpub is automatically sent to the service provider's server, where it derives bitcoin addresses within the gap limit (how many unused addresses with a balance of zero will be checked before the server stops scanning for funds). These addresses are looked up in the server's index, and if transactions are found, they are sent to the user's client. The addresses are watched in case new transactions occur. In addition, when a user sends a transaction, it's also sent through the same communication channel.

It's obvious that this process is very efficient and allows API wallets to provide a fast and easy user experience. However, the service provider will be able to link all of our transactions together, and thus collect your private information by default. Fortunately, many API wallets allow users to connect through Tor, so at least a user's IP address is protected.

Let's now examine an alternative method that does not depend on a single server, the use of bloom filters on light wallets.

Why Bloom Filters Don’t Work for Privacy

Some wallets allow a user to receive and send transaction data through Bloom filters. This communication method was introduced in BIP37 and was originally thought to be private. In this section, we'll break down what Bloom filters are and why they're actually not good for privacy.

Bloom filters are probabilistic data structures used to test whether an element is a member of a set. In the bitcoin context, bloom filters are created by a light client and sent to network peers, which test whether there's a match between an address (element) and blockchain data (set). If there's a match, the transaction data is sent to the light client. It's probabilistic because there are false positives, but these are later discarded by the light client.

It was thought that the false positive rate would be high enough that a network peer wouldn't be able to tell which transactions were really yours and which were fake. However, due to an implementation error, the false positive rate was actually reduced.

Additionally, a light client can create different bloom filters for the same wallet, and if two or more are collected by a network peer, the intersection can be calculated to remove false positives. Finally, if blockchain data is analyzed and the user doesn't coinjoin or use coin control, a network peer can infer which addresses don't belong to the user.

You can read more about the privacy issues with BIP37 here. Now let's examine the remaining light client network solution.

A Bitcoin Wallet Needs Block Filters for Privacy

Back in 2018, there was no real solution to this problem, block filters weren't a thing yet. Fortunately, they were introduced the following year in BIP157 and 158, and are now implemented in several wallets and bitcoin software such as Wasabi, Blixt, Breez, LND, and LDK. They're often referred to as Neutrino. In this section, we'll examine how they work and why they're the right solution for network privacy.

Block filters compress block data to help wallets receive transactions from peers without compromising privacy by downloading specific blocks instead of looking up individual transactions.

The block filter process typically involves three steps. First, a user downloads the block filters representing the blockchain from a network peer in the case of Breez, or from the coordinator server in the case of Wasabi. Then, the light client checks to see if the addresses within the gap limit match a block filter. Finally, if there's a match, the corresponding block is downloaded.

Because we're downloading entire blocks instead of individual transactions, and because there's a false positive rate, the block filter method works to protect a user's privacy from network peers. Unlike Bloom filters and API wallets, it can't figure out (or doesn't collect directly) the connection between a user's transactions, other than what is publicly known on the blockchain.

Block filters are part of the solution to network privacy, but something else is needed to complete the picture.

Tor is the Last Remaining Piece to Solving Network Privacy

Tor and bitcoin go hand in hand, and together with block filters, can solve network privacy for lightweight clients. Tor hides a user's IP address from the destination server by routing it through a network of nodes. This mechanism is called onion routing because of the multiple layers of communication.

Tor and block filtering have one thing in common. They're both processes that can slow down performance, and that can be noticeable and degrade the user experience. Some people think you just have to accept this, but I think it can be improved to the point where it's barely noticeable.

For example, the Tor community has implemented a communication reliability solution called Conflux. Instead of making a single request, clients make two requests using two different Tor circuits to increase the likelihood of fast completion. This, along with innovations in wallet loading for block filters like Turbosync on the Wasabi wallet, will lead us to a future where a user doesn't have to choose between usability and privacy, but can enjoy both.

This is a guest post by Gustavo Flores Echaiz. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.

Read More

Continue Reading

Uncategorized

February Employment Situation

By Paul Gomme and Peter Rupert The establishment data from the BLS showed a 275,000 increase in payroll employment for February, outpacing the 230,000…

Published

on

By Paul Gomme and Peter Rupert

The establishment data from the BLS showed a 275,000 increase in payroll employment for February, outpacing the 230,000 average over the previous 12 months. The payroll data for January and December were revised down by a total of 167,000. The private sector added 223,000 new jobs, the largest gain since May of last year.

Temporary help services employment continues a steep decline after a sharp post-pandemic rise.

Average hours of work increased from 34.2 to 34.3. The increase, along with the 223,000 private employment increase led to a hefty increase in total hours of 5.6% at an annualized rate, also the largest increase since May of last year.

The establishment report, once again, beat “expectations;” the WSJ survey of economists was 198,000. Other than the downward revisions, mentioned above, another bit of negative news was a smallish increase in wage growth, from $34.52 to $34.57.

The household survey shows that the labor force increased 150,000, a drop in employment of 184,000 and an increase in the number of unemployed persons of 334,000. The labor force participation rate held steady at 62.5, the employment to population ratio decreased from 60.2 to 60.1 and the unemployment rate increased from 3.66 to 3.86. Remember that the unemployment rate is the number of unemployed relative to the labor force (the number employed plus the number unemployed). Consequently, the unemployment rate can go up if the number of unemployed rises holding fixed the labor force, or if the labor force shrinks holding the number unemployed unchanged. An increase in the unemployment rate is not necessarily a bad thing: it may reflect a strong labor market drawing “marginally attached” individuals from outside the labor force. Indeed, there was a 96,000 decline in those workers.

Earlier in the week, the BLS announced JOLTS (Job Openings and Labor Turnover Survey) data for January. There isn’t much to report here as the job openings changed little at 8.9 million, the number of hires and total separations were little changed at 5.7 million and 5.3 million, respectively.

As has been the case for the last couple of years, the number of job openings remains higher than the number of unemployed persons.

Also earlier in the week the BLS announced that productivity increased 3.2% in the 4th quarter with output rising 3.5% and hours of work rising 0.3%.

The bottom line is that the labor market continues its surprisingly (to some) strong performance, once again proving stronger than many had expected. This strength makes it difficult to justify any interest rate cuts soon, particularly given the recent inflation spike.

Read More

Continue Reading

Uncategorized

Mortgage rates fall as labor market normalizes

Jobless claims show an expanding economy. We will only be in a recession once jobless claims exceed 323,000 on a four-week moving average.

Published

on

Everyone was waiting to see if this week’s jobs report would send mortgage rates higher, which is what happened last month. Instead, the 10-year yield had a muted response after the headline number beat estimates, but we have negative job revisions from previous months. The Federal Reserve’s fear of wage growth spiraling out of control hasn’t materialized for over two years now and the unemployment rate ticked up to 3.9%. For now, we can say the labor market isn’t tight anymore, but it’s also not breaking.

The key labor data line in this expansion is the weekly jobless claims report. Jobless claims show an expanding economy that has not lost jobs yet. We will only be in a recession once jobless claims exceed 323,000 on a four-week moving average.

From the Fed: In the week ended March 2, initial claims for unemployment insurance benefits were flat, at 217,000. The four-week moving average declined slightly by 750, to 212,250


Below is an explanation of how we got here with the labor market, which all started during COVID-19.

1. I wrote the COVID-19 recovery model on April 7, 2020, and retired it on Dec. 9, 2020. By that time, the upfront recovery phase was done, and I needed to model out when we would get the jobs lost back.

2. Early in the labor market recovery, when we saw weaker job reports, I doubled and tripled down on my assertion that job openings would get to 10 million in this recovery. Job openings rose as high as to 12 million and are currently over 9 million. Even with the massive miss on a job report in May 2021, I didn’t waver.

Currently, the jobs openings, quit percentage and hires data are below pre-COVID-19 levels, which means the labor market isn’t as tight as it once was, and this is why the employment cost index has been slowing data to move along the quits percentage.  

2-US_Job_Quits_Rate-1-2

3. I wrote that we should get back all the jobs lost to COVID-19 by September of 2022. At the time this would be a speedy labor market recovery, and it happened on schedule, too

Total employment data

4. This is the key one for right now: If COVID-19 hadn’t happened, we would have between 157 million and 159 million jobs today, which would have been in line with the job growth rate in February 2020. Today, we are at 157,808,000. This is important because job growth should be cooling down now. We are more in line with where the labor market should be when averaging 140K-165K monthly. So for now, the fact that we aren’t trending between 140K-165K means we still have a bit more recovery kick left before we get down to those levels. 




From BLS: Total nonfarm payroll employment rose by 275,000 in February, and the unemployment rate increased to 3.9 percent, the U.S. Bureau of Labor Statistics reported today. Job gains occurred in health care, in government, in food services and drinking places, in social assistance, and in transportation and warehousing.

Here are the jobs that were created and lost in the previous month:

IMG_5092

In this jobs report, the unemployment rate for education levels looks like this:

  • Less than a high school diploma: 6.1%
  • High school graduate and no college: 4.2%
  • Some college or associate degree: 3.1%
  • Bachelor’s degree or higher: 2.2%
IMG_5093_320f22

Today’s report has continued the trend of the labor data beating my expectations, only because I am looking for the jobs data to slow down to a level of 140K-165K, which hasn’t happened yet. I wouldn’t categorize the labor market as being tight anymore because of the quits ratio and the hires data in the job openings report. This also shows itself in the employment cost index as well. These are key data lines for the Fed and the reason we are going to see three rate cuts this year.

Read More

Continue Reading

Uncategorized

Inside The Most Ridiculous Jobs Report In History: Record 1.2 Million Immigrant Jobs Added In One Month

Inside The Most Ridiculous Jobs Report In History: Record 1.2 Million Immigrant Jobs Added In One Month

Last month we though that the January…

Published

on

Inside The Most Ridiculous Jobs Report In History: Record 1.2 Million Immigrant Jobs Added In One Month

Last month we though that the January jobs report was the "most ridiculous in recent history" but, boy, were we wrong because this morning the Biden department of goalseeked propaganda (aka BLS) published the February jobs report, and holy crap was that something else. Even Goebbels would blush. 

What happened? Let's take a closer look.

On the surface, it was (almost) another blockbuster jobs report, certainly one which nobody expected, or rather just one bank out of 76 expected. Starting at the top, the BLS reported that in February the US unexpectedly added 275K jobs, with just one research analyst (from Dai-Ichi Research) expecting a higher number.

Some context: after last month's record 4-sigma beat, today's print was "only" 3 sigma higher than estimates. Needless to say, two multiple sigma beats in a row used to only happen in the USSR... and now in the US, apparently.

Before we go any further, a quick note on what last month we said was "the most ridiculous jobs report in recent history": it appears the BLS read our comments and decided to stop beclowing itself. It did that by slashing last month's ridiculous print by over a third, and revising what was originally reported as a massive 353K beat to just 229K,  a 124K revision, which was the biggest one-month negative revision in two years!

Of course, that does not mean that this month's jobs print won't be revised lower: it will be, and not just that month but every other month until the November election because that's the only tool left in the Biden admin's box: pretend the economic and jobs are strong, then revise them sharply lower the next month, something we pointed out first last summer and which has not failed to disappoint once.

To be fair, not every aspect of the jobs report was stellar (after all, the BLS had to give it some vague credibility). Take the unemployment rate, after flatlining between 3.4% and 3.8% for two years - and thus denying expectations from Sahm's Rule that a recession may have already started - in February the unemployment rate unexpectedly jumped to 3.9%, the highest since February 2022 (with Black unemployment spiking by 0.3% to 5.6%, an indicator which the Biden admin will quickly slam as widespread economic racism or something).

And then there were average hourly earnings, which after surging 0.6% MoM in January (since revised to 0.5%) and spooking markets that wage growth is so hot, the Fed will have no choice but to delay cuts, in February the number tumbled to just 0.1%, the lowest in two years...

... for one simple reason: last month's average wage surge had nothing to do with actual wages, and everything to do with the BLS estimate of hours worked (which is the denominator in the average wage calculation) which last month tumbled to just 34.1 (we were led to believe) the lowest since the covid pandemic...

... but has since been revised higher while the February print rose even more, to 34.3, hence why the latest average wage data was once again a product not of wages going up, but of how long Americans worked in any weekly period, in this case higher from 34.1 to 34.3, an increase which has a major impact on the average calculation.

While the above data points were examples of some latent weakness in the latest report, perhaps meant to give it a sheen of veracity, it was everything else in the report that was a problem starting with the BLS's latest choice of seasonal adjustments (after last month's wholesale revision), which have gone from merely laughable to full clownshow, as the following comparison between the monthly change in BLS and ADP payrolls shows. The trend is clear: the Biden admin numbers are now clearly rising even as the impartial ADP (which directly logs employment numbers at the company level and is far more accurate), shows an accelerating slowdown.

But it's more than just the Biden admin hanging its "success" on seasonal adjustments: when one digs deeper inside the jobs report, all sorts of ugly things emerge... such as the growing unprecedented divergence between the Establishment (payrolls) survey and much more accurate Household (actual employment) survey. To wit, while in January the BLS claims 275K payrolls were added, the Household survey found that the number of actually employed workers dropped for the third straight month (and 4 in the past 5), this time by 184K (from 161.152K to 160.968K).

This means that while the Payrolls series hits new all time highs every month since December 2020 (when according to the BLS the US had its last month of payrolls losses), the level of Employment has not budged in the past year. Worse, as shown in the chart below, such a gaping divergence has opened between the two series in the past 4 years, that the number of Employed workers would need to soar by 9 million (!) to catch up to what Payrolls claims is the employment situation.

There's more: shifting from a quantitative to a qualitative assessment, reveals just how ugly the composition of "new jobs" has been. Consider this: the BLS reports that in February 2024, the US had 132.9 million full-time jobs and 27.9 million part-time jobs. Well, that's great... until you look back one year and find that in February 2023 the US had 133.2 million full-time jobs, or more than it does one year later! And yes, all the job growth since then has been in part-time jobs, which have increased by 921K since February 2023 (from 27.020 million to 27.941 million).

Here is a summary of the labor composition in the past year: all the new jobs have been part-time jobs!

But wait there's even more, because now that the primary season is over and we enter the heart of election season and political talking points will be thrown around left and right, especially in the context of the immigration crisis created intentionally by the Biden administration which is hoping to import millions of new Democratic voters (maybe the US can hold the presidential election in Honduras or Guatemala, after all it is their citizens that will be illegally casting the key votes in November), what we find is that in February, the number of native-born workers tumbled again, sliding by a massive 560K to just 129.807 million. Add to this the December data, and we get a near-record 2.4 million plunge in native-born workers in just the past 3 months (only the covid crash was worse)!

The offset? A record 1.2 million foreign-born (read immigrants, both legal and illegal but mostly illegal) workers added in February!

Said otherwise, not only has all job creation in the past 6 years has been exclusively for foreign-born workers...

Source: St Louis Fed FRED Native Born and Foreign Born

... but there has been zero job-creation for native born workers since June 2018!

This is a huge issue - especially at a time of an illegal alien flood at the southwest border...

... and is about to become a huge political scandal, because once the inevitable recession finally hits, there will be millions of furious unemployed Americans demanding a more accurate explanation for what happened - i.e., the illegal immigration floodgates that were opened by the Biden admin.

Which is also why Biden's handlers will do everything in their power to insure there is no official recession before November... and why after the election is over, all economic hell will finally break loose. Until then, however, expect the jobs numbers to get even more ridiculous.

Tyler Durden Fri, 03/08/2024 - 13:30

Read More

Continue Reading

Trending