docs: Extends #999. Remove disused package readmes. Rename to sr-metadata. Fix Readme Rustdoc names (#1016)

* docs: Remove safe-mix since is no longer local dependency

* docs: Fix existing packages link. Still only includes Substrate Core

* docs: Remove empty package Readmes. Remove old docs links. Rename to Readme

* docs: Remove link to old docs

* misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names

* Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory

* Change example to use package name that opens all packages in RustDocs

* Fix list of packages names that are available to open in RustDocs

* fix typo

* fix ordering of CLI options and add missing backslash
This commit is contained in:
Luke Schoen
2018-11-12 21:18:06 +01:00
committed by Gav Wood
parent 1f0f3c8f6b
commit 037f9dde10
83 changed files with 320 additions and 855 deletions
+242 -250
View File
File diff suppressed because it is too large Load Diff
+34 -14
View File
@@ -227,18 +227,36 @@ Or you can join the BBQ Birch Testnet with:
[source, shell]
cargo run
If you want to see the multi-node consensus algorithm in action locally, then
you can create a local testnet. You'll need two terminals open. In one, run:
Detailed logs may be shown by running the node with the following environment variables set: `RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.
If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain specification that have been endowed with a testnet DOTs. We'll give each node a name and expose them so they are listed on [Telemetry](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminals windows open.
We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The Bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from the `--node-key` value that we specify below:
[source, shell]
cargo run -- --chain=local --validator --key Alice -d /tmp/alice --node-key 0000000000000000000000000000000000000000000000000000000000000001
cargo run -- \
--base-path /tmp/alice \
--chain=local \
--key Alice \
--name "ALICE" \
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \
--telemetry-url ws://telemetry.polkadot.io:1024 \
--validator
and in the other, run:
In the second terminal, we'll run the following to start Bob's substrate node on a different TCP port of 30334, and with his chain database stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's Bootnode ID on TCP port 30333:
[source, shell]
cargo run -- --chain=local --validator --key Bob -d /tmp/bob --port 30334 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN
cargo run -- \
--base-path /tmp/bob \
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \
--chain=local \
--key Bob \
--name "BOB" \
--port 30334 \
--telemetry-url ws://telemetry.polkadot.io:1024 \
--validator
include::doc/packages/packages.adoc[]
Additional Substate CLI usage options are available and may be shown by running `cargo run -- --help`.
== Documentation
@@ -251,13 +269,16 @@ You can generate documentation for a Substrate Rust package and have it automati
cargo doc --package <spec> --open
```
Replacing `<spec>` with one of the following (i.e. `cargo doc --package node-cli --open`):
Replacing `<spec>` with one of the following (i.e. `cargo doc --package substrate --open`):
* All Substrate Packages
[source, shell]
substrate
* Substrate Core
[source, shell]
substrate, substrate-bft, substrate-cli, substrate-client, substrate-client-db,
substrate-executor, substrate-finality-grandpa, substrate-keyring, substrate-keystore,
substrate-metadata, substrate-misbehavior-check, substrate-network,
substrate, substrate-cli, substrate-client, substrate-client-db,
substrate-consensus-common, substrate-consensus-rhd,
substrate-executor, substrate-finality-grandpa, substrate-keyring, substrate-keystore, substrate-network,
substrate-network-libp2p, substrate-primitives, substrate-rpc, substrate-rpc-servers,
substrate-serializer, substrate-service, substrate-service-test, substrate-state-db,
substrate-state-machine, substrate-telemetry, substrate-test-client,
@@ -268,17 +289,16 @@ substrate-trie
sr-api, sr-io, sr-primitives, sr-sandbox, sr-std, sr-version
* Substrate Runtime Module Library (SRML)
[source, shell]
srml-balances, srml-consensus, srml-contract, srml-council, srml-democracy, srml-example,
srml-executive, srml-session, srml-staking, srml-support, srml-system, srml-timestamp,
srml-assets, srml-balances, srml-consensus, srml-contract, srml-council, srml-democracy, srml-example,
srml-executive, srml-metadata, srml-session, srml-staking, srml-support, srml-system, srml-timestamp,
srml-treasury
* Node
[source, shell]
node-cli, node-consensus, node-executor, node-network, node-primitives, node-runtime, node-service
node-cli, node-consensus, node-executor, node-network, node-primitives, node-runtime
* Subkey
[source, shell]
subkey
=== Contributing to documentation for Substrate packages
https://doc.rust-lang.org/1.9.0/book/documentation.html[Document source code] for Substrate packages by annotating the source code with documentation comments.
-7
View File
@@ -1,13 +1,6 @@
= Substrate CLI
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
Substrate CLI library
include::doc/shell-completion.adoc[]
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate CLI library.
// end::description[]
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
-13
View File
@@ -1,13 +0,0 @@
= Client
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-13
View File
@@ -1,13 +0,0 @@
= Client DB
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-3
View File
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Client backend that uses RocksDB database as storage.
//!
//! # Canonicality vs. Finality
@@ -24,8 +23,6 @@
//! having discarded heavy state that will allow a chain reorganization.
//!
//! Finality implies canonicality but not vice-versa.
//!
// end::description[]
extern crate substrate_client as client;
extern crate kvdb_rocksdb;
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate Client and associated logic.
// end::description[]
#![warn(missing_docs)]
#![recursion_limit="128"]
@@ -1,12 +0,0 @@
= Consensus Common
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
+1 -3
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate Consensus Common. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Consensus basics and common features
// end::description[]
//! Tracks offline validators.
// This provides "unused" building blocks to other crates
#![allow(dead_code)]
-12
View File
@@ -1,12 +0,0 @@
= Consensus Rhododendron (RHD)
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! BFT Agreement based on a rotating proposer in different rounds.
//!
//! Where this crate refers to input stream, should never logically conclude.
@@ -30,7 +29,6 @@
//! conclude without having witnessed the conclusion.
//! In general, this future should be pre-empted by the import of a justification
//! set for this block height.
// end::description[]
#![cfg(feature="rhd")]
// FIXME: doesn't compile - https://github.com/paritytech/substrate/issues/1020
-13
View File
@@ -1,13 +0,0 @@
= Executor
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Temporary crate for contracts implementations.
//!
//! This will be replaced with WASM contracts stored on-chain.
@@ -25,7 +24,6 @@
//! - init_block(PrevBlock?) -> InProgressBlock
//! - add_transaction(InProgressBlock) -> InProgressBlock
//! It is left as is for now as it might be removed before this is ever done.
// end::description[]
#![warn(missing_docs)]
#![recursion_limit="128"]
@@ -1,12 +0,0 @@
= Finality GRANDPA (aka SHAFT)
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
@@ -14,11 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Integration of the GRANDPA finality gadget into substrate.
//!
//! This is a long-running future that produces finality notifications.
// end::description[]
extern crate finality_grandpa as grandpa;
extern crate futures;
-13
View File
@@ -1,13 +0,0 @@
= Keyring
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Support code for the runtime. A set of test accounts.
// end::description[]
#[macro_use] extern crate hex_literal;
#[macro_use] extern crate lazy_static;
-13
View File
@@ -1,13 +0,0 @@
= Keystore
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Keystore (and session key management) for ed25519 based chains like Polkadot.
// end::description[]
extern crate substrate_primitives;
extern crate parity_crypto as crypto;
-13
View File
@@ -1,13 +0,0 @@
= Network libp2p
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
+1 -3
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! TODO: Missing doc
// end::description[]
//! Substrate libp2p implementation of the ethcore network library
#![recursion_limit = "128"]
-13
View File
@@ -1,13 +0,0 @@
= Network
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -17,10 +17,8 @@
#![warn(unused_extern_crates)]
#![warn(missing_docs)]
// tag::description[]
//! Substrate-specific P2P networking: synchronizing blocks, propagating BFT messages.
//! Allows attachment of an optional subprotocol for chain-specific requests.
// end::description[]
extern crate linked_hash_map;
extern crate parking_lot;
-13
View File
@@ -1,13 +0,0 @@
= Primitives
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Shareable Substrate types.
// end::description[]
#![warn(missing_docs)]
-14
View File
@@ -1,14 +0,0 @@
= RPC Server
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate RPC servers.
// end::description[]
#[warn(missing_docs)]
-13
View File
@@ -1,13 +0,0 @@
= RPC
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate RPC interfaces.
// end::description[]
#![warn(missing_docs)]
-14
View File
@@ -1,14 +0,0 @@
= Serializer
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,12 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate customizable serde serializer.
//!
//! The idea is that we can later change the implementation
//! to something more compact, but for now we're using JSON.
// end::description[]
#![warn(missing_docs)]
-14
View File
@@ -1,14 +0,0 @@
= Service
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,10 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate service. Starts a thread that spins up the network, client, and extrinsic pool.
//! Manages communication between them.
// end::description[]
#![warn(unused_extern_crates)]
-12
View File
@@ -1,12 +0,0 @@
= Runtime API
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! API's for interfacing with the runtime via native/wasm.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
-13
View File
@@ -1,13 +0,0 @@
= Runtime io
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! This is part of the Substrate runtime.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(lang_items))]
-12
View File
@@ -1,12 +0,0 @@
= Runtime Primitives
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,10 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! System manager: Handles all of the top-level stuff; executing block/transaction, setting code
//! and depositing logs.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
-13
View File
@@ -1,13 +0,0 @@
= Runtime Sandbox
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
+1 -4
View File
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! This crate provides means to instantiate and execute wasm modules.
//!
//! It works even when the user of this library executes from
@@ -30,12 +29,10 @@
//! When this crate is used in the `std` environment all these functions are implemented by directly
//! calling the wasm VM.
//!
//! Example of possible use-cases for this library are the following:
//! Examples of possible use-cases for this library are not limited to the following:
//!
//! - implementing smart-contract runtimes that use wasm for contract code
//! - executing a wasm substrate runtime inside of a wasm parachain
//! - etc
// end::description[]
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
-14
View File
@@ -1,14 +0,0 @@
= Runtime std
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,10 +14,8 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Lowest-abstraction level for the Substrate runtime: just exports useful primitives from std
//! or core/alloc to be used with any code that depends on the runtime.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(core_intrinsics))]
-13
View File
@@ -1,13 +0,0 @@
= Runtime Version
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Version module for the Substrate runtime; Provides a function that returns the runtime version.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
-13
View File
@@ -1,13 +0,0 @@
= State DB
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-3
View File
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! State database maintenance. Handles canonicalization and pruning in the database. The input to
//! this module is a `ChangeSet` which is basically a list of key-value pairs (trie nodes) that
//! were added or deleted during block execution.
@@ -29,8 +28,6 @@
//! # Pruning.
//! See `RefWindow` for pruning algorithm details. `StateDb` prunes on each canonicalization until pruning
//! constraints are satisfied.
//!
// end::description[]
#[macro_use] extern crate log;
#[macro_use] extern crate parity_codec_derive;
-13
View File
@@ -1,13 +0,0 @@
= State Machine
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate state machine implementation.
// end::description[]
#![warn(missing_docs)]
-13
View File
@@ -1,13 +0,0 @@
= Telemetry
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,14 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Telemetry utils.
//!
//! `telemetry` macro may be used anywhere in the Substrate codebase
//! in order to send real-time logging information to the telemetry
//! server (if there is one). We use the async drain adapter of `slog`
//! so that the logging thread doesn't get held up at all.
// end::description[]
extern crate parking_lot;
extern crate ws;
-13
View File
@@ -1,13 +0,0 @@
= Test client
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Client testing utilities.
// end::description[]
#![warn(missing_docs)]
-13
View File
@@ -1,13 +0,0 @@
= Test runtime
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! The Substrate runtime. This can be compiled with #[no_std], ready for Wasm.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
+11 -11
View File
@@ -526,6 +526,16 @@ dependencies = [
"sr-std 0.1.0",
]
[[package]]
name = "srml-metadata"
version = "0.1.0"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "srml-support"
version = "0.1.0"
@@ -538,7 +548,7 @@ dependencies = [
"sr-io 0.1.0",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"substrate-metadata 0.1.0",
"srml-metadata 0.1.0",
]
[[package]]
@@ -551,16 +561,6 @@ name = "static_assertions"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "substrate-metadata"
version = "0.1.0"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "substrate-primitives"
version = "0.1.0"
@@ -1,13 +0,0 @@
= Transaction Pool
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
@@ -1,13 +0,0 @@
= transaction-graph
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
@@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Generic Transaction Pool
//!
//! The pool is based on dependency graph between transactions
@@ -24,7 +23,6 @@
//!
//! TODO [ToDr]
//! - [ ] Multi-threading (getting ready transactions should not block the pool)
// end::description[]
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Substrate transaction pool.
// end::description[]
#![warn(missing_docs)]
#![warn(unused_extern_crates)]
-12
View File
@@ -1,12 +0,0 @@
= Substrate Trie
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
-2
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Utility functions to interact with Substrate's Base-16 Modified Merkle Patricia tree ("trie").
// end::description[]
// TODO: no_std
-8
View File
@@ -1,8 +0,0 @@
=== Misc packages
:leveloffset: +3
include::../../subkey/README.adoc[]
:leveloffset: -3
-4
View File
@@ -1,4 +0,0 @@
include::substrate.adoc[]
include::misc.adoc[]
-66
View File
@@ -1,66 +0,0 @@
== Substrate Packages
=== Substrate Core
:leveloffset: +3
include::../../core/client/README.adoc[]
include::../../core/test-client/README.adoc[]
include::../../core/client/db/README.adoc[]
include::../../core/state-db/README.adoc[]
include::../../core/consensus/common/README.adoc[]
include::../../core/consensus/rhd/README.adoc[]
include::../../core/executor/README.adoc[]
include::../../core/finality-grandpa/README.adoc[]
include::../../core/transaction-pool/README.adoc[]
include::../../core/keyring/README.adoc[]
include::../../core/network/README.adoc[]
include::../../core/network-libp2p/README.adoc[]
include::../../core/rpc/README.adoc[]
include::../../core/rpc-servers/README.adoc[]
include::../../srml/README.adoc[]
include::../../core/sr-api/README.adoc[]
include::../../core/sr-io/README.adoc[]
include::../../core/sr-primitives/README.adoc[]
include::../../core/sr-sandbox/README.adoc[]
include::../../core/sr-std/README.adoc[]
include::../../core/state-machine/README.adoc[]
include::../../core/test-runtime/README.adoc[]
include::../../core/telemetry/README.adoc[]
include::../../core/cli/README.adoc[]
include::../../core/service/README.adoc[]
include::../../core/trie/README.adoc[]
include::../../core/keystore/README.adoc[]
include::../../core/primitives/README.adoc[]
include::../../core/serializer/README.adoc[]
:leveloffset: -3
+11 -11
View File
@@ -702,6 +702,16 @@ dependencies = [
"srml-system 0.1.0",
]
[[package]]
name = "srml-metadata"
version = "0.1.0"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "srml-session"
version = "0.1.0"
@@ -755,7 +765,7 @@ dependencies = [
"sr-io 0.1.0",
"sr-primitives 0.1.0",
"sr-std 0.1.0",
"substrate-metadata 0.1.0",
"srml-metadata 0.1.0",
]
[[package]]
@@ -844,16 +854,6 @@ dependencies = [
"substrate-primitives 0.1.0",
]
[[package]]
name = "substrate-metadata"
version = "0.1.0"
dependencies = [
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.79 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "substrate-primitives"
version = "0.1.0"
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! Substrate CLI
//! Substrate Node CLI
#![warn(missing_docs)]
-2
View File
@@ -2,5 +2,3 @@
= Runtime
Set of libs for the substrate runtime.
TODO: Add READMEs to packages.
+7 -1
View File
@@ -14,7 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
//! Balances: Handles balances.
//! Balances: Handles setting and retrieval of free balance,
//! retrieving total balance, reserve and unreserve balance,
//! repatriating a reserved balance to a beneficiary account that exists,
//! transfering a balance between accounts (when not reserved),
//! slashing an account balance, account removal, rewards,
//! lookup of an index to reclaim an account (when not balance not reserved),
//! increasing total stake.
#![cfg_attr(not(feature = "std"), no_std)]
@@ -1,3 +1,5 @@
# Complexity
This analysis is on the computing and memory complexity of specific procedures. It provides a rough estimate of operations performed in general and especially focusing on DB reads and writes. It is also an attempt to estimate the memory consumption at its peak.
The primary goal is to come up with decent pricing for functions that can be invoked by a user (via extrinsics) or by untrusted code that prevents DoS attacks.
+1 -1
View File
@@ -1,5 +1,5 @@
[package]
name = "substrate-metadata"
name = "srml-metadata"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
-13
View File
@@ -1,13 +0,0 @@
= Substrate BFT
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
+2 -2
View File
@@ -8,7 +8,7 @@ hex-literal = { version = "0.1.0", optional = true }
serde = { version = "1.0", default-features = false }
serde_derive = { version = "1.0", optional = true }
parity-codec = { version = "2.1", default-features = false }
substrate-metadata = { path = "../metadata", default-features = false }
srml-metadata = { path = "../metadata", default-features = false }
sr-std = { path = "../../core/sr-std", default-features = false }
sr-io = { path = "../../core/sr-io", default-features = false }
sr-primitives = { path = "../../core/sr-primitives", default-features = false }
@@ -28,7 +28,7 @@ std = [
"parity-codec/std",
"sr-std/std",
"sr-primitives/std",
"substrate-metadata/std",
"srml-metadata/std",
]
nightly = []
strict = []
-14
View File
@@ -1,14 +0,0 @@
= Runtime Support
.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
.Description
----
include::src/lib.rs[tag=description]
----
+1 -1
View File
@@ -21,7 +21,7 @@ pub use rstd::prelude::{Vec, Clone, Eq, PartialEq};
pub use std::fmt;
pub use rstd::result;
pub use codec::{Codec, Decode, Encode, Input, Output};
pub use substrate_metadata::{
pub use srml_metadata::{
ModuleMetadata, FunctionMetadata, DecodeDifferent,
CallMetadata, FunctionArgumentMetadata, OuterDispatchMetadata, OuterDispatchCall
};
+1 -1
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
pub use substrate_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEncode};
pub use srml_metadata::{EventMetadata, DecodeDifferent, OuterEventMetadata, FnEncode};
/// Implement the `Event` for a module.
///
+1 -3
View File
@@ -14,9 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
// tag::description[]
//! Support code for the runtime.
// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
@@ -29,7 +27,7 @@ pub extern crate sr_std as rstd;
extern crate sr_io as runtime_io;
#[doc(hidden)]
pub extern crate sr_primitives as runtime_primitives;
extern crate substrate_metadata;
extern crate srml_metadata;
extern crate mashup;
+2 -2
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
pub use substrate_metadata::{
pub use srml_metadata::{
DecodeDifferent, FnEncode, RuntimeMetadata, RuntimeModuleMetadata
};
@@ -98,7 +98,7 @@ macro_rules! __runtime_modules_to_metadata {
#[allow(dead_code)]
mod tests {
use super::*;
use substrate_metadata::{
use srml_metadata::{
EventMetadata, OuterEventMetadata, RuntimeModuleMetadata, CallMetadata, ModuleMetadata,
StorageFunctionModifier, StorageFunctionType, FunctionMetadata,
StorageMetadata, StorageFunctionMetadata, OuterDispatchMetadata, OuterDispatchCall
@@ -53,7 +53,7 @@ pub use rstd::borrow::Borrow;
#[doc(hidden)]
pub use rstd::marker::PhantomData;
pub use substrate_metadata::{
pub use srml_metadata::{
DecodeDifferent, StorageMetadata, StorageFunctionMetadata,
StorageFunctionType, StorageFunctionModifier
};
-1
View File
@@ -29,7 +29,6 @@
//! ## Finalization
//!
//! This module should be hooked up to the finalization routine.
//!
#![cfg_attr(not(feature = "std"), no_std)]