xhavic.com
GitHub (Coming Soon) Whitepaper
Docs / How Xhavic Works

Data Availability

How Xhavic ensures transaction data is always available for verification and fraud proofs.

Data availability (DA) ensures that all transaction data needed to verify Xhavicโ€™s state transitions is publicly accessible. Without DA, fraud proofs cannot function and the networkโ€™s security guarantees break down.

DA Strategy

Xhavic posts all transaction data to Ethereum calldata. This is the most secure DA approach because it inherits Ethereumโ€™s full consensus guarantees.

PropertyValue
DA layerEthereum L1 calldata
Compressionzlib + custom encoding
Compression ratio~10:1 average
RedundancyValidators maintain off-chain copies
State reconstruction5-10 minutes from L1 data

How Data is Posted

  1. Transaction batching โ€” The sequencer groups ~30 blocks of transactions into a single batch
  2. Compression โ€” Batch data is compressed using zlib with a custom encoding scheme optimized for EVM transactions
  3. L1 calldata โ€” Compressed data is included in the calldata of a transaction to the CanonicalTransactionChain contract
  4. Verification โ€” Anyone can decompress the calldata and reconstruct the full L2 state

What Data is Posted

Each batch includes:

  • All transaction payloads (to, from, value, data, gas)
  • Transaction ordering within each block
  • Block metadata (timestamp, block number)
  • State diff summaries

This is everything needed to independently re-execute every transaction and verify the posted state root.

State Management

Xhavic uses a pruned state + snapshot architecture:

  • Recent blocks โ€” Stored in full by all nodes
  • Historical state โ€” Archived after a configurable retention period
  • Periodic snapshots โ€” Global state snapshots generated at regular intervals
  • Node sync โ€” New nodes sync from the latest snapshot rather than replaying from genesis

This architecture keeps node requirements manageable while maintaining full verifiability through L1 data.

Reconstruction

If all Xhavic nodes went offline, the full network state could be reconstructed from Ethereum calldata alone:

  1. Read all batch transactions from the CTC contract on Ethereum
  2. Decompress each batch
  3. Re-execute all transactions in order
  4. Verify the resulting state root matches the posted commitment

Reconstruction takes approximately 5-10 minutes for the current state size.

Future: EIP-4844 (Proto-Danksharding)

Xhavicโ€™s DA layer is designed to migrate to EIP-4844 blob transactions when available, which will reduce L1 data costs by an estimated 10-50x while maintaining the same security guarantees.