Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ USER 10001:10001

# Start the node
ENTRYPOINT ["quantus-node"]
CMD ["--chain", "dirac_live_spec"]
CMD ["--chain", "planck_live_spec"]
18 changes: 9 additions & 9 deletions MINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ If you prefer manual installation or the script doesn't work for your system:

**Save the preimage** - you'll need it for the `--rewards-address` parameter.

4. **Run the node (Dirac testnet)**
4. **Run the node (Planck network)**

Minimal command - see --help for many more options
```sh
./quantus-node \
--validator \
--chain dirac \
--chain planck \
--node-key-file ~/.quantus/node_key.p2p \
--rewards-preimage <YOUR_PREIMAGE_FROM_STEP_3> \
--max-blocks-per-request 64 \
Expand Down Expand Up @@ -126,7 +126,7 @@ docker run -d \
ghcr.io/quantus-network/quantus-node:latest \
--validator \
--base-path /var/lib/quantus \
--chain dirac \
--chain planck \
--node-key-file /var/lib/quantus/node_key.p2p \
--rewards-preimage <YOUR_PREIMAGE>
```
Expand Down Expand Up @@ -190,7 +190,7 @@ docker run -d \
ghcr.io/quantus-network/quantus-node:latest \
--validator \
--base-path /var/lib/quantus \
--chain dirac \
--chain planck \
--rewards-address YOUR_ADDRESS_HERE
```

Expand Down Expand Up @@ -236,7 +236,7 @@ For high-performance mining, you can offload the QPoW mining process to a separa
# Replace <YOUR_PREIMAGE> with the inner_hash from step 1
RUST_LOG=info,sc_consensus_pow=debug ./target/release/quantus-node \
--validator \
--chain dirac \
--chain planck \
--external-miner-url http://127.0.0.1:9833 \
--rewards-preimage <YOUR_PREIMAGE>
```
Expand All @@ -249,7 +249,7 @@ For high-performance mining, you can offload the QPoW mining process to a separa
|-----------|-------------|---------|
| `--node-key-file` | Path to P2P identity file | Required |
| `--rewards-preimage` | Wormhole preimage (inner_hash from key generation) | Required |
| `--chain` | Chain specification | `dirac` |
| `--chain` | Chain specification | `planck` |
| `--port` | P2P networking port | `30333` |
| `--prometheus-port` | Metrics endpoint port | `9616` |
| `--name` | Node display name | Auto-generated |
Expand All @@ -264,7 +264,7 @@ For high-performance mining, you can offload the QPoW mining process to a separa
**View Logs**
```bash
# Real-time logs
tail -f ~/.local/share/quantus-node/chains/dirac/network/quantus-node.log
tail -f ~/.local/share/quantus-node/chains/planck/network/quantus-node.log

# Or run with verbose logging
RUST_LOG=info quantus-node [options]
Expand Down Expand Up @@ -299,7 +299,7 @@ curl -H "Content-Type: application/json" \

## Testnet Information

- **Chain**: Dirac Testnet
- **Chain**: Planck network
- **Consensus**: Quantum Proof of Work (QPoW)
- **Block Time**: ~6 seconds target
- **Network Explorer**: Coming soon
Expand All @@ -318,7 +318,7 @@ quantus-node --port 30334 --prometheus-port 9617 [other options]
**Database Corruption**
```bash
# Purge and resync
quantus-node purge-chain --chain dirac
quantus-node purge-chain --chain planck
```

**Mining Not Working**
Expand Down
2 changes: 1 addition & 1 deletion miner-stack/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# ============================================

REWARDS_ADDRESS=your_ss58_address_here
CHAIN=dirac
CHAIN=planck
NODE_NAME=my-quantus-node
NODE_VERSION=v0.4.2

Expand Down
2 changes: 1 addition & 1 deletion miner-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Edit `.env` file:
```bash
# Required
REWARDS_ADDRESS=your_ss58_address_here
CHAIN=dirac
CHAIN=planck
NODE_NAME=my-quantus-node
```

Expand Down
2 changes: 1 addition & 1 deletion miner-stack/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
command: >
--validator
--base-path /var/lib/quantus
--chain ${CHAIN:-dirac}
--chain ${CHAIN:-planck}
--node-key-file /node-keys/key_node
--rewards-address ${REWARDS_ADDRESS}
--name ${NODE_NAME:-my-quantus-node}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
"schemaVersion": 38,
"style": "dark",
"tags": [
"dirac",
"planck",
"business-metrics"
],
"templating": {
Expand All @@ -380,7 +380,7 @@
"timepicker": {},
"timezone": "browser",
"title": "Quantus - Business Metrics",
"uid": "dirac-business-metrics",
"uid": "planck-business-metrics",
"version": 1,
"weekStart": ""
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
},
"targets": [
{
"expr": "(node_memory_MemTotal_bytes{job=\"dirac-node\"} - node_memory_MemAvailable_bytes{job=\"dirac-node\"})",
"expr": "(node_memory_MemTotal_bytes{job=\"quantus-node\"} - node_memory_MemAvailable_bytes{job=\"quantus-node\"})",
"legendFormat": "Memory Used - {{instance}}",
"refId": "A"
}
Expand Down Expand Up @@ -308,7 +308,7 @@
},
"targets": [
{
"expr": "avg(rate(node_cpu_seconds_total{job=\"dirac-node\",mode!=\"idle\"}[5m])) by (instance) * 100",
"expr": "avg(rate(node_cpu_seconds_total{job=\"quantus-node\",mode!=\"idle\"}[5m])) by (instance) * 100",
"legendFormat": "CPU Usage - {{instance}}",
"refId": "A"
}
Expand Down Expand Up @@ -563,12 +563,12 @@
},
"targets": [
{
"expr": "sum(rate(node_network_transmit_bytes_total{job=\"dirac-node\"}[1m])) / 1024 / 1024",
"expr": "sum(rate(node_network_transmit_bytes_total{job=\"quantus-node\"}[1m])) / 1024 / 1024",
"legendFormat": "Outbound",
"refId": "A"
},
{
"expr": "sum(rate(node_network_receive_bytes_total{job=\"dirac-node\"}[1m])) / 1024 / 1024",
"expr": "sum(rate(node_network_receive_bytes_total{job=\"quantus-node\"}[1m])) / 1024 / 1024",
"legendFormat": "Inbound",
"refId": "B"
}
Expand Down Expand Up @@ -652,12 +652,12 @@
},
"targets": [
{
"expr": "sum by (instance) (rate(node_network_transmit_bytes_total{job=\"dirac-node\"}[1m])) / 1024 / 1024",
"expr": "sum by (instance) (rate(node_network_transmit_bytes_total{job=\"quantus-node\"}[1m])) / 1024 / 1024",
"legendFormat": "{{instance}} - TX",
"refId": "A"
},
{
"expr": "sum by (instance) (rate(node_network_receive_bytes_total{job=\"dirac-node\"}[1m])) / 1024 / 1024",
"expr": "sum by (instance) (rate(node_network_receive_bytes_total{job=\"quantus-node\"}[1m])) / 1024 / 1024",
"legendFormat": "{{instance}} - RX",
"refId": "B"
}
Expand All @@ -670,7 +670,7 @@
"schemaVersion": 38,
"style": "dark",
"tags": [
"dirac",
"planck",
"node-metrics"
],
"templating": {
Expand All @@ -683,7 +683,7 @@
"timepicker": {},
"timezone": "",
"title": "Quantus - Node Metrics",
"uid": "dirac-node-metrics",
"uid": "quantus-node-metrics",
"version": 1,
"weekStart": ""
}
Expand Down
70 changes: 0 additions & 70 deletions node/src/chain-specs/dirac.json

This file was deleted.

72 changes: 72 additions & 0 deletions node/src/chain-specs/planck.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use quantus_runtime::{
genesis_config_presets::{DIRAC_RUNTIME_PRESET, HEISENBERG_RUNTIME_PRESET},
genesis_config_presets::{HEISENBERG_RUNTIME_PRESET, PLANCK_RUNTIME_PRESET},
WASM_BINARY,
};
use sc_service::{ChainType, Properties};
Expand Down Expand Up @@ -65,11 +65,11 @@ pub fn heisenberg_chain_spec() -> Result<ChainSpec, String> {
.build())
}

/// Configure a new chain spec for the dirac testnet.
pub fn dirac_chain_spec() -> Result<ChainSpec, String> {
/// Planck network - same genesis as heisenberg (root and treasury).
pub fn planck_chain_spec() -> Result<ChainSpec, String> {
let mut properties = Properties::new();
properties.insert("tokenDecimals".into(), json!(12));
properties.insert("tokenSymbol".into(), json!("QU"));
properties.insert("tokenSymbol".into(), json!("PLK"));
properties.insert("ss58Format".into(), json!(189));

let telemetry_endpoints = TelemetryEndpoints::new(vec![(
Expand All @@ -79,25 +79,25 @@ pub fn dirac_chain_spec() -> Result<ChainSpec, String> {
.expect("Telemetry endpoints config is valid; qed");

let boot_nodes = vec![
"/dns/a1-p2p-dirac.quantus.cat/tcp/30333/p2p/QmUpQe7KmRW9WiKamEJm1ocJjx38x5TECTtgcvvhAovebA"
"/dns/a1-p2p-planck.quantus.cat/tcp/30333/p2p/QmQ4AywkRZuv2L4XKb71Y3erk2DpQPNUTmMS2LGEEr5q8r"
.parse()
.unwrap(),
"/dns/a2-p2p-dirac.quantus.cat/tcp/30333/p2p/QmV2q5givrE3Dxhu7Fv21MkZ5T3CdFWnmxt8ktweRYJ9AE"
.parse()
.unwrap(),
"/ip4/72.61.118.55/tcp/30333/p2p/QmXkZyXejhpJ6FG9sPG2CYtpyvtpgADKLY5k24jY8DQYwh"
"/dns/a2-p2p-planck.quantus.cat/tcp/30333/p2p/QmZT5LVJjBWf3QeJY6JKcFY6bCJoWucji96pKwpgbfTgic"
.parse()
.unwrap(),
];

Ok(ChainSpec::builder(WASM_BINARY.ok_or_else(|| "Dirac wasm not available".to_string())?, None)
.with_name("Quantus Dirac Testnet")
.with_id("dirac")
.with_protocol_id("dirac")
.with_boot_nodes(boot_nodes)
.with_telemetry_endpoints(telemetry_endpoints)
.with_chain_type(ChainType::Live)
.with_genesis_config_preset_name(DIRAC_RUNTIME_PRESET)
.with_properties(properties)
.build())
Ok(ChainSpec::builder(
WASM_BINARY.ok_or_else(|| "Runtime wasm not available".to_string())?,
None,
)
.with_name("Planck")
.with_id("planck")
.with_protocol_id("planck")
.with_boot_nodes(boot_nodes)
.with_telemetry_endpoints(telemetry_endpoints)
.with_chain_type(ChainType::Live)
.with_genesis_config_preset_name(PLANCK_RUNTIME_PRESET)
.with_properties(properties)
.build())
}
10 changes: 5 additions & 5 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,16 @@ impl SubstrateCli for Cli {
Ok(match id {
"dev" =>
Box::new(chain_spec::development_chain_spec()?) as Box<dyn sc_service::ChainSpec>,
"dirac_live_spec" =>
Box::new(chain_spec::dirac_chain_spec()?) as Box<dyn sc_service::ChainSpec>,
"dirac" => Box::new(chain_spec::ChainSpec::from_json_bytes(include_bytes!(
"chain-specs/dirac.json"
))?) as Box<dyn sc_service::ChainSpec>,
"heisenberg_live_spec" =>
Box::new(chain_spec::heisenberg_chain_spec()?) as Box<dyn sc_service::ChainSpec>,
"" | "heisenberg" => Box::new(chain_spec::ChainSpec::from_json_bytes(include_bytes!(
"chain-specs/heisenberg.json"
))?) as Box<dyn sc_service::ChainSpec>,
"planck_live_spec" =>
Box::new(chain_spec::planck_chain_spec()?) as Box<dyn sc_service::ChainSpec>,
"planck" => Box::new(chain_spec::ChainSpec::from_json_bytes(include_bytes!(
"chain-specs/planck.json"
))?) as Box<dyn sc_service::ChainSpec>,
path =>
Box::new(chain_spec::ChainSpec::from_json_file(std::path::PathBuf::from(path))?)
as Box<dyn sc_service::ChainSpec>,
Expand Down
Loading
Loading