subscan-explorer / origintrail-parachain

OriginTrail Parachain - The Polkadot hub for making Web3 assets discoverable, verifiable and valuable

Home Page:https://parachain.origintrail.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OriginTrail Parachain Node

License Substrate version Twitter URL Telegram Medium Discord

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.

OriginTrail Parachain node is built with Substrate framework.

Build & Run

Follow these steps to prepare a local Substrate development environment 🛠️

Setup of Machine

If necessary, refer to the setup instructions at the Substrate Developer Hub.

Build

Once the development environment is set up, build the parachain node template. This command will build the Wasm Runtime and native node code:

cargo build --release

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 that our parachain.

Run A Relay Chain

To start a relay chain we recommend reading and following instructions in Cumulus Workshop. OriginTrail parachain is currently compatible with Polkadot v0.9.18 version.

Parachain Nodes (Collators)

From the OriginTrail parachain working directory:

# NOTE: this command assumes the chain spec is in a directory named `polkadot`
# that is at the same level of the template working directory. Change as needed.
./target/release/origintrail-parachain \
-d cumulus-parachain/alice\
--local \
--collator\
--alice\
--ws-port 9945\
--parachain-id 2000\
--\
--execution wasm\
--chain ../polkadot/rococo_local.json

Then you need to register on Local Relay Chain as it is presented in Cumulus Workshop. For registering we first need to export the Parachain Genesis and Runtime.

# Build the Chain spec
./target/release/origintrail-parachain build-spec\
--disable-default-bootnode > ./template-local-plain.json

# Build the raw file
./target/release/origintrail-parachain build-spec \
--chain=./resources/template-local-plain.json \
--raw --disable-default-bootnode > ./resources/template-local.json

# Export genesis state to `./resources files
./target/release/origintrail-parachain export-genesis-state --parachain-id 2000 > ./para-2000-genesis
# export runtime 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 Substrate Cumulus Worship by going to:

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

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

Containerize

Build

docker build -t origintrail-parachain .

Run

docker run -it -p 30333:30333 -p 9933:9933 -p 9944:9944 -p 9615:9615 -v /data:/data origintrail-parachain:latest\
  --base-path=/data --rpc-external --ws-external\
  --ws-max-connections=1000 --rpc-cors=all\
  --prometheus-external --rpc-methods=Unsafe\
  --chain=/config/origintrail-parachain-2043-raw.json\
  --no-mdns --execution=wasm --pruning=archive\
  -- --execution=wasm --wasm-execution=Compiled --chain=polkadot

Learn More

  • More about expanding the multi-chain OriginTrail with Polkadot and OriginTrail Parachain development roadmap you can find on parachain.origintrail.io
  • More about OriginTrail Parachain and Decentralized Knowledge Graph read in whitepaper
  • More detailed instructions to use Cumulus parachains are found in the Cumulus Workshop
  • Refer to the upstream Substrate Developer Hub Node Template to learn more about the structure of this project, the capabilities it encapsulates and the way in which those capabilities are implemented.

About

OriginTrail Parachain - The Polkadot hub for making Web3 assets discoverable, verifiable and valuable

https://parachain.origintrail.io/

License:GNU General Public License v3.0


Languages

Language:Rust 98.1%Language:Solidity 1.5%Language:Dockerfile 0.4%