Skip to content

Commit

Permalink
add lock and improve readme (#2177)
Browse files Browse the repository at this point in the history
* add lock and improve readme

* Update gatsby-plugin-substrate

* fixes to 404 links
  • Loading branch information
mordamax authored Sep 17, 2024
1 parent 96f0f17 commit cac50a6
Show file tree
Hide file tree
Showing 10 changed files with 14,674 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .netlify/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/newsletter https://substrate.io/ecosystem/connect/newsletter/ 301!
/seminar https://substrate.io/ecosystem/resources/seminar/ 301!
/terms https://www.parity.io/terms/ 301!
/awesome-substrate https://github.com/substrate-developer-hub/awesome-substrate/blob/master/README.md 301!
/awesome-substrate https://github.com/polkadot-developers/awesome-substrate/blob/master/README.md 301!

/vundefined / 301!
/vundefined/* / 301!
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h1 align="center">
<a href="https://www.docs.substrate.io">
<img alt="Substrate Logo" src="https://github.com/substrate-developer-hub/substrate-docs/raw/main/static/img/sub.gif" width="70%" />
<img alt="Substrate Logo" src="https://github.com/polkadot-developers/substrate-docs/raw/main/static/img/sub.gif" width="70%" />
</a>
</h1>
<h1 align="center">Substrate Docs</h1>
Expand Down Expand Up @@ -74,10 +74,24 @@ yarn

This website uses a submodule for shared components. To set it up please refer to the [gatsby-plugin-substrate repository](https://github.com/paritytech/gatsby-plugin-substrate#troubleshooting).

```shell
git submodule update --init --recursive
```

To update the submodule to the latest main branch, run:

```shell
git submodule update --remote
```

**Configure environment variables**

Copy `example.env.development` into a new `.env.development` file.

```shell
cp example.env.development .env.development
```

Config URL variables based on your preferable local setup.
URL will be used for links generation between Substrate websites.

Expand Down
2 changes: 1 addition & 1 deletion config/menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const resources = [
id: 'ecosystem.resources.past-seminars',
},
{
url: 'https://github.com/substrate-developer-hub/awesome-substrate/blob/master/README.md',
url: 'https://github.com/spolkadot-developers/awesome-substrate/blob/master/README.md',
id: 'ecosystem.resources.awesome-substrate',
},
];
Expand Down
2 changes: 1 addition & 1 deletion config/siteMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ module.exports = {
gitter: 'https://gitter.im/paritytech/parity',
stackoverflow: 'https://stackoverflow.com/questions/tagged/substrate',
stackexchange: 'https://substrate.stackexchange.com',
githubDevhub: 'https://github.com/substrate-developer-hub/',
githubDevhub: 'https://github.com/polkadot-developers/',
};
18 changes: 4 additions & 14 deletions content/md/en/docs/install/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,13 @@ To compile the Substrate node template:
1. Clone the node template repository by running the following command:

```bash
git clone https://github.com/substrate-developer-hub/substrate-node-template
git clone https://github.com/paritytech/polkadot-sdk-minimal-template
```

In most cases, you can clone the `main` branch to get the latest code.
However, you can use the `--branch` command-line option if you want to work with a Substrate branch that is compatible with a specific Polkadot version.
Click [Tags](https://github.com/substrate-developer-hub/substrate-node-template/tags) to see the list of branches that are compatible with specific Polkadot versions.

1. Change to the root of the node template directory by running the following command:

```bash
cd substrate-node-template
cd polkadot-sdk-minimal-template
```

If you want to save your changes and make this branch easy to identify, you can create a new branch by running a command similar to the following:
Expand All @@ -160,21 +156,15 @@ To compile the Substrate node template:
git switch -c my-wip-branch
```

1. Compile the node template by running the following command:

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

Because of the number of packages required, compiling the node can take several minutes.
Follow the instructions in the README.md file to build the node.

After the build completes successfully, your local computer is ready for Substrate development activity.

## Where to go next

The Substrate Developer Hub acts as a central portal for access to the many resources available to the community.
Depending on your interests and learning style, you might prefer one avenue over another.
For example, if you prefer to read source code and are familiar with Rust, you might want to start by digging into the [Rust API](https://paritytech.github.io/substrate/master).
For example, if you prefer to read source code and are familiar with Rust, you might want to start by digging into the [Rust API](https://paritytech.github.io/polkadot-sdk/master).

#### Tell me

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ However, there are a few important differences between the node and parachain te

### Parachain info pallet

By default, the parachain template [runtime](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/Cargo.toml) includes several parachain-specific pallets, including a [`parachain-info` pallet](https://paritytech.github.io/cumulus/parachain_info/pallet/index.html).
By default, the parachain template [runtime](https://github.com/paritytech/polkadot-sdk-parachain-template/blob/master/runtime/Cargo.toml) includes several parachain-specific pallets, including a [`parachain-info` pallet](https://paritytech.github.io/polkadot-sdk/master/staging_parachain_info/pallet/index.html).
This pallet is designed to inject the unique parachain identifier into the parachain runtime.
This information allows the runtime to know which cross-chain messages are intended for it.

Expand All @@ -61,7 +61,7 @@ In contrast, the Substrate node template and many other Substrate-based chains i

### Collator service

The collator service—[`node/src/service.rs`](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/service.rs)—is entirely different in the parachain template from the similarly-named [`node/src/service.rs`](https://github.com/substrate-developer-hub/substrate-node-template/blob/main/node/src/service.rs) in the node template.
The collator service—[`node/src/service.rs`](https://github.com/paritytech/polkadot-sdk-parachain-template/blob/master/node/src/service.rs)—is entirely different in the parachain template from the similarly-named [`node/src/service.rs`](https://github.com/paritytech/polkadot-sdk-parachain-template/blob/master/node/src/service.rs) in the node template.
The collator service is explicitly designed as a wrapper to provide parachain-specific operations that a standard Substrate node doesn't require.

If you have an existing Substrate chain that you want to convert to a parachain, you should copy the [`node/src/service.rs`](https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/node/src/service.rs) from the parachain template as a starting point.
If you have an existing Substrate chain that you want to convert to a parachain, you should copy the [`node/src/service.rs`](https://github.com/paritytech/polkadot-sdk-parachain-template/blob/master/node/src/service.rs) from the parachain template as a starting point.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You want to isolate them to a distinct peer group with this ID.
Protocol ID collisions will cause _many_ issues for your nodes.

In order to set a unique protocol ID, change make sure you use some nonce or salt value. This is set
(for the [parachain node template](https://github.com/substrate-developer-hub/substrate-parachain-template/))
(for the [parachain node template](https://github.com/paritytech/polkadot-sdk-parachain-template/))
as a CLI item in `/client/network/src/command.rs`, and passed to extend the `/client/network/src/chain_spec.rs`

All [chain specification](/build/chain-spec/) files include this item as a field.
Expand Down Expand Up @@ -66,7 +66,7 @@ the amount of resource consumption as much as possible for the relay chain.

## Critical parachain constraints

You can check the maximum sizes [in the Polkadot repo](https://github.com/paritytech/polkadot/blob/f0e1ed0bab6d5cb542b84fa0ad464609198dd255/primitives/src/v2/mod.rs#L322-L348) for all relay chains (these are common constants).
You can check the maximum sizes [in the Polkadot repo](https://github.com/paritytech/polkadot-sdk/blob/43cd6fd4370d3043272f64a79aeb9e6dc0edd13f/polkadot/primitives/src/v8/mod.rs#L401-L429) for all relay chains (these are common constants).
Make note of:

- The runtime version of the relay chain you are targeting (these _may_ change)
Expand Down
4 changes: 2 additions & 2 deletions example.env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# GATSBY_WEBSITE_URL=http://localhost:8100
# GATSBY_DOCS_URL=http://localhost:8200
GATSBY_WEBSITE_URL=http://localhost:8100
GATSBY_DOCS_URL=http://localhost:8200
2 changes: 1 addition & 1 deletion plugins/gatsby-plugin-substrate
Loading

0 comments on commit cac50a6

Please sign in to comment.