From e0b3564f2dced185476906463481d2880c874125 Mon Sep 17 00:00:00 2001 From: Robert Habermeier Date: Mon, 23 Sep 2019 00:12:30 +0200 Subject: [PATCH] improve justification docs --- substrate/core/sr-primitives/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/substrate/core/sr-primitives/src/lib.rs b/substrate/core/sr-primitives/src/lib.rs index 81e73033b2..4d3bfb2c92 100644 --- a/substrate/core/sr-primitives/src/lib.rs +++ b/substrate/core/sr-primitives/src/lib.rs @@ -59,7 +59,13 @@ pub use generic::{DigestItem, Digest}; pub use primitives::crypto::{key_types, KeyTypeId, CryptoType}; pub use app_crypto::RuntimeAppPublic; -/// Justification type. +/// An abstraction over justification for a block's validity under a consensus algorithm. +/// +/// Essentially a finality proof. The exact formulation will vary between consensus +/// algorithms. In the case where there are multiple valid proofs, inclusion within +/// the block itself would allow swapping justifications to change the block's hash +/// (and thus fork the chain). Sending a `Justification` alongside a block instead +/// bypasses this problem. pub type Justification = Vec; use traits::{Verify, Lazy};