Once we integrate MerkleStore into the AdviceProvider (#774) mtree_cwm instruction will no longer be necessary - so, we should remove it.
At the same time, we need to introduce a new instruction which would merge two nodes in the advice provider using merge_roots() function. We could call this instruction mtree_merge and it could work as follows:
Call merge_roots() method on the AdviceProvider using the top two words on the stack as inputs.
Execute an equivalent of hmerge instruction to hash the top two words on the stack.
Once we integrate
MerkleStore
into theAdviceProvider
(#774)mtree_cwm
instruction will no longer be necessary - so, we should remove it.At the same time, we need to introduce a new instruction which would merge two nodes in the advice provider using merge_roots() function. We could call this instruction
mtree_merge
and it could work as follows:merge_roots()
method on theAdviceProvider
using the top two words on the stack as inputs.hmerge
instruction to hash the top two words on the stack.