Git Product home page Git Product logo

Comments (2)

tynes avatar tynes commented on July 23, 2024

Here are some various implementations that I have been able to find.

from bcrypto.

chjj avatar chjj commented on July 23, 2024

A sparse merkle tree requires some kind of data management unless you're only going a few levels deep (unlikely).

The sparse merkle block commitment was an idea joseph and I had (as an alternative to the severely flawed way other projects are doing this). The basic notion is you allocate a sparse merkle tree 32 levels deep. You create an authenticated map of height(uint32) to hash. To get actual distribution at the leaves, you run the height through a perfect hash function before insertion (1 2 3).

32 bits is ~4.3 billion potential leaves, so that necessitates some kind of data management. This doesn't belong in bcrypto. It definitely justifies having its own repo.

We had an impl. of a sparse merkle tree to benchmark it against urkel a while ago. It's either in the urkel repo history or the btrie repo. If we decide to do this for handshake, I would probably just include it in the hsd repo.

edit: Also, note that this might be the only legitimate use-case for a sparse merkle tree in the blockchain space. It's far too slow to use for anything else.

from bcrypto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.