Skip to content

AstrolabDAO/createXcrunch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

createXcrunch (WebGPU Fork)

👮‍♂️ Sanity checks License: MIT

This is a divergent fork of the original createXcrunch that uses WebGPU instead of OpenCL to enable cross-platform support. The original OpenCL implementation had compatibility issues with AMD GPUs, Metal-based MacOS, and DirectX-based Windows systems.

createXcrunch is a Rust-based program designed to efficiently find zero-leading, zero-containing, or pattern-matching addresses for the CreateX contract factory using GPU acceleration.

Key Improvements in this Fork

  • Cross-platform compatibility - Works consistently across NVIDIA, AMD, Intel GPUs
  • Native support for macOS - Uses Metal backend on Apple Silicon and Intel Macs
  • Improved Windows support - No dependency on specific GPU vendor drivers
  • Enhanced pattern matching - Support for complex patterns like "ABCD...EF"
  • Optimized performance - Efficient batch processing of results

Installation

  1. Clone the Repository
git clone <your-repository-url>
cd contracts/tools/createXcrunch
  1. Build the Project
cargo build --release

Example Setup on Vast.ai

Update Linux

sudo apt update && sudo apt upgrade

Install build-essential Packages

We need the GNU Compiler Collection (GCC) later.

sudo apt install build-essential

Install CUDA Toolkit

createXcrunch uses OpenCL which is natively supported via the NVIDIA OpenCL extensions.

sudo apt install nvidia-cuda-toolkit

Install Rust

Enter 1 to select the default option and press the Enter key to continue the installation. Restart the current shell after completing the installation.

curl https://sh.rustup.rs -sSf | sh

Build createXcrunch

git clone https://github.com/HrikB/createXcrunch.git
cd createXcrunch
cargo build --release

🎉 Congrats, now you're ready to crunch your salt(s)!

Usage

./target/release/createxcrunch create3 --caller 0x88c6C46EBf353A52Bdbab708c23D0c81dAA8134A --matching ABCD...EF

You can specify different pattern types:

  • Simple leading pattern: BB
  • Multiple repeating bytes: BBBB
  • Complex patterns with prefix and suffix: ABCD...EF

Use the --help flag for a full overview of all features:

./target/release/createxcrunch create3 --help

Local Development

We recommend using cargo-nextest as test runner for this repository. To install it on a Linux x86_64 machine, invoke:

curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

Afterwards you can run the tests via:

cargo nextest run

Contributions

PRs welcome!

Acknowledgements

Pattern Matching

This fork enhances the pattern matching capabilities with support for complex patterns:

  • Leading patterns: Find addresses starting with specific hex values
  • Trailing patterns: Find addresses ending with specific hex values
  • Complex patterns: Use the format PREFIX...SUFFIX to find addresses that match both criteria

Example patterns:

  • BB - Addresses starting with the byte value 0xBB
  • BBBB - Addresses starting with multiple 0xBB bytes
  • CAFE...42 - Addresses starting with 0xCAFE and ending with 0x42

About

Astrolab Create3 Salt Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 86.4%
  • WGSL 12.0%
  • Python 1.2%
  • Shell 0.4%