• This repository has been archived on 27/Feb/2023
  • Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created about 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Go library that implements a Sparse Merkle tree for a key-value map.

smt

A Go library that implements a Sparse Merkle tree for a key-value map. The tree implements the same optimisations specified in the Libra whitepaper, to reduce the number of hash operations required per tree operation to O(k) where k is the number of non-empty elements in the tree.

Tests codecov GoDoc

Example

package main

import (
	"crypto/sha256"
	"fmt"

	"github.com/celestiaorg/smt"
)

func main() {
	// Initialise two new key-value store to store the nodes and values of the tree
	nodeStore := smt.NewSimpleMap()
	valueStore := smt.NewSimpleMap()
	// Initialise the tree
	tree := smt.NewSparseMerkleTree(nodeStore, valueStore, sha256.New())

	// Update the key "foo" with the value "bar"
	_, _ = tree.Update([]byte("foo"), []byte("bar"))

	// Generate a Merkle proof for foo=bar
	proof, _ := tree.Prove([]byte("foo"))
	root := tree.Root() // We also need the current tree root for the proof

	// Verify the Merkle proof for foo=bar
	if smt.VerifyProof(proof, root, []byte("foo"), []byte("bar"), sha256.New()) {
		fmt.Println("Proof verification succeeded.")
	} else {
		fmt.Println("Proof verification failed.")
	}
}

More Repositories

1

celestia-node

Celestia Data Availability Nodes
Go
923
star
2

celestia-core

A fork of CometBFT
Go
481
star
3

celestia-app

Celestia consensus node
Go
343
star
4

docs

Celestia Documentation Site
TypeScript
167
star
5

rsmt2d

Go implementation of two dimensional Reed-Solomon merkle tree data availability scheme.
Go
163
star
6

rollmint

ABCI-client implementation for rollups.
Go
132
star
7

blobstream-contracts

Celestia -> EVM bridge
Solidity
128
star
8

nmt

Namespaced Merkle Tree
Go
116
star
9

networks

Shell
105
star
10

celestia-specs

Celestia Specifications
JavaScript
51
star
11

lazyledger-prototype

LazyLedger academic prototype
Go
48
star
12

CIPs

Handlebars
46
star
13

celestia.org

HTML
44
star
14

knuu

Integration Test Framework
Go
39
star
15

awesome-celestia

An Awesome List of Celestia Resources
39
star
16

community-calls

Community Call repo, schedule, and notes and videos of discussions
34
star
17

protobuf3-solidity

Protobuf3 plugin for Solidity
Go
29
star
18

orchestrator-relayer

Go implementation of the Blobstream orchestrator and relayer
Go
29
star
19

test-infra

Testing infrastructure for the Celestia Network
Go
25
star
20

celestia-openrpc

OpenRPC client of celestia-node, without dependencies on celestia-node/celestia-app/cosmos-sdk.
Go
19
star
21

go-header

Go library with all the services needed to request, sync and store blockchain headers.
Go
19
star
22

celestia-node-client-rs

🦀 celestia-node REST client in Rust.
Rust
18
star
23

go-libp2p-messenger

Messenger provides a simple arbitrary message sending API to multiple peers for libp2p-based protocols.
Go
16
star
24

go-cnc

celestia-node REST client in Go.
Go
15
star
25

bittwister

Bit Twister: A CLI tool for precise network traffic shaping. Simulate latency, bandwith limitation, drop packets, impose jitter with ease. Enhance your network testing capabilities for development.
Go
15
star
26

protobuf3-solidity-lib

Codec library for protobuf3 in Solidity
JavaScript
14
star
27

wordle

Wordle Game Implemented with Optimint
TypeScript
14
star
28

dalc

Data Availability Light Client for Celestia
Go
13
star
29

go-square

A library for encoding blobs into a 2D square of evenly sized chunks designed for sampling and reconstruction
Go
13
star
30

evm-light-client

EVM-compatible on-chain light client for LazyLedger consensus
Solidity
10
star
31

node-rpc-docs

TypeScript
10
star
32

go-fraud

Generic p2p fraud proof library
Go
9
star
33

devrel-tools

Repository that contains developer toolings useful for devrel and doc demos
Shell
9
star
34

celestia-local-docker

A docker-compose bundle to run a local setup for full node/validator/prometheus/otel/etc...
Shell
8
star
35

knuu-example

Example repository for the knuu Integration Test Framework
Go
8
star
36

op-plasma-celestia

Celestia Data Availability Provider for Optimism Alt-DA Protocol.
Go
8
star
37

da-client-rs

Rust
7
star
38

.github

Shell
7
star
39

apollo

Go
7
star
40

nodelogger

Receive nodes telemetry from a Prometheus endpoint and stores them in a Database
Go
6
star
41

celestia-helm-charts

Celestia Helm Charts
Shell
6
star
42

goodstore

Go
6
star
43

modularsummit.dev

JavaScript
5
star
44

devops

5
star
45

local-celestia-devnet

Docker image exposing celestia-node devnet for CI and local development
Shell
5
star
46

go-leopard

Go wrapper for Leopard Reed-Solomon erasure code library.
Go
5
star
47

ipld-plugin-experiments

Go
5
star
48

terraform-module-scw-k8s

Terraform Module for Kubernetes Clusters built in Scaleway
HCL
5
star
49

celestia-ts

Typescript client library for celestia-node
TypeScript
5
star
50

merkletree

Fork of NebulousLabs / merkletree (on gitlab)
Go
4
star
51

dht-bootstrap-experiment

spin up a devnet on DO quickly
Go
4
star
52

ephemeral-cluster

An ephemeral cluster to contain all components of the Celestia stack to help with developer SDLC
Shell
4
star
53

devops-test

This repository exists as a test ground for various devops automations
Shell
3
star
54

supply

API that returns the current circulating and total supply of TIA
Go
3
star
55

knuu-executor

3
star
56

blobstreamx-monitor

Simple monitoring tool for BlobstreamX contract
Go
3
star
57

celbot

A github bot for Celestia devs
JavaScript
3
star
58

celestia-core-rpc-rs

Celestia Core RPC in Rust
Rust
3
star
59

helm-charts

Celestia Helm Charts
Shell
3
star
60

PromptScavenger

Go
2
star
61

data-availability-wg

2
star
62

headebug

A custom small program to debug Arabica
Go
2
star
63

ethermint-proxy

Proxy that intercepts Ethereum RPC calls to Ethermint and replaces Ethereum block hashes with Tendermint block hashes
Go
2
star
64

ethermint-networks

Files for Ethermint networks deployed on top of Celestia
2
star
65

nitro-das-celestia

Celestia Data Availability Provider for the Arbitrum Nitro stack
Go
2
star
66

blobstream-ops

blobstream related tooling
Go
2
star
67

kv-snap-bench

KV-store snapshoting/versioning benchmark.
Go
1
star
68

test-docker-images

Dockerfile
1
star
69

congest

Go
1
star
70

tools

A number of frequently used codes.
Go
1
star
71

Astria

1
star
72

multisig-test

A script to test multisig
Shell
1
star
73

academy

Build whatever with Celestia underneath
TypeScript
1
star
74

networks-temp

1
star
75

dockwiz

DockWiz: Empowering developers with an API for seamless Docker image construction
Go
1
star
76

docs-preview

HTML
1
star
77

node-api-conformance-test

Conformance test between celestia-openrpc and celestia-node
Go
1
star
78

design-assets

Design assets and branding for Celestia and Modular ecosystem
1
star