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.
| Property | Value |
|---|---|
| DA layer | Ethereum L1 calldata |
| Compression | zlib + custom encoding |
| Compression ratio | ~10:1 average |
| Redundancy | Validators maintain off-chain copies |
| State reconstruction | 5-10 minutes from L1 data |
How Data is Posted
- Transaction batching โ The sequencer groups ~30 blocks of transactions into a single batch
- Compression โ Batch data is compressed using zlib with a custom encoding scheme optimized for EVM transactions
- L1 calldata โ Compressed data is included in the calldata of a transaction to the
CanonicalTransactionChaincontract - 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:
- Read all batch transactions from the CTC contract on Ethereum
- Decompress each batch
- Re-execute all transactions in order
- 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.
Related
- Settlement โ โ How state roots are committed to L1
- Fraud Proofs โ โ How DA enables dispute resolution