How eosio/eos works
Project Type and Main Purpose
• EOSIO is a blockchain infrastructure platform designed for high-performance, secure, and scalable decentralized applications.
• Its design supports smart contracts via WebAssembly, rapid block production, and an extensible plugin ecosystem (e.g., chain_api_plugin, history_plugin, net_plugin).
Main Components
• Core Node Process (nodeos): The primary executable that runs the blockchain node and manages consensus, block production, and state transitions.
• APIs and Plugins: A variety of plugins (chain_api_plugin, history_api_plugin, producer_plugin, etc.) provide interfaces for external access and extend nodeos functionality.
• Wallet and Client Tools: Cleos (CLI for communicating with nodeos) and keosd (manages wallet keys) form the client layer.
• Smart Contracts: Located in the contracts directory, they define on-chain business logic.
• Libraries: Under directories like “libraries”, “chain”, “chain_kv”, “state_history”, etc., these provide core blockchain functionality and utility routines.
• Build and CI/CD Infrastructure: Directories such as .cicd, scripts, and CMakeModules support the build pipeline and automated testing/deployment.
• Testing and Demos: Directories like “tests” and “tutorials” offer integration tests, unit tests, and usage examples.
Relationships and Interactions
• Nodeos runs as a central engine interacting with diverse plugins that extend functionality (e.g., APIs, logging, network, and history management).
• Cleos and keosd act as client and wallet services interfacing with nodeos via RPC calls.
• The libraries (chain, chain_kv, etc.) form the lower-level engine for state management, consensus, and transaction execution.
• CI/CD systems, Dockerfiles, and scripts integrate all these components for compiling, testing, and packaging.
• Smart contracts interact with nodeos and deployed plugins via standardized ABI and WebAssembly interfaces.
Architectural Patterns and Key Technologies
• Modular Plugin Architecture: Plugins are used extensively to add or modify functionality, promoting separation of concerns.
• Layered/MVC-like Pattern: The core blockchain engine (model) is separated from the APIs/clients (view/controller) that interact with users and external systems.
• Microservice-like Components (if considering external tools like cleos/keosd as separate executables) with well-defined interfaces.
• CI/CD Integration: Automated build scripts, test frameworks, and cross-platform Docker configurations ensure uniformity across environments.
• Extensive use of CMake for configurable builds, along with automated scripts tailored for various OS targets (Ubuntu, CentOS, MacOS).
Elements
• Use clear labels for each component:
◦ “Nodeos – Blockchain Node Engine”, “Core Libraries”, “Plugins (Chain API, History, Net, etc.)”, “Cleos (CLI)”, “Keosd (Wallet)”, “Smart Contracts”, “CI/CD Pipeline”, etc.
• Annotations: Add notes about supported platforms and integration points (e.g., “Interacts with the EOS VM for smart contract execution” or “Handles WebAssembly smart contracts”).