This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pallet-mmr: move offchain logic to client-side gadget (#12753)
* Move MMR utils methods from pallet to primitives Signed-off-by: Serban Iorga <serban@parity.io> * Add method to MmrApi * Move forks expanding logic from babe to primitives * Implement MMR gadget * Remove prunning logic from the MMR pallet * Code review changes: 1st iteration * Replace MaybeCanonEngine with CanonEngineBuilder * fix mmr_leaves_count() for kitchen sink demo * Update client/merkle-mountain-range/src/canon_engine.rs Co-authored-by: Adrian Catangiu <adrian@parity.io> * Code review changes: 2nd iteration * fix INDEXING_PREFIX * impl review comments * add documentation and minor rename Signed-off-by: Serban Iorga <serban@parity.io> Co-authored-by: Adrian Catangiu <adrian@parity.io>
- Loading branch information
Showing
21 changed files
with
1,162 additions
and
562 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
[package] | ||
name = "mmr-gadget" | ||
version = "4.0.0-dev" | ||
authors = ["Parity Technologies <admin@parity.io>"] | ||
edition = "2021" | ||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0" | ||
repository = "https://github.com/paritytech/substrate" | ||
description = "MMR Client gadget for substrate" | ||
homepage = "https://substrate.io" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
codec = { package = "parity-scale-codec", version = "3.0.0" } | ||
futures = "0.3" | ||
log = "0.4" | ||
beefy-primitives = { version = "4.0.0-dev", path = "../../primitives/beefy" } | ||
sc-client-api = { version = "4.0.0-dev", path = "../api" } | ||
sp-api = { version = "4.0.0-dev", path = "../../primitives/api" } | ||
sp-blockchain = { version = "4.0.0-dev", path = "../../primitives/blockchain" } | ||
sp-consensus = { version = "0.10.0-dev", path = "../../primitives/consensus/common" } | ||
sp-core = { version = "7.0.0", path = "../../primitives/core" } | ||
sp-io = { version = "7.0.0", path = "../../primitives/io" } | ||
sp-mmr-primitives = { version = "4.0.0-dev", path = "../../primitives/merkle-mountain-range" } | ||
sc-offchain = { version = "4.0.0-dev", path = "../offchain" } | ||
sp-runtime = { version = "7.0.0", path = "../../primitives/runtime" } | ||
|
||
[dev-dependencies] | ||
tokio = "1.17.0" | ||
sc-block-builder = { version = "0.10.0-dev", path = "../block-builder" } | ||
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" } | ||
async-std = { version = "1.11.0", default-features = false } |
Oops, something went wrong.