-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Merkle Mountain Range & BEEFY integration #2101
Conversation
This reverts commit 7f4d41c.
Bump all. Fix missing imports.
I wrote a
The parachain headers don't have any particular format. They are just Can you give some more info on the para-heads merkle tree and what it will be used for? |
Ah, fair enough.
A light client tracking latest MMR root hash, will be able to receive:
Hence a light client with only MMR root hash will be able to efficiently verify any parachain state data if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review, mostly just nits about the search-replace on dependencies.
cli/Cargo.toml
Outdated
@@ -33,7 +33,7 @@ browser-utils = { package = "substrate-browser-utils", git = "https://github.com | |||
|
|||
# this crate is used only to enable `trie-memory-tracker` feature | |||
# see https://github.com/paritytech/substrate/pull/6745 | |||
sp-trie = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sp-trie = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of changes like this which I assume came from some automated search and replace. Can we revert this?
core-primitives/Cargo.toml
Outdated
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert?
node/core/approval-voting/Cargo.toml
Outdated
sc-client-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sc-keystore = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-consensus-slots = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-blockchain = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-application-crypto = { git = "https://github.com/paritytech/substrate", default-features = false, features = ["full_crypto"] , branch = "master" } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert?
node/core/av-store/Cargo.toml
Outdated
@@ -21,7 +21,7 @@ polkadot-overseer = { path = "../../overseer" } | |||
polkadot-primitives = { path = "../../../primitives" } | |||
polkadot-node-primitives = { path = "../../primitives" } | |||
|
|||
sc-service = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
sc-service = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert?
@@ -15,7 +15,7 @@ futures = "0.3.8" | |||
tracing = "0.1.25" | |||
|
|||
[dev-dependencies] | |||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", features = ["std"] } | |||
sp-core = { git = "https://github.com/paritytech/substrate", features = ["std"] , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert?
runtime/kusama/Cargo.toml
Outdated
@@ -48,6 +49,7 @@ pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "m | |||
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
pallet-mmr-primitives = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing from std
features list below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
runtime/common/Cargo.toml
Outdated
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
inherents = { package = "sp-inherents", git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-std = { package = "sp-std", git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-session = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-staking = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } | ||
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert?
runtime/common/Cargo.toml
Outdated
@@ -35,11 +36,14 @@ pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "m | |||
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | |||
|
|||
pallet-beefy = { git = "https://github.com/paritytech/grandpa-bridge-gadget", default-features = false , branch = "master" } | |||
pallet-mmr = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing from std feature list below?
runtime/common/Cargo.toml
Outdated
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false } | ||
beefy-primitives = { git = "https://github.com/paritytech/grandpa-bridge-gadget", default-features = false , branch = "master" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing from std feature list below?
node/service/src/lib.rs
Outdated
@@ -955,6 +967,19 @@ pub fn new_full<RuntimeApi, Executor>( | |||
task_manager.spawn_essential_handle().spawn_blocking("babe", babe); | |||
} | |||
|
|||
// Start BEEFY | |||
task_manager.spawn_essential_handle().spawn_blocking( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do this only on rococo/westend? Otherwise if BEEFY crashes for some reason the whole node goes down.
runtime/rococo/src/lib.rs
Outdated
/// Priviledged origin used by propose parachain. | ||
pub struct PriviledgedOrigin; | ||
// A wrapper around `babe::CurrentBlockRandomness` that does not return `Option<Random>`. | ||
pub struct CurrentBlockRandomness; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Priviledged origin used by propose parachain. | |
pub struct PriviledgedOrigin; | |
// A wrapper around `babe::CurrentBlockRandomness` that does not return `Option<Random>`. | |
pub struct CurrentBlockRandomness; | |
/// Priviledged origin used by propose parachain. | |
pub struct PriviledgedOrigin; | |
// A wrapper around `babe::CurrentBlockRandomness` that does not return `Option<Random>`. | |
pub struct CurrentBlockRandomness; |
Seems unneeded.
- revert unnecessary changes - add missing /std dependencies - remove unused dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed some minor fixes. LGTM.
This is a draft PR of a potential MMR & BEEFY integration with Rococo.
There is a lot of things to polish and finish up here, but opening it up for discussion opportunity and visibility for external teams.
Open questions:
MmrLeaf
and extract a particular digest item from each ParaHead, then merkelize them in addition to headers.Future Work: