To support the isolated Merkle-root-only validation level in #7502, we need to be able to initialise a ccf.MerkleTree from an intermediate state, not just a blank tree appending leafs. This state is what we call a "minitree", written to the public:ccf.internal.tree table in every signature transaction. It is not necessarily a full tree, as nodes from the left may have been flushed.
The source implementation is in C++ under 3rdparty/internal/merklecpp, from the full implementation (including tests) at https://github.com/microsoft/merklecpp. The only bit we need in Python is an equivalent of deserialise. We should test this against sample data from tests/testdata/.
To support the isolated Merkle-root-only validation level in #7502, we need to be able to initialise a
ccf.MerkleTreefrom an intermediate state, not just a blank tree appending leafs. This state is what we call a "minitree", written to thepublic:ccf.internal.treetable in every signature transaction. It is not necessarily a full tree, as nodes from the left may have been flushed.The source implementation is in C++ under
3rdparty/internal/merklecpp, from the full implementation (including tests) at https://github.com/microsoft/merklecpp. The only bit we need in Python is an equivalent ofdeserialise. We should test this against sample data fromtests/testdata/.