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

Commit

Permalink
BEEFY: Simplify hashing for pallet-beefy-mmr (#12393)
Browse files Browse the repository at this point in the history
* beefy-mmr: reuse sp_runtime::traits::Keccak256

* beefy-mmr: use sp_runtime::traits:Hash for generating merkle proofs

* beefy-mmr: use sp_runtime::traits:Hash for validating merkle proofs

* beefy-mmr: remove primitives::Hasher and primitives::Hash

* fixes

* beefy-mmr: reduce the number of generic parameters for merkle_root()

* fix

* compute upper Vec capacity more accurately
  • Loading branch information
serban300 committed Oct 7, 2022
1 parent feaf8f3 commit 9354359
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 166 deletions.
11 changes: 8 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions frame/beefy-mmr/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,22 @@ description = "A no-std/Substrate compatible library to construct binary merkle
homepage = "https://substrate.io"

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

beefy-primitives = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/beefy" }
sp-api = { version = "4.0.0-dev", default-features = false, path = "../../../primitives/api" }
sp-runtime = { version = "6.0.0", default-features = false, path = "../../../primitives/runtime" }

[dev-dependencies]
array-bytes = "4.1"
env_logger = "0.9"
hex = "0.4"
hex-literal = "0.3"

[features]
debug = ["hex", "hex/std", "log"]
default = ["debug", "keccak", "std"]
keccak = ["tiny-keccak"]
debug = ["array-bytes", "log"]
default = ["debug", "std"]
std = [
"beefy-primitives/std",
"sp-api/std"
"sp-api/std",
"sp-runtime/std"
]
Loading

0 comments on commit 9354359

Please sign in to comment.