From f0f583127569d02216d14ac89a20df8b0d7dbfe9 Mon Sep 17 00:00:00 2001 From: chevdor Date: Tue, 24 Jul 2018 13:34:32 +0200 Subject: [PATCH 1/5] Improve doc - convert some md to adoc - include contrib docs to the main readme - add readme for some packages and include them --- CODE_OF_CONDUCT.md => CODE_OF_CONDUCT.adoc | 16 +-- CONTRIBUTING.adoc | 52 ++++++++ CONTRIBUTING.md | 53 -------- README.adoc | 139 +++------------------ doc/docker.adoc | 44 +++++++ doc/networks/dev.adoc | 9 ++ doc/networks/krummelanke.adoc | 4 + doc/networks/local.adoc | 16 +++ doc/networks/networks.adoc | 8 ++ doc/packages.adoc | 33 ----- doc/packages/misc.adoc | 10 ++ doc/packages/packages.adoc | 8 ++ doc/packages/substrate.adoc | 9 ++ doc/shell-completion.adoc | 41 ++++++ polkadot/api/README.adoc | 11 +- polkadot/cli/README.adoc | 12 ++ polkadot/collator/README.adoc | 12 +- polkadot/collator/src/lib.rs | 2 + polkadot/consensus/README.adoc | 12 +- polkadot/consensus/src/lib.rs | 2 + polkadot/executor/README.adoc | 12 +- polkadot/executor/src/lib.rs | 2 + polkadot/network/README.adoc | 12 +- polkadot/network/src/lib.rs | 2 + polkadot/parachain/README.adoc | 12 +- polkadot/parachain/src/lib.rs | 2 + polkadot/primitives/README.adoc | 12 +- polkadot/primitives/src/lib.rs | 2 + polkadot/runtime/README.adoc | 12 +- polkadot/runtime/src/lib.rs | 2 + polkadot/service/README.adoc | 12 +- polkadot/service/src/lib.rs | 2 + polkadot/src/README.adoc | 6 +- polkadot/src/main.rs | 2 + polkadot/statement-table/README.adoc | 12 +- polkadot/statement-table/src/lib.rs | 2 + polkadot/transaction-pool/README.adoc | 14 ++- polkadot/transaction-pool/src/lib.rs | 6 +- safe-mix/README.adoc | 5 + substrate/bft/README.adoc | 3 + substrate/cli/README.adoc | 6 +- 41 files changed, 386 insertions(+), 247 deletions(-) rename CODE_OF_CONDUCT.md => CODE_OF_CONDUCT.adoc (95%) create mode 100644 CONTRIBUTING.adoc delete mode 100644 CONTRIBUTING.md create mode 100644 doc/docker.adoc create mode 100644 doc/networks/dev.adoc create mode 100644 doc/networks/krummelanke.adoc create mode 100644 doc/networks/local.adoc create mode 100644 doc/networks/networks.adoc delete mode 100644 doc/packages.adoc create mode 100644 doc/packages/misc.adoc create mode 100644 doc/packages/packages.adoc create mode 100644 doc/packages/substrate.adoc create mode 100644 doc/shell-completion.adoc create mode 100644 polkadot/cli/README.adoc create mode 100644 safe-mix/README.adoc create mode 100644 substrate/bft/README.adoc 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..05c53b6211d45 --- /dev/null +++ b/CONTRIBUTING.adoc @@ -0,0 +1,52 @@ += 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 house coding style, as specified on the wiki. + +Merging pull requests once CI is successful: + +. A pull request that does not alter any logic (e.g. comments, dependencies, docs) may be tagged `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 `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 1fc4eb3a5cf60..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, as specified on the wiki. - -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` 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` 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 f54896e5e2100..1631624236465 100644 --- a/README.adoc +++ b/README.adoc @@ -4,6 +4,8 @@ :toc: :sectnums: +== Intro + Implementation of a https://polkadot.network node in Rust. @@ -27,43 +29,7 @@ You'll now have a `polkadot` binary installed to your `PATH`. You can drop the `--branch v0.2` or run `cargo install --git https://github.com/paritytech/polkadot.git polkadot` to get the very latest version of Polkadot, but these instructions might not work in that case. -=== 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 @@ -107,103 +73,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 ./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] ---- -cd 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 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..8d93910f41212 --- /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 ./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 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 149e69f3245af..20799802c6fcb 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 dfbaa2ea173af..0b9125eeac2b0 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 7af248fdbeaa4..ce505ad9053e7 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 83118799bb355..065ecb44944b9 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 10349d94dd8cd..6dc0d56821a9e 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_primitives; 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 ecbe832b6a530..2015e275a394a 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[] From 57bd62989a57f49da0845498ef93745a35acf11f Mon Sep 17 00:00:00 2001 From: chevdor Date: Fri, 3 Aug 2018 17:47:55 +0200 Subject: [PATCH 2/5] Bring changes from 68f83a257c69ce876f9daecc812c7548969521e3 into the replacing adoc file --- CONTRIBUTING.adoc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index 05c53b6211d45..7a0b789ea94b0 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -14,17 +14,16 @@ There are a few basic ground-rules for contributors (including the maintainer(s) . **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 house coding style, as specified on the wiki. +. 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 `insubstantial` and merged by its author. +. 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 `pleasereview` tag in order to garner feedback. +. 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: - +.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. @@ -34,8 +33,7 @@ When reviewing a pull request, the end-goal is to suggest useful changes to the . 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: - +.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. From 5239d1ed5c681e60de39aac19cbe7bf447d1a52c Mon Sep 17 00:00:00 2001 From: Chevdor Date: Thu, 9 Aug 2018 12:35:16 +0200 Subject: [PATCH 3/5] Minor fixes --- doc/docker.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/docker.adoc b/doc/docker.adoc index 8d93910f41212..90727281062c9 100644 --- a/doc/docker.adoc +++ b/doc/docker.adoc @@ -8,7 +8,7 @@ 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 ./version +docker run --rm -it chevdor/polkadot:0.2.0 polkadot --version You can also pass any argument/flag that polkadot supports: @@ -38,7 +38,7 @@ If you run into issues with polkadot when using docker, please run the following (replace the tag with the appropriate one if you do not use latest): [source, shell] -docker run --rm -it chevdor/polkadot:latest version +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. From 8f677aa3d4336859651f1e50b8df6dac7514fdf7 Mon Sep 17 00:00:00 2001 From: Will Date: Mon, 10 Sep 2018 15:30:20 +0200 Subject: [PATCH 4/5] Remove files irrelevant for substrate --- README.adoc | 7 +++--- doc/docker.adoc | 44 ----------------------------------- doc/networks/dev.adoc | 9 ------- doc/networks/krummelanke.adoc | 4 ---- doc/networks/local.adoc | 16 ------------- doc/networks/networks.adoc | 8 ------- doc/shell-completion.adoc | 41 -------------------------------- 7 files changed, 3 insertions(+), 126 deletions(-) delete mode 100644 doc/docker.adoc delete mode 100644 doc/networks/dev.adoc delete mode 100644 doc/networks/krummelanke.adoc delete mode 100644 doc/networks/local.adoc delete mode 100644 doc/networks/networks.adoc delete mode 100644 doc/shell-completion.adoc diff --git a/README.adoc b/README.adoc index 62d9ed4a76492..7d74b6ee073f2 100644 --- a/README.adoc +++ b/README.adoc @@ -1,5 +1,8 @@ = Substrate +:Author: Polkadot developers +:Revision: 0.2.0 :toc: +:sectnums: == Intro @@ -179,10 +182,6 @@ substrate --chain=local --validator --key Bob -d /tmp/bob --port 30334 --bootnod Ensure you replace `ALICE_BOOTNODE_ID_HERE` with the node ID from the output of the first terminal. -include::doc/networks/networks.adoc[leveloffset=+1] - -include::doc/docker.adoc[leveloffset=+1] - include::doc/packages/packages.adoc[] include::CONTRIBUTING.adoc[leveloffset=+1] diff --git a/doc/docker.adoc b/doc/docker.adoc deleted file mode 100644 index 90727281062c9..0000000000000 --- a/doc/docker.adoc +++ /dev/null @@ -1,44 +0,0 @@ - -== 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 deleted file mode 100644 index c92209709e0b1..0000000000000 --- a/doc/networks/dev.adoc +++ /dev/null @@ -1,9 +0,0 @@ - -=== 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 deleted file mode 100644 index fb081baab2a96..0000000000000 --- a/doc/networks/krummelanke.adoc +++ /dev/null @@ -1,4 +0,0 @@ - -=== 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 deleted file mode 100644 index a0a332495afeb..0000000000000 --- a/doc/networks/local.adoc +++ /dev/null @@ -1,16 +0,0 @@ - -=== 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 deleted file mode 100644 index 98ca843eb56d1..0000000000000 --- a/doc/networks/networks.adoc +++ /dev/null @@ -1,8 +0,0 @@ - -== Polkadot networks - -include::dev.adoc[] - -include::local.adoc[] - -include::krummelanke.adoc[] diff --git a/doc/shell-completion.adoc b/doc/shell-completion.adoc deleted file mode 100644 index c5697acf9c9b9..0000000000000 --- a/doc/shell-completion.adoc +++ /dev/null @@ -1,41 +0,0 @@ - -== 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 ----- From 25b7d301ec0baa62dc07d36716c37cbc8ca75fc9 Mon Sep 17 00:00:00 2001 From: Will Date: Mon, 10 Sep 2018 16:06:04 +0200 Subject: [PATCH 5/5] Remove old polkadot related doc --- README.adoc | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/README.adoc b/README.adoc index 7d74b6ee073f2..f1502ca3313fc 100644 --- a/README.adoc +++ b/README.adoc @@ -28,7 +28,7 @@ Substrate is designed to be used in one of three ways: === The Basics of Substrate -Substrate is a blockchain platform with a completely generic state transition function. That said, it does come with both standards and conventions (particularly regarding the Runtime Module Library) regarding underlying datastructures. Roughly speaking, these core datatypes correspond to as `trait`s in terms of the actual non-negotiable standard and generic `struct`s in terms of the convention. +Substrate is a blockchain platform with a completely generic state transition function. That said, it does come with both standards and conventions (particularly regarding the Runtime Module Library) regarding underlying datastructures. Roughly speaking, these core datatypes correspond to as +trait+s in terms of the actual non-negotiable standard and generic +struct+s in terms of the convention. ``` Header := Parent + ExtrinsicsRoot + StorageRoot + Digest @@ -45,6 +45,7 @@ To give an example, there is the timestamp inherent which sets the current times Other examples include the parachain-heads extrinsic in Polkadot and the "note-missed-proposal" extrinsic used in the Substrate Runtime Module Library to determine and punish or deactivate offline validators. + === Runtime and API Substrate chains all have a runtime. The runtime is a WebAssembly "blob" that includes a number of entry-points. Some entry-points are required as part of the underlying Substrate specification. Others are merely convention and required for the default implemnentation of the Substrate client to be able to author blocks. In short these two sets are: @@ -143,9 +144,9 @@ Then build the code: [source, shell] ---- -./scripts/build.sh # Builds the WebAssembly binaries -./scripts/build-demos.sh # Builds the WebAssembly binaries -cargo build # Builds all native code +./scripts/build.sh # Builds the WebAssembly binaries +./scripts/build-demos.sh # Builds the WebAssembly binaries +cargo build # Builds all native code ---- You can run the tests if you like: @@ -158,30 +159,6 @@ You can start a development chain with: [source, shell] cargo run -- --dev -=== Development - -You can run a simple single-node development "network" on your machine by -running in a terminal: - -[source, shell] -substrate --dev - -== 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] -substrate --chain=local --validator --key Alice -d /tmp/alice - -and in the other, run: - -[source, shell] -substrate --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/packages/packages.adoc[] include::CONTRIBUTING.adoc[leveloffset=+1]