Skip to main content

Crate power_house

Crate power_house 

Source
Expand description

Deterministic verification, portable proof provenance, and optional quorum networking.

Power House combines five interoperable layers:

  • provenance defines Power House Archive (.pha) and Rootprint v1.
  • sumcheck implements dense, streaming, constant, and seeded-affine sum-check workflows.
  • sparse_sumcheck implements stable seeded and commitment-bound sparse certificate formats.
  • julian records proof transcripts, anchors them, and reconciles quorum state.
  • net adds signed libp2p transport, data availability, governance, and quorum-finalized native RPC when the net feature is enabled.

§Power House Archive

A provenance::PhaArtifact binds core proof data and provenance to a deterministic phx_fingerprint. Optional external proof attachments are transported with the artifact but do not alter its Power House core identity.

use power_house::provenance::PhaArtifact;
use serde_json::json;

let artifact = PhaArtifact::new(
    json!({"producer": "example"}),
    "power-house/example/v1",
    json!({"claim": 7}),
    json!({"accepted": true}),
)?;
artifact.verify()?;

§Rootprint

provenance::Rootprint is a deterministic directed acyclic graph of .pha artifacts. The prove_with_rootprint! macro is the recommended construction interface.

use power_house::{prove_with_rootprint, provenance::PhaArtifact};
use serde_json::json;

let artifact = PhaArtifact::new(
    json!({"source": "rootprint-example"}),
    "power-house/example/v1",
    json!({"claim": 11}),
    json!({"accepted": true}),
)?;
let graph = prove_with_rootprint!(label: "main", artifact: artifact)?;
graph.verify()?;

§Structured sum-check

Closed-form and seeded proof constructors operate on compact algebraic descriptions without allocating the expanded Boolean hypercube.

use power_house::{Field, GeneralSumProof};

let field = Field::new(1_000_000_007);
let proof = GeneralSumProof::prove_seeded_affine(
    4096,
    &field,
    b"public reproducible workload",
);
assert!(proof.verify_seeded_affine(
    &field,
    b"public reproducible workload",
));

§Feature flags

  • default: proof, provenance, transcript, and sparse-certificate APIs.
  • net: networking, migration commands, data availability, governance, staking, and native JSON-RPC.

§Specifications and guides

The repository contains the normative .pha and Rootprint specifications, cross-language conformance vectors, provenance and sparse security models, verification guide, and operational runbooks. See the documentation index.

Re-exports§

pub use consensus::consensus;
pub use julian::compute_fold_digest;
pub use julian::julian_genesis_anchor;
pub use julian::julian_genesis_hash;
pub use julian::reconcile_anchors;
pub use julian::reconcile_anchors_with_quorum;
pub use julian::AnchorMetadata;
pub use julian::AnchorVote;
pub use julian::EntryAnchor;
pub use julian::LedgerAnchor;
pub use julian::Proof;
pub use julian::ProofKind;
pub use julian::ProofLedger;
pub use julian::Statement;
pub use julian::JULIAN_GENESIS_STATEMENT;
pub use sparse_sumcheck::CommittedSparsePolynomial;
pub use sparse_sumcheck::CommittedSparseProof;
pub use sparse_sumcheck::SeededSparseProof;
pub use sparse_sumcheck::SeededSparseSpec;
pub use sparse_sumcheck::SparseMonomial;
pub use sparse_sumcheck::SparseProofError;
pub use sparse_sumcheck::SparseVerificationReport;
pub use sumcheck::ChainedSumProof;
pub use sumcheck::GeneralSumClaim;
pub use sumcheck::GeneralSumProof;
pub use sumcheck::ProofStats;
pub use sumcheck::SumClaim;

Modules§

commands
CLI command helpers for migration and deterministic artifacts.
consensus
The design philosophy underlying power_house is pedagogical, yet mathematically rigorous. Each module encapsulates a discrete concept in modern computational complexity theory, illustrating how modest abstractions compose into a cohesive proof infrastructure.
economics
Token economics scaffolding for DA layer monetization.
julian
The design philosophy underlying power_house is pedagogical, yet mathematically rigorous. Each module encapsulates a discrete concept in modern computational complexity theory, illustrating how modest abstractions compose into a cohesive proof infrastructure.
net
Networking primitives for the JULIAN Protocol (MFENX Power-House Network).
provenance
Portable provenance artifacts and deterministic identity.
rollup
Rollup integration with Groth16 verification. Circuit: next = prev + tx_root (Fr) plus Pedersen Merkle inclusion of tx_root into pedersen_root bytes (public).
sparse_sumcheck
Event-driven sum-check certificates for seeded and externally committed sparse polynomials.
sumcheck
The design philosophy underlying power_house is pedagogical, yet mathematically rigorous. Each module encapsulates a discrete concept in modern computational complexity theory, illustrating how modest abstractions compose into a cohesive proof infrastructure.

Macros§

prove_with_rootprint
Creates or extends a Rootprint graph with a verified Power House artifact.

Structs§

Field
A finite field defined by an odd prime modulus.
LogRecordMetadata
Metadata captured from optional comment lines in a ledger log file.
MerkleProof
Merkle inclusion proof for a single transcript digest.
MerkleProofNode
Describes a sibling hash encountered while walking a Merkle tree.
MultilinearPolynomial
Represents an n-variate multilinear polynomial via its values on {0,1}ⁿ.
ParsedLogFile
Parsed contents of a ledger log file.
SimplePrng
A deterministic stream generator derived from BLAKE2b-256.
StreamingPolynomial
Streaming representation of a multilinear polynomial over a Boolean hypercube.
Transcript
Stateful helper that derives challenges from a recorded transcript.

Functions§

build_merkle_proof
Constructs an inclusion proof for the leaf at index within leaves.
merkle_root
Computes the Merkle root for the provided leaf digests.
parse_log_file
Parses a ledger log file, tolerating optional comment lines that begin with #.
parse_transcript_record
Parses a transcript record and returns its components and stored hash.
read_fold_digest_hint
Attempts to load a fold digest hint from fold_digest.txt inside dir.
transcript_digest
Computes the deterministic digest used for transcript records.
transcript_digest_from_hex
Parses a lowercase or uppercase hex string into a transcript digest.
transcript_digest_to_hex
Converts a digest into a lowercase hex string.
verify_merkle_proof
Checks whether the proof recomputes the advertised Merkle root.
verify_transcript_lines
Verifies that a transcript record matches its stored hash digest.
write_text_series
Writes a text file to base_dir/prefix_index.txt using the provided lines.
write_transcript_record
Writes a transcript record using the provided writer function.

Type Aliases§

TranscriptDigest
Fixed-width transcript digest.