Using something like prolly trees might help though it might be too much re-arch
https://youtu.be/X8nAdx1G-Cs?si=oZ3jR-jQwqLaTt5V
And a blog post explaining this sync process
https://joelgustafson.com/posts/2023-05-04/merklizing-the-key-value-store-for-fun-and-profit