I Tried to Delete Something From a Blockchain. The Contract Said No, Permanently.

By Telmo ·

It cost 2,532 CKB to learn that the word I had been using for months was the wrong one. Three wrong answers came first, and I nearly reported the first as fact. On telling storage from a purchase, and on asking a system a costly question for free.

I went to take something back off a blockchain and the contract refused. Not this time, not under these conditions: never. There is no operation it will accept that makes the thing cease to exist, and the sentence saying so had been sitting in a public file the whole time, four words long, written by the person who built it. That cost me 2,532 CKB to find out, and it took three wrong answers before the right one. I nearly reported the first as fact. For months I had called it a deposit. In my own documentation, in conversations, whenever anyone asked what it costs to put a build of my app on chain: a deposit, I said, the coin is locked while the thing exists and comes back when it does not. I had never once checked whether that was true. It is not. What follows assumes nothing about blockchains. The case that taught me happens to be on one, but the mistake is the ordinary kind, made in backups, logs and retained data every day. By the end you will have a ten-second test for telling storage from a purchase, one technique for asking a system a costly question for free, and a rule for reading error messages that I learned the expensive way. A deposit and a purchase are two different things A deposit is money that is somewhere else and comes back. A purchase is money that is gone. The difference is not the amount, and it is not how long it sits there. It is one thing only: whether a path back exists. Everyone knows this about a rental deposit. Almost nobody checks it about software. In my case, publishing a build creates three cells, and on CKB a cell has to hold enough coin to pay for the bytes it occupies. That is about 211 CKB each, 633 per publish, and the network fees are noise beside it: 0.0128 across all three transactions. I had four publishes from a single day in September, three of them long superseded and pointed at by nothing. About 2,532 CKB sitting there. And I called it a deposit. Not as a deliberate misstatement. I called it a deposit because that is…