Skip to content

[Persistence] Evaluate Celestia's Sparse Map Tree implementation #199

@Olshansk

Description

@Olshansk

Objective

Determine if we can leverage an open source Sparse Merkle Tree implementation or if we need to implement our own.

Origin Document

The implementation of Pocket Network's V1 state hash can be done independently of #147 by leveraging an existing library, but its correctness is dependent on that of the underlying library.

With cosmos leaving IAVL, there are lots of other options available in the industry. cosmos/cosmos-sdk#7100. Per the research done in this deck, Libra's Jellyfish Merkle Tree seems to be the best path forward.

One of the best open source, fully in Go, implementations we've found online is from Celestia: https://github.com/celestiaorg/smt. I've reached out to see if this is being used in production via a Tweet but have not heard back.

Screen Shot 2022-09-08 at 6 22 47 PM

Goals

  • Review, evaluate & understand Celestia's open source SMT implementation
  • Stretch goal: merge changes/ improvements upstream; opportunity to contribute back and work more closely together

Deliverable

  • A determination of the correction of Celestia's implementation
  • A decision if this codebase could / should be used as our SMT implementation
  • Optional: changes / improvements to Celestia's SMT

Non-goals / Non-deliverables

  • Implement any part of the Pocket Network V1 state hash

Creator: @Olshansk

Metadata

Metadata

Assignees

Labels

coreCore infrastructure - protocol relatedpersistencePersistence specific changes

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions