writing blocks and transactions to mongo