This reference is descriptive, not a normative consensus specification. Use the applicable tagged source and synchronized chain state to verify deployment and parameters.
Reference snapshot: 2026-12-02.
Versioned difficulty limits
At Core e224c5277e3ce23677804e0eea6f5c836d30e5eb, CheckProofOfWork accepts nBits only within 1–1,023 before its remaining checks. The mainnet ASERT configuration instead bounds adjustment to even nBits from 32 through 1,022 and includes a protective halt above its supported ceiling. Neither quantity is the current observed network difficulty. IFaaS's independent 4,159-bit serialization limit is not a mining difficulty limit. Activation must be established from chain state, not inferred from a source configuration.
Mathematical foundations
Integer factorization is the problem of finding nontrivial integer divisors of an integer N. Complete prime factorization expresses N as a product of primes, with multiplicities. For a semiprime N = p*q, where p and q are prime, a nontrivial divisor p gives q = N/p.
For positive N, define its bit length as L(N) = floor(log2(N)) + 1. The project uses the term strong semiprime for a semiprime with factors of equal bit length in its original design; this should not be confused with the separate cryptographic term strong prime.
Factoring sufficiently large, suitably chosen semiprimes can require substantial computation using known classical algorithms. Checking a candidate factor is much cheaper: evaluate exact divisibility, reconstruct the complementary factor and apply the necessary primality and structural tests. This computational asymmetry is central to FACTOR's consensus design.
The difficulty of integer factorization is not known to be NP-complete. No unconditional superpolynomial lower bound for general integer factoring is known. The usefulness and security of the protocol depend on actual computational costs, not a theorem that factoring must remain hard forever.
The General Number Field Sieve (GNFS) is the leading known classical general-purpose algorithm for sufficiently large unstructured integers. Its heuristic asymptotic running time is expressed as L_N[1/3,(64/9)^(1/3)], where L_N[alpha,c] = exp((c+o(1))(ln N)^alpha(ln ln N)^(1-alpha)). This is an asymptotic model, not an empirical timing guarantee for any particular integer, implementation or hardware.
Proof-of-work: challenge generation and verification
A blockchain proof must be bound to candidate block data. A trusted generator that constructs N by multiplying secret primes would already possess the solution, which would be undesirable for an open mining competition.
FACTOR instead derives a pseudorandom integer W from candidate block-header information using a construction named gHash. A miner can look for an eligible composite in a bounded neighborhood of W and submit a factor that meets consensus requirements. Miners can explore different candidate block inputs to obtain new neighborhoods.
For the reviewed main-branch CheckProofOfWork implementation, let d = nBits, the required candidate integer bit length, and delta = wOffset. The mathematical acceptance conditions include:
- 1 <= d <= 1023 at the proof-checking function level; contextual difficulty rules impose additional constraints.
- N = W + delta.
- abs(delta) <= 16*d.
- L(N) = d.
- The submitted factor p is nonzero and L(p) = ceil(d/2).
- q is reconstructed by integer division and p*q must equal N exactly.
- p <= q.
- Both p and q must pass the configured probable-primality checks.
The resulting factors are used to verify the proof, while all other applicable block-validation and chain-selection rules must also be satisfied. This is a description of the inspected implementation, not a substitute for the consensus code.
Equal widths are not universally required. With b = ceil(d/2), odd d forces L(q) = b; even d permits L(q) = b or b + 1. The structural example 253 = 11 × 23 has widths 4 and 5 at d = 8, but is not a block or gHash vector. Conversely, 77 = 7 × 11 fails at d = 7 because the submitted p has only three bits instead of four.
Hash functions have not been removed from the blockchain. They remain important for block and transaction identification, cryptographic commitments and challenge derivation. Integer factoring replaces hash-target searching as the defining expensive computational component of consensus.
Source: https://github.com/ProjectFactor/FACTOR/blob/main/src/pow.cpp
Consensus, difficulty adjustment and network security
FACTOR inherits substantial elements of the Bitcoin Core architecture, while modifying consensus to accommodate mathematical proof of work. Compatibility with the Bitcoin Core design does not imply identical consensus rules, chain history, monetary policy or network interoperability.
The reviewed mainnet configuration targets a block interval of 1,800 seconds (30 minutes). Individual block intervals are stochastic and can depart substantially from the target. The source also contains network-specific configurations; testnet and other networks need not use mainnet parameters.
Difficulty adjustment attempts to keep block production near its target as factorization capacity changes. The v6.0.43 release describes a custom ASERT-inspired adjustment mechanism. In the reviewed implementation, the algorithm works in a precomputed log2(compute) space and maps estimated computational difficulty to allowable even nBits values. A simplified representation of the adjustment before table quantization is:
log2(C_target) = log2(C_anchor) + (h*T - t)/H
where C is modeled computational cost, h is the block-height difference from the anchor, T is the target interval, t is elapsed time relative to the anchor and H is the configured half-life. Main-branch mainnet parameters specify H = 172,800 seconds (two days). Blocks arriving ahead of schedule increase modeled difficulty; blocks behind schedule decrease it. The code also includes bounds and a protective halt condition for difficulty beyond its supported maximum. Consult the exact implementation and active deployment state before relying on this formula operationally.
A software release or a deployment start time does not establish that a consensus upgrade has activated on mainnet. Activation depends on the relevant versioned rules and observed network state.
As with any PoW chain, security depends on the distribution of effective computational capacity, validation behavior, network conditions and the incentives of participants. Factorization progress could change the threat model. Network decentralization, resistance to reorganizations and attack costs require empirical assessment; the mathematical puzzle alone does not guarantee these properties.
Sources: https://github.com/ProjectFactor/FACTOR/blob/main/src/pow.cpp ; https://github.com/ProjectFactor/FACTOR/blob/main/src/chainparams.cpp ; https://github.com/ProjectFactor/FACTOR/releases
Sources and versioning
Header, challenge and accumulated work
The 218-byte header serializes nP1 (128), hashPrevBlock (32), hashMerkleRoot (32), nNonce (8), wOffset (8), nVersion (4), nTime (4) and nBits (2 bytes), in that order. Integral network serialization is little-endian; displayed hash strings are not internal bytes.
gHash builds a 72-byte password and 10-byte salt from block data, excluding nP1 and wOffset. It derives 256 bytes using scrypt (4096, 2, 1), applies the configured hashRounds mixing (mainnet: one), then retains d bits with the highest bit set. Its mixing includes BLAKE2b, SHA3-512, Whirlpool, integer roots, next-prime, modular-inverse and modular-exponentiation branches. Native-endian memcpy/GMP semantics and the historical eight-byte population count require exact reproduction. Header GetHash is a different function. Mainnet configures 50 probable-primality rounds.
For submitted-factor width b ≥ 16, set a = sqrt(2b log2(b)), k = floor(a), f = floor(1024(a − k)). GetBlockProof returns (1 << k) + (f << (k − 11)); below 16 bits it returns zero. Parent chainwork plus this score governs accumulated work. The score is neither measured energy nor Bitcoin inverse-target work.
ASERT uses 511 committed Q32.32 entries and parent-relative anchor differences without an extra +1. Nearest-entry ties choose easier difficulty. A modeled target strictly above the maximum returns rejected nBits = 1024; equality does not halt. Activation and older DAA paths must be checked separately. See the complete public consensus explanation for configuration, chainwork and contextual validation details.
Engineering references
- Mathematical consensus.
- Difficulty adjustment.
- Reviewed header, proof and retargeting and chainwork.
