Skip to content

Commit

Permalink
BEEFY: Simplify hashing for pallet-beefy-mmr (paritytech#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 authored and ark0f committed Feb 27, 2023
1 parent 18ef85a commit 0ae9038
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 158 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

8 changes: 4 additions & 4 deletions frame/beefy-mmr/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ homepage = "https://substrate.io"
[dependencies]
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"

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

0 comments on commit 0ae9038

Please sign in to comment.