How celestiaorg/celestia-app works
• Blockchain Application (State Machine): Represent the “app” directory which houses core logic like transaction validation, modules (ante handlers, governance, mint, signal, blob, etc.), state exports, genesis, and encoding. This layer is essentially the state machine implemented with Cosmos SDK patterns.
• Command Layer: Illustrate the “cmd/celestia-appd” component that serves as the entry point for launching nodes. It encapsulates configuration and start-up logic.
• Networking and External Communications: Include a block for communications/peer-to-peer networking that supports validator-to-node interactions and block propagation.
• Supporting Modules and Services:
• Modules such as “ante”, “mint”, “minfee”, “signal”, etc. (found under app/, x/ directories, and pkg/). Represent these as functional modules integrated into the application layer.
• gRPC and Protobuf definitions (in proto/ directories) which facilitate external and inter-node RPC calls.
• Local development components (local_devnet) and Docker-related scripts, which help simulate and deploy network configurations.
Relationships and Data Flow
• From the External Validator/Client Nodes to the “celestia-appd” command layer.
• From “celestia-appd” to the Application/State Machine (which executes the business logic).
• From the Application layer to the Consensus Engine via the ABCI interface.
• Dependencies, for example:
• The application modules interact with underlying packages (pkg/) and utilize Protobuf for data encoding and event messaging.
• Networking components pass data between validators and consensus nodes.
Architectural Patterns and Design Principles
• Use of the Cosmos SDK “modular” architecture pattern where separate modules (ante handlers, posthandlers, governance, etc.) are clearly isolated.
• ABCI pattern: the decoupling of the application state machine from the consensus layer.
• Modular code structure by grouping files into “app”, “cmd”, “pkg”, “proto”, and “x” directories.
• External integrations, such as Docker container definitions and CI/CD workflows (shown in the .github and docker directory), as supporting infrastructure for deployment and testing.