Check or restore keys during sliced tree recovery
kushti opened this issue · comments
Alexander Chepurnoy commented
Currently keys are stored during manifest and subtrees serialization in BatchAVLProverSerializer. However, they are not protected via collision-resistant hash function for internal nodes. Thus, currently verifier (calling verify() functions in BatchAVLProverManifest and BatchAVLProverSubtree) is blindly trusting the keys, which opens possibilities for adversaries.
So we need to whether avoid storing keys for internal nodes at all, or implement check (for subtrees, and for manifest(assuming bottom keys of subtrees are correct)).