diff --git a/.snippets/code/node-operators/networks/collators/account-management/check-nimbus-key.md b/.snippets/code/node-operators/networks/collators/account-management/check-nimbus-key.md new file mode 100644 index 000000000..a30d7e166 --- /dev/null +++ b/.snippets/code/node-operators/networks/collators/account-management/check-nimbus-key.md @@ -0,0 +1,10 @@ +
+ curl http://127.0.0.1:9933 -H "Content-Type:application/json;char set=utf-8" -d '{ + "jsonrpc":"2.0" + "id" :1, + "method": "author_hasKey", + "params": ["72c7ca7ef07941a3caeb520806576b52cb085f7577c12c36c2d64dbf73757a", "nmbs"] + }' + {"jsonrpc":"2.0", "result" :true, "id" :1} + +
diff --git a/.snippets/code/node-operators/networks/collators/account-management/log-output.md b/.snippets/code/node-operators/networks/collators/account-management/log-output.md new file mode 100644 index 000000000..3c5e1941d --- /dev/null +++ b/.snippets/code/node-operators/networks/collators/account-management/log-output.md @@ -0,0 +1,15 @@ +
+ 2025-02-25 20:00:52 [Relaychain] 💤 Idle (6 peers), best: #12706 (0x1d51.3042), finalized #12704 (0xf74b.aa44), 1 0.4kiB/s 1 0.6kiB/s + 2025-02-25 20:00:52 💤 Idle (6 peers), best: #5751 (Oxc5alesb5), finalized #5750 (0x9dc..e bad), 1 9.6kiB/s 1 3.5kiB/s + 2025-02-25 20:00:53 [Relaychain] ✨ Imported #12707 (0x77ea.4299) + 2025-02-25 20:00:57 [Relaychain] 💤 Idle (6 peers), best: #12707 (0x77ea..4299), finalized #12704 (0xf74b..aa44), | 16.4kiB/s 1 12.2kiB/s + 2025-02-25 20:00:57 💤 Idle (6 peers), best: #5751 (0xc5a1e8b5), finalized #5750 (0x9fdc...e bad), 1 1.6kiB/s 1 0.4kiB/s + 2025-02-25 20:00:59 [Relaychain] ✨ Imported #12708 (0x009f...3bbf) + 2025-02-25 20:01:00 ✨ Imported #5753 (0x8981.6c81) + 2025-02-25 20:01:00 ✨ Imported #5753 (0x33a...b5e3) + 2025-02-25 20:01:02 [Relaychain] 💤 Idle (6 peers), best: #12708 (0x009f...3bbf), finalized #12706 (0x1d51.3042), 1 1.5kiB/s 1 1.3kiB/s + 2025-02-25 20:01:02 💤 Idle (6 peers), best: #5752 (0x7036.569e), finalized #5751 (0xc5a1..e8b5), 1 3.3kiB/s 1 5.8kiB/s + 2025-02-25 20:01:05 [Relaychain] ✨ Imported #12709 (0x76b9...bf65) + 2025-02-25 20:01:07 [Relaychain] 💤 Idle (6 peers), best: #12709 (0x76b9..bf65), finalized #12706 (0x1d51.3042), | 2.0kiB/s | 0.9kiB/s + 2025-02-25 20:01:07 💤 Idle (6 peers), best: #5752 (0x7036.569e), finalized #5751 (0xc5a1..e8b5), 1 0 1 0 +
\ No newline at end of file diff --git a/.snippets/code/node-operators/networks/collators/account-management/rotate-keys.md b/.snippets/code/node-operators/networks/collators/account-management/rotate-keys.md new file mode 100644 index 000000000..69f326b73 --- /dev/null +++ b/.snippets/code/node-operators/networks/collators/account-management/rotate-keys.md @@ -0,0 +1,11 @@ +
+ curl http://127.0.0.1:9933-H\ "Content-Type: application/json;charset=utf-8" -d \ + '{ + "jsonrpc": "2.0", + "id" :1, + "method": "author_rotatekeys", + "params": [] + }' + {"jsonrpc": "2.0", "result":"0x72c7ca7ef0794103caeb520806576b52cb085f7577cc12cd36c2d64dbf73757a789407ec0f401a8792ac57c4fb7dabd4da6cc74d9ac9b8dd8c4faf770255403f", "id" :1} + +
diff --git a/.snippets/text/node-operators/networks/collators/account-management/generate-session-keys.md b/.snippets/text/node-operators/networks/collators/account-management/generate-session-keys.md index a129062a1..037a2a641 100644 --- a/.snippets/text/node-operators/networks/collators/account-management/generate-session-keys.md +++ b/.snippets/text/node-operators/networks/collators/account-management/generate-session-keys.md @@ -2,7 +2,7 @@ To match the Substrate standard, Moonbeam collator's session keys are [SR25519]( First, make sure you're [running a collator node](/node-operators/networks/run-a-node/overview/){target=\_blank}. Once you have your collator node running, your terminal should print similar logs: -![Collator Terminal Logs](/images/node-operators/networks/collators/account-management/account-1.webp) +--8<-- 'code/node-operators/networks/collators/account-management/log-output.md' Next, session keys can be created/rotated by sending an RPC call to the HTTP endpoint with the `author_rotateKeys` method. When you call `author_rotateKeys`, the result is the size of two keys. The response will contain a concatenated Nimbus ID and VRF key. The Nimbus ID will be used to sign blocks and the [VRF](https://wiki.polkadot.network/docs/learn-randomness#vrf){target=\_blank} key is required for block production. The concatenated keys will be used to create an association to your H160 account for block rewards to be paid out. @@ -21,7 +21,7 @@ curl http://127.0.0.1:9944 -H \ The collator node should respond with the concatenated public keys of your new session keys. The first 64 hexadecimal characters after the `0x` prefix represent your Nimbus ID and the last 64 hexadecimal characters are the public key of your VRF session key. You'll use the concatenated public keys when mapping your Nimbus ID and setting the session keys in the next section. -![Collator Terminal Logs RPC Rotate Keys](/images/node-operators/networks/collators/account-management/account-2.webp) +--8<-- 'code/node-operators/networks/collators/account-management/rotate-keys.md' Make sure you write down the concatenated public keys. Each of your servers, your primary and backup, should have their own unique keys. Since the keys never leave your servers, you can consider them a unique ID for that server. diff --git a/images/node-operators/networks/collators/account-management/account-1.webp b/images/node-operators/networks/collators/account-management/account-1.webp index ce71e4596..18d3e4e68 100644 Binary files a/images/node-operators/networks/collators/account-management/account-1.webp and b/images/node-operators/networks/collators/account-management/account-1.webp differ diff --git a/images/node-operators/networks/collators/account-management/account-2.webp b/images/node-operators/networks/collators/account-management/account-2.webp index fdaa7aa04..cab46aab0 100644 Binary files a/images/node-operators/networks/collators/account-management/account-2.webp and b/images/node-operators/networks/collators/account-management/account-2.webp differ diff --git a/images/node-operators/networks/collators/account-management/account-3.webp b/images/node-operators/networks/collators/account-management/account-3.webp index 18d3e4e68..022f8126b 100644 Binary files a/images/node-operators/networks/collators/account-management/account-3.webp and b/images/node-operators/networks/collators/account-management/account-3.webp differ diff --git a/images/node-operators/networks/collators/account-management/account-4.webp b/images/node-operators/networks/collators/account-management/account-4.webp index f3ec30e37..2d1c63c1e 100644 Binary files a/images/node-operators/networks/collators/account-management/account-4.webp and b/images/node-operators/networks/collators/account-management/account-4.webp differ diff --git a/images/node-operators/networks/collators/account-management/account-5.webp b/images/node-operators/networks/collators/account-management/account-5.webp deleted file mode 100644 index cab46aab0..000000000 Binary files a/images/node-operators/networks/collators/account-management/account-5.webp and /dev/null differ diff --git a/images/node-operators/networks/collators/account-management/account-6.webp b/images/node-operators/networks/collators/account-management/account-6.webp deleted file mode 100644 index 022f8126b..000000000 Binary files a/images/node-operators/networks/collators/account-management/account-6.webp and /dev/null differ diff --git a/images/node-operators/networks/collators/account-management/account-7.webp b/images/node-operators/networks/collators/account-management/account-7.webp deleted file mode 100644 index 2d1c63c1e..000000000 Binary files a/images/node-operators/networks/collators/account-management/account-7.webp and /dev/null differ diff --git a/llms.txt b/llms.txt index 02af692c6..52538b1d0 100644 --- a/llms.txt +++ b/llms.txt @@ -60530,7 +60530,7 @@ To match the Substrate standard, Moonbeam collator's session keys are [SR25519]( First, make sure you're [running a collator node](/node-operators/networks/run-a-node/overview/){target=\_blank}. Once you have your collator node running, your terminal should print similar logs: -![Collator Terminal Logs](/images/node-operators/networks/collators/account-management/account-1.webp) +--8<-- 'code/node-operators/networks/collators/account-management/log-output.md' Next, session keys can be created/rotated by sending an RPC call to the HTTP endpoint with the `author_rotateKeys` method. When you call `author_rotateKeys`, the result is the size of two keys. The response will contain a concatenated Nimbus ID and VRF key. The Nimbus ID will be used to sign blocks and the [VRF](https://wiki.polkadot.network/docs/learn-randomness#vrf){target=\_blank} key is required for block production. The concatenated keys will be used to create an association to your H160 account for block rewards to be paid out. @@ -60549,7 +60549,7 @@ curl http://127.0.0.1:9944 -H \ The collator node should respond with the concatenated public keys of your new session keys. The first 64 hexadecimal characters after the `0x` prefix represent your Nimbus ID and the last 64 hexadecimal characters are the public key of your VRF session key. You'll use the concatenated public keys when mapping your Nimbus ID and setting the session keys in the next section. -![Collator Terminal Logs RPC Rotate Keys](/images/node-operators/networks/collators/account-management/account-2.webp) +--8<-- 'code/node-operators/networks/collators/account-management/rotate-keys.md' Make sure you write down the concatenated public keys. Each of your servers, your primary and backup, should have their own unique keys. Since the keys never leave your servers, you can consider them a unique ID for that server. @@ -60611,7 +60611,7 @@ To create the mapping from [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc= 4. Enter the **keys**. It is the response obtained via the RPC call `author_rotateKeys` in the previous section, which is the concatenated public keys of your Nimbus ID and VRF key 5. Click on **Submit Transaction** -![Author ID Mapping to Account Extrinsic](/images/node-operators/networks/collators/account-management/account-3.webp) +![Author ID Mapping to Account Extrinsic](/images/node-operators/networks/collators/account-management/account-1.webp) !!! note If you receive the following error, you may need to try rotating and mapping your keys again: `VRF PreDigest was not included in the digests (check rand key is in keystore)`. @@ -60639,7 +60639,16 @@ curl {{ networks.development.rpc_url }} -H "Content-Type:application/json;charse If it's correct the response should return `"result": true`. -![Check Nimbus Key](/images/node-operators/networks/collators/account-management/account-4.webp) +
+ curl http://127.0.0.1:9933 -H "Content-Type:application/json;char set=utf-8" -d '{ + "jsonrpc":"2.0" + "id" :1, + "method": "author_hasKey", + "params": ["72c7ca7ef07941a3caeb520806576b52cb085f7577c12c36c2d64dbf73757a", "nmbs"] + }' + {"jsonrpc":"2.0", "result" :true, "id" :1} + +
From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase.moonbeam.network#/assets){target=\_blank}, click on **Developer** at the top of the page, then choose **Chain State** from the dropdown, and take the following steps: @@ -60648,7 +60657,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 3. Provide a Nimbus ID to query. Optionally, you can disable the slider to retrieve all mappings 4. Click on the **+** button to send the RPC call -![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-5.webp) +![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-2.webp) You should be able to see the H160 account associated with the Nimbus ID provided and the deposit paid. If no Nimbus ID was included, this would return all the mappings stored on-chain. @@ -60663,7 +60672,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 3. Provide a collator's address to query. Optionally, you can disable the slider to retrieve all mappings 4. Click on the **+** button to send the RPC call -![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-6.webp) +![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-3.webp) You should be able to see the nimbus ID associated with the H160 account provided. If no account was provided, this would return all the mappings stored on-chain. @@ -60679,7 +60688,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 2. Choose the **authorMapping** pallet and the **removeKeys** extrinsic 3. Click **Submit Transaction** -![Remove session keys on Polkadot.js Apps](/images/node-operators/networks/collators/account-management/account-7.webp) +![Remove session keys on Polkadot.js Apps](/images/node-operators/networks/collators/account-management/account-4.webp) Once the transaction goes through, the mapping bond will be returned to you. To make sure that the keys were removed, you can follow the steps in the [Check Mappings](#checking-the-mappings) section. @@ -61065,7 +61074,7 @@ To match the Substrate standard, Moonbeam collator's session keys are [SR25519]( First, make sure you're [running a collator node](/node-operators/networks/run-a-node/overview/){target=\_blank}. Once you have your collator node running, your terminal should print similar logs: -![Collator Terminal Logs](/images/node-operators/networks/collators/account-management/account-1.webp) +--8<-- 'code/node-operators/networks/collators/account-management/log-output.md' Next, session keys can be created/rotated by sending an RPC call to the HTTP endpoint with the `author_rotateKeys` method. When you call `author_rotateKeys`, the result is the size of two keys. The response will contain a concatenated Nimbus ID and VRF key. The Nimbus ID will be used to sign blocks and the [VRF](https://wiki.polkadot.network/docs/learn-randomness#vrf){target=\_blank} key is required for block production. The concatenated keys will be used to create an association to your H160 account for block rewards to be paid out. @@ -61084,7 +61093,7 @@ curl http://127.0.0.1:9944 -H \ The collator node should respond with the concatenated public keys of your new session keys. The first 64 hexadecimal characters after the `0x` prefix represent your Nimbus ID and the last 64 hexadecimal characters are the public key of your VRF session key. You'll use the concatenated public keys when mapping your Nimbus ID and setting the session keys in the next section. -![Collator Terminal Logs RPC Rotate Keys](/images/node-operators/networks/collators/account-management/account-2.webp) +--8<-- 'code/node-operators/networks/collators/account-management/rotate-keys.md' Make sure you write down the concatenated public keys. Each of your servers, your primary and backup, should have their own unique keys. Since the keys never leave your servers, you can consider them a unique ID for that server. diff --git a/node-operators/networks/collators/account-management.md b/node-operators/networks/collators/account-management.md index 7467f6d54..fbc367855 100644 --- a/node-operators/networks/collators/account-management.md +++ b/node-operators/networks/collators/account-management.md @@ -83,7 +83,7 @@ To create the mapping from [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc= 4. Enter the **keys**. It is the response obtained via the RPC call `author_rotateKeys` in the previous section, which is the concatenated public keys of your Nimbus ID and VRF key 5. Click on **Submit Transaction** -![Author ID Mapping to Account Extrinsic](/images/node-operators/networks/collators/account-management/account-3.webp) +![Author ID Mapping to Account Extrinsic](/images/node-operators/networks/collators/account-management/account-1.webp) !!! note If you receive the following error, you may need to try rotating and mapping your keys again: `VRF PreDigest was not included in the digests (check rand key is in keystore)`. @@ -111,7 +111,7 @@ curl {{ networks.development.rpc_url }} -H "Content-Type:application/json;charse If it's correct the response should return `"result": true`. -![Check Nimbus Key](/images/node-operators/networks/collators/account-management/account-4.webp) +--8<-- 'code/node-operators/networks/collators/account-management/check-nimbus-key.md' From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase.moonbeam.network#/assets){target=\_blank}, click on **Developer** at the top of the page, then choose **Chain State** from the dropdown, and take the following steps: @@ -120,7 +120,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 3. Provide a Nimbus ID to query. Optionally, you can disable the slider to retrieve all mappings 4. Click on the **+** button to send the RPC call -![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-5.webp) +![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-2.webp) You should be able to see the H160 account associated with the Nimbus ID provided and the deposit paid. If no Nimbus ID was included, this would return all the mappings stored on-chain. @@ -135,7 +135,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 3. Provide a collator's address to query. Optionally, you can disable the slider to retrieve all mappings 4. Click on the **+** button to send the RPC call -![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-6.webp) +![Nimbus ID Mapping Chain State](/images/node-operators/networks/collators/account-management/account-3.webp) You should be able to see the nimbus ID associated with the H160 account provided. If no account was provided, this would return all the mappings stored on-chain. @@ -151,7 +151,7 @@ From [Polkadot.js Apps](https://polkadot.js.org/apps/?rpc=wss://wss.api.moonbase 2. Choose the **authorMapping** pallet and the **removeKeys** extrinsic 3. Click **Submit Transaction** -![Remove session keys on Polkadot.js Apps](/images/node-operators/networks/collators/account-management/account-7.webp) +![Remove session keys on Polkadot.js Apps](/images/node-operators/networks/collators/account-management/account-4.webp) Once the transaction goes through, the mapping bond will be returned to you. To make sure that the keys were removed, you can follow the steps in the [Check Mappings](#checking-the-mappings) section.