Sekin is a complete infrastructure stack for running KIRA blockchain nodes with integrated indexing, cross-chain interaction services, and comprehensive monitoring. It provides a production-ready deployment environment using Docker Compose with automated CI/CD pipelines for seamless updates.
Sekin orchestrates multiple microservices in a containerized environment:
┌─────────────────────────────────────────────────────────────┐
│ Sekin Infrastructure │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────┐ ┌───────────────────────┐ │
│ │ Sekai + Scaller │ │ Interx Manager │ │
│ │ (Cosmos + CLI) │ │ (P2P/HTTP Server) │ │
│ └─────────┬──────────┘ └───────────┬───────────┘ │
│ │ │ │
│ ┌─────────┴──────────────────────────┴───────────┐ │
│ │ Centralized Logging (Syslog-ng) │ │
│ └────────────────────────────────────────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Storage │ │ Proxy │ │ MongoDB │ │
│ │ (MongoDB) │ │ (HTTP/REST) │ │ (Database) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ┌──────────────────┐ ┌──────────────────────────┐ │
│ │ Cosmos Services │ │ Ethereum Services │ │
│ │ - Indexer │ │ - Indexer │ │
│ │ - Interaction │ │ - Interaction │ │
│ └──────────────────┘ └──────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
Sekai with Scaller
- KIRA blockchain node built on Cosmos SDK
- Includes scaller CLI for node bootstrapping, management, and monitoring
- Ports: 26657 (RPC), 26656 (P2P), 9090 (gRPC), 1317 (REST API)
- Built from
sekai.Dockerfile(contains sekaid + scaller)
Syslog-ng
- Centralized logging server for all services
- Collects logs via UDP/TCP on port 514
- Configured with log rotation and retention policies
Manager
- P2P load balancer and HTTP server
- Handles peer discovery and request routing
- Ports: 8080 (HTTP), 9000 (UDP P2P)
Proxy
- Legacy HTTP request converter
- Translates between different API formats
- Port: 11000
Storage
- MongoDB-backed storage service
- Provides data persistence layer
- Port: 8880
Cosmos Indexer
- Indexes KIRA/Cosmos blockchain data
- Real-time block and transaction indexing
- Port: 8883
Cosmos Interaction
- Creates and publishes Cosmos transactions
- Handles transaction signing and broadcasting
- Port: 8884
Ethereum Indexer
- Indexes Ethereum blockchain data
- Monitors smart contract events
- Port: 8881
Ethereum Interaction
- Creates and publishes Ethereum transactions
- Smart contract interaction layer
- Port: 8882
MongoDB
- Database backend for storage service
- Version: 7.0
All services run on a custom bridge network kiranet (10.1.0.0/16):
| Service | IP Address | Hostname |
|---|---|---|
| Gateway | 10.1.0.1 | - |
| Syslog-ng | 10.1.0.2 | syslog-ng.local |
| Sekai | 10.1.0.3 | sekai.local |
| Manager | 10.1.0.4 | manager.local |
| Proxy | 10.1.0.10 | proxy.local |
| Storage | 10.1.0.11 | storage.local |
| Cosmos Indexer | 10.1.0.12 | cosmos-indexer.local |
| Cosmos Interaction | 10.1.0.13 | cosmos-interaction.local |
| Ethereum Indexer | 10.1.0.14 | ethereum-indexer.local |
| Ethereum Interaction | 10.1.0.15 | ethereum-interaction.local |
| MongoDB | 10.1.0.16 | mongo.local |
- Ubuntu 20.04 or later
- Minimum 8GB RAM, 16GB recommended
- 100GB+ available disk space
- Root or sudo access
- Docker Engine 20.10+
- Docker Compose v2.0+
Clone the repository and make scripts executable:
git clone https://github.com/KiraCore/sekin.git
cd sekin
chmod +x ./scripts/*Run the bootstrap script to install all dependencies (Docker, Docker Compose, etc.):
sudo ./scripts/bootstrap.shThis script will:
- Update system packages
- Install Docker and Docker Compose
- Configure Docker daemon
- Set up required users and permissions
Production Deployment:
docker compose -f compose.yml up -dDevelopment Deployment:
docker compose -f dev-compose.yml up -dThe main differences:
compose.yml: Uses pre-built images from GHCRdev-compose.yml: Builds images locally from Dockerfiles
Check that all services are running:
docker compose psView logs from all services:
docker compose logs -fView logs from a specific service:
docker compose logs -f sekai
# or check the centralized logs
tail -f ./syslog-data/sekai.logBuild the sekai image (includes sekaid + scaller):
docker build -f sekai.Dockerfile -t sekai:latest .Build the syslog-ng image:
docker build -f syslog-ng.Dockerfile -t syslog-ng:latest .| Port | Service | Description |
|---|---|---|
| 26657 | Sekai | RPC (Tendermint) |
| 26656 | Sekai | P2P (Tendermint) |
| 9000 | Manager | P2P UDP |
| 11000 | Proxy | HTTP Proxy |
| 8880 | Storage | Storage API |
| 8881 | ETH Idx | Ethereum Indexer API |
| 8882 | ETH Int | Ethereum Interaction API |
| 8883 | Cos Idx | Cosmos Indexer API |
| 8884 | Cos Int | Cosmos Interaction API |
| Port | Service | Description |
|---|---|---|
| 26658 | Sekai | ABCI |
| 26660 | Sekai | Prometheus Metrics |
| 1317 | Sekai | REST API |
| 9090 | Sekai | gRPC |
| 8080 | Manager | HTTP Server |
| 514 | Syslog-ng | Syslog Server (UDP/TCP) |
Configuration files for each service are located in their respective directories:
- Manager:
./manager/config.yml - Proxy:
./proxy/config.yml - Storage:
./worker/sai-storage-mongo/config.yml - Cosmos Indexer:
./worker/cosmos/sai-cosmos-indexer/config.yml - Cosmos Interaction:
./worker/cosmos/sai-cosmos-interaction/config.yml - Ethereum Indexer:
./worker/ethereum/sai-ethereum-indexer/config.json - Ethereum Interaction:
./worker/ethereum/sai-ethereum-contract-interaction/config.yml - Syslog:
./config/syslog-ng.conf,./config/logrotate.conf
Sekai and Interx configurations are stored in ./sekai/ and ./interx/ directories (gitignored).
Sekin uses GitHub Actions for automated image building, signing, and deployment:
ci.yml - Build and Release
- Triggers on PR merge to
mainbranch - Creates semantic version tags
- Builds and pushes Sekai and Syslog-ng images to GHCR
- Signs images with Cosign (Sigstore)
- Updates
compose.ymlwith new versions
hook.yml - Repository Dispatch
- Triggered by external repositories (Sekai/Interx releases)
- Builds and publishes Docker images
- Signs images with Cosign
- Updates compose file automatically
interx-update.yml - Interx Services Update
- Triggered by Interx repository releases
- Updates all Interx microservice versions in
compose.yml - Maintains version consistency across services
All images are signed using Cosign for supply chain security. Verify signatures:
cosign verify --key cosign.pub ghcr.io/kiracore/sekin/sekai:latestScaller is a Go CLI tool bundled in the sekai container for node bootstrapping, management, and monitoring.
| Command | Description |
|---|---|
wait |
Wait indefinitely (container entrypoint) |
init |
Initialize new sekaid node |
keys-add |
Add key to keyring |
add-genesis-account |
Add account to genesis |
gentx-claim |
Claim validator role in genesis |
join |
Initialize node and join existing network |
start |
Start sekaid (with optional restart) |
status |
Show node and network status |
version |
Show scaller version |
# Initialize a new node
docker exec sekin-sekai-1 /scaller init --chain-id testnet-1 --moniker MyNode
# Join an existing network
docker exec sekin-sekai-1 /scaller join \
--chain-id kira-1 \
--rpc "https://rpc.kira.network:26657" \
--moniker MyNode
# Start sekaid (replaces process)
docker exec sekin-sekai-1 /scaller start
# Start with auto-restart (up to 5 retries)
docker exec sekin-sekai-1 /scaller start --restart 5
# Start with auto-restart (max 10 retries)
docker exec sekin-sekai-1 /scaller start --restart always
# Check node status (defaults: rpc=localhost:26657, interx=proxy.local:8080)
docker exec sekin-sekai-1 /scaller statusThe status command displays a table showing:
| Field | Description |
|---|---|
| Sekai | Node health (OK/SYNCING/DOWN) and block height |
| Interx | Interx service health |
| Peers | Number of connected peers |
| Node ID | Unique node identifier (for peer connections) |
| Chain | Network chain ID |
| Moniker | Node's moniker name |
| Validator | Validator status and voting power |
Example output:
SERVICE STATUS DETAIL
---------- ------- ------------------------------
Sekai [+] OK height 12345
Interx [+] OK responding
Peers [+] OK 5 connected
Node ID [ ] INFO a1b2c3d4e5f6...
Chain [ ] INFO kira-1
Moniker [ ] INFO MyNode
Validator [+] OK power 100
# Check blockchain status via RPC
curl http://localhost:26657/status
# Check node status with scaller
docker exec sekin-sekai-1 /scaller status
# Check scaller version
docker exec sekin-sekai-1 /scaller versionLogs are centralized in ./syslog-data/:
# View all logs
ls -lh ./syslog-data/
# Tail specific service logs
tail -f ./syslog-data/sekai.log
tail -f ./syslog-data/manager.log# Backup blockchain data
tar -czf sekai-backup.tar.gz ./sekai/
# Backup MongoDB data
docker compose exec mongo mongodump --out /backupTo update to newer versions, modify image tags in compose.yml and restart:
docker compose pull
docker compose up -dsekin/
├── src/
│ └── sCaller/ # Scaller CLI (node bootstrap & management)
├── manager/ # Interx Manager (P2P/HTTP)
├── proxy/ # Interx Proxy
├── worker/ # Interx Worker services
│ ├── cosmos/ # Cosmos indexer & interaction
│ ├── ethereum/ # Ethereum indexer & interaction
│ └── sai-storage-mongo/ # Storage service
├── scripts/ # Utility scripts
├── config/ # Configuration files
├── sekai.Dockerfile # Sekai + Scaller image
├── syslog-ng.Dockerfile # Syslog-ng image
└── compose.yml # Production compose file
Each component can be built independently using its respective Dockerfile:
# Build Sekai (includes scaller CLI)
docker build -f sekai.Dockerfile -t sekin/sekai:custom .
# Build Syslog-ng
docker build -f syslog-ng.Dockerfile -t sekin/syslog-ng:custom .Check logs for errors:
docker compose logs <service-name>Ensure the kiranet network exists:
docker network ls | grep kiranet
docker network inspect kiranetCheck for existing processes using required ports:
sudo netstat -tulpn | grep -E '26657|26656|8080'Monitor disk usage:
df -h
docker system dfClean up unused Docker resources:
docker system prune -a --volumes- RPC endpoint (26657) is exposed to 0.0.0.0 by default. Change to 127.0.0.1 in production
- Configure firewall rules to restrict access to sensitive ports
- Regularly update all services to latest versions
- Monitor logs for suspicious activity
- Use strong passwords for MongoDB
- Rotate signing keys periodically
- Enable prometheus API to connect monitoring
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request to
main
CC BY-NC-SA 4.0