Giter VIP home page Giter VIP logo

smt's Introduction

Sparse Merkle Tree

A performance oriented implementation of a binary SMT with parallel update, node batching and storage shortcuts.

Details of the SMT implementation : https://medium.com/@ouvrard.pierre.alain/sparse-merkle-tree-86e6e2fc26da

Features

  • Efficient Merkle proof verification (binary tree structure)
  • Compressed Merkle proofs
  • Efficient database reads and storage (node batching)
  • Reduced data storage (shortcut nodes for subtrees containing one key)
  • Simultaneous update of multiple keys with goroutines

Related

Check also the state-tools

smt's People

Contributors

paouvrard avatar kroggen avatar

Stargazers

 avatar  avatar  avatar Özgür Akkurt avatar therainisme avatar Ruslan avatar Sebastien Couture avatar Giovanni Petrantoni avatar Mamy Ratsimbazafy avatar somcha.eth avatar mjolk avatar  avatar Thomas Harr avatar  avatar Nikita avatar Mambisi Zempare avatar shotaro avatar Taylor luk avatar Victor Ogudu avatar Ping avatar Sam Stokes avatar  avatar Lysin He avatar  avatar  avatar zbv avatar Crypto Michael avatar Scott Fleckenstein avatar Luke Hinds avatar ◤◢◤◢◤◢◤◢ avatar  avatar Tim Daubenschütz avatar HAOYUatHZ avatar longcpp avatar Ha DANG  avatar bonedaddy avatar Anton Suprunchuk avatar Paul Emmanuel  avatar Jiayu Ye avatar achraf avatar Park Sang kil avatar asteroidable avatar  avatar No JinHo avatar Álvaro Alda avatar Paul Grau avatar Chen Kai avatar  avatar Aaron (Yun Woo) Park avatar  avatar Theofanis Despoudis avatar Taeik Lim avatar junu avatar Andrejs Agejevs avatar George Erickson avatar Hunyoung Park avatar

Watchers

 avatar James Cloos avatar Yarkin avatar Aaron (Yun Woo) Park avatar No JinHo avatar  avatar Hunyoung Park avatar  avatar  avatar  avatar

smt's Issues

Growing size of DB with same keys update

Hi,
It seems the library does not removed the nodes, which is already added to the db, during the updating. The old nodes are only removed in the live cache, rather than in the db. So if one node is commit to the db, it will stay there forever. For example, if I run the code:

keys := getFreshData(10000, 32)
for i := 0; i < 30; i++ {
    values := getFreshData(10000, 32)
    smt.Update(keys, values)
    smt.Commit()
}

The size of the db keeps growing, even the keys do not change.

unit tests problem

github.com/aergoio/aergo-lib/db

/home/ellis/Documents/Golang/src/github.com/aergoio/aergo-lib/db/badgerdb.go:130:15: assignment mismatch: 2 variables but 1 values
/home/ellis/Documents/Golang/src/github.com/aergoio/aergo-lib/db/badgerdb.go:130:28: not enough arguments in call to item.Value
have ()
want (func([]byte) error)
/home/ellis/Documents/Golang/src/github.com/aergoio/aergo-lib/db/badgerdb.go:249:30: too many arguments in call to transaction.tx.Commit
have (nil)
want ()
/home/ellis/Documents/Golang/src/github.com/aergoio/aergo-lib/db/badgerdb.go:335:14: assignment mismatch: 2 variables but 1 values
/home/ellis/Documents/Golang/src/github.com/aergoio/aergo-lib/db/badgerdb.go:335:39: not enough arguments in call to iter.iter.Item().Value
have ()
want (func([]byte) error)
FAIL github.com/aergoio/SMT [build failed]
Error: Tests failed.

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.