Categories
Bitcoin

Bitcoin Core Wishlist

Bitcoin Core Wishlist

I started to contribute code and reviews to Bitcoin Core a few months ago and gradually accumulated lists of stuff I’d like to see. Some of these I can do myself, others are still beyond my level of expertise, still others might be terrible ideas and never happen.

Categories
Bitcoin

Decoding a BIP-70 Payment Request

Decoding a BIP-70 Payment Request

I was trying to understand BIP-70 Payment Requests a bit better, mainly because I am confused by BitPay’s claim that they can somehow block “mistaken” transactions:

We can also analyze transactions to make sure an adequate bitcoin miner fee is included. If the fee isn’t sufficient to allow the transaction to confirm on the bitcoin network on time, BitPay can return a helpful message back to the wallet to let the user know. Mistaken payments will never reach the Bitcoin network.

The wording suggests that a wallet sends the transaction to BitPay for approval and they forward it, but afaik that’s not what the BIP-70 does. According to the specification wallets broadcast the transaction via the P2P network like any other transaction. Of course BitPay can always choose to not honor a transaction they receive, but I don’t see how BIP-70 changes that.

Categories
Bitcoin

On Fees

On Fees

When sending less than €1,000 of Bitcoin it’s worth paying attention to fees, but keep mind that your payment is competing with transactions that move €100,000 on equal terms. Transactions are charged per byte, not as a percentage of the amount. But willingness to pay is obviously a percentage of the amount.

It’s interesting to note that although the price has increased more than 10x over the past year, transaction amounts in BTC terms haven’t changed much:

Transaction Value Average in BTC according to tradeblock.com. Average is 9 BTC, median 8.1.

Neither have fees as a percentage, they still hover around 0.75%:

 

Fees as percentage of transaction volume in the same time period according to blockchain.info

Categories
Bitcoin

Debugging Bitcoin Core Functional Tests

I was trying to improve the functional tests for bumpfee, a Bitcoin Core wallet feature that lets you increase the fee of a transaction that’s unconfirmed and stuck. Unfortunately I introduced a bug in the test, which I’m still in the process of tracking down. Every disadvantage has its advantage, so I took the opportunity to better understand the functional test framework and its powerful debugging tools.

Categories
Bitcoin

A Short History of Replay Protection

A Short History of Replay Protection

This article is based on the slides I used for a presentation at the Hong Kong Bitcoin Developer meetup on November 1st, plus some feedback I received on the chainspl.it Slack. This was before SegWit2x was called off, but in the interest of (my) time, I haven’t adjusted this article to reflect that. I’m sure something similar will happen again anyway and it’s a good mental exercise to think through what could have happened.

Investor TL&DR

For non-technical readers a useful perspective — even if technically not accurate — is to distinguish between airdrops and contentious hard forks. This assumes you are in possession of your private keys, as you should.

Categories
Bitcoin

Opt-in hard-fork without alternate transaction history?

Opt-in hard-fork without alternate transaction history?

IETF’s RFC 7282 is an eloquent document which describes important aspects on koop consensus, and worthwhile if you want a more nuanced interpretation than “widespread agreement and disagreements addressed (even if not acommodated)”.

Measuring Consensus

Once we have a concrete technical proposal, and it seems to have some traction, we need to figure out if we really have consensus before it gets deployed.

Moving from RFC 7282 style technical rough consensus to economical and political (rough) consensus is quite problematic. If you want to stay in the spirit of RFC 7282 then you should only use polls to see if there is any opposition. You then need to actively go out and figure out what people’s concerns are and make sure those are reasonably addressed. You have to go through all that before you accept anything below 100% support.

Categories
Bitcoin

Replay Protection in The Blockchain Wars

Replay Protection in The Blockchain Wars

First, I’ll let Jimmy Song explain transaction replay attacks:

However what this short video doesn’t cover, is that there are multiple levels of replay protection. I believe a lot of anger and confusion stems from not properly understanding this. So I’ll do my best to explain.

Categories
Bitcoin

Historical Bitcoin Core Client Performance

Historical Bitcoin Core Client Performance

