crankx

Crates.iocrankx
lib.rscrankx
version0.2.2
created_at2025-04-23 15:52:25.051412+00
updated_at2025-04-23 17:02:57.522095+00
descriptionYour data, permanently recorded β€” uncensorable, uneditable, and here for good.
homepagehttps://tapedrive.io
repositoryhttps://github.com/tapedrive-io/crankx
max_upload_size
id1645892
size62,554
(zfedoran)

documentation

https://docs.rs/crankx/latest/crankx/

README

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.

Commit count: 8

cargo fmt