added consensus caching - probably needs some further testing.