Miner changes to enable non blocking operations in wallet

Based on the multi-gcm commit