Skip to content

JROChub/power_house

Repository files navigation

power_house

git tests crates.io docs.rs license

power_house is a Rust protocol stack for deterministic proof generation, quorum state reconciliation, and stake-aware settlement.

Maintainer: MFENX

What It Delivers

  • Deterministic multilinear sum-check proofs with transcript hashing.
  • Quorum finality and anchor reconciliation for auditable state progression.
  • Optional P2P networking via julian net ... with policy gates.
  • DA commitments with share_root and pedersen_root support.
  • Stake registry, slashing evidence, and fee distribution controls.

Live References

Install

cargo install power_house
cargo install power_house --features net

Build And Test

cargo test
cargo test --features net

Local Quick Start

cargo run --example demo
cargo run --example scale_sumcheck

Network Mode (--features net)

Generate an identity and start a node:

julian keygen ed25519://<seed> --out ./keys/node.identity

julian net start \
  --node-id <node_id> \
  --log-dir ./logs/<node_id> \
  --listen /ip4/0.0.0.0/tcp/0 \
  --bootstrap /dns4/mfenx.com/tcp/7002/p2p/<BOOTSTRAP_PEER_ID> \
  --broadcast-interval 5000 \
  --quorum 2 \
  --key ed25519://<seed>

Common flags:

  • --metrics :9100
  • --policy configs/governance.stake.json
  • --policy-allowlist configs/governance.multisig.json
  • --allow-open-membership
  • --gossip-shard 1
  • --bft --bft-round-ms 5000
  • --token-mode <native|TOKEN_ID>
  • --token-oracle <RPC_URL>

DA HTTP API

Endpoints:

  • POST /submit_blob
  • GET /commitment/<namespace>/<hash>
  • GET /sample/<namespace>/<hash>?count=N
  • GET /prove_storage/<namespace>/<hash>/<idx>

Example:

curl -X POST http://127.0.0.1:8181/submit_blob \
  -H 'X-Namespace: default' \
  -H 'X-Fee: 10' \
  --data-binary @file.bin

Governance And Staking

Use explicit governance policy files under configs/.

  • Stake-backed DA attestation and slashing write evidence to evidence_outbox.jsonl.
  • Stake registry balances are updated deterministically by command handlers.
  • Open membership is opt-in (--allow-open-membership).

Token Migration Workflow

The migration workflow is deterministic and idempotent.

Freeze mutable ingress during migration:

export PH_MIGRATION_MODE=freeze

Run finalize pipeline:

julian migration finalize \
  --registry ./path/to/stake_registry.json \
  --height 12345 \
  --log-dir ./logs/nodeA \
  --output-dir ./migration-out \
  --token-contract native://julian \
  --conversion-ratio 1 \
  --treasury-mint 0 \
  --amount-source total

Validate state:

julian migration verify-state \
  --registry ./path/to/stake_registry.json \
  --claims ./migration-out/migration_claims.json \
  --state ./migration-out/migration_apply_state.json \
  --require-complete

Run packaged checks:

./scripts/token_migration_dry_run.sh
./scripts/verify_migration_contract.sh
./scripts/smoke_net.sh --with-migration

Documentation

  • JULIAN_PROTOCOL.md
  • docs/book_of_power.md
  • docs/ops.md
  • docs/permissionless_join.md
  • docs/community_onboarding.md
  • docs/tokenomics.md

License

power_house is dual-licensed under MIT OR BSD-2-Clause. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors