Merkle Mountain Range pallet improvements (#7891)

* Add stateless verification helper function.

* Split MMR primitives.

* Add RuntimeAPI

* RuntimeAPI with OpaqueLeaves

* Bump spec_version,.

* Move primitives back to frame.

* Fix OpaqueLeaf encoding.

* Add block number to frame_system implementation of LeafDataProvider.

* Relax leaf codec requirements and fix OpaqueLeaf

* Add root to debug line.

* Apply suggestions from code review

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>

* Typo.

Co-authored-by: Hernando Castano <HCastano@users.noreply.github.com>
This commit is contained in:
Tomasz Drwięga
2021-01-28 11:58:52 +01:00
committed by GitHub
parent fa23de2c03
commit 6c2dd28dfb
12 changed files with 373 additions and 93 deletions
@@ -16,12 +16,12 @@
// limitations under the License.
use crate::*;
use crate::primitives::{LeafDataProvider, Compact};
use codec::{Encode, Decode};
use frame_support::{
impl_outer_origin, parameter_types,
};
use pallet_mmr_primitives::{LeafDataProvider, Compact};
use sp_core::H256;
use sp_runtime::{
testing::Header,