Category: Sci/Tech

September Challenges/To-Do’s

September has snuck up on me and sees me papier mache-ing like a mad thing - my aim? To create a piece of textural science art for the visually impaired and the blind.

This piece of art work does not just involve papier mache though - it involves knitting, sewing, clay sculpting, sugru, polymer clay, wire work, metal casting, wood carving, stone carving, geology and acrylic paints not too mention lots of recycled pots and tubs and our mountain of graze boxes.

This all needs to be ready for the 24th of September for the Centre Arts Exhibition in Braille. And yes I am panicking - it is a play on the tree of life but I have gone for a more coral/byozoan feel and hope to have life in various forms sitting in the polyp tubes (what I have instead of branches). A relief of the scientific creation of life will hopefully be feelable along the base along with an audio poem/story of life.

Apart from that I am researching stuff for my Punk in Pink series and generally trying to take the musical me forward.

What if my child is gay?

It's widely held that it's a scary experience for somebody to tell their parents that they are gay. As a parent, therefore, I began to wonder how I could arrange it so that, if any of my children turn out to be gay, they could be spared any distress in telling us about it.

I surmised that the distress arose because of this pattern:

  1. Child is raised by parents with the assumption that they will be straight. This might be a stated assumption - the parents actually talking about "when you start to bring [girl/boy]friends home" or "when you get married and have kids", or simply be signs of homophobia in the parent. Perhaps it could even be that the parents show no signs of expecting their child to be heterosexual, but the child (through other social conditioning) nonetheless assume (correctly or not) that's what their parents expect.

  2. Child, at some point, realises they have desires they feel their parents would disapprove of or be shocked by, as well as or instead of "normal" heterosexual desires.

  3. Child eventually announces this to the parents.

  4. Parents reaction ranges from "Oh, that's nice dear" to "Oh my god! What a shock... but now I think about it it's no big deal" to "YOU ARE NO CHILD OF MINE".

I presume it's either the fear of not knowing how the parent will respond, or suspecting they'll respond negatively, that makes it stressful for people to tell their parents that they're gay, bisexual, transgender, or whatever.

So I started wondering if it'd be best to, at some point, outright say "You know, your mother and I are totally fine with whatever sexual orientation you choose". Maybe that'd be a bit awkward; perhaps it'd be better to just to leave it implicit-but-hinted-at by openly introducing our gay/poly/etc friends to the children as such, and other such ways of showing that we're OK with it all.

But I began to realise that it would be much better if our children never actually had to "come out" to us about anything. Rather than trying to make step 4 of the above list less traumatic, how about if we just make it unnecessary by stopping the process at step 1?

I mean, ideally, our children should be able to bring home same-sex partners or whatever without feeling they have to gain our permission and acceptance first.

For a start, I think people are too enthusiastic about putting themselves (and, worse, each other) into boxes. I mean, I am attracted to women, and have never fancied a man, so I guess I count as straight, but I can find no reason to assume I might never fall in love with a man (I might just be really really picky and have not met Mr Right yet). And what about a bisexual person who has the occasional gay crush, but never really acts on it, and (quite happily) only ever goes out with members of the opposite sex, eventually marries one, and lives happily ever after? There's no problem with that, and their actual sexual label becomes a matter of perspective.

