A look into how bitcoin mining works and how we can derive decentralised consensus from it.