We should pull @roysc's rewrite of smt.go upstream here (https://github.com/vulcanize/smt), as it provides a substantial and well-written performance improvement by not recomputing the root on every update, that also produces the same roots as this smt.
In order to do so we need to first:
Re-implement deepsubtree;
Re-add value storage.
Given that the Cosmos SDK store v2 may be abandoned, we are looking into resuming the work of integrating SMT into store v1 (https://github.com/celestiaorg/cosmos-sdk/pull/12) by @tzdybal. The way that we re-add value storage will depend on the requirements of store v1 and in particular its requirements for historical state access, rollback, and pruning, so this needs to be analyzed first.
We should pull @roysc's rewrite of smt.go upstream here (https://github.com/vulcanize/smt), as it provides a substantial and well-written performance improvement by not recomputing the root on every update, that also produces the same roots as this smt.
In order to do so we need to first:
Given that the Cosmos SDK store v2 may be abandoned, we are looking into resuming the work of integrating SMT into store v1 (https://github.com/celestiaorg/cosmos-sdk/pull/12) by @tzdybal. The way that we re-add value storage will depend on the requirements of store v1 and in particular its requirements for historical state access, rollback, and pruning, so this needs to be analyzed first.