How leisuremeta/leisuremeta-chain works
High-Level Components
a. Core Blockchain Components:
• Node Module (modules/node)
• API Layer (modules/api)
• Library Components (modules/lib)
• Node Proxy (modules/node-proxy)
b. Gateway Components:
• ETH Gateway System (modules/eth-gateway-*)
c. Explorer Components:
• LMScan Backend (modules/lmscan-backend)
• LMScan Frontend (modules/lmscan-frontend)
Core Architecture Details
Within the Node component, show these subcomponents:
a. DApp Layer:
• PlayNommDApp
• Submodules (Account, Agenda, CreatorDao, Group, Reward, Token, Voting)
b. Services Layer:
• BlockService
• TransactionService
• StateReadService
• RewardService
• LocalStatusService
c. Repository Layer:
• BlockRepository
• StateRepository
• TransactionRepository
d. Storage Layer:
• HashStore
• KeyValueStore
• Store Interpreters (Redis, Sway, Multi)
Data Flow Connections
• Transaction flow from API through Node Proxy to Nodes
• State updates from Node to Storage
• Data flow to Explorer components
• ETH Gateway interaction with main chain
Special Architectural Elements
Unique features:
a. Merkle-Patricia Trie Structure:
• How it combines UTXO and account data
• State snapshot storage
b. Consensus Mechanism:
• Interaction between nodes
• Validation process
Component Interactions
Specific interactions:
• API endpoints connecting to Node Proxy
• Node Proxy load balancing to Nodes
• ETH Gateway deposit/withdraw flow
• Explorer data collection path
Technical Stack Indicators
Technology labels:
• Scala/ScalaJS
• Redis
• Ethereum compatibility layer
• Frontend technologies