Parallax가 결정론적이고 정규화된 상태 업데이트를 통해 채굴자 보조금을 성숙 시점까지 어떻게 에스크로하는지 설명합니다.
| 파라미터 | 기호 | 값 / 출처 | 비고 |
|---|---|---|---|
| 코인베이스 성숙 블록 수 | M | 100 블록 | Bitcoin 스타일 코인베이스 성숙 기간 |
| 락박스 주소 | — | 0x0000000000000000000000000000000000000042 | 예약된 시스템 계정 |
| 키 접두사 | — | "maturity:addr:", "maturity:amt:" | Keccak256(prefix || 빅엔디안 height) |
Finalize(header, state):
h = header.number
R = calcBlockReward(h)
M = 100 blocks
if R > 0:
putScheduledPayout(state, h + M, header.coinbase, R)
if due(h):
(addr, amt) = popDuePayout(state, h)
state.AddBalance(addr, amt)
header.Root = state.IntermediateRoot(...)
schedKeyAddr(H):
b = bigEndianUint64(H)
return keccak256("maturity:addr:" || b)
schedKeyAmt(H):
b = bigEndianUint64(H)
return keccak256("maturity:amt:" || b)
N: mine block, schedule payout for U=N+M
...
U-1: pending only
U: popDuePayout → AddBalance(addr_U, amt_U) → clear slots
U+1: nothing due for U anymore
popDuePayout(state, H):
rawAmt = state.Get(lockbox, schedKeyAmt(H))
if rawAmt == 0: return (zero, 0, false)
rawAddr = state.Get(lockbox, schedKeyAddr(H))
state.Set(lockbox, schedKeyAmt(H), 0)
state.Set(lockbox, schedKeyAddr(H), 0)
return (Address(rawAddr), BigInt(rawAmt), true)
ReorgTo(newTip):
rewind state → parent of fork
for block in pathTo(newTip):
Execute(block) // schedules & payouts naturally recompute
for h in [current..current+K]:
if getState(lockbox, schedKeyAmt(h)) != 0:
// list upcoming payout at height h