Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
244 changes: 200 additions & 44 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ path = "src/lib.rs"
name = "quantus"
path = "src/main.rs"


[dependencies]
# CLI and async runtime
clap = { version = "4.5", features = ["derive"] }
Expand Down Expand Up @@ -52,9 +51,10 @@ aes-gcm = "0.10" # AES-256-GCM (quantum-safe with 256-bit keys)
# Quantus crypto dependencies
qp-rusty-crystals-dilithium = { version = "2.0.0" }
qp-rusty-crystals-hdwallet = { version = "1.0.0" }
qp-poseidon = { version = "0.9.5", features = [
qp-poseidon = { version = "1.0.5", features = [
"serde",
] }
qp-poseidon-core = { version = "1.0.5", default-features = false, features = ["p2", "p3"] }
qp-dilithium-crypto = { version = "0.2.0", features = ["serde"] }

# Blockchain and RPC client
Expand All @@ -70,5 +70,12 @@ jsonrpsee = { version = "0.24", features = ["client"] }
# Needed for implementing custom Subxt hasher
subxt-metadata = "0.43.0"

# ZK proof generation
anyhow = "1.0"
qp-wormhole-circuit = { version = "0.1.7", default-features = false }
qp-wormhole-prover = { version = "0.1.7", default-features = false }
qp-zk-circuits-common = { version = "0.1.7", default-features = false }
qp-plonky2 = { version = "1.1.3", default-features = false, features = ["no_random"] }

[dev-dependencies]
tempfile = "3.8"
855 changes: 649 additions & 206 deletions src/chain/quantus_subxt.rs

Large diffs are not rendered by default.

21 changes: 7 additions & 14 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@ pub mod high_security;
pub mod metadata;
pub mod preimage;
pub mod recovery;
pub mod referenda;
pub mod referenda_decode;
pub mod reversible;
pub mod runtime;
pub mod scheduler;
pub mod send;
pub mod storage;
pub mod system;
pub mod tech_collective;
pub mod tech_referenda;
pub mod treasury;
pub mod wallet;
pub mod wormhole;

/// Main CLI commands
#[derive(Subcommand, Debug)]
Expand Down Expand Up @@ -94,12 +92,6 @@ pub enum Commands {
/// Tech Referenda management commands (for runtime upgrade proposals)
#[command(subcommand)]
Preimage(preimage::PreimageCommands),
#[command(subcommand)]
TechReferenda(tech_referenda::TechReferendaCommands),

/// Standard Referenda management commands (public governance)
#[command(subcommand)]
Referenda(referenda::ReferendaCommands),

/// Treasury management commands
#[command(subcommand)]
Expand Down Expand Up @@ -230,6 +222,10 @@ pub enum Commands {
/// Block management and analysis commands
#[command(subcommand)]
Block(block::BlockCommands),

/// Wormhole proof generation and verification
#[command(subcommand)]
Wormhole(wormhole::WormholeCommands),
}

/// Developer subcommands
Expand Down Expand Up @@ -282,11 +278,6 @@ pub async fn execute_command(
.await,
Commands::Preimage(preimage_cmd) =>
preimage::handle_preimage_command(preimage_cmd, node_url, finalized).await,
Commands::TechReferenda(tech_referenda_cmd) =>
tech_referenda::handle_tech_referenda_command(tech_referenda_cmd, node_url, finalized)
.await,
Commands::Referenda(referenda_cmd) =>
referenda::handle_referenda_command(referenda_cmd, node_url, finalized).await,
Commands::Treasury(treasury_cmd) =>
treasury::handle_treasury_command(treasury_cmd, node_url, finalized).await,
Commands::Runtime(runtime_cmd) =>
Expand Down Expand Up @@ -362,6 +353,8 @@ pub async fn execute_command(
},
Commands::CompatibilityCheck => handle_compatibility_check(node_url).await,
Commands::Block(block_cmd) => block::handle_block_command(block_cmd, node_url).await,
Commands::Wormhole(wormhole_cmd) =>
wormhole::handle_wormhole_command(wormhole_cmd, node_url).await,
}
}

Expand Down
Loading