Protocol Architecture

A deep dive into Parallax’s security model: signatures for authorship, PVM for semantics, Proof-of-Work for time, and Nakamoto consensus for canonical history.

How the pieces fit together

Parallax weaves cryptography, deterministic execution, proof-of-work timekeeping, and neutral fork-choice into a single verifiable pipeline.

Cryptography

ECDSA decides who may act (valid authorship).

Execution (PVM)

Defines what actions do (state transitions).

Timestamp Server

Establishes when actions occur (ordered by PoW).

Nakamoto

Selects which history prevails (heaviest chain).

Digital Signatures

Who can act: ECDSA over secp256k1 authenticates state transitions.

  • ECDSA over secp256k1 identical to Bitcoin for battle-tested security and tooling.
  • Transactions include (r, s, v); sender recovered via public key → address derivation.
  • Validation runs in the execution pipeline, ensuring uniform rules across nodes.
  • Non-repudiation: signatures bind intents to keys; replay protection via chain id & nonce.
Signature verification (conceptual)
pseudocode
// 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
Turing-complete Scripting (PVM)

What actions mean: Deterministic EVM-compatible execution under Bitcoin-like monetary rules.

  • Opcode parity with the EVM (CALL/SSTORE/etc.), gas-metered deterministic execution.
  • State stored in Merkle Patricia Trie; block header commits to stateRoot & receiptsRoot.
  • Programmability within scarcity: 21M cap, halving ⇒ execution inherits hard money.
  • Light-client friendliness via inclusion proofs and deterministic replay of blocks.
Block → Execution → Roots
pseudocode
// 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
Timestamp Server

When actions occur: PoW turns time into a cryptographic resource and orders events.

  • Each block commits to the previous header hash ⇒ verifiable temporal chain.
  • Proof-of-Work (XHash) binds cost to time; recomputation enforces the arrow of time.
  • Objective ordering without trusted clocks; median-time-past prevents timestamp abuse.
  • Security grows with cumulative difficulty; backdating becomes economically infeasible.
Header linkage
pseudocode
// Block header sketch
header = {
  parentHash,
  stateRoot,
  txRoot,
  time,
  nonce,
  difficulty,
  mixHash,      // XHash result
}
assert(block.parent.hash == parentHash)
assert(XHash(header) < target(difficulty))
Nakamoto Consensus

Which history prevails: the heaviest valid chain by cumulative work is canonical.

  • Heaviest-chain rule selects canonical history via cumulative PoW (difficulty sum).
  • Probabilistic finality: reorg risk decays exponentially with depth (k-confirmations).
  • Difficulty retargeting (XHash) aims for ~10-minute blocks using median-time-past.
  • Economically neutral: no staking or privileged validators — only open PoW.
Fork-choice (conceptual)
pseudocode
// Choose chain with max cumulative work
best = argmax(chains, sum(block.work for block in chain))

End-to-end flow

A signed transaction enters the mempool → the miner proposes a block → the PVM executes deterministically → the header commits to state/receipts → XHash proves work → the network adopts the heaviest valid chain. Scarcity (21M, halvings) underpins all execution.

1
Sign
2
Execute
3
Commit
4
Prove
5
Select