mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
main still called the provider Casdoor in ten places. hanzo.id is served by github.com/hanzoai/iam, which its own LICENSE states is a clean-room implementation carrying no third-party licensed source. The Casdoor-derived server was hanzoai/iam-v1, retired and no part of this stack. Every fact the text carried is kept. IAM really does stamp iss claims that openid-client rejects, which is why the NextAuth provider is type: "oauth" and why setting `issuer` breaks it; the applications really do live in the iam-init-data configmap. Only the vendor name changed. iam.py claimed a "Casdoor-compatible" flow. It is a standard flow — RFC 6749 and OIDC Core — which is what HIP-0111 requires; naming a vendor for a capability that has an RFC is what the standard exists to stop. infra/k8s/cloud-deployment.yaml is deleted rather than edited. Its env block named casdoorEndpoint / casdoorOrganization / casdoorApplication, and nothing reads them: hanzoai/cloud configures IAM through IAM_URL, IAM_MINT_CLIENT_ID and CLOUD_IAM_ISSUER, and ships no conf/. Renaming them to IAM_* would have produced config that looks live and still does nothing. The file is unreferenced by kustomization.yaml, duplicates declared state that belongs in universe (infra/k8s/cloud/), pins registry.digitalocean.com instead of ghcr.io/hanzoai, and pins a floating :latest tag that must never reach a cluster. Landed directly on main via an isolated worktree. chore/use-datastore-fork is 139/137 divergent from a history rewrite; merging it would re-import that lineage, and only two commit subjects there are genuinely absent from main. Co-authored-by: Hanzo Dev <[email protected]>
Bootnode Infrastructure
Docker Compose and Kubernetes configurations for running the Bootnode blockchain development platform.
Quick Start
Prerequisites
- Docker & Docker Compose v2
- 8GB+ RAM recommended
- Configure RPC endpoints in
.env
Local Development
# Copy environment template
cp .env.example .env
# Edit .env with your RPC endpoints and secrets
vim .env
# Start core services
docker compose up -d
# View logs
docker compose logs -f
# Check health
curl http://localhost:8000/health
Services
| Service | Port | Description |
|---|---|---|
| API | 8000 | Bootnode FastAPI backend |
| Web | 3001 | Next.js dashboard |
| Indexer | 5000 | Multi-chain blockchain indexer |
| PostgreSQL | 5432 | Operational database |
| Redis | 6379 | Cache & rate limiting |
| DataStore | 8123 | ClickHouse analytics |
| RabbitMQ | 5672, 15672 | Message queue |
Profiles
# Core services only
docker compose up -d
# With monitoring (Prometheus + Grafana)
docker compose --profile monitoring up -d
# With ERC-4337 bundler
docker compose --profile bundler up -d
# Everything
docker compose --profile monitoring --profile bundler up -d
Scaling
# Scale API horizontally
docker compose up -d --scale api=3
Kubernetes
Deploy to Kubernetes clusters on any cloud provider.
Prerequisites
- kubectl configured
- Helm 3 installed
- Cluster with 3+ nodes (8GB+ RAM each)
Deploy
# Create namespace and secrets
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/secrets.yaml
# Deploy services
kubectl apply -f k8s/
# Check status
kubectl -n bootnode get pods
Cloud-Specific Deployment
# AWS EKS
./cloud/deploy.sh aws
# Google Cloud GKE
./cloud/deploy.sh gcp
# Azure AKS
./cloud/deploy.sh azure
# DigitalOcean DOKS
./cloud/deploy.sh digitalocean
Configuration
Environment Variables
See .env.example for all configuration options.
Key variables:
DATABASE_URL- PostgreSQL connectionREDIS_URL- Redis connectionDATASTORE_URL- ClickHouse connection*_RPC- Chain RPC endpoints
Chain Configuration
Edit config/chains.yaml to enable/disable chains and configure protocols.
ethereum:
mainnet:
chain_id: 1
enabled: true
protocols:
- uniswap_v3
- aave_v3
Monitoring
Prometheus
Access at http://localhost:9091
Metrics available:
- API request latency
- RPC call counts
- Indexer block height
- Queue depth
Grafana
Access at http://localhost:3000
Default credentials: admin / bootnode
Pre-configured dashboards:
- API Overview
- Chain Status
- Indexer Progress
Troubleshooting
Service won't start
# Check logs
docker compose logs <service>
# Verify dependencies
docker compose ps
Database connection issues
# Ensure postgres is healthy
docker compose exec postgres pg_isready
# Reset database
docker compose down -v
docker compose up -d
High memory usage
# Limit indexer chains
MAX_CHAINS=10 docker compose up -d indexer
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Load Balancer │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ API │ │ API │ │ Web │ │ Indexer │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
│ │ │ │ │ │
│ └────────────┴────────────┴────────────┘ │
│ │ │
│ ┌────────────────────────┴────────────────────────┐ │
│ │ Data Layer │ │
│ │ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │ │
│ │ │PostgreSQL│ │ Redis │ │ DataStore │ │ │
│ │ └──────────┘ └──────────┘ └──────────────┘ │ │
│ └──────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