How does bit coin mining work