diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.adoc
similarity index 95%
rename from CODE_OF_CONDUCT.md
rename to CODE_OF_CONDUCT.adoc
index 137f7ebe1a606..c5b21d93fb0c2 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.adoc
@@ -1,10 +1,10 @@
-# Contributor Covenant Code of Conduct
+= Contributor Covenant Code of Conduct
-## Our Pledge
+== Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
-## Our Standards
+== Our Standards
Examples of behavior that contributes to creating a positive environment include:
@@ -22,30 +22,30 @@ Examples of unacceptable behavior by participants include:
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
-### Facilitation, Not Strongarming
+=== Facilitation, Not Strongarming
We recognise that this software is merely a tool for users to create and maintain their blockchain of preference. We see that blockchains are naturally community platforms with users being the ultimate decision makers. We assert that good software will maximise user agency by facilitate user-expression on the network. As such:
* This project will strive to give users as much choice as is both reasonable and possible over what protocol they adhere to; but
* use of the project's technical forums, commenting systems, pull requests and issue trackers as a means to express individual protocol preferences is forbidden.
-## Our Responsibilities
+== Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
-## Scope
+== Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
-## Enforcement
+== Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at admin@parity.io. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
-## Attribution
+== Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc
new file mode 100644
index 0000000000000..7a0b789ea94b0
--- /dev/null
+++ b/CONTRIBUTING.adoc
@@ -0,0 +1,50 @@
+= Contributing
+
+`Polkadot` projects is a **OPENISH Open Source Project**
+
+== What?
+
+Individuals making significant and valuable contributions are given commit-access to a project to contribute as they see fit. A project is more like an open wiki than a standard guarded open source project.
+
+== Rules
+
+There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
+
+. **No `--force` pushes** or modifying the Git history in any way. If you need to rebase, ensure you do it in your own repo.
+. **Non-master branches**, prefixed with a short name moniker (e.g. `gav-my-feature`) must be used for ongoing work.
+. **All modifications** must be made in a **pull-request** to solicit feedback from other contributors.
+. A pull-request *must not be merged until CI* has finished successfully.
+. Contributors should adhere to the https://github.com/paritytech/polkadot/wiki/Style-Guide[house coding style].
+
+Merging pull requests once CI is successful:
+
+. A pull request that does not alter any logic (e.g. comments, dependencies, docs) may be tagged https://github.com/paritytech/polkadot/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3AA2-insubstantial[`insubstantial`] and merged by its author.
+. A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.
+. All other PRs should sit for 48 hours with the https://github.com/paritytech/polkadot/pulls?q=is%3Apr+is%3Aopen+label%3AA0-pleasereview[`pleasereview`] tag in order to garner feedback.
+. No PR should be merged until all reviews' comments are addressed.
+
+.Reviewing pull requests:
+When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:
+
+. Buggy behaviour.
+. Undue maintenance burden.
+. Breaking with house coding style.
+. Pessimisation (i.e. reduction of speed as measured in the projects benchmarks).
+. Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
+. Uselessness (i.e. it does not strictly add a feature or fix a known issue).
+
+.Reviews may not be used as an effective veto for a PR because:
+. There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
+. It does not fit well with some other contributors' longer-term vision for the project.
+
+== Releases
+
+Declaring formal releases remains the prerogative of the project maintainer(s).
+
+== Changes to this arrangement
+
+This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
+
+== Heritage
+
+These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: https://github.com/Level/community/blob/master/CONTRIBUTING.md
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index d6b64ac752fd4..0000000000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,53 +0,0 @@
-## `Polkadot` projects is a **OPENISH Open Source Project**
------------------------------------------
-
-## What?
-
-Individuals making significant and valuable contributions are given commit-access to a project to contribute as they see fit. A project is more like an open wiki than a standard guarded open source project.
-
-## Rules
-
-There are a few basic ground-rules for contributors (including the maintainer(s) of the project):
-
-1. **No `--force` pushes** or modifying the Git history in any way. If you need to rebase, ensure you do it in your own repo.
-1. **Non-master branches**, prefixed with a short name moniker (e.g. `gav-my-feature`) must be used for ongoing work.
-1. **All modifications** must be made in a **pull-request** to solicit feedback from other contributors.
-1. A pull-request *must not be merged until CI* has finished successfully.
-1. Contributors should adhere to the [house coding style](https://github.com/paritytech/polkadot/wiki/Style-Guide).
-
-Merging pull requests once CI is successful:
-
-1. A pull request that does not alter any logic (e.g. comments, dependencies, docs) may be tagged [`insubstantial`](https://github.com/paritytech/polkadot/pulls?utf8=%E2%9C%93&q=is%3Apr+is%3Aopen+label%3AA2-insubstantial+) and merged by its author.
-1. A pull request with no large change to logic that is an urgent fix may be merged after a non-author contributor has reviewed it well.
-1. All other PRs should sit for 48 hours with the [`pleasereview`](https://github.com/paritytech/polkadot/pulls?q=is%3Apr+is%3Aopen+label%3AA0-pleasereview) tag in order to garner feedback.
-1. No PR should be merged until all reviews' comments are addressed.
-
-Reviewing pull requests:
-
-When reviewing a pull request, the end-goal is to suggest useful changes to the author. Reviews should finish with approval unless there are issues that would result in:
-
-1. Buggy behaviour.
-1. Undue maintenance burden.
-1. Breaking with house coding style.
-1. Pessimisation (i.e. reduction of speed as measured in the projects benchmarks).
-1. Feature reduction (i.e. it removes some aspect of functionality that a significant minority of users rely on).
-1. Uselessness (i.e. it does not strictly add a feature or fix a known issue).
-
-Reviews may not be used as an effective veto for a PR because:
-
-1. There exists a somewhat cleaner/better/faster way of accomplishing the same feature/fix.
-1. It does not fit well with some other contributors' longer-term vision for the project.
-
-## Releases
-
-Declaring formal releases remains the prerogative of the project maintainer(s).
-
-## Changes to this arrangement
-
-This is an experiment and feedback is welcome! This document may also be subject to pull-requests or changes by contributors where you believe you have something valuable to add or change.
-
-## Heritage
-
-These contributing guidelines are modified from the "OPEN Open Source Project" guidelines for the Level project: https://github.com/Level/community/blob/master/CONTRIBUTING.md
-
------------------------------------------
diff --git a/README.adoc b/README.adoc
index fca6168aa5f13..e0b8a9d1cd621 100644
--- a/README.adoc
+++ b/README.adoc
@@ -4,6 +4,8 @@
:toc:
:sectnums:
+== Intro
+
Implementation of a https://polkadot.network node in Rust.
@@ -29,43 +31,7 @@ to get the very latest version of Polkadot, but these instructions might not wor
If you want a specific version of polkadot, say `0.2.2`, you may run `cargo install --git https://github.com/paritytech/polkadot.git --tag v0.2.2 polkadot`.
-=== Krumme Lanke Testnet
-
-You will connect to the global Krumme Lanke testnet by default. To do this, just use:
-
-[source, shell]
-polkadot
-
-If you want to do anything on it (not that there's much to do), then you'll need
-to get some Krumme Lanke DOTs. Ask in the Polkadot watercooler.
-
-=== Development
-
-You can run a simple single-node development "network" on your machine by
-running in a terminal:
-
-[source, shell]
-polkadot --dev
-
-You can muck around by cloning and building the http://github.com/paritytech/polka-ui and http://github.com/paritytech/polkadot-ui or just heading to https://polkadot.js.org/apps.
-
-
-== Local Two-node Testnet
-
-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:
-
-[source, shell]
-polkadot --chain=local --validator --key Alice -d /tmp/alice
-
-and in the other, run:
-
-[source, shell]
-polkadot --chain=local --validator --key Bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/ALICE_BOOTNODE_ID_HERE'
-
-Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of
-the first terminal.
-
+include::doc/networks/networks.adoc[]
== Hacking on Polkadot
@@ -109,102 +75,26 @@ You can start a development chain with:
cargo run -- --dev
-== Using Docker
-
-=== The easiest way
+include::doc/packages/packages.adoc[]
-The easiest/faster option is to use the latest image.
+include::doc/docker.adoc[]
+include::doc/shell-completion.adoc[]
-.First run
-Let´s first check the version we have. The first time you run this command, the polkadot docker image will be downloaded. This takes a bit of time and bandwidth, be patient:
-
-[source, shell]
-docker run --rm -it chevdor/polkadot:latest polkadot --version
+:leveloffset: +1
+include::CONTRIBUTING.adoc[]
-.Polkadot arguments
-You can also pass any argument/flag that polkadot supports:
-
-[source, shell]
-docker run --rm -it chevdor/polkadot:latest polkadot --name "PolkaDocker"
+:leveloffset: -1
+:leveloffset: +1
-.Run as deamon
-Once you are done experimenting and picking the best node name :) you can start polkadot as daemon, exposes the polkadot ports and mount a volume that will keep your blockchain data locally:
-
-[source, shell]
-docker run -d -p 30333:30333 -p 9933:9933 -p 9944:9944 -v /my/local/folder:/data chevdor/polkadot:latest polkadot
-
-.Docker image update
-If you have an image such as `latest` locally, docker will *not* bother downloading the very latest that may be available.
-To update:
+include::CODE_OF_CONDUCT.adoc[]
-- stop and delete your containers (`docker stop ...` `docker rm ...`)
-- delete your previous image (`docker rmi chevdor/polkadot:latest`)
-- run as daemon again, the very latest image will be downloaded again
+:leveloffset: -1
-=== Build your own image
+== License
-To get up and running with the smallest footprint on your system, you may use the Polkadot Docker image.
-You can either build it yourself (it takes a while...):
-
-[source, shell]
----
-./docker/build.sh
+include::LICENSE[]
----
-
-=== Reporting issues
-
-If you run into issues with polkadot when using docker, please run the following command
-(replace the tag with the appropriate one if you do not use latest):
-
-[source, shell]
-docker run --rm -it chevdor/polkadot:latest polkadot --version
-
-This will show you the polkadot version as well as the git commit ref that was used to build your container.
-Just paste that in the issue you create.
-
-
-== Shell completion
-
-The Polkadot cli command supports shell auto-completion. For this to work, you will need to run the completion script matching you build and system.
-
-Assuming you built a release version using `cargo build --release` and use `bash` run the following:
-
-[source, shell]
-source target/release/completion-scripts/polkadot.bash
-
-You can find completion scripts for:
-- bash
-- fish
-- zsh
-- elvish
-- powershell
-
-To make this change persistent, you can proceed as follow:
-
-=== First install
-
-[source, shell]
-----
-COMPL_DIR=$HOME/.completion
-mkdir -p $COMPL_DIR
-cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/
-echo "source $COMPL_DIR/polkadot.bash" >> $HOME/.bash_profile
-source $HOME/.bash_profile
-----
-
-=== Update
-
-When you build a new version of Polkadot, the following will ensure you auto-completion script matches the current binary:
-
-[source, shell]
-----
-COMPL_DIR=$HOME/.completion
-mkdir -p $COMPL_DIR
-cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/
-source $HOME/.bash_profile
-----
-
-include::doc/packages.adoc[]
diff --git a/doc/docker.adoc b/doc/docker.adoc
new file mode 100644
index 0000000000000..90727281062c9
--- /dev/null
+++ b/doc/docker.adoc
@@ -0,0 +1,44 @@
+
+== Using Docker
+
+=== The easiest way
+
+The easiest/faster option is to use the latest image.
+
+Let´s first check the version we have. The first time you run this command, the polkadot docker image will be downloaded. This takes a bit of time and bandwidth, be patient:
+
+[source, shell]
+docker run --rm -it chevdor/polkadot:0.2.0 polkadot --version
+
+You can also pass any argument/flag that polkadot supports:
+
+[source, shell]
+docker run --rm -it chevdor/polkadot:0.2.0 polkadot --name "PolkaDocker"
+
+Once you are done experimenting and picking the best node name :) you can start polkadot as daemon, exposes the polkadot ports and mount a volume that will keep your blockchain data locally:
+
+[source, shell]
+docker run -d -p 30333:30333 -p 9933:9933 -v /my/local/folder:/data chevdor/polkadot:0.2.0 polkadot
+
+
+=== Build your own image
+
+To get up and running with the smallest footprint on your system, you may use the Polkadot Docker image.
+You can either build it yourself (it takes a while...):
+
+[source, shell]
+----
+ccd docker
+./build.sh
+----
+
+=== Reporting issues
+
+If you run into issues with polkadot when using docker, please run the following command
+(replace the tag with the appropriate one if you do not use latest):
+
+[source, shell]
+docker run --rm -it chevdor/polkadot:latest polkadot version
+
+This will show you the polkadot version as well as the git commit ref that was used to build your container.
+Just paste that in the issue you create.
diff --git a/doc/networks/dev.adoc b/doc/networks/dev.adoc
new file mode 100644
index 0000000000000..c92209709e0b1
--- /dev/null
+++ b/doc/networks/dev.adoc
@@ -0,0 +1,9 @@
+
+=== Dev network
+
+You can run a simple single-node development "network" on your machine by running in a terminal:
+
+[source, shell]
+polkadot --dev
+
+You can muck around by cloning and building the http://github.com/paritytech/polka-ui and http://github.com/paritytech/polkadot-ui or just heading to https://polkadot.js.org/apps.
diff --git a/doc/networks/krummelanke.adoc b/doc/networks/krummelanke.adoc
new file mode 100644
index 0000000000000..fb081baab2a96
--- /dev/null
+++ b/doc/networks/krummelanke.adoc
@@ -0,0 +1,4 @@
+
+=== Krumme Lanke
+
+Krumme Lanke is a testnet network used during the developement of PoC-2.
diff --git a/doc/networks/local.adoc b/doc/networks/local.adoc
new file mode 100644
index 0000000000000..a0a332495afeb
--- /dev/null
+++ b/doc/networks/local.adoc
@@ -0,0 +1,16 @@
+
+=== Local Two-node Testnet
+
+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:
+
+[source, shell]
+polkadot --chain=local --validator --key Alice -d /tmp/alice
+
+and in the other, run:
+
+[source, shell]
+polkadot --chain=local --validator --key Bob -d /tmp/bob --port 30334 --bootnodes '/ip4/127.0.0.1/tcp/30333/p2p/ALICE_BOOTNODE_ID_HERE'
+
+Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of
+the first terminal.
diff --git a/doc/networks/networks.adoc b/doc/networks/networks.adoc
new file mode 100644
index 0000000000000..98ca843eb56d1
--- /dev/null
+++ b/doc/networks/networks.adoc
@@ -0,0 +1,8 @@
+
+== Polkadot networks
+
+include::dev.adoc[]
+
+include::local.adoc[]
+
+include::krummelanke.adoc[]
diff --git a/doc/packages.adoc b/doc/packages.adoc
deleted file mode 100644
index f21c307077a98..0000000000000
--- a/doc/packages.adoc
+++ /dev/null
@@ -1,33 +0,0 @@
-
-== Cargo Packages
-
-:leveloffset: +2
-
-include::../polkadot/api/README.adoc[]
-
-include::../polkadot/cli/README.adoc[]
-
-include::../polkadot/collator/README.adoc[]
-
-include::../polkadot/consensus/README.adoc[]
-
-include::../polkadot/executor/README.adoc[]
-
-include::../polkadot/network/README.adoc[]
-
-include::../polkadot/parachain/README.adoc[]
-
-include::../polkadot/primitives/README.adoc[]
-
-include::../polkadot/runtime/README.adoc[]
-
-include::../polkadot/service/README.adoc[]
-
-include::../polkadot/src/README.adoc[]
-
-include::../polkadot/statement-table/README.adoc[]
-
-include::../polkadot/transaction-pool/README.adoc[]
-
-:leveloffset: -2
-
diff --git a/doc/packages/misc.adoc b/doc/packages/misc.adoc
new file mode 100644
index 0000000000000..316cf44858c91
--- /dev/null
+++ b/doc/packages/misc.adoc
@@ -0,0 +1,10 @@
+
+=== Misc packages
+
+:leveloffset: +3
+
+include::../../safe-mix/README.adoc[]
+
+include::../../subkey/README.adoc[]
+
+:leveloffset: -3
diff --git a/doc/packages/packages.adoc b/doc/packages/packages.adoc
new file mode 100644
index 0000000000000..a5271f87efe3e
--- /dev/null
+++ b/doc/packages/packages.adoc
@@ -0,0 +1,8 @@
+
+== Cargo Packages
+
+include::polkadot.adoc[]
+
+include::substrate.adoc[]
+
+include::misc.adoc[]
diff --git a/doc/packages/substrate.adoc b/doc/packages/substrate.adoc
new file mode 100644
index 0000000000000..d3feb6f79c7d2
--- /dev/null
+++ b/doc/packages/substrate.adoc
@@ -0,0 +1,9 @@
+
+=== Substrate Packages
+
+:leveloffset: +3
+
+// include::../../substrate/bft/README.adoc[]
+NOTE: Substratte will be refactored and the doc will be in another location.
+
+:leveloffset: -3
diff --git a/doc/shell-completion.adoc b/doc/shell-completion.adoc
new file mode 100644
index 0000000000000..c5697acf9c9b9
--- /dev/null
+++ b/doc/shell-completion.adoc
@@ -0,0 +1,41 @@
+
+== Shell completion
+
+The Polkadot cli command supports shell auto-completion. For this to work, you will need to run the completion script matching you build and system.
+
+Assuming you built a release version using `cargo build --release` and use `bash` run the following:
+
+[source, shell]
+source target/release/completion-scripts/polkadot.bash
+
+You can find completion scripts for:
+- bash
+- fish
+- zsh
+- elvish
+- powershell
+
+To make this change persistent, you can proceed as follow:
+
+=== First install
+
+[source, shell]
+----
+COMPL_DIR=$HOME/.completion
+mkdir -p $COMPL_DIR
+cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/
+echo "source $COMPL_DIR/polkadot.bash" >> $HOME/.bash_profile
+source $HOME/.bash_profile
+----
+
+=== Update
+
+When you build a new version of Polkadot, the following will ensure you auto-completion script matches the current binary:
+
+[source, shell]
+----
+COMPL_DIR=$HOME/.completion
+mkdir -p $COMPL_DIR
+cp -f target/release/completion-scripts/polkadot.bash $COMPL_DIR/
+source $HOME/.bash_profile
+----
diff --git a/polkadot/api/README.adoc b/polkadot/api/README.adoc
index 8f382d4f43919..6bef2e4362832 100644
--- a/polkadot/api/README.adoc
+++ b/polkadot/api/README.adoc
@@ -1,5 +1,12 @@
= Polkadot API
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+Strongly typed API for Polkadot based around the locally-compiled native
+runtime.
diff --git a/polkadot/cli/README.adoc b/polkadot/cli/README.adoc
new file mode 100644
index 0000000000000..6bef2e4362832
--- /dev/null
+++ b/polkadot/cli/README.adoc
@@ -0,0 +1,12 @@
+
+= Polkadot API
+
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+Strongly typed API for Polkadot based around the locally-compiled native
+runtime.
diff --git a/polkadot/collator/README.adoc b/polkadot/collator/README.adoc
index 3a5408b489e02..953cbd098c5ae 100644
--- a/polkadot/collator/README.adoc
+++ b/polkadot/collator/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Collator
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/collator/src/lib.rs b/polkadot/collator/src/lib.rs
index 60b46d47f0b89..33f94ad607daf 100644
--- a/polkadot/collator/src/lib.rs
+++ b/polkadot/collator/src/lib.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Collation node logic.
//!
//! A collator node lives on a distinct parachain and submits a proposal for
@@ -43,6 +44,7 @@
//!
//! This crate defines traits which provide context necessary for collation logic
//! to be performed, as the collation logic itself.
+// end::description[]
extern crate futures;
extern crate substrate_client as client;
diff --git a/polkadot/consensus/README.adoc b/polkadot/consensus/README.adoc
index a3ac5f631c38c..2af4db4d9ee80 100644
--- a/polkadot/consensus/README.adoc
+++ b/polkadot/consensus/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Consensus
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/consensus/src/lib.rs b/polkadot/consensus/src/lib.rs
index 195d50a00fccd..4e94bcad7d114 100644
--- a/polkadot/consensus/src/lib.rs
+++ b/polkadot/consensus/src/lib.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Propagation and agreement of candidates.
//!
//! Authorities are split into groups by parachain, and each authority might come
@@ -28,6 +29,7 @@
//! of invalid blocks.
//!
//! Groups themselves may be compromised by malicious authorities.
+// end::description[]
extern crate ed25519;
extern crate parking_lot;
diff --git a/polkadot/executor/README.adoc b/polkadot/executor/README.adoc
index 1c91cccab5fac..6b7613bc84d0c 100644
--- a/polkadot/executor/README.adoc
+++ b/polkadot/executor/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Executor
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/executor/src/lib.rs b/polkadot/executor/src/lib.rs
index 82cd5cd47851c..c7b8e93f88c4d 100644
--- a/polkadot/executor/src/lib.rs
+++ b/polkadot/executor/src/lib.rs
@@ -14,8 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see .
+// tag::description[]
//! A `CodeExecutor` specialisation which uses natively compiled runtime when the wasm to be
//! executed is equivalent to the natively compiled code.
+// end::description[]
extern crate polkadot_runtime;
#[macro_use] extern crate substrate_executor;
diff --git a/polkadot/network/README.adoc b/polkadot/network/README.adoc
index 1c2ad29b1b098..fd89f4426d156 100644
--- a/polkadot/network/README.adoc
+++ b/polkadot/network/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Network
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/network/src/lib.rs b/polkadot/network/src/lib.rs
index 48b382f66258e..6f4ff245992ee 100644
--- a/polkadot/network/src/lib.rs
+++ b/polkadot/network/src/lib.rs
@@ -14,11 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Polkadot-specific network implementation.
//!
//! This manages gossip of consensus messages for BFT and for parachain statements,
//! parachain block and extrinsic data fetching, communication between collators and validators,
//! and more.
+// end::description[]
extern crate substrate_bft as bft;
extern crate substrate_codec as codec;
diff --git a/polkadot/parachain/README.adoc b/polkadot/parachain/README.adoc
index fbce59a188f42..12d6e04e8423d 100644
--- a/polkadot/parachain/README.adoc
+++ b/polkadot/parachain/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Parachain
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/parachain/src/lib.rs b/polkadot/parachain/src/lib.rs
index 3854fe2ca8c33..cc31d2ffc415a 100644
--- a/polkadot/parachain/src/lib.rs
+++ b/polkadot/parachain/src/lib.rs
@@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Defines primitive types for creating or validating a parachain.
//!
//! When compiled with standard library support, this crate exports a `wasm`
@@ -39,6 +40,7 @@
//!
//! The `load_params` and `write_result` functions provide utilities for setting up
//! a parachain WASM module in Rust.
+// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
diff --git a/polkadot/primitives/README.adoc b/polkadot/primitives/README.adoc
index a8468a0cd9612..b52c73dcfa16c 100644
--- a/polkadot/primitives/README.adoc
+++ b/polkadot/primitives/README.adoc
@@ -1,5 +1,13 @@
= Polkadot primitives
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/primitives/src/lib.rs b/polkadot/primitives/src/lib.rs
index 99ca00314cbc2..f74ce1da5f449 100644
--- a/polkadot/primitives/src/lib.rs
+++ b/polkadot/primitives/src/lib.rs
@@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Shareable Polkadot types.
+// end::description[]
#![warn(missing_docs)]
diff --git a/polkadot/runtime/README.adoc b/polkadot/runtime/README.adoc
index 86dc313134a08..1d72d63959b4b 100644
--- a/polkadot/runtime/README.adoc
+++ b/polkadot/runtime/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Runtime
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/runtime/src/lib.rs b/polkadot/runtime/src/lib.rs
index 9e47ad54e792e..d68590b7e7717 100644
--- a/polkadot/runtime/src/lib.rs
+++ b/polkadot/runtime/src/lib.rs
@@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! The Polkadot runtime. This can be compiled with ``#[no_std]`, ready for Wasm.
+// end::description[]
#![cfg_attr(not(feature = "std"), no_std)]
diff --git a/polkadot/service/README.adoc b/polkadot/service/README.adoc
index 3de386712855d..85e13827c8665 100644
--- a/polkadot/service/README.adoc
+++ b/polkadot/service/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Service
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/service/src/lib.rs b/polkadot/service/src/lib.rs
index 3814a1c98da38..6022198178ca0 100644
--- a/polkadot/service/src/lib.rs
+++ b/polkadot/service/src/lib.rs
@@ -16,7 +16,9 @@
#![warn(unused_extern_crates)]
+// tag::description[]
//! Polkadot service. Specialized wrapper over substrate service.
+// end::description[]
extern crate ed25519;
extern crate polkadot_availability_store as av_store;
diff --git a/polkadot/src/README.adoc b/polkadot/src/README.adoc
index fed228df0b6bd..85fd0444763e4 100644
--- a/polkadot/src/README.adoc
+++ b/polkadot/src/README.adoc
@@ -1,5 +1,7 @@
= Polkadot Src
-placeholder
-//TODO Write content :)
+.Description
+----
+include::main.rs[tag=description]
+----
diff --git a/polkadot/src/main.rs b/polkadot/src/main.rs
index d3e951596e200..f8318d19fc56f 100644
--- a/polkadot/src/main.rs
+++ b/polkadot/src/main.rs
@@ -14,7 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! Polkadot CLI
+// end::description[]
#![warn(missing_docs)]
diff --git a/polkadot/statement-table/README.adoc b/polkadot/statement-table/README.adoc
index 402f55108f4e9..6c48103f01f38 100644
--- a/polkadot/statement-table/README.adoc
+++ b/polkadot/statement-table/README.adoc
@@ -1,5 +1,13 @@
= Polkadot Statement table
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/statement-table/src/lib.rs b/polkadot/statement-table/src/lib.rs
index 02457ac4ae425..1e4102d9e1820 100644
--- a/polkadot/statement-table/src/lib.rs
+++ b/polkadot/statement-table/src/lib.rs
@@ -1,6 +1,7 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// tag::description[]
//! The statement table.
//!
//! This stores messages other authorities issue about candidates.
@@ -13,6 +14,7 @@
//! Each parachain is associated with two sets of authorities: those which can
//! propose and attest to validity of candidates, and those who can only attest
//! to availability.
+// end::description[]
extern crate substrate_codec as codec;
extern crate substrate_primitives;
diff --git a/polkadot/transaction-pool/README.adoc b/polkadot/transaction-pool/README.adoc
index 868a3434b3e9e..c1e9426f7d30a 100644
--- a/polkadot/transaction-pool/README.adoc
+++ b/polkadot/transaction-pool/README.adoc
@@ -1,5 +1,13 @@
-= Polkadot Transactin pool
+= Polkadot Transaction pool
-placeholder
-//TODO Write content :)
+.Summary
+[source, toml]
+----
+include::Cargo.toml[lines=2..5]
+----
+
+.Description
+----
+include::src/lib.rs[tag=description]
+----
diff --git a/polkadot/transaction-pool/src/lib.rs b/polkadot/transaction-pool/src/lib.rs
index 265f72ba9903a..393f53ff1a431 100644
--- a/polkadot/transaction-pool/src/lib.rs
+++ b/polkadot/transaction-pool/src/lib.rs
@@ -14,6 +14,10 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see .
+// TODO: Add missing crate doc between the tags below
+// tag::description[]
+// end::description[]
+
extern crate ed25519;
extern crate substrate_client as client;
extern crate substrate_codec as codec;
@@ -286,7 +290,7 @@ impl<'a, A> txpool::Verifier for Verifier<'a, A> where
let encoded = uxt.encode();
let (encoded_size, hash) = (encoded.len(), BlakeTwo256::hash(&encoded));
-
+
debug!(target: "transaction-pool", "Transaction submitted: {}", ::substrate_primitives::hexdisplay::HexDisplay::from(&encoded));
let inner = match uxt.clone().check_with(|a| self.lookup(a)) {
diff --git a/safe-mix/README.adoc b/safe-mix/README.adoc
new file mode 100644
index 0000000000000..074b2496d03f4
--- /dev/null
+++ b/safe-mix/README.adoc
@@ -0,0 +1,5 @@
+= Safe-mix
+
+Means of mixing a series of hashes to create a single secure hash.
+
+Described in http://www.cs.huji.ac.il/~nati/PAPERS/coll_coin_fl.pdf
diff --git a/substrate/bft/README.adoc b/substrate/bft/README.adoc
new file mode 100644
index 0000000000000..f8c3d99724593
--- /dev/null
+++ b/substrate/bft/README.adoc
@@ -0,0 +1,3 @@
+= Substrate BFT
+
+TBD
diff --git a/substrate/cli/README.adoc b/substrate/cli/README.adoc
index 1ad1d01eb1330..2b9b74362d322 100644
--- a/substrate/cli/README.adoc
+++ b/substrate/cli/README.adoc
@@ -1,11 +1,13 @@
= Substrate CLI
-== Summary
-
+.Summary
[source, toml]
----
include::Cargo.toml[lines=2..5]
----
+.Description
+Polkadot CLI library
+
include::doc/shell-completion.adoc[]