Skip to content

Commit

Permalink
added commands and ending lines to terminal snippets, some small edits
Browse files Browse the repository at this point in the history
  • Loading branch information
dawnkelly09 committed Oct 7, 2024
1 parent 3d5c4cf commit 0b9371e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<div id='termynal' data-termynal>
<span data-ty>Secret phrase: digital width rely long insect blind usual name oyster easy steak spend</span>
<span data-ty> Network ID: substrate</span>
<span data-ty> Secret seed: 0xc52405d0b45dd856cbf1371f3b33fbde20cb76bf6ee440d12ea15f7ed17cca0a</span>
<span data-ty> Public key (hex): 0xc9c2cd111f98f2bf78bab6787449fc007dd7f2a5d02f099919f7fb50ade97dd6</span>
<span data-ty> Account ID: 0xc9c2cd111f98f2bf78bab6787449fc007dd7f2a5d02f099919f7fb50ade97dd6</span>
<span data-ty> Public key (SS58): 5GdFMFbXy24uz8mFZroFUgdBkY2pq6igBNGAq9tsBfEZRSzP</span>
<span data-ty> SS58 Address: 5GdFMFbXy24uz8mFZroFUgdBkY2pq6igBNGAq9tsBfEZRSzP</span>
<span data-ty="input"><span class="file-path"></span>./target/release/solochain-template-node key inspect \</span>
<span>--scheme Ed25519 \</span></br>
<span>--password-interactive \</span></br>
<span>"SECRET_PHRASE"</span>
<span data-ty>Secret phrase: digital width rely long insect blind usual name oyster easy steak spend</span>
<span data-ty>Network ID: substrate</span>
<span data-ty>Secret seed: 0xc52405d0b45dd856cbf1371f3b33fbde20cb76bf6ee440d12ea15f7ed17cca0a</span>
<span data-ty>Public key (hex): 0xc9c2cd111f98f2bf78bab6787449fc007dd7f2a5d02f099919f7fb50ade97dd6</span>
<span data-ty>Account ID: 0xc9c2cd111f98f2bf78bab6787449fc007dd7f2a5d02f099919f7fb50ade97dd6</span>
<span data-ty>Public key (SS58): 5GdFMFbXy24uz8mFZroFUgdBkY2pq6igBNGAq9tsBfEZRSzP</span>
<span data-ty>SS58 Address: 5GdFMFbXy24uz8mFZroFUgdBkY2pq6igBNGAq9tsBfEZRSzP</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div id='termynal' data-termynal>
<span data-ty>Secret phrase: digital width rely long insect blind usual name oyster easy steak spend</span>
<span data-ty> Network ID: substrate</span>
<span data-ty> Secret seed: 0xc52405d0b45dd856cbf1371f3b33fbde20cb76bf6ee440d12ea15f7ed17cca0a</span>
<span data-ty> Public key (hex): 0xea23fa399c6bd91af3d7ea2d0ad46c48aff818b285342d9aaf15b3172270e914</span>
<span data-ty> Account ID: 0xea23fa399c6bd91af3d7ea2d0ad46c48aff818b285342d9aaf15b3172270e914</span>
<span data-ty> Public key (SS58): 5HMhkSHpD4XcibjbU9ZiGemLpnsTUzLsG5JhQJQEcxp3KJaW</span>
<span data-ty> SS58 Address: 5HMhkSHpD4XcibjbU9ZiGemLpnsTUzLsG5JhQJQEcxp3KJaW</span>
<span data-ty="input"><span class="file-path"></span>./target/release/solochain-template-node key generate \</span>
<span>--scheme Sr25519 \</span></br>
<span>--password-interactive</span>
<span data-ty>Secret phrase: digital width rely long insect blind usual name oyster easy steak spend</span>
<span data-ty>Network ID: substrate</span>
<span data-ty>Secret seed: 0xc52405d0b45dd856cbf1371f3b33fbde20cb76bf6ee440d12ea15f7ed17cca0a</span>
<span data-ty>Public key (hex): 0xea23fa399c6bd91af3d7ea2d0ad46c48aff818b285342d9aaf15b3172270e914</span>
<span data-ty>Account ID: 0xea23fa399c6bd91af3d7ea2d0ad46c48aff818b285342d9aaf15b3172270e914</span>
<span data-ty>Public key (SS58): 5HMhkSHpD4XcibjbU9ZiGemLpnsTUzLsG5JhQJQEcxp3KJaW</span>
<span data-ty>SS58 Address: 5HMhkSHpD4XcibjbU9ZiGemLpnsTUzLsG5JhQJQEcxp3KJaW</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
<div id='termynal' data-termynal>
<span data-ty="input"><span class="file-path"></span>./target/release/solochain-template-node \</span>
<span>--base-path /tmp/node02 \</span></br>
<span>--chain ./customSpecRaw.json \</span></br>
<span>--port 30334 \</span></br>
<span>--rpc-port 9946 \</span></br>
<span>--validator \</span></br>
<span>--name MyNode02 \</span></br>
<span>--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWSbaPxmb2tWLgkQVoJdxzpBPTd9dQPmKiJfsvtP753Rg1 \</span></br>
<span>--unsafe-force-node-key-generation \</span></br>
<span>--password-interactive</span></br>
<span data-ty>2024-09-12 15:37:05 💤 Idle (0 peers), best: #0 (0x8af7…53fd), finalized #0 (0x8af7…53fd), ⬇ 0 ⬆ 0</span>
<span data-ty>2024-09-12 15:37:08 discovered: 12D3KooWMaL5zqYiMnVikaYCGF65fKekSPqXGgyz92eRcqcnfpey /ip4/192.168.1.2/tcp/30334</span>
<span data-ty>2024-09-12 15:37:10 💤 Idle (1 peers), best: #0 (0x8af7…53fd), finalized #0 (0x8af7…53fd), ⬇ 0.6kiB/s ⬆ 0.6kiB/s</span>
Expand All @@ -14,4 +24,5 @@
<span data-ty>2024-09-12 15:37:24 🔖 Pre-sealed block for proposal at 3. Hash now 0x12cc1e9492988cfd3ffe4a6eb3186b1abb351a12a97809f7bae4a7319e177dee, previously 0x74d78266b1ac2514050ced3f34fbf98a28c6a2856f49dbe8b44686440a45f879.</span>
<span data-ty>2024-09-12 15:37:24 🏆 Imported #3 (0x17a7…a1fd → 0x12cc…7dee)</span>
<span data-ty>2024-09-12 15:37:25 💤 Idle (1 peers), best: #3 (0x12cc…7dee), finalized #1 (0x0511…4f04), ⬇ 0.5kiB/s ⬆ 0.6kiB/s</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<div id='termynal' data-termynal>
<span data-ty="input"><span class="file-path"></span>./target/release/solochain-template-node \</span>
<span>--base-path /tmp/node01 \</span></br>
<span>--chain ./customSpecRaw.json \</span></br>
<span>--port 30333 \</span></br>
<span>--rpc-port 9945 \</span></br>
<span>--validator \</span></br>
<span>--name MyNode01 \</span></br>
<span>--password-interactive</span></br>
<span data-ty>2024-09-12 11:18:46 Substrate Node</span>
<span data-ty>2024-09-12 11:18:46 ✌️ version 0.1.0-8599efc46ae</span>
<span data-ty>2024-09-12 11:18:46 ❤️ by Parity Technologies <admin@parity.io>, 2017-2024</span>
Expand All @@ -15,4 +23,5 @@
<span data-ty>2024-09-12 11:18:46 〽️ Prometheus exporter started at 127.0.0.1:9615</span>
<span data-ty>2024-09-12 11:18:46 Running JSON-RPC server: addr=127.0.0.1:9945, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]</span>
<span data-ty>2024-09-12 11:18:51 💤 Idle (0 peers), best: #0 (0x850f…951f), finalized #0 (0x850f…951f), ⬇ 0 ⬆ 0</span>
<span data-ty="input"><span class="file-path"></span></span>
</div>
11 changes: 5 additions & 6 deletions tutorials/polkadot-sdk/build-a-blockchain/add-trusted-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: Launch a blockchain with a private set of authorized validators. Ge