So, sod that. As my children are human beings, I am aware that they might acquire any combination of sexual tastes that humans are capable of; and those tastes are their own affair - which they may or may not choose to discuss with their parents, as they see fit. And what kinds (and numbers; don't forget polyamory) of people they actually bring home to meet us is their choice. And I don't require them to declare a classification up front. I want my children to feel free to bring home whatever partners take their fancy.

Of course, I don't want to deny them the right to stand up and say "Father! I wish to declare that I BAT FOR THE OTHER TEAM!" if they want to. I think that labeling yourself can be an important thing for a young person, learning to establish their own identity. If they want to do that, that's fine, and I'll support them in doing so and treat the event with the gravity they seem to want from it; if they come to me looking like they're after a rite of passage, I'll try to provide one. But I don't want them to think they have to.

But what I really want in the end, I guess, is for my children to feel free to be themselves (at least at home; I can't be responsible for the reactions of the rest of society, sadly), and for them to know that they have my support in whatever they do, as long as they do it ethically.

Scientists

I've been reading a book lately called "The Brain that Changes Itself", which discusses a once-controversial theory that the adult brain can rewire itself in the same manner as the developing brain, with the main difference being that it just requires more effort to focus the attention. It used to be believed that once the brain had finished developing, its structure and function was fixed. However, it turns out that, with the right approach, the victims of strokes and the like can retrain their brain to perform the lost functions with different bits of neural tissue.

But that's not what I'm writing about today.

One of the things that has struck me in the book's account of how the neurbiologists rejected this controversial idea, along with previous impressions I had obtained from other sources, is that the academic community is riddled with idiots who reject evidence that contradicts their beliefs about their field.

To see why this is crazy, look at it like this. Science is, largely, about finding the underlying truths of the Universe. The problem is that these underlying truths can rarely be directly observed (and we've figured most of the ones that can out by now). One cannot directly percieve an electron, but one can deduce its existance by perceiving the effect of an electron gun in an evacuated chamber pointed at a phosphorescent screen. But there are multiple interpretations of that experiment - perhaps there are tiny charged particles being released which stimulate the screen into producing light... or perhaps the electron gun actually causes the metal of the negative electrode to ablate and the resulting ion cloud then condenses into an invisibly thin thread which coils out across the vacuum until it touches the screen, whereupon electricity flows directly down the wire and causes the spot of light. Perhaps the vacuum is required, not because air inhibits the free motion of electrons, but because the air disrupts the formation of the thread.

Yet we can rule out the thread theory in a number of ways, and there are other experiments that show that electrons are discrete charged particles. It's the weight of a whole heap of evidence that all reinforce the correct theory and disprove all the alternative theories. However, one can never be entirely sure that another theory has yet to be discovered, which all the existing experiments fail to disprove - but which leads to the development of an experiment which disproves the electron theory, and reinforces the new theory. Perhaps there are no electrons; but the "electron theory" has provided us with useful predictions, and nobody has yet found fault with it. So we stick with it. Even if it's wrong, it's useful - and if we ever find it's wrong, that will give us the clues required to find a better theory.

But there are levels of deduction involved here. We directly observe the construction of electron guns and the appearance of spots of light with our eyes. We apply previously reinforced beliefs that the electrical power supply we connect the electron gun to will provide a voltage, and that the electron gun will therefore emit electrons. We observe the appearance of a spot of light, and therefore conclude that the electrons flew through the chamber and caused the spot of light. And from that, combined with existing knowledge about the nature of light and matter, we construct a theory that electrons can travel through a vacuum then cause phosphorescent screens to glow. Each level of further deduction is less certain then those that it builds upon, since its truth depends on their truth, plus a further step of deduction - which might be wrong in itself.

So what do we do when new evidence comes and appears to disprove our theory? Say somebody publishes the results of an experiment that show that, if a kitten is within one metre of the chamber, the spot of light on the screen grows into the kanjii for "potato". The electron theory does not predict this. Have we disproved the theory of electrons? Or have we merely discovered that kittens emit complicated high-frequency magnetic fields that disturb the paths of nearby electron beams? Well, I'm sure further experiments would be performed, surrounding kittens with Hall sensors and SQUIDs and the like, but for now, let's imagine we only have that one data point to look at.

Electron theorists would probably question the validity of the experiment at all. For a start, it is a leap of faith that the experiment was set up correctly. Perhaps the electron gun itself is defective and projects the kanjii symbol directly, and the kitten has nothing to do with it. Perhaps there are coils under the bench generating magnetic fields that steer the beam to draw the symbol, either accidentally or as part of a deliberate academic prank. In this case, with seemingly unrelated objects (kittens) having suspiciously unexpected consequences (kanjii characters), that is a distinct possibility, so the kitten theorists would be under additional burden of proof to recreate the experiment - and to ask electron theorists to defend their theory by recreating the experiment themselves to show that it does not occur with "trusted" equipment. For sure, the academic community does need some level of protection from a "denial of service" attack from charlatans assaulting it with fraudulent claims that have to be tediously experimentally dismissed. There is scope to accidentally perform flawed experiments due to overlooking some factor or failing to test all the equipment used for defects, leading to honest results that turn out to be misleading. This gives some credibility to the concept that some data can be rejected out-of-hand for contradicting widely-held theories, but it is all too easy to take conformist censorship at this level too far and reject evidence that actually shows flaws in currently-sacred theories.

But what if the conflicting evidence is less silly, or it is independently and widely confirmed in other experiments, showing there is definitely some effect at work? Perhaps kittens do emit mysterious high-frequency magnetic fields - in which case, our theory of electrons is still valid; it's just our theory of kittens which was wrong. As physicists are often more familiar with electrons than kittens, it's easy for them to defend their electron theory and question the researcher's grasp of kitten theory, thereby making it somebody else's problem. Meanwhile, biologists asked to defend the theory that mammal tissue can't generate intense, high frequency, magnetic fields might point to excellent arguments about the maximum rates of charge movements in various tissues, and tell the physicsts that their electron theory must be all wrong. At least we now have some kind of debate, rather than outright censorship, but - particularly in cross-specialisation problems like this one - it's all too easy for both sides to just ignore the evidence and blame it on the other.

But what makes scientists so defensive? Good scientists realise that the data is all we can be sure about (and, even then, we must be careful of experimental errors, or failing to control for unknown influences). They treat theories as temporary affairs, which suffice until they are found wanting, or something better is found. Where does this academic Nazism emerge, where academics will often jump immediately to questioning the motives and competence of people who hold views that contradict the mainstream, leading to the mainstream remaining mainstream long after the weight of contradicting evidence becomes overpowering?

I think a part of the problem is the fact that scientists with new ideas have to fight so hard to get them heard over the mainstream in the first place - they find it hard to give up the fighting mentality once they've been accepted.

Another part of the problem might be human nature - scientists are taught the existing lore of their field in lectures where they soak it all up, and probably record it in their minds as unassailable truth. I suspect they are much more open to reconsider theories they encounter as "new" after having lived, for a while, in an academic world in which no theory explaining the behaviour in question had yet emerged. Theories considered "complete" when they were learnt are probably rarely questioned.

Cloud Storage

Currently, you can go to various providers and buy online storage capacity (IMHO, rsync.net is best, after research I did to find an offsite backup host for work). It's more expensive than a hard disk in your computer, and miles slower, but it has one brilliant advantage: it's remote. So it's perfect for backups.

And that's the heart of a free market - storage is cheap to the cloud providers (they just buy disks, and in bulk at that), but their storage has more value to you than your own storage because of it's remoteness. So they can rent it to you at a markup, and you get a benefit, and everyone is happy. Money flows, the economy grows, and one day we'll get to have affordable space tourism et cetera.

But large, centralised, cloud storage providers are attractive targets for people who want to steal data. They become centralised points of failure; if they go bankrupt, lots of people lose their backups. Therefore, it's smart to do your backups to more than one of them, just in case. But that means setting up your systems to talk to each one's interfaces, arranging payment and agreeing to terms and conditions with them all individually, and so on.

Surely this state of affairs can be improved? With ADVANCED TECHNOLOGY?

Well, I think it can, and here's how.

Imagine a marketplace for cloud storage. This might be a centralised trading server, or it might be a peer-to-peer protocol... greater minds than I are working on decentralised P2P marketplaces, I hope. But however it's implemented, imagine that I can run a daemon on my server that measures my free disk space, subtracts some amount (10GiB?) for my short-term growth, and rents the rest out on the marketplace. By looking at the depth of market (how many unfulfilled bids for how much storage are out there, ordered by bidding price, highest first), it can choose the best price it can rent my storage for that will use up my available storage. My offer will include a price to upload a block (base price + price per byte), the price to keep a block (base price + price per byte, and the billing period) and the price to download a block (base price + price per byte).

It's an interesting question whether periodic storage fees, or just having a "successful download bounty", will win out. Charging storage fees encourages the buyers to notify you if they don't want a block any more, but just charging for successful downloads (and just deleting blocks that aren't referenced on an LRU basis to free up space) is beautifully simple.

The trust model is rather different to normal cloud providers. If a provider loses their data, I can't sue them; I just don't get to pay them the download bounty for getting my block back. So I'll have to store my data widely across several providers, and prices will lower to take account of that, and I'll need to do trial downloads to check my blocks are still available from time to time, and if not, hire a new storage provider to take a new copy of that block from a surviving copy.

But all of this can be done in software. A storage manager app would present a simple get/store block interface to, eg, Ugarit or Tahoe-LAFS, but behind the scenes, it would manage relationships with providers, checking blocks are available, ensuring there's a sufficient number of copies of each, shifting between providers when rates go up or if a provider's reliability score drops too low, etc.

But all of this depends on it being easy for computers to send money between themselves, which is where Bitcion comes in. Storage providers and consumers can just run bitcoin wallets and arrange transfers between themselves.

The end result? I can run a daemon to rent out spare storage space on my system, and money would slowly accrue in a Bitcoin wallet. The daemon would rent out all but a safety margin of my space, and as I used up my safety margin, it would shed blocks (notifying the owner) to make more room, and increase its offer price in the market to reduce demand so that the lower-paying blocks move willingly and can be replaced with higher-paying blocks.

And I can run another daemon as part of my backup system, that would spend from the same bitcoin wallet to get backup space on other machines. When I have mostly empty filesystems, I will be spending little on backups, and earning lots on renting that space out, so money will accumulate... when I start to fill the filesystems up, the trickle will slowly reverse, and then perhaps I should spend my profits on a new hard disk before they all go and I have to top it up from my own Bitcoin wallet!

Details

The devil's in the details, as always. The marketplace will depend on being able to place bids in a standard format. Potential buyers will need to be able to introduce themselves, perhaps via an HTTP-based protocol served by the storage-for-hire daemon on my server; sign up for an account by registering a public key, and then access upload/download/delete block interfaces. The daemon would quote a price in the market, but each block upload would have to be annotated with the rates the buyer is offering, to avoid race conditions when rates change during a transaction. Blocks with unattractive rates can be rejected by the server. There would need to be a back channel for the server to asynchronously notify buyers that it needs to get rid of a block - I'd hate to force buyers to have public IPs (many will be behind NAT) by giving them an HTTP endpoint, but perhaps a choice of that or polling the server to ask for blocks that need to be shifted within a time limit would suffice. It would also be polite for the server to inform the buyer of any blocks it had to delete without notice, rather than waiting for them to check them.

But how to address blocks? On the one hand, I want content-addressed storage, as it prevents cheating. There's no way a bad server can claim to have blocks it's deleted by sending back random junk and saying "But that's what you gave me! PROVE I'M LYING!" if they are identified by hashes. But on the other hand, existing systems have their own addressing schemes (Ugarit identifies block by a keyed hash of their uncompressed plaintext contents, so that the hash doesn't give away the content (it's a keyed hash), but it will also remain unchanged if the compression or encryption algorithms are upgraded - old blocks can still be read while new blocks are written with the new algorithms, and old blocks can be re-compressed and re-encrypted without breaking the references to them). So enforcing that blocks are identified by the SHA256 of their ciphertext would exclude various uses.

The best scheme I can think of is this: each block is identified by a client-supplied ID string combined with a hash based on an agreed algorithm. So the server would say "I support SHA1, SHA256, and Tiger", and the client would say "Ok, here's a block I want to call Boris, and I like SHA256", and the server would reply with "Ok, that block's called Boris:<256-bit hash>". The client should check the returned hash matches the hash it computed itself. A client that's happy with server-assigned IDs would give all their blocks the same name (the empty string), as the hash in the resulting identifier keeps it unique. The server will store the block by hash (deduplicating blocks with the same hash), but keep a per-customer table mapping names to hashes. If the client hasn't provided distinct names, then the LAST mapping for the name provided is kept.

Meanwhile, on retrieval, a block can be requested by name, or by hash. The client should remember the hashes, even if it uses names, so that it can check that the server isn't sending it a garbage block.

As a Ugarit backend, this would work fine; the Ugarit keyed hash can be used as the name, and the server's hash stored for cross-checking on retrieval. If the local store is lost due to disaster, it could either be restored from another backup somehow, or it could just be skipped and we hope that the servers don't lie to us (the latter would be better than refusing to try to restore at all!). Ugarit tags (which are the roots of the hash tree) can be stored by using the tag name as a block name, and using the fact that multiple uploads with the same block name just overwrite the name->hash mapping.

Needless to say, clients should encrypt ALL their data! You can't trust random providers.

Have I missed any other scams? Servers might try to accept lots of blocks and keep the upload fees and never keep them. That provides an incentive to servers to not charge upload fees at all, and just hope to make money on download fees and/or storage. It'll be interesting to see how the market ends up structuring itself! Also, as it's a low risk to accept data from somebody but a high risk to send money, I think the protocol should be based around periodic billing at the end of the period, rather than per-operation micropayments (that makes more efficient use of Bitcoin's transaction charge and hour transaction confirmation latency, too). Billing periods could be anything from a day upwards.

But this is a real cloud, in a sense far beyond the current definition of cloud computing. Millions of tiny providers, all competing in a marketplace, with the clients automatically spreading their risk across them in a fine-grained way. I think that'd work for storage, as it's easy to define and commoditise; doing it for computation might be possible, but it'd require much more standardisation of execution models and sandboxes and the like...

(Thanks to the folks in #bitcoin on Freenode IRC for inspiration for all this!)

UPDATE: A friend suggests an improvement over periodic downloads to check the data is still there. Have a "check" operation where the client supplies a random key and a block name or hash, and the server has to hash the block along with the key and return the result. That allows the client to check the block is still there if it has a way to get a local copy of the block. Otherwise, it would still have to rely on downloading the block and checking the hash matches.

Lords of a new economy

Pondering Bitcoin, I recently opined:

Who sets the difficulty of the puzzle and all that? The computers in the network do - when the system was created, rules were agreed, and written into the software. As everyone runs software following those rules, anybody solving easier puzzles or trying to award themselves more bounty for doing so will have their bounty-claiming transaction rejected as invalid. To loosen the rules, a majority of the computers in the system will all need to accept the new rules - so it will require consensus from the community.

I've been thinking more about this.

What does it really mean to say a transaction is "accepted" in Bitcoin? I want to pay somebody 10BTC for a piece of computer hardware. So my bitcoin client software looks over my bitcoin addresses, and assembles a transaction stating that I take money from a bunch of previous transactions that send money to my addresses and send 10BTC to one addresses, and the change to a newly-minted address of my own. That's signed by my private keys, to prove I own the addresses the money is coming from, and fired off into the Bitcoin network. Which, in practice, means it's broadcast so the whole world sees it.

Now, anybody seeing that can check it's valid, by looking at the global transaction history to see if the source transactions were valid, and that the transaction is signed to prove that I was the owner of the addresses those transactions paid into, and so on. So the recipient knows I'm sending them the money within a few seconds. However, there's a number of frauds I could be committing, including taking advantage of network delays to spend the same money twice - which won't be detected until the second transaction also arrives at the recipient and they realise they've been duped. So there's more to it than just that.

You can consider money to have "cleared" into your address if, and only if, other recipients will accept you transferring that money to them as valid. So if some of your balance is from a dodgy transaction, and you decide to try and spend it anyway, then the new recipient should reject that.

So to build a global standard of "accepted transaction", we have the bitcoin miners. They all run software that checks the validity of transactions, and assembles groups of accepted transactions, and then invests significant effort into demonstrating that they agree with it. This means that an onlooker can tell that the majority of the miners agree on the validity of a transaction if lots of proof of it accumulates. Currently, the standard is that this involves about an hour's total computation from the majority of the miners in the system. If your transaction has withstood that much scrutiny, then it's considered "baked in", and transactions spending the money you received in that transaction will now be considered valid in turn - in other words, you can now spend the money. The miner's reward for providing this service is that they are allowed, subject to certain constraints, to sneak in their own transactions that let them create money from nothing and give it to themselves; and they also get any transaction fees that were provided with the transactions they accept.

So "validity" all boils down to what transactions more than 50% of the miners will accept. If there was a bug in the software that let a transaction which created money from nothing count as valid, then the miners would accept it as valid and it would be baked into global history. And therefore the senders of those transactions could magic money into existence. Not cool.

But if that bug was found, and a new release of the software rushed out, then that loophole would be closed as soon as more than 50% of the miners ran that software. Indeed, if such a bug were found, many miners would probably stop mining - as contributing to devaluing the economy would reduce the value of the bitcoins they can award themselves for doing the mining - until the patch was in place; bitcoin transactions would just hang in limbo until it was ready.

Nonetheless, it seems that a lot of scrutiny needs to be applied to new versions of the rules miners use to validate transactions in case they have loopholes. As they are the rules of the Bitcoin economy. And a LOT of scrutiny needs to be given to the implementation of those rules, which is where it's really easy to let bugs in.

Changing the Rules

For instance, as there's a cap of about 21 million bitcoin in existence, and each bitcoin can be divided into at most a hundred billion little pieces, there's a constraint that you can never spend an amount smaller than a 21*10^17th of the total value of the economy. When we're a universe-spanning colony of post-singularity time-bending superbeings, that might be an issue.

But it could be fixed. Just create a new currency, within the same bitcoin infrastructure (but with its own transaction types for transacting it). And then create a new kind of transaction which splits N bitcoins into N*2^128 "minicoins", and another which does the reverse. You'd extend the "is this transaction valid?" routine to now accept four kinds of transactions: Traditional bitcoin ones, new minicoin ones, and the two directions of exchange transactions. If everyone agreed that was a good idea, and all the implementations implemented it, and everyone installed the new implementations, then after a while, people would start to find their test transactions attempting to split a bitcoin up would be accepted by the global mining community. At which point, the new change would be "in". The changeover to the new implementation should be done at the same time across all the miners if possible (perhaps at an agreed block number), as otherwise, miners running the new rules before a majority of the mining capacity is would sometimes win blocks that don't get accepted by the majority, losing their bounty (and, therefore, having wasted their time).

A similar process could be followed to change the rules for generation transactions; perhaps the bounty rules might be changed so that the system will no longer cap at 21 million BTC, but grow with the size of the economy or something.

Which is very interesting.

Making the change would require consensus amongst the implementation teams (currently, there's only really one, with Freecoin hopefully soon being another) followed by consensus amongst the miners to install the new implementation.

Compare that to the analogous process for national currencies: governments can choose to print more or less money as they see fit, while a tangled combination of laws and banks generally define the rules for transferring funds. The Bitcoin economy is, largely, defined by the miners and what transactions they choose to accept. They know that if they change their rules to unfairly benefit themselves over non-miners, then they can't stop more people joining up and becoming miners too, dissolving their advantage with more competition; and if they ruin the Bitcoin economy, everyone will start a new one with saner miners, and their mined bitcoins wil become worthless. There's little incentive for an individual miner to accept transactions that other miners wouldn't; because if they win a block with such a transaction in and try to claim the bounty, the others would reject their block due to the bad transaction, and they wouldn't get their bounty accepted. It's in nobody's best interests to vary the rules without gaining a consensus between the implementers first, so any change to the rules will necessarily be rather conservative and careful.

But, the bitcoin economy needs to be careful. Don't let any one miner (or mining pool) get too close to 50% of the hashing capacity. And get more competing implementations of the rules in place. Bugs in the system would hit confidence in the economy hard, even if they were fixed rapidly. (Also, rolling out en emergency bug fix would probably be the easiest way for an attacker to try and slip a new bug in with insufficient review).

And... back to politics

It's not often that you get to see anarcho-capitalism and enlightened self interest having such free reign of expression; and it will be interesting to see how it pans out.

Currently, powerful vested interests (largely, big business) have found ways to lobby governments to do things in ways that benefit them. What will happen if bitcoin becomes a significant proportion of the world economy? There will be cries that we can't let the world be run by a bunch of nerds. Perhaps countries will enact rules that bitcoin miners on their soil have to run approved software, and those countries will form an international committee to decide what rules that approved software should run. Or perhaps private bitcoin mining will be made illegal, and nations will set up their own supercomputers to dominate the mining capacity, with their own rules controlling the money supply. I can see that happening; and then anti-money-laundering rules (transactions above a certain amount need to be signed with an X.509 identity or similar?) will be introduced. But that will, at worst, just cause a fork of the chain, as people who want an unregulated economy will just go off on their own separate way with the old rules.

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales