Skip to main content

Python-based ABCI server for CometBFT

Project description

xian-abci

xian-abci is the CometBFT-facing Xian node application. It owns deterministic chain behavior, ABCI request handling, state export and restore flows, and node-adjacent services such as BDS and the optional dashboard.

The published PyPI package name is xian-tech-abci. The console entrypoints remain xian-abci, xian-dashboard, and the other xian-* commands exposed by this repo.

Quick Start

Run the ABCI application:

uv run xian-abci

Run the optional dashboard against a local CometBFT RPC endpoint:

uv run xian-dashboard --rpc-url http://127.0.0.1:26657

Inspect the backend-oriented CLI surface:

uv run xian-configure-node --help
uv run xian-export-state --help
uv run xian-state-snapshot --help
uv run xian-legacy-replay-audit --help

Principles

  • xian-abci owns deterministic node behavior and backend primitives, not the full operator UX.
  • Process supervision, Docker topology, and operator workflows belong in xian-stack, xian-cli, or external tooling such as systemd.
  • BDS, metrics, snapshots, and the dashboard are part of the node-adjacent runtime surface, but the core ABCI path should remain understandable without them.
  • Consensus-sensitive behavior belongs in reusable code, not ad hoc scripts or one-off operator commands.

How It Fits

  • use xian-abci when you need the actual node application or backend-oriented node tooling
  • use xian-cli when you want the operator-facing UX around manifests, profiles, health, and recovery flows
  • use xian-stack when you want the local Docker/Compose runtime and smoke flows
  • use xian-deploy when you want remote Linux host deployment

Key Directories

  • src/xian/methods/: ABCI request handlers and query surfaces
  • src/xian/services/: BDS, dashboard, metrics, state sync, and related services
  • src/xian/cli/: backend-oriented command entrypoints owned by this repo
  • src/xian/: node setup helpers, state export/import, and shared runtime code
  • scripts/: repo validation and protobuf generation helpers
  • tests/: unit, integration, governance, and system coverage

What It Covers

  • deterministic transaction processing and block finalization
  • node queries and simulation
  • state export, state snapshots, and state sync helpers
  • node setup, home configuration, and genesis-building primitives
  • BDS indexing and optional dashboard services
  • backend-oriented CLI entrypoints such as:
    • xian-configure-node
    • xian-export-state
    • xian-state-snapshot
    • xian-bds-reindex
    • xian-bds-snapshot
    • xian-bds-spool
    • xian-legacy-replay-audit

Validation

UV_CACHE_DIR=/tmp/uv-cache uv sync --group dev
./scripts/validate-repo.sh

Optional runtime extras:

  • uv sync --extra native for the native admission/tracer helpers
  • uv sync --extra vm for the experimental xian_vm_v1 native-runtime path with stored-IR-first preflight plus native execution wiring on explicit simulation requests and on the real tx path

The current xian_vm_v1 rollout model is intentionally strict:

  • xian_vm_v1 is native-authoritative only on this branch; there is no Python shadow/compare mode in node execution
  • native contract deployment is artifact-driven: submission.submit_contract(...) calls must carry deployment_artifacts with persisted vm_ir_json instead of relying on a source-only compile path
  • native deployment is also deterministic-context-driven: the native deploy path requires explicit now/block context from the node runtime and will not fall back to local wall-clock time
  • xian_vm_v1 execution is strict about artifacts: contracts must already carry persisted __xian_ir_v1__; stored __source__ remains available for inspection, but it is not used as a runtime fallback
  • VM-native state stores __source__ plus __xian_ir_v1__; __code__ is not part of the native deployment/runtime path
  • the node does not silently try native first and then hide problems behind a fallback to Python
  • transaction simulation remains explicit client-triggered behavior; the node does not auto-run simulation for every incoming transaction
  • VM shadow/native observability is exported through the Prometheus endpoint:
    • xian_node_info now includes execution mode, authority, shadow flag, bytecode version, and gas schedule
    • xian_vm_shadow_metric and xian_vm_shadow_stage_metric expose comparison and mismatch counters
    • xian_vm_shadow_last_mismatch_info exposes the latest mismatch context
  • when VM comparison is active, mismatch records are also appended to: storage/logs/xian-vm-shadow-mismatches.jsonl

Legacy network replay audit is now available as an explicit backend tool:

uv run --extra vm xian-legacy-replay-audit \
  --rpc-url https://node.xian.org \
  --graphql-url https://node.xian.org/graphql \
  --output-dir ./.artifacts/legacy-replay \
  --logic-only \
  --native-only \
  --max-transactions 100

That tool is intentionally split into two views:

  • strict historical parity: uses the historical chi budget and current rewards path, so it highlights legacy-vs-current economic drift directly
  • logic parity: replays with fees and rewards disabled and compares only status/result/events, so contract execution compatibility is visible even when legacy fee calibration differs from the current stack
  • native-only: skips the current Python replay path and focuses only on whether xian_vm_v1 can process the historical transactions

The replay tool seeds from the live legacy chain GENESIS pseudo-transaction, reads ordered transactions from CometBFT RPC block data, and writes:

  • report.json
  • transactions.jsonl
  • contract_inventory.json
  • contract_compatibility.json
  • a local replay state directory under output-dir/replay-state

The BDS-backed test paths expect Postgres at postgres://postgres:1234@localhost:5432/xian.

Related Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xian_tech_abci-0.8.10.tar.gz (203.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xian_tech_abci-0.8.10-py3-none-any.whl (282.5 kB view details)

Uploaded Python 3

File details

Details for the file xian_tech_abci-0.8.10.tar.gz.

File metadata

  • Download URL: xian_tech_abci-0.8.10.tar.gz
  • Upload date:
  • Size: 203.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xian_tech_abci-0.8.10.tar.gz
Algorithm Hash digest
SHA256 58247c97e4f0e82874ca408541962f4addb6eeb53b01086aae7dad264ed07add
MD5 8a67736e0ee17976d41e6b7807cfc0db
BLAKE2b-256 a5d499fd4e43e13e2890e9344ac03f42690d8edff2d34642ab436f08541b962f

See more details on using hashes here.

Provenance

The following attestation bundles were made for xian_tech_abci-0.8.10.tar.gz:

Publisher: release.yml on xian-technology/xian-abci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xian_tech_abci-0.8.10-py3-none-any.whl.

File metadata

  • Download URL: xian_tech_abci-0.8.10-py3-none-any.whl
  • Upload date:
  • Size: 282.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xian_tech_abci-0.8.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1abe50b5b17dbdb156d2a4b82fe476a478cc6cc28896b3f1e9a7cc4678e64a
MD5 dbd0b2cf855a92db05634f2d309484c8
BLAKE2b-256 7eb5ab6fc76002bdee0fc6981ea00f340c5510c84c19fe4d30e6a3652db52a6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xian_tech_abci-0.8.10-py3-none-any.whl:

Publisher: release.yml on xian-technology/xian-abci

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page