After reading about performance optimizations on the Bitcoin Core blog, I wanted to see a chart of that. I couldn’t find one, so I spun up a bunch of EC2 nodes and set out to measure how long it took each new version of the bitcoin core client to sync the full blockchain.

Initial Blockchain Download (IBD) on Amazon EC2 (~474K blocks, t2.xlarge, 4 cores, 16 GiB, GP2 200 GiB SSD). Light blue is blocks up 2014–01–01, dark blue up to early July 2017. For explanation of Assume Valid Block, see text below.
Categories
Uncategorized

Some books on the economy

Some books on the economy

After listening to another unconvincing and — more importantly — unscientific oversimplistic rant about a magical world without government, I decided to post a comment on Youtube! Actually a bunch of them. Maybe I should just write blog posts again

One of the folks I chatted with in the comments is Michael Tidwell from the Blocktime podcast. He said:

I’m doing some soul searching in my life… i don’t really know if I’m a libertarian or a liberal

I know the feeling. As much as I enjoy Peter Schiff’s podcast, as soon as he ventures away from monetary policy and the need for a balanced budget, his all-government-is-bad conviction often leads to some really clumbsy reasoning.

There’s almost a religious element to some peoples hate for government and blind faith in the mythical free market. Statements are based on dogma, not on actual facts or observation. There’s a lot of “you can’t understand, because the truth has not been revealed to you” retoric. And there is the usual gospel: how people always used hard money (not true), that government is always bad, etc.. The tone is invariably highly emotional, which is another sign of some sort of brain-washing.

Anyway, the real world is much more complicated. I responded with a list of books I read over the past decade. Let me share those here:

Anthropology / biology:

Friendly reminder that the economy consists of humans.

Biographies:

  • Volcker: The Triumph of Persistence — William L. Silber. My favorite part is where he needs to explain Nixon —with the attention span of a toddler— the whole gold standard issue in 1973. Quite a different setting than the conspiracy theorists like to imagine.
  • Per Slot van Rekening — Zijlstra (in Dutch, but a friend of mine translated some of it): Dutch Central Bank president from 1976 to 1982 and Minister of Finance before that.
  • Stress Test: Reflections on Financial Crises – Tim Geithner. He’s both humble and entertaining; he also shows how important it is to have competent people in government (and elsewhere) when a crisis hits; let’s hope Trump recruited wisely.

These are just people, usually quite competent. They have lots of meetings, make decisisons on limited information, experience frustration, etc. Reading their stories tends to cure the sense conspiracy.

Other

None of these will offer you a framework to understand everything, or offer a simple recipe to salvation for humankind, sorry.

P.S. don’t forget to buy some Shitcoin!

Categories
Uncategorized

Ford vs. modern day minimum wage and overwork

I finally got around to reading more about what Ford said back in the day. I think it’s an urban legend that doubling peoples pay leads to more consumption and that leads to increased prosperity. Ford seems to have believed this himself, but if you read the article he also points out two other things:

1 – he didn’t just double the salaries overnight. He only paid people a competitive salary, which happened to be 2x minimum wage. He found that cheaper people were not productive enough and fired those: “we are not inclined to keep a man who is not worth more than the minimum wage”.

A company that increases the productivity of their employees – rather than waste it – is able to produce more stuff more cheaply. Cheaper stuff means more people people – including but not limited to their own employees – can afford it. That’s all there’s too it. If there was larger supply of skilled workers, he would have paid them minimum wage and the company would have been even more profitable.

2 – much more interesting to me is that he encouraged his employees to get enough rest. He reduced the work week from 6 days to 5. He paid them to rest and to not work in those other days. Resting increased their productivity during work hours so much that it offset the lost time. 

He had to make sure people didn’t just take the extra money and then work two jobs – or drink, like the French (his words). This race to the bottom might be why he lobbied to make this the law. That and such a law would hurt his less efficient competitors.

From (1) follows a very important warning to well intentioned initiatives in places like New York and Los Angeles to increase minimum wage: if employees can’t achieve $15 of productivity per hour, they will become unemployed. Ford is careful not mention the fate (starvation?) of those men he was “not inclined to keep”.

From (2) follows a very important lesson for companies that work their employees to death: more hours *reduces* total productivity. This is still true.