#solana #mining #performance #cryptography #hashing #sorting #crankx

no-std crankx

Your data, permanently recorded — uncensorable, uneditable, and here for good

4 releases

0.2.2 Apr 23, 2025
0.2.1 Apr 23, 2025
0.1.1 Apr 23, 2025
0.1.0 Apr 23, 2025

#43 in #mining

Download history 341/week @ 2025-04-23 4/week @ 2025-04-30

345 downloads per month

Apache-2.0 and LGPL-3.0-only

17KB
152 lines

CrankX

license crates.io

CrankX is a Rust crate for proving access to stored data segments using the EquiX Proof-of-Work algorithm. Developed for TAPEDRIVE and optimized for Solana, it enables miners to earn rewards by demonstrating possession of specific data. The design is loosely based on Ore’s drillx, with an added data-verification step.


✨ Features

  • EquiX PoW for tape segment data
  • Proves raw data possession
  • Malleability-resistant digest sorting
  • Solana-optimized with Keccak hashing
  • Pre-allocated memory for performance

🚀 Quick Start

Solve challenge,

use crankx::{solve, CrankXError};

fn main() -> Result<(), CrankXError> {
    let challenge = [0u8; 32];
    let data = [1u8; 64];
    let nonce = [0u8; 8];

    let solution = solve(&challenge, &data, &nonce)?;

    println!("Digest: {:?}", solution.d);
    println!("Difficulty: {}", solution.difficulty());
    Ok(())
}

Verify solution,

use crankx::{verify, CrankXError};

fn main() -> Result<(), CrankXError> {
    let challenge = [0u8; 32];
    let data = [1u8; 64];
    let nonce = [0u8; 8];
    let digest = [0u8; 16];

    verify(&challenge, &data, &nonce, &digest)?;

    println!("Valid!");
    Ok(())
}

Returns Ok() or Err(CrankXError).


🙌 Contributing

Contributions are welcome! Please open issues or PRs on the GitHub repo.

Dependencies

~2–11MB
~112K SLoC