Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update versions, docs. #282

Merged
merged 1 commit into from
Jul 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ pub struct Concrete;
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: ver_str!("demo"),
impl_name: ver_str!("parity-demo"),
authoring_version: 0,
spec_version: 0,
authoring_version: 1,
spec_version: 1,
impl_version: 0,
};

Expand Down
4 changes: 2 additions & 2 deletions polkadot/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ pub struct Concrete;
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: ver_str!("polkadot"),
impl_name: ver_str!("parity-polkadot"),
authoring_version: 0,
spec_version: 0,
authoring_version: 1,
spec_version: 1,
impl_version: 0,
};

Expand Down
32 changes: 23 additions & 9 deletions substrate/runtime/version/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,33 @@ macro_rules! ver_str {
#[derive(Clone)]
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
pub struct RuntimeVersion {
/// Identifies the different Substrate runtimes. There'll be at least polkadot and demo. A different on-chain spec_name to that of the native runtime would normally result in node not attempting to sync further.
/// Identifies the different Substrate runtimes. There'll be at least polkadot and demo.
/// A different on-chain spec_name to that of the native runtime would normally result
/// in node not attempting to sync or author blocks.
pub spec_name: VersionString,
/// Name of the implementation of the spec. This is of little consequence for the node and serves only to differentiate code of different implementation teams. For this codebase, it will be parity-polkadot.
/// If there were a non-Rust implementation of the Polkadot runtime (e.g. C++), then it would identify itself with an accordingly different impl_name.

/// Name of the implementation of the spec. This is of little consequence for the node
/// and serves only to differentiate code of different implementation teams. For this
/// codebase, it will be parity-polkadot. If there were a non-Rust implementation of the
/// Polkadot runtime (e.g. C++), then it would identify itself with an accordingly different
/// `impl_name`.
pub impl_name: VersionString,
/// `authoring_version` is the version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.

/// `authoring_version` is the version of the authorship interface. An authoring node
/// will not attempt to author blocks unless this is equal to its native runtime.
pub authoring_version: u32,
/// Version of the runtime specification. A full-node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, `spec_version` and `authoring_version`
/// are the same between Wasm and native.

/// Version of the runtime specification. A full-node will not attempt to use its native
/// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
/// `spec_version` and `authoring_version` are the same between Wasm and native.
pub spec_version: u32,
/// Version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different;
/// as long as the other two versions are the same then while the code may be different, it is nonetheless required to do the same thing.
/// Non-consensus-breaking optimisations are about the only changes that could be made which would result in only the impl_version changing.

/// Version of the implementation of the specification. Nodes are free to ignore this; it
/// serves only as an indication that the code is different; as long as the other two versions
/// are the same then while the actual code may be different, it is nonetheless required to
/// do the same thing.
/// Non-consensus-breaking optimisations are about the only changes that could be made which
/// would result in only the `impl_version` changing.
pub impl_version: u32,
}

Expand Down