CKB Explorer Worker is a backend task service developed with Spring Boot. It provides data processing tasks for the basic data of Nervos CKB blockchain nodes, and the processed data is available for the CKB Explorer Web API to consume.
CKB Explorer Worker includes the following core task processing modules, responsible for automated processing and statistics of blockchain data:
- DailyStatistic (Daily data statistics)
- EpochStatistic (Epoch cycle statistics)
- AverageBlockTimeGenerator (Block average time calculation)
- DaoContract (DAO contract data processing)
- ScriptAnalysis (Script information parsing)
- StatisticReset (Statistical data reset)
- UdtDailyStatistic (UDT token daily statistics)
- Backend Framework: Spring Boot 3.2.10
- Programming Language: Java 21
- Build Tool: Maven
- ORM Framework: MyBatis-Plus
- Database: RisingWave (for data analysis and statistics)
- Caching: Redis
- JDK 21 or higher
- Maven 3.8+ or higher
- Redis 6.0+ (optional, for caching)
- PostgreSQL 14+ database
- RisingWave database
├── src/
│ ├── main/
│ │ ├── java/ # Java source code
│ │ │ └── com/ckb/explore/ # Main package
│ │ │ ├── enums/ # Data enums
│ │ │ ├── service/ # Business logic layer
│ │ │ ├── mapper/ # Data access layer
│ │ │ ├── domain/ # Data models
│ │ │ ├── config/ # Configuration classes
│ │ │ └── task/ # Data tasks
│ │ └── resources/ # Configuration files
│ │ ├── application.yml # Main configuration file
│ │ ├── mapper/ # MyBatis mapping files
│ │ └── static/ # Static resources
│ │ └── *.sql # RisingWave sql
│ └── test/ # Test code
└── pom.xml # Maven configuration file
The main configuration is located in src/main/resources/application.yml and includes:
- Server configuration (port, context path, etc.)
- MyBatis-Plus configuration
- Database connection configuration
The project supports multi-environment configuration:
application-testnet.yml: testnet environment configurationapplication-mainnet.yml: Mainnet environment configuration
mvn clean installmvn spring-boot:runchmod +x start.sh
./start.shContributions to this project are welcome! If you want to participate in development, please follow these steps:
- Fork this repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions, please contact us through:
- Project Repository: https://github.com/appfi5/ckb-explorer-worker.git
- Issues: https://github.com/appfi5/ckb-explorer-worker/issues