Mining-Friendly Cryptocurrencies