Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Use Binary Merkle Tree instead of a trie (#225)
Browse files Browse the repository at this point in the history
* Binary tree merkle root.

* Add proofs and verification.

* Clean up debug.

* Use BEEFY addresses instead of pubkeys.

* Use new merkle tree.

* Optimize allocations.

* Add test for larger trees.

* Add tests for larger cases.

* Appease clippy

* Appease clippy2.

* Fix proof generation & verification.

* Add more test data.

* Fix CLI.

* Update README

* Bump version.

* Update docs.

* Rename beefy-merkle-root to beefy-merkle-tree

Co-authored-by: adoerr <0xad@gmx.net>
  • Loading branch information
tomusdrw and adoerr authored Jul 8, 2021
1 parent 9234d02 commit 9a8773f
Show file tree
Hide file tree
Showing 2 changed files with 831 additions and 0 deletions.
23 changes: 23 additions & 0 deletions frame/beefy-mmr/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[package]
name = "beefy-merkle-tree"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
description = "A no-std/Substrate compatible library to construct binary merkle tree."

[dependencies]
hex = { version = "0.4", optional = true }
log = { version = "0.4", optional = true, default-features = false }
tiny-keccak = { version = "2.0.2", features = ["keccak"], optional = true }

[dev-dependencies]
env_logger = "0.8"
hex = "0.4"
hex-literal = "0.3"

[features]
debug = ["hex", "log"]
default = ["std", "debug", "keccak"]
keccak = ["tiny-keccak"]
std = ["log/std"]
Loading

0 comments on commit 9a8773f

Please sign in to comment.