Prepare for mining