Parallax 난이도 조정 역사에 대한 정확한 안내 — 제네시스부터의 BTC 스타일 DAA, 블록 17,560(PIP-0002)에서의 ASERT 업그레이드, 그리고 누적 작업량에 기반한 나카모토 포크 선택 규칙입니다.
| 파라미터 | 기호 | 값 | 비고 |
|---|---|---|---|
| 목표 블록 간격 | τ | 600 초 | Bitcoin 스타일 목표 |
| 미래 시간 드리프트 한계 | — | 300 초 | 5분 |
| MTP 샘플 크기 | — | 11 블록 | 최근 11개 타임스탬프의 중앙값 |
| 난이도 알고리즘 역사 | — | BTC 스타일 DAA → ASERT | 제네시스부터 17,559까지는 BTC 스타일 2016 블록 윈도우; 17,560 블록 이상은 ASERT(aserti3-2d) (PIP-0002). |
// Given difficulty D (big integer)
TWO256M1 = (1n << 256n) - 1n
target = TWO256M1 / D
valid = BigIntFromBytes(result) <= target
// Difficulty selection by era
CalcDifficulty(config, anchor, parent, header):
if height(header) < 17560:
// BTC-style DAA: 2016-block window with epoch anchors
return CalcNakamotoDifficulty(config, parent)
else:
// ASERT: per-block retarget relative to fixed anchor
return CalcAsertDifficulty(config, anchor, parent, header)
// ASERT core idea (fixed-point, aserti3-2d)
CalcAsertDifficulty(config, anchor, parent, header):
Δh = height(header) - anchor.height
Δt = header.Time - anchor.parentTime // seconds
// τ = 600 s target, T_half = 172800 s (2 days)
e = ((Δt - Δh * τ) * RADIX) / T_half // fixed-point exponent
target = anchor.target * 2^e // via cubic approximation in integer math
target = clamp(target, 1, maxTarget)
return DifficultyFromTarget(target)
MTP(n):
ts = timestamps(n, upTo=11) // back from n inclusive
sort(ts)
return ts[len(ts)//2]
Work(block):
target = TWO256M1 / Difficulty(block)
// Use an approximation that preserves ordering; e.g.,
return TWO256M1 / (target + 1)
SelectBest(tips):
return argmax(tips, ChainWork[tip])
OnNewTip(candidate):
if ChainWork[candidate] > ChainWork[currentTip]:
currentTip = candidate
ReorgTo(candidate)
ValidHeader(h, parent):
require(len(h.Extra) <= MaximumExtraDataSize)
require(h.Time <= now() + 300)
require(h.Time > MTP(parent))
require(h.Difficulty > 0)
// difficulty rules depend on height:
// < 17560: BTC-style DAA epoch invariants
// ≥ 17560: ASERT anchor-based invariants
// PoW: MixDigest match & XHash(h) <= targetFrom(D)
헤더는 Extra 크기, 시간(MTP & 미래 드리프트), 시대별 난이도 규칙(초기 블록은 BTC 스타일 DAA, 높이 ≥ 17,560은 ASERT), 가스 한도/EIP, 높이 증분, PoW 씰을 기준으로 검사됩니다. 유효한 블록은 ChainWork를 확장하며, 가장 무거운 팁이 정규입니다.