use cursor caching for chain state builder as well, try out database shrinking