init miner code