Skip to content

Commit 1a74bf4

Browse files
committed
Update content
1 parent f645cca commit 1a74bf4

File tree

4 files changed

+514
-521
lines changed

4 files changed

+514
-521
lines changed

.ai/pages/node-infrastructure-run-a-collator-collator.md

Lines changed: 82 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,22 @@ This guide provides two deployment options. Select the option that best fits you
9797

9898
=== "Manual Setup"
9999

100-
Extract the binary from the official Docker image:
100+
Download the `polkadot-parachain` binary from the latest stable [Polkadot SDK release](https://github.com/paritytech/polkadot-sdk/releases){target=\_blank}:
101101

102102
```bash
103-
# Create a temporary container and copy the binary
104-
docker create --name temp-parachain parity/polkadot-parachain:stable2509-2
105-
sudo docker cp temp-parachain:/usr/local/bin/polkadot-parachain /usr/local/bin/
106-
docker rm temp-parachain
103+
# Download the latest stable release (check releases page for current version)
104+
wget https://github.com/paritytech/polkadot-sdk/releases/download/polkadot-stable2509-2/polkadot-parachain
105+
106+
# Make it executable and move to system path
107+
chmod +x polkadot-parachain
108+
sudo mv polkadot-parachain /usr/local/bin/
107109

108110
# Verify installation
109111
polkadot-parachain --version
110112
```
111113

114+
Check the [Polkadot SDK releases](https://github.com/paritytech/polkadot-sdk/releases){target=\_blank} page for the latest stable version.
115+
112116
## Generate Node Key
113117

114118
Generating a stable node key enables a consistent peer ID across the network. Follow these steps to generate a node key:
@@ -305,7 +309,9 @@ Sync time depends on:
305309

306310
The relay chain uses warp sync for faster synchronization.
307311

308-
**Important**: Do not proceed with registration until both chains are fully synced. Monitor sync progress using the log viewing commands in the [Log Management](#log-management) section.
312+
!!! warning
313+
314+
Do not proceed with registration until both chains are fully synced. Monitor sync progress using the log viewing commands in the [Log Management](#log-management) section.
309315

310316
## Generate Session Keys
311317

@@ -383,10 +389,20 @@ The registration process varies by system parachain. General steps include the f
383389

384390
Monitoring the following items will help ensure your collator runs efficiently to avoid service interruptions or down time:
385391

386-
- **Block Production**: monitor for block production using the following command:
387-
```bash
388-
sudo journalctl -u polkadot-collator | grep -i "prepared block"
389-
```
392+
- **Block Production**: Monitor for block production using the appropriate command for your setup:
393+
394+
=== "Docker Setup"
395+
396+
```bash
397+
docker logs polkadot-collator 2>&1 | grep -i "prepared block"
398+
```
399+
400+
=== "systemd Setup"
401+
402+
```bash
403+
sudo journalctl -u polkadot-collator | grep -i "prepared block"
404+
```
405+
390406
- **Peer Connections**: Maintain a sufficient amount of peers for good connectivity and set up alerts to notify if peer connections falls below ten.
391407
- **Resource Usage**: Monitor CPU, RAM, and disk I/O and set up alerts for unusual or high usage.
392408
- **Sync Status**: Ensure both chains stay synced and set up alerts for sync issues.
@@ -416,32 +432,64 @@ Key metrics to monitor via Prometheus include the following:
416432

417433
## Log Management
418434

419-
Effecient log management is essential to ensure collator performance and uptime. Use the following commands to help you manage logs to monitor and maintain your collator:
435+
Efficient log management is essential to ensure collator performance and uptime. Use the following commands to help you manage logs to monitor and maintain your collator:
436+
437+
=== "Docker Setup"
438+
439+
- View logs:
440+
```bash
441+
docker logs -f polkadot-collator
442+
```
443+
- View recent logs (last 100 lines):
444+
```bash
445+
docker logs --tail 100 polkadot-collator
446+
```
447+
- Filter for errors:
448+
```bash
449+
docker logs polkadot-collator 2>&1 | grep -i error
450+
```
451+
- Filter for block production:
452+
```bash
453+
docker logs polkadot-collator 2>&1 | grep -i "imported"
454+
```
455+
456+
=== "systemd Setup"
457+
458+
- View recent logs:
459+
```bash
460+
sudo journalctl -u polkadot-collator -n 100
461+
```
462+
- Follow logs in real-time:
463+
```bash
464+
sudo journalctl -u polkadot-collator -f
465+
```
466+
- Filter for errors:
467+
```bash
468+
sudo journalctl -u polkadot-collator | grep -i error
469+
```
470+
- Filter for block production:
471+
```bash
472+
sudo journalctl -u polkadot-collator | grep -i "imported"
473+
```
474+
475+
## Database Maintenance
476+
477+
Check database size periodically using the commands for your selected setup:
478+
479+
=== "Docker Setup"
420480

421-
- View recent logs:
422-
```bash
423-
sudo journalctl -u polkadot-collator -n 100
424-
```
425-
- Follow logs in real-time:
426-
```bash
427-
sudo journalctl -u polkadot-collator -f
428-
```
429-
- Filter for errors:
430481
```bash
431-
sudo journalctl -u polkadot-collator | grep -i error
482+
# Replace with your mounted data directory path
483+
du -sh ./collator-data
432484
```
433-
- Filter for block production:
485+
486+
=== "systemd Setup"
487+
434488
```bash
435-
sudo journalctl -u polkadot-collator | grep -i "imported"
489+
du -sh /var/lib/polkadot-collator
436490
```
437491

438-
## Database Maintenance
439-
440-
You can check database size using the following command:
441-
```bash
442-
du -sh /var/lib/polkadot-collator
443-
```
444-
The collator node handles pruning automatically.
492+
The collator node handles pruning automatically based on configuration.
445493

446494
## Updates and Upgrades
447495

@@ -492,12 +540,11 @@ Updates or upgrades can happen on either the runtime or client. Runtime upgrades
492540
sudo cp -r /var/lib/polkadot-collator /var/lib/polkadot-collator.backup
493541
```
494542

495-
3. Pull the new image and extract the binary:
543+
3. Download the new binary from [GitHub releases](https://github.com/paritytech/polkadot-sdk/releases){target=\_blank}:
496544
```bash
497-
docker pull parity/polkadot-parachain:<NEW_TAG>
498-
docker create --name temp-parachain parity/polkadot-parachain:<NEW_TAG>
499-
sudo docker cp temp-parachain:/usr/local/bin/polkadot-parachain /usr/local/bin/
500-
docker rm temp-parachain
545+
wget https://github.com/paritytech/polkadot-sdk/releases/download/<NEW_VERSION>/polkadot-parachain
546+
chmod +x polkadot-parachain
547+
sudo mv polkadot-parachain /usr/local/bin/
501548
```
502549

503550
4. Verify `polkadot-parachain` version to confirm successful update:

0 commit comments

Comments
 (0)