LogoLogo
  • Abstract
  • Architecture
  • VIDA
  • VIDA Security & Trustlessness
  • EVMs on PWR Chain
  • Conduits
  • Consensus
  • Scalability
  • Security
  • Transaction Fee Model
  • PWR Coin Utility
  • Costs, Inflation & Deflation
  • HOW TO
    • How To Build a VIDA
      • Basics of Blockchain Development
      • Stateless vs. Stateful VIDAs
      • Building a Stateless VIDA
      • Building a Stateful VIDA
  • FAQ
    • How does PWR Chain Resolve Inconsistent VIDA Execution Results?
  • Inconsistent VIDA Results from Non-Deterministic Execution?
  • Are there any restrictions on external API calls within VIDAs?
  • How are VIDA Upgrades Managed without Breaking Replayability?
  • If an VIDA’s Logic Changes, how does PWR Chain Ensure Past Transactions Remain Verifiable?
  • Others
    • Glossary
Powered by GitBook
On this page

Was this helpful?

  1. HOW TO
  2. How To Build a VIDA

Stateless vs. Stateful VIDAs

When building an Verifiable Immutable Data Application (VIDA), it’s important to understand the difference between stateless and stateful VIDAs. These two types of VIDAs serve different purposes and are designed for different use cases, depending on the criticality of the data and the level of consistency required.


Stateless VIDAs

Stateless VIDAs are applications that do not need to validate or manage historical data or maintain a consistent state across its Execution Instances. They focus on simplicity, speed, and ease of development, making them ideal for non-critical use cases.

  • Use Cases:

    • Global chat rooms

    • Simple games

    • Non-critical applications where speed and flexibility are prioritized

  • Key Characteristics:

    • Do not track or validate past transactions or states.

    • Operate independently of historical data.

    • Prioritize fast execution and low overhead.

Stateless VIDAs are perfect for scenarios where consistency between execution instances is not a concern, and the focus is on rapid development and user interaction.


Stateful VIDAs

Stateful VIDAs, on the other hand, are designed to manage critical data and ensure consistency across all execution instances. They validate both past and present data to guarantee the correctness of execution and maintain a synchronized state.

  • Use Cases:

    • Financial systems (e.g., payment processing)

    • Supply chain management

    • Internal company operations (e.g., HR or ERP systems)

  • Key Characteristics:

    • Validate historical data to ensure correctness.

    • Use mechanisms like cross-instance root hash validation or conduit root hash validation on PWR Chain to maintain consistency.

    • Focus on reliability, auditability, and trustworthiness for mission-critical applications.

Stateful VIDAs are essential for applications where data accuracy, consistency, and integrity are non-negotiable.


Why This Distinction Matters

Understanding whether your VIDA should be stateless or stateful is critical because it impacts how you design, develop, and operate your application. Stateless VIDAs offer simplicity but may lack reliability for critical use cases, while stateful VIDAs provide robust guarantees at the cost of additional complexity. Choosing the right type ensures your VIDA aligns with your application's requirements and goals.

PreviousBasics of Blockchain DevelopmentNextBuilding a Stateless VIDA

Last updated 3 months ago

Was this helpful?