Add an isolated Wownero research network, Carrot-compatible miner authorization, release corrections, and local acceptance tests. Base the implementation on FCMP++ beta 3.0 with the beta 3.1 legacy ring-offset correction; both research build options remain disabled by default.
Carrot miner proof experiment
Status: draft · Updated 2026-10-05 · Applies to: Wownero FCMP++ testnet research
This directory contains a standalone Carrot miner proof experiment and an optional, isolated Wownero FCMP++ network profile. Both build selectors default to OFF. The network profile is a research implementation, not a Wownero mainnet migration or a deployable release.
Statement and encoding
Let K = xG + yT be the coinbase output public key. G and T are the exact Ed25519 subgroup generators supplied by the pinned FCMP++ implementation. They are not Ristretto encodings. Knowledge of a representation authorizes this experiment; the proof does not establish who performed the proof of work or prevent remote signing services.
The prover samples independent nonzero scalars a, b, computes R = aG + bT, then:
c = Hs(domain || network_genesis || block_digest || encode(K) || encode(R))
s_g = a + c*x mod l
s_t = b + c*y mod l
proof = encode(c) || encode(s_g) || encode(s_t)
domain is the 25 ASCII bytes WOW-CARROT-MINER-PROOF-v1, without a terminating NUL. The four remaining transcript fields are 32 bytes each. Hs is upstream crypto::hash_to_scalar, using Keccak-256 followed by reduction modulo the Ed25519 subgroup order l. The proof contains three canonical little-endian scalars, totaling 96 bytes. Sampling repeats for identity R or zero c.
The verifier reconstructs R = s_g G + s_t T - cK and recomputes c. It rejects incorrect lengths, noncanonical scalars, zero challenges, identity reconstructed nonces, and invalid public keys. Public keys must use canonical Edwards encodings, be nonidentity, and satisfy [l]K = identity. This excludes small-order and mixed-order points without depending on a system libsodium point-validation version.
The signer rejects a witness that does not open the supplied output key. Nonces and witness scalars use upstream locked and scrubbed containers. This is not a completed side-channel audit of the scalar multiplication implementation or compiler output.
Coinbase compatibility
Tests construct a Carrot coinbase with upstream get_coinbase_enote_v1, scan it through the receiver API, and add the recovered sender extensions to the account's two spending scalars. Both new Carrot addresses and legacy single-generator addresses are covered. A Carrot payment to a legacy address still acquires a T component through its sender extension.
Isolated network profile
WOWNERO_FCMP_TESTNET=ON enables a separate testnet identity, genesis, address prefixes, data directory and binary names. Its daemon and wallets require --testnet; mainnet, stagenet and regtest are refused. Built-in upstream seeds, DNS blocklists, checkpoints and binary update queries are disabled. Explicit peers remain available.
The fresh chain uses feature version 1 at genesis, FCMP++/Carrot version 17 at height 1, and version 18 at height 2. These numbers follow the reference implementation and do not specify a migration from Wownero mainnet. The profile uses 11 decimal places, a five-minute target, Wownero emission parameters without tail subsidy, 288-block coinbase maturity, four-block ordinary output age and one coinbase output. RandomWOW is pinned as a separate submodule. Its difficulty window, lag and cut are 144, 3 and 12; bootstrap difficulty is 100 through height 720.
The genesis generator hashes independent public domains to curve points without a known spending witness. Its single reward is not assigned to an operator. Regenerate src/wownero/testnet_genesis.h with wow_testnet_genesis; do not edit the generated bytes.
Block authorization
From feature version 17, the header contains a 96-byte miner proof followed by a two-byte vote. Votes are restricted to 0, 1 or 2. The statement hashes the canonical block hashing blob with the proof zeroed, including the nonce, timestamp, previous block, complete coinbase, transaction set, FCMP root and layer count. Height is bound through the coinbase input. Cached transaction and block hashes are invalidated when constructing the statement. The actual proof enters the normal proof-of-work input.
The built-in miner scans each template's Carrot coinbase and signs every nonce candidate. Consensus checks the proof during coinbase prevalidation. The synchronous mining helper refuses Carrot blocks because it lacks a signing account. The proof adds 32 bytes to Wownero's existing 64-byte signature and requires no trusted setup beyond the inherited curve generators. It remains unaudited.
Mining credentials enter through --wow-miner-key-fd, which accepts an inherited pipe descriptor of at least 3. The bounded input frame is the eight ASCII bytes WOWMIN01, followed by the canonical generate-image, prove-spend and incoming-view scalars, 32 bytes each. The reader closes the descriptor and rejects incomplete frames, invalid scalars and invalid account keys. A legacy account uses a zero prove-spend scalar. The payout address must match the account. Credential values must never enter arguments, logs or source files.
Remaining qualification
Native tests cover block binding, serialization, proof-of-work binding, network isolation and credential input. Daemon regressions cover fork-gated legacy ring offset bounds, exact pruned-transaction boundaries, nested database admission, distribution-cache refusal and console sanitization. The local integration target exercises mining, synchronization, wallet scanning, FCMP payments and restricted-template privacy. It also rejects an unauthorized alternate block, replaces a two-block fork with a greater-work chain, restarts both nodes and confirms an FCMP spend from a wallet that scanned the losing fork.
Remaining qualification includes independent cryptographic review, complete release-fix reconciliation, deeper reorganizations and proof-of-work key transitions, sustained mining measurements and a reviewed deployment plan. The explicit PoW target compares four public inputs under the RandomWOW interpreter and secure JIT. Matching outputs across platforms establish agreement for those vectors; they do not exhaustively validate every generated program.
Reproduction
Configure the pinned source and initialized submodules with the repository's normal platform dependencies:
cmake -S . -B "$WOW_BUILD_DIR" -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=ON -DBUILD_WOW_MINER_PROOF_EXPERIMENT=ON
cmake --build "$WOW_BUILD_DIR" \
--target wow_miner_proof_tests wow_miner_proof_benchmark
ctest --test-dir "$WOW_BUILD_DIR" -R '^wow_miner_proof$' --output-on-failure
"$WOW_BUILD_DIR/tests/wow_miner_proof/wow_miner_proof_benchmark"
Set WOW_BUILD_DIR to a disposable build directory outside the source checkout. BUILD_WOW_MINER_PROOF_EXPERIMENT defaults to OFF and requires BUILD_TESTS=ON.
The benchmark reports 1,000 wall-clock samples after ten warmups, with a fixed synthetic statement and fresh nonces. Every resulting proof and legacy signature is checked. It includes public-key validation and witness matching in the experimental signing cost. Coinbase scanning, statement serialization, proof of work, network propagation and complete block validation are excluded. Recorded measurements belong with the exact source commit and host/compiler evidence.
Reference: Carrot specification.
Local network reproduction
Use a separate build directory for the network profile:
cmake -S . -B "$WOW_BUILD_DIR" -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=ON -DBUILD_WOW_MINER_PROOF_EXPERIMENT=ON \
-DWOWNERO_FCMP_TESTNET=ON
cmake --build "$WOW_BUILD_DIR" \
--target daemon simplewallet wallet_rpc_server wow_testnet_tests \
wow_miner_proof_tests wow_release_regressions wow_pow_vectors wow_local_network
ctest --test-dir "$WOW_BUILD_DIR" -R '^wow_(miner_proof|testnet|release_regressions)$' --output-on-failure
"$WOW_BUILD_DIR/tests/wow_miner_proof/wow_pow_vectors"
"$WOW_BUILD_DIR/tests/wow_miner_proof/wow_local_network" \
"$WOW_BUILD_DIR/bin/wownero-fcmp-testnetd" "$WOW_NEW_TEST_DATA_DIR"
The integration target first runs a loopback fixture that drops the initial get_info response, delays the next response for six seconds and requires recovery on a fresh connection. Run this cheap check independently with wow_local_network --rpc-read-check. The mining test then requires a new disposable data directory. It binds only loopback ports 49880–49882 and 49890–49892 for P2P, unrestricted RPC and restricted RPC. It disables TLS on its loopback RPC endpoints and rejects an unexpected RPC private-key file. Mining startup retries only an explicit busy response, with a bounded deadline and a specific refusal cause. The read-only get_info query uses a 30-second per-attempt timeout, reconnects once after a transport or decoding failure and requires a valid response; state-changing calls are not retried after transport failure. It generates in-memory wallets, passes mining credentials through a pipe and stops its child daemons on exit. It retains public chain data and logs, but no recoverable wallet. The target is explicit rather than part of ordinary CTest because real proof-of-work mining is resource-intensive.
Verification checklist
- Carrot coinbase creation, receiver scanning and representation proof round trip.
- Legacy-address compatibility and rejection of missing witness components.
- Network, digest, key and proof mutation rejection; proof length checks.
- Noncanonical scalar and point rejection; identity, torsion and mixed-order rejection.
- Independent cryptographic review and cross-implementation vectors.
- Block serialization, statement mutation rejection and miner integration.
- Valid-PoW unauthorized block rejection and authorized control acceptance.
- Local FCMP payment, observed maturity and observer restart.
- Local alternate-chain rejection, two-block wallet recovery and subsequent FCMP spend.
- Broader fork recovery and proof-of-work key-transition qualification.
- Sustained mining measurements and deployment-platform qualification.