Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ crypto_nodes/*/*.tar.gz
crypto_nodes/bitcoin/bitcoin/
crypto_nodes/dogecoin/dogecoin/
crypto_nodes/litecoin/litecoin/
# The build writes the credential-injected conf here, beside the tracked template.
crypto_nodes/*/*.generated.conf

# Per-coin/network node configs - never track (generated at install). The main files hold
# only non-secret operator overrides now, but stay ignored to protect any leftover files
Expand All @@ -38,3 +40,7 @@ config/*.bak*
# Coverage output (c8/nyc) - generated, not source
coverage/
.nyc_output/

# Validator identity, coin wallets and the DOGE signer written by `validator init`.
# Private keys live here (signing.key, wallets.env, signer/.env): never a repo artifact.
config/validator/
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.12.2] - 2026-09-01

### Added
- `validator stake` and `validator unstake` mint, stake and withdraw against the public network, so an operator can join before installing any stack.
- `validator init` builds the stake and publisher wallets and prints the two addresses to fund.

### Fixed
- An unrecognised service name is refused with the list of valid ones, instead of silently expanding to every service on every coin and network.
- A coin image builds from a context that holds its Dockerfile, and never writes live credentials into the tracked config template.
- A mutating command waits out a busy lock instead of losing the run, and a locked bootstrap create is retried by the publisher.
- The next step printed after `validator init` names the release rather than a branch.

## [0.12.1] - 2026-08-31

### Fixed
Expand Down
41 changes: 23 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<p align="center">
<img src="https://img.shields.io/badge/version-0.12.1-blue" alt="Version">
<img src="https://img.shields.io/badge/tests-2%2C568%2B%20passing-brightgreen" alt="Tests">
<img src="https://img.shields.io/badge/tests-2%2C659%2B%20passing-brightgreen" alt="Tests">
<img src="https://img.shields.io/badge/node-%3E%3D22-green" alt="Node">
<img src="https://img.shields.io/badge/license-AGPL--3.0--or--later-blue" alt="License">
</p>
Expand Down Expand Up @@ -84,26 +84,31 @@ as a full validator (P2P + PBFT + capability staking), generate a validator
identity first. This is offline and needs no running stack:

```bash
xchain-node validator init \
--seed-nodes seed1.example:10001,seed2.example:10001 \
--p2p-addr <your-public-host>:10001 \
--oracle-epoch-start <shared-federation-unix-ms> \
--capabilities price,cross_chain,oracle_publish,attestation
xchain-node validator init --network testnet --p2p-addr <your-public-host>:10002
```

It generates an Ed25519 signing key (saved `0600` under `config/validator/`),
prints the **pubkey to stake XCHAIN to**, and writes a starter `capabilities.json`
under `config/validator/hub-caps/` (its own subdirectory, mounted read-only into
the hub container; the signing key is never mounted). Edit that file to set real
`cross_chain` RPC endpoints and `oracle_publish` DOGE values, then install/start
the hub. It will boot in validator mode with your key and capability config
mounted automatically:
It generates an Ed25519 signing key, a BTC **stake wallet** and a DOGE
**publisher wallet** (all `0600` under `config/validator/`, git-ignored), prints
the **pubkey to stake XCHAIN to** and the **two addresses to fund**, and writes
`capabilities.json` under `config/validator/hub-caps/` already pointed at the
DOGE wallet, plus the signer module the hub loads to publish price rounds and
anchors from it. Seed nodes, network and the testnet oracle epoch default to
the federation's values. To use keys you already hold (a vanity address, say),
add `--import-stake-key` / `--import-doge-key`; each prompts for the WIF with
echo off.

Fund the two addresses, then stake and start:

```bash
xchain-node install master xchain-hub
xchain-node validator status # show pubkey, peers, capabilities
xchain-node validator stake # dry run: balances and the plan
xchain-node validator stake --broadcast # mints XCHAIN on testnet if short, then STAKEs
xchain-node install master xchain-hub # boots in validator mode, signer mounted
xchain-node validator status # pubkey, network, wallets, peers, capabilities
```

The full walkthrough, including the BTC indexer the hub needs and how to verify
membership on the explorer, is `xchain-documentation/operations/run-a-validator.md`.

## Host environment variables

Five env vars override where xchain-node stores its filesystem state. Set them in the shell or systemd unit before running `xchain-node install`. Each falls back to a path inside this repo if unset, so existing installs are unaffected.
Expand Down Expand Up @@ -151,19 +156,19 @@ Turn it off with any of: `--no-telemetry` on any command (sticks for future runs

| Command | Description |
|---|---|
| `npm test` | Unit tests (1,676 tests) |
| `npm test` | Unit tests (1,766 tests) |
| `npm run test:integration` | Integration tests (103 tests) |
| `npm run test:smoke` | Smoke tests (159 tests) |
| `npm run test:boundary` | Boundary condition tests (57 tests) |
| `npm run test:security` | Security tests (73 tests) |
| `npm run test:security` | Security tests (74 tests) |
| `npm run test:e2e` | End-to-end tests (57 tests) |
| `npm run test:fuzz` | Fuzz tests (264 tests) |
| `npm run test:chaos` | Chaos engineering tests (121 tests) |
| `npm run test:regression` | Regression tests (58 tests) |
| `npm run test:regression:p0` | Regression P0: critical gate (33 tests) |
| `npm run test:regression:p0p1` | Regression P0+P1: standard gate (51 tests) |
| `npm run test:mutation` | Mutation testing (Stryker Mutator) |
| `npm run test:all` | All tests (~2,438 tests; excludes security/boundary) |
| `npm run test:all` | All tests (~2,528 tests; excludes security/boundary) |
| `npm run benchmark` | Performance benchmarks (5 scenarios) |
| `npm run benchmark:quick` | Quick benchmarks |

Expand Down
Loading
Loading