Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Updated to Polkadot-v1.1.0 (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmishra2005 authored Oct 6, 2023
1 parent ed63f6f commit 0e6f1ed
Show file tree
Hide file tree
Showing 28 changed files with 5,195 additions and 4,876 deletions.
2,300 changes: 1,536 additions & 764 deletions Cargo.lock

Large diffs are not rendered by default.

226 changes: 114 additions & 112 deletions Cargo.toml

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

**Trappist** is a web3 developer playground for experimenting with [cross-chain applications and services](https://polkadot.network/cross-chain-communication/) built on the technologies spearheaded by the [Polkadot Network](https://polkadot.network/), namely:
* [Substrate](https://substrate.io/), a Blockchain framework that enables developers to quickly and easily build future proof blockchains optimized for any use case.
* [Cumulus](https://github.com/paritytech/cumulus), a set of tools for writing Substrate-based Polkadot parachains.
* [Cumulus](https://github.com/paritytech/polkadot-sdk/tree/master/cumulus), a set of tools for writing Substrate-based Polkadot parachains.
* [XCM](https://polkadot.network/cross-chain-communication/), a common language for secure messaging across Polkadot parachains, and with external networks via bridges.
* [Rococo](https://polkadot.network/blog/statemint-becomes-first-common-good-parachain-on-polkadot/), Polkadot’s Parachain Testnet.
* [Statemint](https://polkadot.network/blog/statemint-becomes-first-common-good-parachain-on-polkadot/), Polkadot's common good parachain which provides functionality for deploying and transferring assets — both Fungible and Non-Fungible Tokens (NFTs).
* [Contracts Pallet](https://github.com/paritytech/substrate/tree/master/frame/contracts), enable WebAssembly smart-contracts executions.
* [Contracts Pallet](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/contracts), enable WebAssembly smart-contracts executions.
* [ink!](https://paritytech.github.io/ink/), an eDSL to write smart contracts in Rust for blockchains built on the Substrate framework.

Altogether those technologies enable an array of exciting cross-chain applications & services:
Expand Down Expand Up @@ -55,15 +55,15 @@ First, complete the [basic Rust setup instructions](./docs/rust-setup.md).

Use the following command to build the Trappist collator binary:

```bash
```bash
cargo build --release
```

### XCM Playground via Zombienet

Create a `bin` directory into the root of this repository and place the following binaries inside of it:
- `polkadot` (which you can download from [the releases](https://github.com/paritytech/polkadot/releases))
- `polkadot-parachain` (which you will build from [cumulus](https://github.com/paritytech/cumulus))
- `polkadot` (which you can download from [the releases](https://github.com/paritytech/polkadot-sdk/releases))
- `polkadot-parachain` (which you will build from [cumulus](https://github.com/paritytech/polkadot-sdk))

Download the [latest release of zombienet](https://github.com/paritytech/zombienet/releases/) into the root of this repository and make it executable:
```bash
Expand Down
2 changes: 1 addition & 1 deletion docker/trappist-parachain.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is sourced from https://github.com/paritytech/polkadot/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile
# This file is sourced from https://github.com/paritytech/polkadot-sdk/blob/master/scripts/ci/dockerfiles/polkadot/polkadot_builder.Dockerfile
FROM docker.io/paritytech/ci-linux:1.68.2-bullseye as builder

WORKDIR /trappist
Expand Down
8 changes: 4 additions & 4 deletions docs/rust-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Installation
---

This guide is for reference only, please check the latest information on getting starting with Substrate
This guide is for reference only, please check the latest information on getting starting with Substrate
[here](https://docs.substrate.io/v3/getting-started/installation/).

This page will guide you through the **2 steps** needed to prepare a computer for **Substrate** development.
Expand Down Expand Up @@ -157,7 +157,7 @@ runtimes. You will need to configure your Rust compiler to use
compile Substrate runtime code to the Wasm target.

> There are upstream issues in Rust that need to be resolved before all of Substrate can use the stable Rust toolchain.
> [This is our tracking issue](https://github.com/paritytech/substrate/issues/1252) if you're curious as to why and how this will be resolved.
> [This is our tracking issue](https://github.com/paritytech/polkadot-sdk/issues/1252) if you're curious as to why and how this will be resolved.
#### Latest nightly for Substrate `master`

Expand Down Expand Up @@ -186,7 +186,7 @@ dependencies, you should use a specific Rust nightly version that is known to be
compatible with the version of Substrate they are using; this version will vary from project to
project and different projects may use different mechanisms to communicate this version to
developers. For instance, the Polkadot client specifies this information in its
[release notes](https://github.com/paritytech/polkadot/releases).
[release notes](https://github.com/paritytech/polkadot-sdk/releases).

```bash
# Specify the specific nightly toolchain in the date below:
Expand Down Expand Up @@ -222,4 +222,4 @@ specific nightly version, follow these steps:
rustup uninstall nightly
rustup install nightly-<yyyy-MM-dd>
rustup target add wasm32-unknown-unknown --toolchain nightly-<yyyy-MM-dd>
```
```
2 changes: 2 additions & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ xcm = { workspace = true, features = ["std"] }

# Cumulus
cumulus-client-cli = { workspace = true }
cumulus-client-collator = { workspace = true }
cumulus-client-consensus-aura = { workspace = true }
cumulus-client-consensus-relay-chain = { workspace = true }
cumulus-client-consensus-common = { workspace = true }
cumulus-client-consensus-proposer = { workspace = true }
cumulus-client-service = { workspace = true }
cumulus-client-network = { workspace = true }
cumulus-primitives-core = { workspace = true, features = ["std"] }
Expand Down
12 changes: 5 additions & 7 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::{net::SocketAddr, path::PathBuf};
use cumulus_client_cli::generate_genesis_block;
use cumulus_primitives_core::ParaId;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use log::{info, warn};
use log::info;
use parachains_common::AuraId;
use parity_scale_codec::Encode;
use sc_cli::{
Expand Down Expand Up @@ -412,7 +412,9 @@ pub fn run() -> Result<()> {
let id = ParaId::from(para_id);

let parachain_account =
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(&id);
AccountIdConversion::<polkadot_primitives::AccountId>::into_account_truncating(
&id,
);

let block: crate::service::Block =
generate_genesis_block(&*config.chain_spec, sp_runtime::StateVersion::V1)
Expand All @@ -429,17 +431,13 @@ pub fn run() -> Result<()> {
info!("Parachain genesis state: {}", genesis_state);
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });

if !(collator_options.relay_chain_rpc_urls.is_empty() || cli.relaychain_args.is_empty()) {
warn!("Detected relay chain node arguments together with --relay-chain-rpc-url. This command starts a minimal Polkadot node that only uses a network-related subset of all relay chain CLI options.");
}

dispatch_runtime!(config.chain_spec.runtime(), |runtime| {
crate::service::start_aura_node::<runtime::RuntimeApi, AuraId>(
config,
polkadot_config,
collator_options,
id,
hwbench
hwbench,
)
.await
.map(|r| r.0)
Expand Down
2 changes: 1 addition & 1 deletion node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where
C::Api: pallet_dex_rpc::DexRuntimeApi<Block, AssetId, Balance, Balance>,
P: TransactionPool + Sync + Send + 'static,
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashFor<Block>>,
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::HashingFor<Block>>,
{
use frame_rpc_system::{System, SystemApiServer};
use pallet_dex_rpc::{Dex, DexApiServer};
Expand Down
Loading

0 comments on commit 0e6f1ed

Please sign in to comment.