Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NZT48 authored Apr 27, 2022
1 parent c6da0b1 commit f5f5494
Showing 1 changed file with 20 additions and 32 deletions.
52 changes: 20 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# OriginTrail Parachain Node

OriginTrail Parachain node built with [Substrate](https://substrate.dev) framework.

<p align="center">
<img src="https://parachain.origintrail.io/images/navigation-logo.svg">
</p>

The OriginTrail Parachain is the next-generation L1 blockchain designed to tightly integrate with the OriginTrail DKG. As an OriginTrail-tailored blockchain it is optimized for maximum performance and usability in the OriginTrail consensus layer. It leverages the strong trust model and inherent interoperability of Polkadot, enabling smooth integration with other Polkadot ecosystem projects.

![](https://parachain.origintrail.io/storage/whitepaper-content/April2022/[email protected])

OriginTrail Parachain node is built with [Substrate](https://substrate.dev) framework.

## Build & Run

Expand All @@ -22,23 +31,16 @@ build the
cargo build --release
```

### Run standalone parachain node

For testing purposes, OriginTrail Parachain node can work without Relay chain. To start it as standalone node we need to specify --dev and --tmp flags,
also to determine if we want manual sealing or not, in command below we will set our standalone node to produce blocks every 12 seconds.
```bash
./target/release/origintrail-parachain --dev --tmp --sealing 12000
```

### Run a network

To run a full network with multiple OriginTrail parachain nodes (collators and non-collators), first we need to start relay chain, and after our parachain.
To run a full network with multiple OriginTrail parachain nodes (collators and non-collators), first we need to start relay chain, and after that our parachain.

![](https://parachain.origintrail.io/storage/whitepaper-content/April2022/[email protected])

#### Run A Relay Chain

To start a relay chain we recommend reading and following instructions in [Cumulus Workshop](https://substrate.dev/cumulus-workshop/).
OriginTrail parachain is currently compatible with Polkadot v0.9.6 version.

OriginTrail parachain is currently compatible with Polkadot v0.9.18 version.

#### Parachain Nodes (Collators)

Expand All @@ -53,7 +55,7 @@ From the OriginTrail parachain working directory:
--collator\
--alice\
--ws-port 9945\
--parachain-id 2160\
--parachain-id 2000\
--\
--execution wasm\
--chain ../polkadot/rococo_local.json
Expand All @@ -72,9 +74,9 @@ Then you need to register on Local Relay Chain as it is presented in Cumulus Wor
--raw --disable-default-bootnode > ./resources/template-local.json

# Export genesis state to `./resources files
./target/release/origintrail-parachain export-genesis-state --parachain-id 2160 > ./para-2160-genesis
./target/release/origintrail-parachain export-genesis-state --parachain-id 2000 > ./para-2000-genesis
# export runtime wasm
./target/release/origintrail-parachain export-genesis-wasm > ./para-2160-wasm
./target/release/origintrail-parachain export-genesis-wasm > ./para-2000-wasm
```

In order to produce blocks you will need to register the parachain as detailed in the
Expand All @@ -83,29 +85,15 @@ by going to:

`Developer -> sudo -> paraSudoWrapper -> sudoScheduleParaInitialize(id, genesis)`

Ensure you set the `ParaId to 2160` and the `parachain: Bool to Yes`.
Ensure you set the `ParaId to 2000` and the `parachain: Bool to Yes`.

## Docker

The easiest/faster option to run OriginTrail parachain in Docker is to use the latest release images.

Here we will run OriginTrail Parachain Node in develpoment mode (standalone node that works without relay chain and produce blocks every 12 seconds):
```bash
docker create -v /path/to/ParachainChainspecRaw.json:/starfleet-parachain/paraChainSpecRaw.json \
-v /path/to/RelayChainChainspecRaw.json:/starfleet-parachain/rococo-custom.json \
-i --log-driver json-file --log-opt max-size=1g \
--name=origintrail-parachain -p 30333:30333 -p 30343:30343 -p 9933:9933 -p 9944:9944 -p 9615:9615 \
-e ADDITIONAL_PARAMS="--execution wasm --dev --sealing 12000" docker.io/origintrail/starfleet-parachain
```
With next command can start our node and print logs:
```bash
docker origintrail-parachain && docker logs origintrail-parachain -f --tail 100
```

## Learn More

- More about expanding the multi-chain OriginTrail with Polkadot you can find on
- More about expanding the multi-chain OriginTrail with Polkadot and OriginTrail Parachain development roadmap you can find on
[parachain.origintrail.io](https://parachain.origintrail.io/)
- More about OriginTrail Parachain and Decentralized Knowledge Graph read in [whitepaper](https://parachain.origintrail.io/whitepaper)
- More detailed instructions to use Cumulus parachains are found in the
[Cumulus Workshop](https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register)
- Refer to the upstream
Expand Down

0 comments on commit f5f5494

Please sign in to comment.