Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 5.06 KB

factor-mining.md

File metadata and controls

48 lines (29 loc) · 5.06 KB

Mining and computational infrastructure

FACTOR miners search block-bound integer neighborhoods for eligible factorizations, construct complete blocks and submit them to independently validating nodes.

Reviewed source: e224c5277, version fields 6.0.43; documentation review December 2, 2026. This is a descriptive engineering reference. The applicable implementation and validated chain state determine active behavior; release publication alone does not prove activation.

Mining lifecycle

  1. Synchronize a node and inspect getblockchaininfo and getnetworkinfo.
  2. Obtain getblocktemplate with support for required rules (at least segwit; follow advertised rules for the active deployment).
  3. Construct the coinbase paying a controlled script and the transaction/Merkle commitments. Observe integer difficulty, parent, version and time requirements.
  4. Derive W=gHash(header,params). Explore offsets in [-16*d,16*d], selecting candidates of the required length and eliminating unsuitable candidates. Vary nonce/block data to explore new neighborhoods.
  5. Factor a candidate, verify it against the exact proof conditions, then set nP1 and wOffset and submit the full serialized block with submitblock.
  6. Refresh work on a new tip; stale parent, changed difficulty, invalid timestamps or transactions can invalidate an otherwise correct factorization.

The template returns numeric bits and numeric target, not Bitcoin compact difficulty or a hash-target hex string. It also returns merkleroothash, mintime=parent time+1, and maxtime. nNonce is unsigned 64-bit despite the inherited-looking noncerange string. Check RPC details and mining.cpp; generic Bitcoin mining serializers are incompatible with the 218-byte FACTOR header.

Wallet and payout setup

With a wallet-enabled node running, these existing RPCs create a descriptor wallet and inspect a fresh payout address. The placeholders must be replaced:

src/factorn-cli -named createwallet wallet_name=mining descriptors=true
src/factorn-cli -rpcwallet=mining getnewaddress
src/factorn-cli -rpcwallet=mining getaddressinfo '<address returned above>'

Use the returned scriptPubKey for software that requests a payout script. Back up with backupwallet and protect wallet secrets. A miner needs a payout script, not the private key. Alternatively, the offline wallet tool supports src/factorn-wallet -wallet=mining -descriptors create, followed by loadwallet; avoid creating or modifying the same wallet concurrently with a running process. See node setup, files and backups.

External solvers and pools

The factoring repository currently documents a Docker/YAFU workflow using SCRIPTPUBKEY, RPC_USER, RPC_PASS, YAFU_THREADS, YAFU_LATHREADS and MSIEVE_BIN. Its entry point is python3.10 FACTOR.py inside the image. The old Core README's standalone python FACTOR.py <scriptPubKey> and fixed Conda package list are not verified instructions for that current container. Follow the actual miner revision rather than combining those workflows. Dependencies of the historical Python approach included cypari2, gmpy2, numpy, sympy, base58; these are miner-specific, not prerequisites to run Core.

GPUDispersion documents GPU candidate elimination and an external solver pipeline. Trial division and ECM can screen candidates; GNFS can solve appropriate surviving composites. Consensus does not mandate a GPU, GNFS or a hosted pool. Solo mining and compatible pools remain possible; service uptime, current share protocols and profitability are not verified here. Factory is branded infrastructure, not a consensus requirement.

Use local cookie authentication where supported. For an external miner needing static credentials, generate rpcauth with the supplied utility and use a secure private connection. Do not expose RPC to the public Internet or paste secrets into examples/logs.

Measurements and tests

Candidate counts, ECM curves/s, GNFS relations/s, solve-time distributions and end-to-end blocks/time measure different stages. getnetworkhashps computes an accumulated-work/time estimate, not measured SHA hashes/s or a pool's relations/s. See benchmarks.

Implementation: pow.cpp, miner.cpp, rpc/mining.cpp. Existing mining tests and future-tip tests provide regression context; they were not executed in this review.

Further reading

Mining knowledge · Mining reference

Documentation index · Release history · Repository knowledge index