Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
efb7e73
chore: update devnet to xion v28.1.0
crucible-burnt Mar 5, 2026
09df34b
chore: add dkim module to IMPORT_MODULES
crucible-burnt Mar 5, 2026
87df758
feat(devnet): add core app services (AA API, Dashboard, Indexer, Stak…
crucible-burnt Mar 5, 2026
7dc1749
feat: add IBC chain init scripts for Osmosis, Noble, and Hermes
crucible-burnt Mar 5, 2026
391f51b
feat: complete docker-compose with all services, profiles, IBC, HAProxy
crucible-burnt Mar 5, 2026
ebe76c2
feat: add post-genesis contract deployment script (DO-247)
crucible-burnt Mar 5, 2026
8763efb
fix: enable abstractaccount allowed_code_ids and configure Stytch JWK…
crucible-burnt Mar 5, 2026
8186f21
chore: update subql-node-cosmos to v4.0.1
crucible-burnt Mar 5, 2026
64c9020
chore: wire Stytch credentials into devnet env and compose
crucible-burnt Mar 5, 2026
42ad24f
fix: P2P port 26656, add assets port 3004, sync .env.example with .env
crucible-burnt Mar 5, 2026
2ed4410
chore: remove oauth3 from devnet stack
crucible-burnt Mar 5, 2026
6501598
chore: remove xion-indexer and xion-indexer-proxy from devnet stack
crucible-burnt Mar 5, 2026
567256d
chore: restore xion-indexer-proxy to devnet stack
crucible-burnt Mar 5, 2026
d1aa87d
chore: register 6 placeholder submodules and fix xion-assets/dev-port…
crucible-burnt Mar 20, 2026
92261e9
fix(compose): align developer-portal and assets ports with Dockerfile…
crucible-burnt Mar 20, 2026
fb1b3ea
fix(compose): copy init scripts through named volume (DO-272)
2xburnt Jul 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
XIOND_VERSION="20.0.0"
XIOND_VERSION="28.1.0"
CHAIN_ID="xion-devnet-1"

DAEMON_HOME="/home/xiond/.xiond"
Expand All @@ -22,14 +22,19 @@ SOURCE_CHAIN_API="https://api.xion-testnet-2.burnt.com:443"
# first should be account, second should be treasury, more can be appended code ids are assigned sequentially starting from 1
SOURCE_CHAIN_CODE_IDS="1 1260"

STYTCH_AUD="project-test-1aa439cd-842b-4d3b-b2a6-37899cf83ca9"
STYTCH_JWK='{"alg":"RS256","e":"AQAB","kid":"jwk-test-a93974ec-5fb7-4970-957d-7d3439077841","kty":"RSA","n":"80EHR58Nopm1CeGWBTx_yGO3REn9mCfktSyb00Rf2x12WIiZhkVKcsXIA6GyUJJfrRomKWWPbPeTz1NMx3Oz6VY8nWpZIhZ93QEFqXmjLMJeuf1UNLTzyI9UM32GYu9EEne7LW39i7-ke0Hd9q0Ru-eBA86qNQ7M3sz_VhYZFQCSKZPUFtTXLEzZVAcvCP0yZEIXyxvSjxAIgY7p0mvF7WPsPSkqBXzwgnPd5P1A8hldCH2qeCwqmoZLmPLniRRTlSUO1Nog7YyxTCPp1bRskSAxkawqeB3hzRZPnDEHM9HrE3eamiKAGpBfkkfmkGT0MpA8J5de-BH2bLk_SxZERQ","use":"sig"}'

MODIFY_GENESIS_JQ='
# .genesis_time = "2025-01-28T16:00:00Z" |
.app_state.gov.params.expedited_voting_period = "0h1m0s" |
.app_state.feeabs.epochs = [] |
.app_state.feeabs.params.native_ibced_in_osmosis = "" |
.app_state.feeabs.params.chain_name = ""
# .app_state.abstractaccount.params.allowed_code_ids = ["1"]
# .app_state.jwk.audienceList = [{"aud": env.JWK_AUD, "key": env.JWK_KEY, "admin": env.JWK_ADMIN}]
.app_state.feeabs.params.chain_name = "" |
.app_state.abstractaccount.params.allowed_code_ids = ["1"] |
.app_state.abstractaccount.params.allow_all_code_ids = false |
.app_state.jwk.audienceList = [{"aud": $stytch_aud, "key": $stytch_jwk, "admin": $abstraxion_addr}]
'



RELAYER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art"
63 changes: 63 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# ═══════════════════════════════════════════════════════════════════════════
# Xion Devnet — Environment Variables
# ═══════════════════════════════════════════════════════════════════════════

# --- Xion Chain ---
XIOND_VERSION="28.1.0"
CHAIN_ID="xion-devnet-1"
DAEMON_HOME="/home/xiond/.xiond"
DAEMON_NAME="xiond"
DEFAULT_DENOM="uxion"
DENOM_METADATA_NAME="xion"
GENESIS_AMOUNT="1000000000000"
GENTX_AMOUNT="1000000"
NUM_VALIDATORS=3

# Devnet mnemonic (NOT SENSITIVE — do not use in production)
MNEMONIC="decorate corn happy degree artist trouble color mountain shadow hazard canal zone hunt unfold deny glove famous area arrow cup under sadness salute item"
ABSTRAXION_ADDRESS="xion1e2fuwe3uhq8zd9nkkk876nawrwdulgv460vzg7"

# --- Source Chain (genesis import) ---
SOURCE_CHAIN_ID="xion-testnet-2"
SOURCE_CHAIN_RPC="https://rpc.xion-testnet-2.burnt.com:443"
SOURCE_CHAIN_API="https://api.xion-testnet-2.burnt.com:443"
SOURCE_CHAIN_CODE_IDS="1 1260"

# --- Faucet ---
FAUCET_ACCOUNTS="10"
FAUCET_AMOUNT="100000000"

# --- Stytch / JWK (used in genesis modifications) ---
STYTCH_AUD="project-test-1aa439cd-842b-4d3b-b2a6-37899cf83ca9"
STYTCH_JWK='{"alg":"RS256","e":"AQAB","kid":"jwk-test-a93974ec-5fb7-4970-957d-7d3439077841","kty":"RSA","n":"80EHR58Nopm1CeGWBTx_yGO3REn9mCfktSyb00Rf2x12WIiZhkVKcsXIA6GyUJJfrRomKWWPbPeTz1NMx3Oz6VY8nWpZIhZ93QEFqXmjLMJeuf1UNLTzyI9UM32GYu9EEne7LW39i7-ke0Hd9q0Ru-eBA86qNQ7M3sz_VhYZFQCSKZPUFtTXLEzZVAcvCP0yZEIXyxvSjxAIgY7p0mvF7WPsPSkqBXzwgnPd5P1A8hldCH2qeCwqmoZLmPLniRRTlSUO1Nog7YyxTCPp1bRskSAxkawqeB3hzRZPnDEHM9HrE3eamiKAGpBfkkfmkGT0MpA8J5de-BH2bLk_SxZERQ","use":"sig"}'

# --- Genesis Modifications ---
MODIFY_GENESIS_JQ='
.app_state.gov.params.expedited_voting_period = "0h1m0s" |
.app_state.feeabs.epochs = [] |
.app_state.feeabs.params.native_ibced_in_osmosis = "" |
.app_state.feeabs.params.chain_name = "" |
.app_state.abstractaccount.params.allowed_code_ids = ["1"] |
.app_state.abstractaccount.params.allow_all_code_ids = false |
.app_state.jwk.audienceList = [{"aud": $stytch_aud, "key": $stytch_jwk, "admin": $abstraxion_addr}]
'

# --- Postgres ---
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres

# --- Indexer ---
SUB_COMMAND=forceClean

# --- Dashboard ---
STYTCH_PUBLIC_TOKEN=public-token-test-823bab5f-5fe6-4a3f-b49a-ca59763be42a
NUMIA_TOKEN=placeholder
FEE_GRANTER_ADDRESS=
ZKEMAIL_FLAG=false

# --- IBC Relayer ---
RELAYER_MNEMONIC="abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon art"

STYTCH_PROJECT_ID=project-test-1aa439cd-842b-4d3b-b2a6-37899cf83ca9
STYTCH_SECRET=PLACEHOLDER_NEED_SECRET
32 changes: 30 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[submodule "xion"]
path = xion
url = https://github.com/burnt-labs/xion.git
branch = release/v20
branch = release/v28
[submodule "xion-dashboard-app"]
path = xion-dashboard-app
url = https://github.com/burnt-labs/xion-dashboard-app.git
branch = chore/devnet
[submodule "xion-explorer"]
path = xion-explorer
url = https://github.com/burnt-labs/xion-explorer.git
branch = xion/mainnet
branch = chore/devnet
[submodule "xion-faucet"]
path = xion-faucet
url = https://github.com/burnt-labs/xion-faucet.git
Expand All @@ -25,4 +25,32 @@
[submodule "xion-assets"]
path = xion-assets
url = https://github.com/burnt-labs/xion-assets.git
branch = main
[submodule "account-abstraction-api"]
path = account-abstraction-api
url = https://github.com/burnt-labs/account-abstraction-api.git
branch = chore/devnet
[submodule "oauth2-api-service"]
path = oauth2-api-service
url = https://github.com/burnt-labs/oauth2-api-service.git
branch = chore/devnet
[submodule "oauth2-clients-dashboard"]
path = oauth2-clients-dashboard
url = https://github.com/burnt-labs/oauth2-clients-dashboard.git
branch = chore/devnet
[submodule "zk-email-backend"]
path = zk-email-backend
url = https://github.com/burnt-labs/zk-email-backend.git
branch = chore/devnet
[submodule "zk-email-prover"]
path = zk-email-prover
url = https://github.com/burnt-labs/zk-email-prover.git
branch = chore/devnet
[submodule "zk-email-worker"]
path = zk-email-worker
url = https://github.com/burnt-labs/zk-email-worker.git
branch = chore/devnet
[submodule "xion-indexer-proxy"]
path = xion-indexer-proxy
url = https://github.com/burnt-labs/xion-indexer-proxy.git
branch = chore/devnet
51 changes: 40 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,53 @@
singleton:
. .env && ./scripts/docker-run.sh
# Xion Devnet — Makefile
PROFILE ?= core
COMMIT ?= $(shell cd ./xion && git rev-parse --short HEAD 2>/dev/null || echo "unknown")

.PHONY: build build-no-cache start stop down clean purge logs status singleton core apps oauth zk ibc full

build:
COMMIT=$$(cd ./xion && git rev-parse --short HEAD) docker compose build --pull
COMMIT=$(COMMIT) docker compose --profile $(PROFILE) build --pull

build-no-cache:
COMMIT=$$(cd ./xion && git rev-parse --short HEAD) docker compose build --pull --no-cache
COMMIT=$(COMMIT) docker compose --profile $(PROFILE) build --pull --no-cache

start:
docker compose up -d
start up:
docker compose --profile $(PROFILE) up -d

stop:
docker compose stop
docker compose --profile $(PROFILE) stop

down:
docker compose down
docker compose --profile $(PROFILE) down

clean:
docker compose rm -f -s -v
docker compose --profile $(PROFILE) rm -f -s -v

purge:
docker compose rm -f -s -v
docker volume rm -f devnet_shared
docker compose --profile $(PROFILE) down -v --remove-orphans

logs:
docker compose --profile $(PROFILE) logs -f

status:
docker compose --profile $(PROFILE) ps

core:
$(MAKE) start PROFILE=core

apps:
$(MAKE) start PROFILE=apps

oauth:
$(MAKE) start PROFILE=oauth

zk:
$(MAKE) start PROFILE=zk

ibc:
$(MAKE) start PROFILE=ibc

full:
$(MAKE) start PROFILE=full

singleton:
. .env && ./scripts/docker-run.sh
149 changes: 47 additions & 102 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,58 @@
# Xion Devnet
# Xion Devnet — Full Stack

Xion Devnet is a multi-validator sandbox environment orchestrated with Docker Compose for local development and testing.

## Prerequisites

- [Docker](https://www.docker.com/) (version 20.10 or higher)
- [Docker Compose](https://github.com/docker/compose) (version 2.0 or higher)
- [Make](https://www.gnu.org/software/make/) (for using Makefile commands)
Run the entire Xion ecosystem locally with Docker Compose.

## Quick Start

The easiest way to get started is using the provided Makefile commands:

```sh
# Build devnet images with commit ID
make build

# Start devnet in background
make start

# Stop devnet (preserves state)
make stop

# Stop and remove containers
make down

# Clean up containers
make clean

# Complete purge (removes containers and shared volume)
make purge

# Start singleton validator from .env configuration
make singleton
```bash
git clone --recurse-submodules -b chore/devnet-v28 https://github.com/burnt-labs/devnet.git
cd devnet
cp .env.example .env
make core # chain + haproxy + explorer + faucet
make full # everything
```

## Manual Docker Compose Commands

If you prefer to use Docker Compose directly:

```sh
# Build images with commit ID
COMMIT=$(cd ./xion && git rev-parse --short HEAD) docker compose build --pull --no-cache

# Start devnet
docker compose up -d

# Stop devnet (preserves blockchain state)
docker compose stop

# Stop and remove containers
docker compose down

# View logs
docker compose logs -f

# Complete cleanup and reset
docker compose rm -f -s -v
docker volume rm -f devnet_shared

# Restart from previous height
docker compose start
## Profiles

| Profile | Services |
|---------|----------|
| `core` | Xion (3 validators), HAProxy, Explorer, Faucet |
| `apps` | Core + AA API, Dashboard, Staking, Dev Portal, Indexer, Assets |
| `oauth` | Apps + OAuth3, OAuth2 API, OAuth2 Clients Dashboard |
| `zk` | Apps + ZK Email Backend, Prover, Worker |
| `ibc` | Core + Osmosis, Noble, Hermes relayer |
| `full` | Everything |

## Ports

| Port | Service | Port | Service |
|------|---------|------|---------|
| 1317 | Xion REST | 8001 | Indexer Proxy |
| 9090 | Xion gRPC | 8002 | OAuth2 API |
| 26657 | Xion RPC | 8003 | OAuth2 Clients |
| 3000 | Faucet | 8080 | OAuth3 |
| 3001 | AA API | 8081 | ZK Email Prover |
| 3002 | Indexer GraphQL | 8082 | ZK Email Worker |
| 3003 | Developer Portal | 8788 | Staking |
| 3004 | Assets | 26757 | Osmosis RPC |
| 4173 | Dashboard | 26857 | Noble RPC |
| 5173 | Explorer | 9190/9290 | Osmosis/Noble gRPC |
| 8444 | HAProxy Stats | 26656 | Xion P2P |

## Commands

```bash
make build PROFILE=apps # Build images
make start PROFILE=apps # Start
make logs PROFILE=apps # Follow logs
make status # Container status
make purge # Remove everything
```

## Configuration Options

- **NUM_VALIDATORS**: Number of validator nodes (default: 3)
- **XIOND_VERSION**: Version tag for the xion docker image (default: latest)
- **COMMIT**: Git commit hash passed to build (automatically set by Makefile)
- **DAEMON_NAME**: Name of the daemon process (configured in .env)

## Network Information

Once running, the devnet exposes the following services through HAProxy:

- **RPC Endpoint**: `http://localhost:26657`
- **API Endpoint**: `http://localhost:1317`
- **gRPC Endpoint**: `http://localhost:9090`
- **Xion Explorer**: `http://localhost:5173`
- **Xion Faucet**: `http://localhost:3000`
- **Additional RPC**: `http://localhost:26658`
## IBC

The setup includes:

- **Xion validators**: Configurable number of validator nodes (default: 3)
- **HAProxy**: Load balancer and reverse proxy
- **Xion Explorer**: Web interface for blockchain exploration
- **Xion Faucet**: Token distribution service

## Submodules

This devnet environment includes several Xion ecosystem components as git submodules:

- **[xion](https://github.com/burnt-labs/xion)** - Core Xion blockchain node and validator software
- **[xion-explorer](https://github.com/burnt-labs/xion-explorer)** - Web-based blockchain explorer for viewing transactions and blocks
- **[xion-faucet](https://github.com/burnt-labs/xion-faucet)** - Token distribution service for testnet XION tokens
- **[xion-staking](https://github.com/burnt-labs/xion-staking)** - Staking interface for validators and delegators
- **[xion-assets](https://github.com/burnt-labs/xion-assets)** - Static assets and branding resources

To update all submodules to their latest commits:

```sh
git submodule update --remote --recursive
```
The `ibc` profile starts Osmosis (v28.0.0) and Noble (v11.3.0) with a Hermes relayer (v1.12.0). Channels are auto-created for `transfer` on both pairs. Noble includes USDC minting via `fiat-tokenfactory`.

## Troubleshooting
## Environment

- **Port conflicts**: Ensure ports 26657, 1317, 9090, 5173, and 3000 are available
- **Storage issues**: Use `make purge` to reset blockchain state and volumes
- **Build failures**: Try `make build` to rebuild images with commit ID
- **Permission errors**: Ensure Docker daemon is running and user has permissions
- **Service startup**: Check `docker compose logs -f` for detailed error messages
See `.env.example` for all variables. Key ones: `XIOND_VERSION`, `NUM_VALIDATORS`, `RELAYER_MNEMONIC`, `STYTCH_PUBLIC_TOKEN`, `FEE_GRANTER_ADDRESS`.
1 change: 1 addition & 0 deletions account-abstraction-api
Loading