This tutorial guides you through launching a private blockchain network with a small, trusted set of validators. In decentralized networks, consensus ensures that nodes agree on the state of the data at any given time. The [Polkadot SDK Solochain Template](https://github.com/paritytech/polkadot-sdk-solochain-template){target=_blank} uses Aura (Authority Round), a proof of authority consensus mechanism where a fixed set of trusted validators produces blocks in a round-robin fashion. This approach offers an easy way to launch a standalone blockchain with a predefined list of validators.



You'll learn how to generate keys, create a custom chain specification, and start a two-node blockchain network using the Aura consensus mechanism.

## Prerequisites
Expand All @@ -24,21 +22,22 @@ Before starting this tutorial, ensure you have:
## Generate an Account and Keys

Unlike in the [Simulate a Network](TODO - add path) tutorial, where you used predefined accounts and keys to start peer nodes, this tutorial requires you to generate unique secret keys for your validator nodes. It's crucial to understand that each participant is responsible for generating and managing their own unique set of keys in a real blockchain network.

This process of generating your own keys serves several important purposes:

- It enhances the security of your network by ensuring that each node has its own unique cryptographic identity
- It simulates a more realistic blockchain environment where participants don't share key information
- It helps you understand the process of key generation, which is a fundamental skill in blockchain operations

To understand more about the different signing algorithms used in this tutorial (sr25519 and ed25519), check [Keypairs and Signing](https://wiki.polkadot.network/docs/learn-cryptography#keypairs-and-signing){target=\_blank}. To learn more about the different types of keys used, refer to the [Keys](https://wiki.polkadot.network/docs/learn-cryptography#keys){target=\_blank} section in the Polkadot Wiki.
There are a couple of Polkadot Wiki articles that may help you better understand the different signing algorithms used in this tutorial. See the [Keypairs and Signing](https://wiki.polkadot.network/docs/learn-cryptography#keypairs-and-signing){target=\_blank} section to learn about the sr25519 and ed25519 signing algorithms. Refer to the [Keys](https://wiki.polkadot.network/docs/learn-cryptography#keys){target=\_blank} section to learn more about the different types of keys used in the ecosystem.

### Key Generation Options

There are several ways you can generate keys. The available methods are:

- [`solochain-template-node key`](https://docs.rs/sc-cli/0.46.0/sc_cli/commands/enum.KeySubcommand.html){target=\_blank} subcommand - the most straightforward method for developers working directly with the node is to use the integrated key generation feature. Using the `key` subcommand, you can generate keys directly from your node's command line interface. This method ensures compatibility with your chain and is convenient for quick setup and testing
- [subkey](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/utils/subkey){target=\_blank} - it is a powerful standalone utility specifically designed for Polkadot SDK-based chains. It offers advanced options for key generation, including support for different key types such as `ed25519` and `sr25519`. This tool allows fine-grained control over the key generation process
- Third-party key generation utilities - various tools developed by the community
- **[`solochain-template-node key` subcommand](https://docs.rs/sc-cli/0.46.0/sc_cli/commands/enum.KeySubcommand.html){target=\_blank}** - the most straightforward method for developers working directly with the node is to use the integrated key generation feature. Using the `key` subcommand, you can generate keys directly from your node's command line interface. This method ensures compatibility with your chain and is convenient for quick setup and testing
- **[subkey](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/utils/subkey){target=\_blank}** - it is a powerful standalone utility specifically designed for Polkadot SDK-based chains. It offers advanced options for key generation, including support for different key types such as `ed25519` and `sr25519`. This tool allows fine-grained control over the key generation process
- **Third-party key generation utilities** - various tools developed by the community

### Generate Local Keys with the Node Template

Expand Down

0 comments on commit 0b9371e

Please sign in to comment.