Parallaxのセキュリティモデルの詳細。作成者のための署名、セマンティクスのためのPVM、時間のためのProof of Work、そして正規の履歴のためのNakamotoコンセンサス。
誰が行動できるかをECDSAが決めます (有効な作成者)。
行動が何をもたらすかを定義します (状態遷移)。
行動がいつ起きたかを確立します (PoWによる順序付け)。
どの履歴が優勢かを選択します (最も重いチェーン)。
// Pseudocode: PVM-side validation sketch
verify(tx):
msg = keccak256(encodeTxForSig(tx))
pub = ecrecover(msg, tx.v, tx.r, tx.s)
require(address(pub) == tx.from)
require(tx.nonce == account.nonce)
// gas accounting & state updates proceed
// Conceptual block processing
for (tx of block.txs):
result = PVM.execute(tx, state)
commit:
stateRoot = MPT(state)
receiptsRoot = MPT(receipts)
header.stateRoot = stateRoot
header.receiptsRoot = receiptsRoot
// Block header sketch
header = {
parentHash,
stateRoot,
txRoot,
time,
nonce,
difficulty,
mixHash, // XHash result
}
assert(block.parent.hash == parentHash)
assert(XHash(header) < target(difficulty))
// Choose chain with max cumulative work
best = argmax(chains, sum(block.work for block in chain))
署名済みトランザクションがメンプールに入り → マイナーがブロックを提案 → PVMが決定的に実行 → ヘッダが状態/レシートにコミット → XHashが作業を証明 → ネットワークが最重量の有効チェーンを採用します。希少性 (2,100万、半減期) がすべての実行を支えます。