Open samwise2 opened 2 years ago
I think the logic here is looking sound after your explainer comment. The main thing that still seems somewhat uncertain to me is how to actually go about performing a tree migration. Operationally, it seems difficult to "wait" for the desired indices to become available for append. Maybe this can be handled purely from the controlling contract level where aggregated trees completely ban regular appends and only allow for subtrees of a certain size to be appended. Still, this is definitely a step in the right direction
This PR adds functionality to append a subtree to a CMT!
The high-level process roughly goes as follows (similar to what @jarry-xiao initially outlined):
Why we only need one changelog in order to accurately fast-forward proofs for subsequent
replace_leaf
calls.Why we don't allow initializing a CMT via subtree append (for now, worth for the future?):