You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we handle left and right proofs separately but it seems that we need to merge the proofs. Implement the logic to merge and de-merge the proofs
You should implement two functions.
func mergeProofPaths(leftPath,rightPath []ProofNode) (mergedPath []ProofNode,error)
leftPath and rightPath are lists of ProofNodes, which define paths from the root node to some leaf
mergedPath represents the merged list of leftPath and rightPath, with no duplicates.
func splitProofPath(mergedPath []ProofNode) (leftPath,rightPath []ProofNode,error)
This function should do the reverse of mergeProofPaths, ie take a mergedPath, and split it into leftPath and rightPath.
It might be useful to look at this, and an example trie here. Note that ProofNodes are either Binary or Edge.
The text was updated successfully, but these errors were encountered:
Currently we handle left and right proofs separately but it seems that we need to merge the proofs. Implement the logic to merge and de-merge the proofs
You should implement two functions.
func mergeProofPaths(leftPath,rightPath []ProofNode) (mergedPath []ProofNode,error)
leftPath and rightPath are lists of ProofNodes, which define paths from the root node to some leaf
mergedPath represents the merged list of leftPath and rightPath, with no duplicates.
func splitProofPath(mergedPath []ProofNode) (leftPath,rightPath []ProofNode,error)
This function should do the reverse of mergeProofPaths, ie take a mergedPath, and split it into leftPath and rightPath.
It might be useful to look at this, and an example trie here. Note that ProofNodes are either Binary or Edge.
The text was updated successfully, but these errors were encountered: