Use quark database instead of current state in write graph block.