GhostDeploy · the standard
GDS-1 — GhostDeploy Universal Node Hosting Standard
Version 0.1.0-draft. The open formats and behaviours any hosting operator can implement: signed network manifests, deployment profiles, the lifecycle commands, validator safety rules, Cold Smartnodes, the management API, offers, conformance and decentralization safeguards.
Contents
- 0. Purpose and non-goals
- 1. Terms
- 2. Network manifest (`gds.network/1`)
- 3. Profiles (`gds.profile/1`)
- 4. Instances, isolation and multi-tenancy
- 5. Targets
- 6. Lifecycle interface
- 7. Validator safety (MUST)
- 8. Cold Smartnodes and key separation (MUST)
- 9. Peer discovery
- 10. Universal Node Hosting API (`gds.api/1`)
- 11. Operators, offers and the marketplace
- 12. Conformance and certification
- 13. Decentralization safeguards
- 14. Versioning
Version 0.1.0-draft · Status: draft for PQWERAI Public Testnet 20778 · Applies to chain-ID-pinned PQWERAI networks.
The key words MUST, MUST NOT, SHOULD and MAY are used as in RFC 2119.
0. Purpose and non-goals
GDS-1 lets any infrastructure operator deploy, run, monitor, migrate and sell PQWERAI nodes without permission from,
integration with, or an account at the PQWERAI developers. It is a set of open, versioned formats and behaviours plus a
reference implementation (ghostdeploy, this repository).
Principles:
- No mandatory provider, platform or control plane. No host, cloud, orchestrator, website or API run by the PQWERAI developers is needed to install or run a node after the operator has the network manifest and a release artifact.
- Consensus stays in Core. GDS-1 never changes consensus. It drives the release bundle's own run scripts and the protocol's existing Smartnode transactions.
- Management is not consensus. The management API (§10) is a separate listener, separately authenticated. It is never the node's JSON-RPC port and never exposes it.
- Owners keep custody (§8). Nothing in GDS-1 needs an owner's seed phrase or spending key on a host.
- Honest capability. A profile, platform or architecture is listed as
supportedonly with a passing conformance run (§12) recorded inspec/evidence/. Everything else isexperimentalorunavailable, and the installer refusesunavailableprofiles.
Non-goals: GDS-1 does not rate service quality, does not decide disputes automatically when the facts are subjective, and does not exclude nodes because they share a provider (§13).
1. Terms
| Term | Meaning |
|---|---|
| Owner | Holder of the secp256k1 account that owns a Smartnode's stake, rewards and exit (protocol "owner"). |
| Vote key | ed25519 key used only by the validator signer. Holds no funds, sends no transactions. |
| Operator | Anyone who runs nodes: a hosting company, a community member, the owner themself. |
| Host | One machine or VM (any provider, any location) that runs one or more instances. |
| Instance | One isolated deployment of one profile on a host, with its own name, data, ports, users and limits. |
| Profile | A machine-readable deployment type (§3), e.g. full-node, smartnode, cold-smartnode. |
| Target | The packaging used to run an instance: compose, systemd, kubernetes, coolify, cloud-init, windows. |
| Network manifest | Signed document that pins a network: chain ID, genesis, release artifacts, peers (§2). |
2. Network manifest (gds.network/1)
A JSON document, signed, that tells an installer everything network-specific. Installers MUST refuse to install from a
manifest whose signature threshold is not met, whose expires has passed, or whose genesis files do not hash to the pins.
{
"schema": "gds.network/1",
"network": "pqwerai-public-testnet-20778",
"chain_id": 20778,
"genesis_hash": "0xe7c4…3db6",
"issued": "2026-11-28T00:00:00Z",
"expires": "2027-02-28T00:00:00Z",
"sequence": 1,
"genesis": {"files": {"genesis.json": "sha256", "genesis.json.profile.json": "sha256",
"GENESIS_MANIFEST.json": "sha256", "validators.json": "sha256"}},
"releases": [{"core_rev": "a679d60a1…", "channel": "stable", "min_gds": "0.1.0",
"artifacts": [{"os": "linux", "arch": "amd64", "kind": "bundle-tar",
"sha256": "3ed1a27f…", "size": 0, "urls": ["https://…", "ipfs://…"]}]}],
"peers": {"bootnodes": ["enode://…"], "seed_manifests": ["https://…/seed-manifest-20778.json"],
"seed_manifest_keys": ["ed25519 hex"], "dns_seeds": []},
"features": {"ghostshield": {"collateral_min": "32", "max_sponsored": 10}, "ghostturbo": {"final": false}},
"signatures": [{"key": "ed25519 hex", "sig": "hex"}]
}
- Signing: ed25519 over
"GHOSTDEPLOY-NETWORK-MANIFEST/1\n" || canonical_json(document without "signatures"), where canonical JSON = UTF-8, object keys sorted, no insignificant whitespace, no HTML escaping (asjson.dumps(sort_keys=True, separators=(",",":"), ensure_ascii=False)). Documents with trailing data or with object keys that differ only by case are rejected; inline file names must come from a fixed allow-list. - Trust roots: the installer ships with per-network root keys and a threshold (
spec/networks/<chain>.trust.json). For a network with an embedded trust root the threshold MUST be met by embedded keys alone;--trust-keyonly applies to networks without one. Rotating a root key means shipping a new installer. Rollback protection: an installer MUST refuse a manifest with a lowersequencethan the highest it has already accepted for that chain. - Mirrors: the same bytes may be served from any URL or IPFS; trust comes from the signature, not the location.
- Artifacts: every artifact is pinned by SHA-256. URLs are hints.
--artifact FILEinstalls from a local copy after the same hash check, so a provider can pre-stage or mirror artifacts.
3. Profiles (gds.profile/1)
Each profile is a JSON file in spec/profiles/ validated by spec/schema/profile.schema.json. Fields:
name, title, status (supported|experimental|unavailable), status_reason, roles[], requires[] (bundle components),
resources {min, recommended: cpu_cores, memory_mb, disk_gb, disk_iops?, network_mbps, gpu?},
architectures {amd64: verified|unverified|unavailable, arm64: …}, targets {compose: …, systemd: …, kubernetes: …,
coolify: …, cloud-init: …, windows: …}, ports[] {name, port, proto, exposure: public|loopback|private, required},
storage[] {name, path, purpose, persistent, backup: include|exclude|never, min_gb}, services[] {name, command, user,
health}, health {liveness, readiness}, env {key: default}, mining (none|optional|required), ai (none|optional|required),
secrets[] {name, holder: host|owner-only, purpose}, management {api_scopes[]}, notes.
The standard profile set:
| Profile | What runs | Validator key on host | Owner key on host | Mining | AI |
|---|---|---|---|---|---|
full-node |
Core, P2P, loopback RPC | no | no | none | none |
smartnode |
Core + 1..N signers (operator is also owner) | yes | no (owner signs Register from a wallet) | optional | optional |
cold-smartnode |
Core + signer; host makes vote key + PoP, owner registers remotely | yes | never | none | none |
bootstrap-seed |
Core with discovery on, high peer count, stable enode | no | no | none | none |
ghostrider-miner |
Core with GhostRider mining to an external payout address | no | no | required | none |
public-rpc |
Core + method-allowlisting RPC gateway + rate-limiting front (TLS by the operator) | no | no | none | none |
archive-node |
Core with full history (state is never pruned; full tx index needs -gcmode archive) |
no | no | none | none |
ghostllm-cpu |
GhostLLM provider runtime, CPU | no | no | none | required |
ghostllm-gpu |
GhostLLM provider runtime, GPU | no | no | none | required |
ghostllm-enterprise |
multi-GPU provider fleet behind one operator identity | no | no | none | required |
explorer |
explorer + PostgreSQL + its own Core | no | no | none | none |
ipfs |
Kubo storage node (no Core); reward enrolment is a separate on-chain step | no | no | none | none |
all-in-one |
full node + optional signer + metrics on one host | optional | no | optional | optional |
Mining and AI MUST stay optional for Smartnode profiles. Profile status is decided by evidence (§0.5), and the current status of each profile is in its file.
4. Instances, isolation and multi-tenancy
- An instance has a name
^[a-z][a-z0-9-]{1,30}$, unique per host. All paths, users, ports and units derive from it: - config
/etc/ghostdeploy/<name>/, data/var/lib/ghostdeploy/<name>/, signer state/var/lib/ghostdeploy/<name>/signer/<validator>/, backups/var/backups/ghostdeploy/<name>/; - node uid/gid and signer uid/gid are per instance (
gd-<name>,gd-<name>-signer), so one tenant's processes cannot read another tenant's keys even on the same kernel; - ports:
p2p = 30303 + slot,rpc = 8545 + 10*slot,metrics = 6061 + 10*slot; one management API per host serves all its instances, scoped per instance (§10).slotis allocated at install and recorded. App components userpc-gateway = 8546 + 10*slot(public),ipfs-swarm = 4001 + slot(public),ipfs-api = 5001 + 10*slotandipfs-gateway = 8080 + 10*slot(loopback); third-party app images are pulled by digest only. - Limits: CPU (cores/quota), memory, pids and disk quota per instance (compose
cpus/mem_limit/pids_limit; systemdCPUQuota/MemoryMax/TasksMax; disk via a dedicated volume or project quota when the filesystem supports it — the installer reportsdisk_quota: not_enforcedotherwise, it does not pretend). - Each instance writes
instance.json(profile, network, slot, versions, created, host id) and an append-onlyevents.log(JSON lines). - Failure domains: several instances on one host are one failure domain.
ghostdeploy status --jsonreports the host id; concentration reporting (§13) counts instances per host, operator and provider separately.
5. Targets
| Target | Output | Reference status |
|---|---|---|
compose |
compose.yaml + .env per instance, image built on the host from the pinned bundle (no registry trust) or pulled by digest |
experimental until the GhostDeploy conformance run; the hand-written stack it derives from runs the live 20778 nodes |
systemd |
per-instance units calling the bundle's pqwerai-core-run / pqwerai-validator-run with instance env files |
experimental |
kubernetes |
Helm chart (single-active signer fence: StatefulSet replicas 1, RWOP volume, Lease) | experimental |
coolify |
Compose with Coolify labels, generated from the compose target | experimental |
cloud-init |
#cloud-config that installs ghostdeploy and runs ghostdeploy install non-interactively |
experimental |
windows |
native Core + signer as Windows services | experimental (Core Windows build exists; no conformance run yet) |
ghostdeploy render prints any target without touching the host, so providers can review or feed their own tooling.
6. Lifecycle interface
All commands accept --instance NAME, --json (machine-readable output) and never print secrets.
| Command | Contract |
|---|---|
install --profile P --network N |
verify manifest + artifact; create users, dirs, env; render target; start; record instance.json. Idempotent: re-running converges, never wipes data. --dry-run prints the plan. |
status |
instance health: service state, chain ID/genesis check, head, peers, finality, validator state, resources. Exit 0 healthy, 1 degraded, 2 down. |
update [--to REV] |
stage new release from a manifest, switch, health check, automatic rollback on failure. |
rollback |
switch back to the previous release. |
backup |
chain data + config with the node stopped, SHA-256 manifest. Signer journals are never included (§7). |
restore FILE |
restore chain data + config. Refuses to restore signer state. |
migrate export|import |
move an instance to another host (§7.3). |
doctor |
read-only checks: OS, arch, CPU, RAM, disk, clock sync, ports, Docker/systemd, manifest, genesis, peers, key file modes, duplicate-identity guard. |
uninstall |
stop and remove services. Data and signer state are kept unless --purge-data; --purge-signer additionally requires typing the validator id. |
smartnode keygen|pop|status |
Cold Smartnode tooling (§8). |
bench |
hardware benchmark, signed by the host key (§11.3). |
api serve|token |
management API (§10). |
conformance run |
compatibility test suite (§12). |
7. Validator safety (MUST)
Equivocation burns 25% of stake plus delegations and force-exits the validator. GDS-1 therefore treats every validator key as single-active:
- S1 One-shot enrollment. A signer starts with
-enrollonly when its signer dir carries theENROLL_ONCEmarker and has no journal yet. The marker is created only when a new key is created on this host and removed once the journal exists. A lost journal makes the signer refuse to start; it never re-enrolls silently. - S2 Fence. Each signer dir holds
FENCE.json{validator_id, instance, host_id, created}. A signer starts only if the fence matches its own instance and host. Copying a signer dir to another host (scaling, cloning a VM image, restoring onto other hardware) therefore fails closed. - S3 No journal restore.
backupexcludes signer state;restorerefuses it. In addition Core itself refuses a journal that is behind the chain'slast_seen_epochfor that validator. - S4 Network liveness check before first start. Before a signer first starts on a host,
ghostdeployreadsg4_validatorsand refuses to start a key whose validator voted within the last 2 epochs unless the local journal is the one that produced those votes. - S5 Migration moves, never copies. §7.3.
- S6 No replicas. Compose and systemd targets run exactly one signer process per key; Kubernetes uses replicas 1 + RWOP + Lease. Autoscaling MUST NOT apply to signers.
- S8 Start-time guard and doppelganger detection. Before EVERY signer start, whoever triggers it (the installer, a
container restart policy after a reboot, systemd, Coolify),
gd-signer-guardchecks: the fence names this instance, the host id and the LIVE/etc/machine-id(read at start, never copied into generated files); the fence's validator id equals sha256 of the vote key in the key file; noDOPPELGANGER.jsonmarker exists. With the local node synced it then listens forGD_DOPPELGANGER_EPOCHS(default 1) full epochs: if the chain records a vote of this key for an epoch after the signer stopped, another signer holds the key, a permanentDOPPELGANGER.jsonmarker is written and the start is refused. Core additionally refuses a journal older than the key's on-chain participation. Provider images MUST regenerate/etc/machine-idon clone (standard cloud-init behaviour). - S7 Rotation preferred. Changing provider SHOULD use key rotation (§8.3): the new host makes a new key, the owner signs Rotate, the old key retires at the epoch boundary. Old and new keys have different validator IDs, so the switch-over cannot produce slashable double votes.
7.3 Migration protocol (when moving the same key)
migrate exporton the old host: stops the signer, writesTOMBSTONE.jsoninto the old signer dir (the signer never starts there again), packages key + journal + anchor + a handoff record{validator_id, exported_at, from_host, chain_last_seen_epoch}encrypted with a passphrase (scrypt + AES-256-GCM).migrate importon the new host: decrypts, waits until the chain shows no vote from this validator newer than the handoff for 2 epochs (proof the old signer is really stopped), writes a new fence for the new host, starts the signer.- If the old host is unreachable (provider failure), the key cannot be exported with a tombstone; GDS-1 tooling then refuses to move it and instructs rotation instead.
8. Cold Smartnodes and key separation (MUST)
| Item | Holder | On the hosting provider's machine? |
|---|---|---|
| Owner spending key / seed phrase | owner wallet | never |
| Stake (collateral) | protocol escrow, owner address | n/a |
| Reward address | = owner address (protocol rule; no separate field today) | n/a |
| Vote key (ed25519) + its password | signer | yes (only for hosted signers) |
| P2P node key | node | yes |
| Finality relayer key (optional, gas only) | node | only if the operator chooses to relay; MUST NOT be the owner key |
| GhostShield collateral and sponsorship authority | owner address | never (the protocol has no operator role yet) |
| Management API tokens | operator / owner, by scope | token hashes only |
8.1 Registration flow (no owner key on the host)
- Owner gives the operator only their owner address.
- Host:
ghostdeploy smartnode keygen --instance Xmakes the vote key (keystore v3, scrypt) andghostdeploy smartnode pop --instance X --owner 0x…outputs{validator_id, vote_pubkey, pop, owner, chain_id, genesis_hash, registry, calldata}. The PoP signssha256("PQAI-G4-POP-V1" ‖ chainID ‖ genesis ‖ owner ‖ key), so it is valid only for that owner on that network. - The owner's wallet verifies the PoP locally and sends the Register transaction (value = stake) to the registry account
0xe52c49c93523b0bc4d53de22a0631994fbcb70e9with that calldata. The encoding is byte-identical topqwerai-cli sn-register(test vector captured from the released CLI ininternal/smartnode/testdata). - Activation after 2 epochs. Rewards, top-up, exit and withdrawal stay with the owner address.
8.2 Risks that remain with delegated operation (MUST be shown to owners)
- An operator holding the vote key can double-sign, burning 25% of stake + delegations and forcing exit. It cannot move funds.
- An operator that stops signing gets the validator force-exited after 12 silent checkpoints (no slash, no rewards).
- The owner must be an EOA (the registry refuses contract callers), so multisig custody is not possible today.
- GhostShield operations (offers, renewals, sponsorship) need the owner key; GDS-1 never automates them on a host.
8.3 Changing provider
Preferred: rotation. The new host runs smartnode keygen + smartnode pop --rotate <validator-id>; the owner sends Rotate; the
new key signs from the next epoch; stake, stable identity and GhostShield record are kept. Fallback: §7.3 migration.
9. Peer discovery
Installers configure, from the manifest: bootnodes, signed seed manifests (Core -seed-manifest + -seed-manifest-keys,
ed25519, bound to chain ID + genesis + expiry), the persistent peer cache, and discovery (discv4) on for all non-validator
profiles. The network ID equals the chain ID and the eth handshake checks genesis and fork ID, so cross-network peers are
refused. Run-time fork flags are not in the fork ID; GDS-1 therefore forbids rule/fork flags in instance configuration
(the network manifest is the only source, and 20778 binds all rules in genesis).
Not available in Core today (tracked gaps): DNS discovery (EIP-1459), discv5, IPFS-based discovery. After bootstrap no official node is required: peers are learned from peers and kept in the peer cache.
10. Universal Node Hosting API (gds.api/1)
OpenAPI 3.1 in spec/api/openapi.yaml. A host runs at most one API daemon (ghostdeploy api serve) on a separate port
(default 8790), HTTPS with a self-signed certificate whose SHA-256 fingerprint clients pin. It MUST NOT proxy node JSON-RPC.
- Auth: bearer tokens
gd_<id>_<secret>; the host stores onlysha256(secret). Each token has scopes, an optional instance list and an optional expiry. Scopes:read(status, metrics, events),operate(start/stop/restart/backup),deploy(install/update/rollback/remove),smartnode(keygen/pop; private keys are never exported),admin(tokens). Every mutating call is appended to the audit log with the token id, never the secret. - Endpoints (v1):
GET /v1/capabilities,GET /v1/benchmark,GET /v1/profiles,GET /v1/instances,POST /v1/instances(deploy),GET/DELETE /v1/instances/{name},GET /v1/instances/{name}/status,POST /v1/instances/{name}/actions/{start|stop|restart|update|rollback|backup},POST /v1/instances/{name}/smartnode/{keygen|pop},GET /v1/operations/{id},GET /v1/offers. - Long operations return
202with an operation id.
11. Operators, offers and the marketplace
11.1 Operator identity (gds.operator/1)
An operator identity is an ed25519 key. Signed operator documents carry name, contact, endpoints, supported profiles, networks, regions (voluntary), terms URL and payout address. Nothing private (credentials, customer data) is published.
11.2 Offers (gds.offer/1)
A signed offer: {offer_id, operator, profile, network, resources, region?, price {asset, asset_address, amount_wei, period_blocks},
min_periods, setup_fee_wei, terms_hash, valid_until, capacity}. Offers are published anywhere (HTTP, IPFS, peer
directories) and verified by signature; the on-chain registry (§11.4) stores only the operator's metadata URI and hash. asset_address follows the network's asset convention: address(0) is the native coin (the only value accepted today);
any other value must be an ERC-20 that a future AssetRegistry marks payable, with payouts in that asset.
11.3 Attestations
ghostdeploy bench produces a signed benchmark {host_id, cpu, ram, disk, measured_at} with the host key. Attestations are
self-reported and labelled so. A client MAY run conformance probes against a deployed instance to confirm part of it.
Reputation is computed by clients from settled agreements on chain, not declared by operators.
11.4 On-chain contracts (optional)
HostingOperatorRegistry: permissionless register/update/retire of operator metadata (URI + hash, identity key, payout); a small refundable bond deters spam; no admin can approve or remove operators. The identity key is an unproven claim (the EVM cannot check ed25519), so it is not unique on chain: clients MUST verify the signed operator document.HostingMarket: agreements between a customer and an operator for an offer hash, prepaid periods held in escrow in the canonical payment asset (native tPQAI). The operator claims elapsed periods; the customer can cancel any time and is refunded the unstarted periods; renewal only by an explicit customer transaction. If the agreement names an arbiter (agreed by both), the arbiter can split the escrowed remainder of a disputed agreement; otherwise funds follow the elapsed/unstarted rule. The contract does not judge uptime. Per-operator counters record counts AND value per outcome; counts are spammable with tiny agreements, so clients weight by value.- Hosting payments, validator stake and GhostShield collateral are separate; no hosting contract can touch stake or GhostShield funds.
12. Conformance and certification
ghostdeploy conformance run executes numbered checks and writes a signed JSON report. Certification is technical conformance
only, optional, and never a condition to participate.
GD-INST-01 install idempotent · GD-NET-01 chain ID + genesis · GD-NET-02 ≥ 2 peers · GD-SYNC-01 head within 3 blocks of
a reference · GD-SN-01 PoP verifies and calldata matches · GD-SN-02 fence/enroll-once refuse a copied signer dir ·
GD-SN-03 validator present in g4_validators and voting · GD-KEY-01 key file modes owner-only · GD-KEY-02 no owner key
material on host · GD-API-01 API rejects missing/invalid/out-of-scope tokens · GD-API-02 API port ≠ RPC port, RPC loopback
· GD-ISO-01 instances have distinct uids, dirs, ports · GD-BAK-01 backup excludes signer, restore refuses signer ·
GD-UPD-01 update + rollback · GD-MIG-01 migration refuses while old signer active · GD-NETFAIL-01 peers recover after
network loss · GD-GS-01 GhostShield status readable · GD-GT-01 GhostTurbo status provisional (never final).
13. Decentralization safeguards
ghostdeploy concentration computes voting-power shares by operator, host, provider/ASN and declared region from
g4_validators plus operator metadata. Provider-reported data is marked unverified. Alerts: any single operator, provider or
host above 1/3 of active voting power = critical (it alone can halt finality); above 20% = warning. Alerts never
exclude nodes.
14. Versioning
Formats carry schema ids (gds.network/1, gds.profile/1, gds.api/1, gds.offer/1, gds.operator/1). Additive changes
keep the major version; breaking changes bump it and installers MUST support the previous major for one release cycle.