implement bitcoin miner and fix bugs in LSP