Commit Graph

53 Commits

Author SHA1 Message Date
Juan Girini a310df263d Move developer-hub to polkadot-sdk-docs (#2598)
This PR is a continuation of
https://github.com/paritytech/polkadot-sdk/pull/2102 and part of an
initiative started here https://hackmd.io/@romanp/rJ318ZCEp
What has been done:
- The content under `docs/*` (with the exception of `docs/mermaid`) has
been moved to `docs/contributor/`
- Developer Hub has been renamed to Polkadot SDK Docs, and the crate has
been renamed from `developer-hub` to `polkadot-sdk-docs`
- The content under `developer-hub/*` has been moved to `docs/sdk`

---
Original PR https://github.com/paritytech/polkadot-sdk/pull/2565, it has
been close due to too many rebase conflicts

---------

Co-authored-by: Serban Iorga <serban@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
Co-authored-by: Egor_P <egor@parity.io>
Co-authored-by: Bastian Köcher <git@kchr.de>
2023-12-05 10:23:24 +01:00
Gonçalo Pestana 2ac23d247d Fixes cumulus README instructions (#2442)
README instructions fixes to be compatible with the `polkadot-prepare`
and `polkadot-execute` binary split.
2023-11-28 08:11:46 +01:00
Chevdor a30092ab42 Markdown linter (#1309)
* Add markdown linting

- add linter default rules
- adapt rules to current code
- fix the code for linting to pass
- add CI check

fix #1243

* Fix markdown for Substrate
* Fix tooling install
* Fix workflow
* Add documentation
* Remove trailing spaces
* Update .github/.markdownlint.yaml

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Fix mangled markdown/lists
* Fix captalization issues on known words
2023-09-04 12:02:32 +03:00
Joyce Siqueira c80f76f187 update polkadot, substrate, cumulus readme (#1182)
* update readmes

* temporary ReadMe for the Polkadot SDK

* delete welcome readme

* update links on substrate readme

* update links on polkadot readme

* update links on cumulus readme

* update overseer feature comment

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update cumulus/README.md

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update cumulus/README.md

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update polkadot/README.md

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update polkadot/README.md

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* Update polkadot/README.md

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* update gitlab links

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>

* terminal friendly convention

---------

Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
2023-08-29 14:37:16 +03:00
Joyce Siqueira aa2871415d update readme: archived repo (#3049)
* Update README.md

* Update README.md
2023-08-25 10:04:54 +02:00
Sebastian Kunert 817c4503db Allow integrated relay chain light client (#2270)
* Add embedded light client to cli

* Prepare for light-client-worker

* First working version

* Clean up

* Remove unwanted logs

* Simplify subscription code

* Let jsonrpsee handle rpc management

* Simplify implementation

* Reorganize crate structure

* Use relay chain arg chainspec for light-client

* Clean up command line

* Add light client worker file

* Use smoldot master to avoid wasmtime conflict

* Remove sleep

* Improve naming of cli option

* Remove conflict with `validator`

* Improve docs

* Update smoldot, remove unwanted change

* Apply suggestions from code review

Co-authored-by: Dmitry Markin <dmitry@markin.tech>

* Disable collation

* Reviewer comments

* Update smoldot and tokio-platform

* Update smoldot

* Update smoldot

* Adjust to new version

* Patch substrate

* Use constants

* Add readme entry, improve zombienet tests

* Apply suggestions from code review

Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* Make execution mode an enum

* Update smoldot, remove substrate patch

* Update client/relay-chain-rpc-interface/src/rpc_client.rs

Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

* Reduce duplicate code

* Update smoldot

* Update smoldot

* Fix build

* Update smoldot

* Make platform compile

* Clean up dependencies

* Use crates.io instead of github for smoldot

* Apply suggestions from code review

Co-authored-by: Davide Galassi <davxy@datawok.net>

* Docs

* Improve docs

* Remove `RpcFrontend`

---------

Co-authored-by: Dmitry Markin <dmitry@markin.tech>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Davide Galassi <davxy@datawok.net>
2023-08-22 15:53:32 +02:00
Chevdor 4b7c10c2da Add information about the parity container image (#2783) 2023-07-25 14:48:56 +00:00
Branislav Kontur f3ada7b81f Removed --execution wasm (#2857) 2023-07-12 09:33:24 +00:00
joe petrowski 6007549589 Rename Statemint to Asset Hub (#2633)
* change dir names

* cargo toml updates

* fix crate imports for build

* change chain spec names and PR review rule

* update cli to accept asset-hub

* find/replace benchmark commands

* integration tests

* bridges docs

* more integration tests

* AuraId

* other statemint tidying

* rename statemint mod

* chain spec mod

* rename e2e test dirs

* one more Runtime::Statemine

* benchmark westmint

* rename chain spec name and id

* rename chain spec files

* more tidying in scripts/docs/tests

* rename old dir if exists

* Force people to manually do the move.

(Safer as there could be additional considerations with their setup)

* review touchups

* more renaming

* Update polkadot-parachain/src/command.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* better error message

* do not break on-chain spec_name

* log info message that path has been renamed

* better penpal docs

---------

Co-authored-by: gilescope <gilescope@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: parity-processbot <>
2023-06-02 09:58:19 +00:00
S E R A Y A 0516e57c57 Update README.md (#2603)
fix broken link
2023-05-19 20:39:23 +02:00
Sasha Gryaznov 234f0dd809 docs: fix build command and some broken links (#2567) 2023-05-11 22:19:36 +02:00
Sebastian Kunert f4f467beff ReadMe followup for #2313 (#2317)
* Readme again

* relaychain -> relay chain
2023-03-15 09:33:42 +01:00
Sebastian Kunert 7aa2ea2690 README: Document usage of RPC node (#2313)
* Update readme

* Improve

* Apply suggestions from code review

Co-authored-by: Koute <koute@users.noreply.github.com>

* Quote urls

* Apply suggestions from code review

Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>

---------

Co-authored-by: Koute <koute@users.noreply.github.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
2023-03-14 14:56:32 +00:00
Radha ef411db3a7 Minor update to Readme - Statemint section (#2078)
* Minor update to Readme - Statemint section

Common good -> System

* update parchains readme

* Update parachains/README.md

Co-authored-by: Bastian Köcher <git@kchr.de>

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2023-01-11 15:25:23 +00:00
Branislav Kontur c3df7db394 BridgeHubKusama - initial setup - (chain_spec + basic runtime without any bridging pallets) (#1764)
* [BridgeHub] Setup Rococo backbone parachain

* [BridgeHub] Setup Wococo parachain backbone (reused from Rococo)
[Bridge-Backport] Rebase-fix
BridgeHub] Added zombienet startup tomls for Rococo/Wococo
Fix typo

* [BridgeHub] Added chain_spec for live Rococo/Wococo

* [BridgeHub] Clean bridge-hub-rococo runtime

* [BridgeHub] Add bridge-hub-rococo to CI pipelines

* [BridgeHub] Added bridge-hub-kusama - empty runtime/chain_spec setup

* Fixes

* Fixes for BH

* Fixes for other runtimes - align all

* Fixes - const

* Fixes const

* Fixes

* Fix kusama-local

* Sample zombienet runs

* Fixes

* Fixes for benchmarking

* Fixes CI

* Fixes

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs frame_system

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_collator_selection

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_balances

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_session

* Fixes name

* Fixes readme

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_timestamp

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs cumulus_pallet_xcmp_queue

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_collator_selection

* Fixes

* Fixes

* rustfmt

* Fixes

* Added pallet_utility/pallet_multisig

* Blind try for regex pr-custom-review.yml (added bridge-hub-kusama + collectives-polkadot)

* Fixes

* Fixes

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_utility

* ".git/.scripts/bench-bot.sh" pallet bridge-hub-kusama bridge-hubs pallet_multisig

* Trying to fix sed expression?

* Added license headers + correct "DAG:" desc

Co-authored-by: command-bot <>
2022-12-02 14:06:39 +01:00
Sebastian Kunert 9a3e518e5c Add example zombienet network file and instructions (#1839)
* Add simple example on how to spin up network.

* Update readme

* Remove unnecessary prefix

* Improve folder structure

* Add link to file

* Fix paths in readme

* Update README.md

Co-authored-by: Bastian Köcher <git@kchr.de>

Co-authored-by: Bastian Köcher <git@kchr.de>
2022-11-08 18:26:20 +00:00
Dan Shields 4a0ea59c85 Update README.md (#1683)
* Update README.md

* Update README.md
2022-10-03 09:41:15 +00:00
Squirrel 4561c6c45b standard way to get at the docs (#1430)
* standard way to get at the docs

* Update README.md
2022-07-05 19:15:45 +00:00
Muharem Ismailov 460c835ce1 README: installation instructions (#1403) 2022-06-24 08:31:51 +00:00
Squirrel bc0c98884f dir restructure to support more CGP (#1266)
* rerame res to chain-specs

* split polkadot-parachains dir

* rename dir parachains-common to common

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Wilfried Kopp <wilfried@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
2022-05-20 13:43:04 +01:00
Michael Müller a03c4c82d6 Rename canvas to contracts (#1265)
* Update SVG

* Rename `canvas-kusama` folder `contracts-rococo`

* Search-Replace `canvas-kusama` with `contracts-rococo`

* Search-Replace `canvas_kusama` with `contracts_rococo`

* Search-Replace `canvas_rococo` with `contracts_rococo`

* Rename `canvas-rococo.json` to `contracts-rococo.json`

* Rename `CanvasKusamaChainSpec` to `ContractsRococoChainSpec`

* Migrate chain specs and configurations to `contracts-rococo`

* Adapt readme

* Improve directory structure

* Remove last occurrences of `canvas`

* Apply `cargo fmt`

* Update README.md

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* Fix funny indentation

* Fix wasm path renaming

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Wilfried Kopp <wilfried@parity.io>
Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
2022-05-18 09:56:34 +00:00
Squirrel 1474308bbb rename polkadot-collator to polkadot-parachain (#1241)
* rename polkadot-collator to polkadot-parachain

Not every node has to be a collator.

* Update README.md

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* rename docker file

* Update .github/workflows/extrinsic-ordering-check-from-bin.yml

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>

* Versioning scheme that tracks polkadot relay chain

but allows for patch releases by having a 0 at the end.
(`-patch1` patch naming schemes were discussed but they
were judged to cause downstream packagers pain.)

* update name

* update lock file

Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
2022-05-13 13:02:52 +00:00
nodi-andy 2d63f6da2e bash tutorial: change the working path after clone (#1210) 2022-04-25 10:38:21 +02:00
Alexander Theißen 4d319d0fae Add canvas-kusama runtime (#980)
* Added kanvas runtime

* Fix up benchmarking

* Fixup markdown stucture

* replace :emoji_name: by utf8
* fix up header hierarchy

* Merge canvas README

* Only use "Canvas" as a name

* Remove reference to Rocanvas
2022-02-17 16:18:48 -05:00
Chris Sosnin 8a98067d96 Remove unused cli param (#941) 2022-02-01 12:03:54 +01:00
Sacha Lansky 8da32cfbfc Fix broken links in README (#899)
* Fix broken links

* Update README.md

* Update README.md
2022-01-17 22:15:02 +01:00
BenWhiteJam 4f8f4cfa3d update Rococo readme intro (#869) 2021-12-20 13:07:15 +01:00
Denis Pisarev ab2c9cd020 polkadot collator builder (#740)
* dockerfiles: polkadot-collator_builder.Containerfile and docs

* dockerfiles: optimize test dockerfile
2021-11-11 13:57:57 +01:00
Alexander Popiak 026f9b4422 add minimal mention of Statemint in the readme (#656)
* add minimal mention of Statemint in the readme

* use unicode coin
2021-10-15 17:36:20 +02:00
Dan Shields ba94a684c7 move to substrate.io (#658)
Co-authored-by: Dan Shields <danwshields@gmail.com>
2021-10-14 09:56:03 +02:00
Andronik Ordian e0a0b5612e docs: make collators actually work (#638)
* docs: make collators actually work

* bump polkadot

* include recent fix for overseer
2021-10-02 21:00:18 +02:00
Alexander b39bad58f1 Add build with docker info to README (#609)
* Add build with docker info to README

* removed few lines

* small fix README
2021-09-16 11:49:53 +02:00
Bastian Köcher ccae03fb9d Remove rococo-v1 branch from README (#608) 2021-09-14 10:50:23 +02:00
Chevdor d260b0e14f Add script and dockerfile to build an injected docker image for the polkadot-collator binary (#591)
* remove exec flag on json file
* fix dockerignore filter to allow building the injected docker image
* Update docker/injected.Dockerfile
* Update docker/scripts/build-injected-image.sh

Co-authored-by: Martin Pugh <pugh@s3kr.it>
Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
2021-09-03 15:30:12 +02:00
Bastian Köcher 3194febb1f Rename rococo-collator to polkadot-collator (#435)
* Rename `rococo-collator` to `polkadot-collator`

Also contains some other small changes.

* Test fixes and some further search&replace
2021-05-12 17:53:22 +02:00
Gavin Wood 86f9a99184 XCM revamp & Ping pallet (#391)
* Add spambot

* Fixes

* Add some extra functions to spambot, bump version

* Lock..

* Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot.

* Fix tests, bump Polkadot.

* Fix HMP tests

* Rename Hrmp -> Xcmp for handler/sender

* Use master branch

* Test Xcm message passing & rename away from HMP

* Docs

* Introduce fee payment mechanics into XCM.

* Rename spambot -> ping

* Lock

* XCMP message dispatch system reimagining

- Moved most of the logic into xcm-handler pallet
- Altered the outgoing XCMP API from push to pull
- Changed underlying outgoing queue data structures to avoid multi-page read/writes
- Introduced queuing for incoming messages
- Introduced signal messages as a flow-control sub-stream
- Introduced flow-control with basic threshold back-pressure
- Introduced overall weight limitation on messages executed
- Additonal alterations to XCM APIs for the new system

* Should process any remaining XCM messages when we're not doing anything else.

* Update API usage and preparation for the big build.

* Some build fixes

* Build fixes

* xcm-handler builds

* Fix warnings

* Docs

* Parachains system builds

* Parachain runtime building

* Fix build

* Introduce transfer_asset specialisation.

* Fixes

* Two-stage upgrade for parachains.

* Fixes

* Fixes

* Updates for message sending.

* Repotting/renaming. Add primitives/utility.

* Remove real-overseer and bump refs

* Configure & document Rococo XCM runtime.

* Add shell runtime, some companion changes for #8589

* Bumps & fixes

* Fix test

* Build fix

* Update pallets/xcmp-queue/src/lib.rs

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>

* Make tests compile

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove unused

* remove unused event stuff

* Adds proper validation-worker to make integration tests work

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* import saturating

* remove panic test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-04-14 09:36:59 +02:00
Bastian Köcher 119e0859b9 The great refactor (#325)
* Move pallets to pallets folder and rename them

* Move genesis file to service

* Rename primitives to primitives-core

* Delete cumulus-runtime

* Move stuff to client folder and rename
2021-02-10 13:07:21 +01:00
BenWhiteJam 010f106e24 update local setup to rococo-v1 (#293) 2021-01-15 21:50:43 +01:00
BenWhiteJam a6c1b4a5da add local setup to README (#283)
* adds local setup RelayChain, ParaChain and Registration

* cleanup

* removes metadata types adds parachain id placeholder

* spelling

* update parachain id information

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2021-01-11 21:48:07 +01:00
Dan Shields adbd6cffac Fix collator link (#223) 2020-10-06 07:12:52 +00:00
Joshy Orndorff cd15cbe605 Add workshop link to readme (#211) 2020-09-08 11:54:35 +02:00
Dan Forbes 1089e65494 Updated README (#176)
* Updated docs

* README 100-character line length

* We're keeping the name
2020-08-06 11:39:48 +02:00
Dan Forbes e739334f76 Rename cumulus-test-parachain-collator to rococo-collator (#173)
Ran `find . -type f -name "*" -print0 | xargs -0 sed -i -e "s/cumulus-test-parachain-collator/rococo-collator/g"`
2020-08-04 19:44:02 +02:00
Bastian Köcher 23c1954c74 Add parachains for rococo (#144)
* Add parachains for rococo

* Fix chain specs

* Update to revert log rotation

* Support selecting the chain in `export-genesis-state`

* Add subcommand for exporting the genesis wasm of a Parachain

* Update stuff

* Fix `export-genesis-wasm`

* Update the polkadot ref

* Add bootNodes address

* Add bootNodes address - track

* Add bootNodes address - trick

* Fix incorrect peer id (trick)

* Fixes https://github.com/paritytech/cumulus/issues/157

* Update chainspecs

* Update specs again

* Set correct sudo account

* Update properties

* Update readme

* Update `Cargo.lock`

* Switch to rococo-branch

Co-authored-by: Evaldo <contato@evaldofelipe.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-08-04 17:33:20 +02:00
Peter Goodspeed-Niklaus a29ac85f1d fix docker script (#93)
* fix test collator compilation failure

Closes #88.

* copy method instead of using feature

Using a feature gate like "test-features" is problematic because
it is leaky: depending on situational considitons such as the
current working directory when compilation is attempted, the
feature may or may not be applied, which makes success inconsistent.
It's simpler in this case to copy a dozen lines of code than to
work out all the issues with test features.

* docker script shoudld work on cumulus-branch (default)

* Add storage_append to runtime

Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-05-12 13:20:40 +02:00
Peter Goodspeed-Niklaus 5678c8a188 Automatic Example Collator (#67)
* add polkadot build script

* Add scripting to bring up a simple alice-bob example net

Demonstrated to produce blocks, but as of right now there's still
trouble getting it to respond to external queries on its ports.

* enable external rpc access to the nodes

Also shrink the build context by excluding some extraneous data.

* Ensure external RPC access works

Also set default branch appropriately, and have the stop command
clean itself up more thoroughly.

* Add multi-stage dockerfile for building the cumulus-test-parachain-collator

- Exclude the docker/ directory from build context because we're
  never going to build recursively, and this prevents spurious
  cache misses
- build the parachain collator in three stages. The build stage
  is discarded; the collator stage has a wrapper script to simplify
  generating the right bootnodes flags, and the default stage
  has just the binary in a small runtime.
- build_collator.sh collects appropriate build flags for the dockerfile
- inject_bootnodes.sh discovers the testnet node IDs and inserts them
  into the arguments list for cumulus-test-parachain-collator

* Add services which generate genesis state, run the collator

- Ignore the scripts directory to reduce spurious cache misses.
- Move inject_bootnodes.sh from the scripts directory into the root:
  It can't stay in the scripts directory, because that's ignored;
  I didn't want to invent _another_ top-level subdirectory for it.
  That decision could certainly be appealed, though.
- Move docker-compose.yml, add dc.sh, modify *_collator.sh: by
  taking docker-compose.yml out of the root directory, we can
  further reduce cache misses. However, docker-compose normally
  has a strong expectation that docker-compose.yml exist in the
  project root; it takes a moderately complicated invocation to
  override that expectation. That override is encoded in dc.sh;
  the updates to the other scripts are just to use the override.

The expectation as of now is that scripts/run_collator.sh runs
both chain nodes and the collator, generates the genesis state
into a volume with a transient container, and runs the collator
as specified in the repo README.

Upcoming work: Steps 5 and 6 from the readme.

* Launch the collator node

The biggest change here is adding the testing_net network to the
collator node's networks list. This lets it successfully connect
to the alice and bob nodes, which in turn lets it get their node IDs,
which was the blocker for a long time.

Remove httpie in favor of curl: makes for a smaller docker image,
and has fewer weird failure modes within docker.

Unfortunately this doesn't yet actually connect to the relay chain
nodes; that's the next area to figure out.

* enable external websocket access to indexer nodes

* Reorganize for improved caching, again

- Manually enumerate the set of source directories to copy when building.
  This bloats the cache a bit, but means that rebuilds on script changes
  don't bust that cache, which saves a _lot_ of time.
- Un-.dockerignore the scripts directory; it's small and will no longer
  trigger cache misses.
- Move inject_bootnodes.sh back into scripts directory for better organization.
- inject_bootnodes.sh: use rpc port for rpc call and p2p port for
  generating the bootnode string. I'm not 100% sure this is correct,
  but upwards of 80% at least.
- docker-compose.yml: reorganize the launch commands such that alice
  and bob still present the same external port mapping to the world,
  but within the docker-compose network, they both use the same
  (standard) p2p, rpc, and websocket ports. This makes life easier
  for inject_bootnodes.sh

The collator node still doesn't actually connect, but I think this
commit still represents real progress in that direction.

* Get the collator talking to the indexer nodes

In the end, it was four characters: -- and two = signs in the
launch arguments. They turn out to be critical characters for
correct operation, though!

Next up: automating step 5.

* Add runtime stage to collect runtime wasm blob into volume

We can't just copy the blob in the builder stage because the volumes
aren't available at that point.

Rewrite build_collator.sh into build_docker.sh and update for generality.

* WIP: add registrar service and partial work to actually register the collator

This is likely to be discarded; the Python library in use is 3rd party
and not well documented, while the official polkadot-js repo has a
CLI tool: https://github.com/polkadot-js/tools/tree/master/packages/api-cli

* Add a parachain registrar which should properly register the parachain

Doesn't work at the moment because it depends on two api-cli features
which I added today, which have not yet made it out into a published
release.

Next up: figure out how to add the `api-cli` at its `master` branch,
then run tests to ensure the collator is producing blocks. Then,
automate the block production tests.

* BROKEN attempt to demo registrar communication with the blockchain

This is a really weird bug. After running `scripts/run_collector.sh`,
which brings everything up, it's perfectly possible to get into
a state very much like what the registrar is in, and communicate
with the blockchain without issue:

```sh
$ docker run --rm --net cumulus_testing_net para-reg:latest polkadot-js-api --ws ws://172.28.1.1:9944 query.sudo.key
Thu 20 Feb 2020 12:19:20 PM CET
{
  "key": "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY"
}
```

However, the registrar itself, doing the same thing from within
`register_para.sh`, is failing to find the right place in the network:

```
/runtime/cumulus_test_parachain_runtime.compact.wasm found after 0 seconds
/genesis/genesis-state found after 0 seconds
2020-02-20 10:43:22          API-WS: disconnected from ws://172.28.1.1:9944 code: '1006' reason: 'connection failed'
_Event {
  type: 'error',
  isTrusted: false,
  _yaeti: true,
  target: W3CWebSocket {
    _listeners: {},
    addEventListener: [Function: _addEventListener],
    removeEventListener: [Function: _removeEventListener],
    dispatchEvent: [Function: _dispatchEvent],
    _url: 'ws://172.28.1.1:9944',
    _readyState: 3,
    _protocol: undefined,
    _extensions: '',
    _bufferedAmount: 0,
    _binaryType: 'arraybuffer',
    _connection: undefined,
    _client: WebSocketClient {
      _events: [Object: null prototype] {},
      _eventsCount: 0,
      _maxListeners: undefined,
      config: [Object],
      _req: null,
      protocols: [],
      origin: undefined,
      url: [Url],
      secure: false,
      base64nonce: 'aJ6J3pYDz8l5owVWHGbzHg==',
      [Symbol(kCapture)]: false
    },
    onclose: [Function (anonymous)],
    onerror: [Function (anonymous)],
    onmessage: [Function (anonymous)],
    onopen: [Function (anonymous)]
  },
  cancelable: true,
  stopImmediatePropagation: [Function (anonymous)]
}
```

They should be connected to the same network, running the same
image, doing the same call. The only difference is the file
existence checks, which really shouldn't be affecting the network
state at all.

Pushing this commit to ask for outside opinions on it, because
this is very weird and I clearly don't understand some part of
what's happening.

* Fix broken parachain registrar

The problem was that the registrar container was coming up too fast,
so the Alice node wasn't yet ready to receive connections. Using
a well-known wait script fixes the issue.

Next up: verify that the collator is in fact building blocks.

* fixes which cause the collator to correctly produce new parachain blocks

It didn't take much! The biggest issue was that the genesis state
was previously being double-encoded.

* add documentation for running the parachain automatically

* Add health check to collator

* minor scripting improvements

* Apply suggestions from code review

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>

* Docker: copy the whole workspace in one go

Pro: future-proofing against the time we add or remove a directory
Con: changing any file in the workspace busts Rust's build cache,
     which takes a long time.

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-21 16:20:22 +01:00
Bastian Köcher 669ea4864f Update README.md (#66) 2020-02-20 09:23:02 +01:00
Bastian Köcher 082bdd74fc Update README to fix the startup (#61)
* Update README to fix the startup

* Add missing `=`

* Apply suggestions from code review
2020-02-14 22:03:11 +01:00
Joshy Orndorff 991911ec4c Minor fix to readme instructions (#51) 2020-02-03 09:36:33 +01:00
Bastian Köcher 6dc3a76293 Update the README (#45) 2020-01-20 13:13:36 +01:00