Public and Private Blockchains