Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b68724c
feat: Add experimental MPS backend for Apple Silicon
google-labs-jules[bot] Aug 1, 2025
a5ad326
fix: Add Homebrew OpenSSL path for macOS
google-labs-jules[bot] Aug 1, 2025
e28ea7d
fix: Use correct Homebrew OpenSSL path for Apple Silicon
google-labs-jules[bot] Aug 1, 2025
e3e647e
fix(build): Add LDFLAGS to addrgen Makefile
google-labs-jules[bot] Aug 1, 2025
cca96ce
fix(build): Use correct libtorch path for miniconda env
google-labs-jules[bot] Aug 1, 2025
7df7d01
fix(build): Use C++17 standard for PyTorch compatibility
google-labs-jules[bot] Aug 1, 2025
9b81352
fix(build): Add MpsKeySearchDevice to include paths
google-labs-jules[bot] Aug 1, 2025
64a368d
fix(build): Correct library link order for MPS build
google-labs-jules[bot] Aug 1, 2025
c11f815
fix(build): Remove duplicate torch libraries from linker command
google-labs-jules[bot] Aug 1, 2025
24045c8
refactor(build): Explicitly link torch libs in KeyFinder Makefile
google-labs-jules[bot] Aug 1, 2025
751f9f4
fix(build): Address code review feedback for MPS backend
google-labs-jules[bot] Aug 1, 2025
ce980cc
fix(build): Address code review feedback for MPS backend
google-labs-jules[bot] Aug 1, 2025
343d969
fix(build): Remove duplicate torch libraries from KeyFinder Makefile
google-labs-jules[bot] Aug 1, 2025
39468d9
refactor(build): Isolate torch linking to KeyFinder Makefile
google-labs-jules[bot] Aug 1, 2025
deba942
refactor(build): Create dedicated Makefile for MPS backend
google-labs-jules[bot] Aug 1, 2025
abe8da6
fix(build): Add rpath for torch libraries on macOS
google-labs-jules[bot] Aug 1, 2025
8c881ac
fix(build): Define BUILD_MPS when compiling with Makefile.mps
google-labs-jules[bot] Aug 1, 2025
3a2c607
feat(build): Add simplified Makefile for MPS backend
google-labs-jules[bot] Aug 1, 2025
7f0db08
feat: Add experimental Metal backend for Apple Silicon
google-labs-jules[bot] Aug 1, 2025
74b9d33
feat(build): Add Makefile for Metal backend
google-labs-jules[bot] Aug 1, 2025
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
2 changes: 1 addition & 1 deletion AddrGen/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CPPSRC:=$(wildcard *.cpp)

all:
${CXX} -o addrgen.bin ${CPPSRC} ${INCLUDE} -I${CUDA_INCLUDE} ${CXXFLAGS} ${LIBS} -laddressutil -lsecp256k1 -lcryptoutil -lsecp256k1 -lutil -lcmdparse
${CXX} -o addrgen.bin ${CPPSRC} ${INCLUDE} -I${CUDA_INCLUDE} ${CXXFLAGS} ${LDFLAGS} ${LIBS} -laddressutil -lsecp256k1 -lcryptoutil -lsecp256k1 -lutil -lcmdparse
mkdir -p $(BINDIR)
cp addrgen.bin $(BINDIR)/addrgen

Expand Down
21 changes: 21 additions & 0 deletions KeyFinder/DeviceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
#include "clutil.h"
#endif

#ifdef BUILD_METAL
#include "MetalKeySearchDevice.h"
#include <Metal/Metal.hpp>
#endif

std::vector<DeviceManager::DeviceInfo> DeviceManager::getDevices()
{
int deviceId = 0;
Expand Down Expand Up @@ -57,5 +62,21 @@ std::vector<DeviceManager::DeviceInfo> DeviceManager::getDevices()
}
#endif

#ifdef BUILD_METAL
MTL::Device* device = MTL::CreateSystemDefaultDevice();
if(device) {
DeviceManager::DeviceInfo devInfo;
devInfo.name = device->name()->utf8String();
devInfo.type = DeviceType::Metal;
devInfo.id = deviceId;
devInfo.physicalId = 0;
devInfo.memory = device->recommendedMaxWorkingSetSize();
devInfo.computeUnits = 0;
devices.push_back(devInfo);
deviceId++;
device->release();
}
#endif

return devices;
}
3 changes: 2 additions & 1 deletion KeyFinder/DeviceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class DeviceType {
public:
enum {
CUDA = 0,
OpenCL
OpenCL,
Metal
};
};

Expand Down
6 changes: 6 additions & 0 deletions KeyFinder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ ifeq ($(BUILD_OPENCL),1)
mkdir -p $(BINDIR)
cp clKeyFinder.bin $(BINDIR)/clBitCrack
endif
ifeq ($(BUILD_METAL),1)
${CXX} -DBUILD_METAL -o metalKeyFinder.bin ${CPPSRC} ${INCLUDE} ${CXXFLAGS} ${LDFLAGS} ${LIBS} -lkeyfinder -laddressutil -lsecp256k1 -lcryptoutil -lsecp256k1 -lMetalKeySearchDevice -llogger -lutil -lcmdparse
mkdir -p $(BINDIR)
cp metalKeyFinder.bin $(BINDIR)/metalBitCrack
endif

clean:
rm -rf cuKeyFinder.bin
rm -rf clKeyFinder.bin
rm -rf metalKeyFinder.bin
10 changes: 10 additions & 0 deletions KeyFinder/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include "CLKeySearchDevice.h"
#endif

#ifdef BUILD_METAL
#include "MetalKeySearchDevice.h"
#endif

typedef struct {
// startKey is the first key. We store it so that if the --continue
// option is used, the correct progress is displayed. startKey and
Expand Down Expand Up @@ -251,6 +255,12 @@ static KeySearchDevice *getDeviceContext(DeviceManager::DeviceInfo &device, int
}
#endif

#ifdef BUILD_METAL
if(device.type == DeviceManager::DeviceType::Metal) {
return new MetalKeySearchDevice(device.id, pointsPerThread);
}
#endif

return NULL;
}

Expand Down
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

CUR_DIR=$(shell pwd)
DIRS=util AddressUtil CmdParse CryptoUtil KeyFinderLib CLKeySearchDevice CudaKeySearchDevice cudaMath clUtil cudaUtil secp256k1lib Logger embedcl
DIRS=util AddressUtil CmdParse CryptoUtil KeyFinderLib CLKeySearchDevice CudaKeySearchDevice MetalKeySearchDevice cudaMath clUtil cudaUtil secp256k1lib Logger embedcl

INCLUDE = $(foreach d, $(DIRS), -I$(CUR_DIR)/$d)

Expand All @@ -11,6 +11,7 @@ LIBS+=-L$(LIBDIR)
# C++ options
CXX=g++
CXXFLAGS=-O2 -std=c++11
LDFLAGS=

# CUDA variables
COMPUTE_CAP=86
Expand Down Expand Up @@ -41,6 +42,7 @@ export OPENCL_LIB
export OPENCL_INCLUDE
export BUILD_OPENCL
export BUILD_CUDA
export BUILD_METAL

TARGETS=dir_addressutil dir_cmdparse dir_cryptoutil dir_keyfinderlib dir_keyfinder dir_secp256k1lib dir_util dir_logger dir_addrgen

Expand All @@ -53,6 +55,13 @@ ifeq ($(BUILD_OPENCL),1)
CXXFLAGS:=${CXXFLAGS} -DCL_TARGET_OPENCL_VERSION=${OPENCL_VERSION}
endif

ifeq ($(BUILD_METAL),1)
TARGETS:=${TARGETS} dir_metalKeySearchDevice
CXX=clang++
CXXFLAGS+=-std=c++17 -Wno-unused-parameter
LDFLAGS+=-framework Metal -framework Foundation
endif

all: ${TARGETS}

dir_cudaKeySearchDevice: dir_keyfinderlib dir_cudautil dir_logger
Expand All @@ -61,6 +70,9 @@ dir_cudaKeySearchDevice: dir_keyfinderlib dir_cudautil dir_logger
dir_clKeySearchDevice: dir_embedcl dir_keyfinderlib dir_clutil dir_logger
make --directory CLKeySearchDevice

dir_metalKeySearchDevice: dir_keyfinderlib dir_logger
make --directory MetalKeySearchDevice

dir_embedcl:
make --directory embedcl

Expand All @@ -86,6 +98,10 @@ ifeq ($(BUILD_OPENCL),1)
KEYFINDER_DEPS:=$(KEYFINDER_DEPS) dir_clKeySearchDevice
endif

ifeq ($(BUILD_METAL),1)
KEYFINDER_DEPS:=$(KEYFINDER_DEPS) dir_metalKeySearchDevice
endif

dir_keyfinder: $(KEYFINDER_DEPS)
make --directory KeyFinder

Expand Down
50 changes: 50 additions & 0 deletions Makefile.metal
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Makefile for building the Metal backend on macOS

# Compiler
CXX=clang++

# Directories
CUR_DIR=$(shell pwd)
LIBDIR=$(CUR_DIR)/lib
BINDIR=$(CUR_DIR)/bin

# Source directories
DIRS=util AddressUtil CmdParse CryptoUtil KeyFinderLib MetalKeySearchDevice secp256k1lib Logger

# Include paths
INCLUDE = $(foreach d, $(DIRS), -I$(CUR_DIR)/$d)
INCLUDE += -I/opt/homebrew/opt/openssl/include

# C++ flags
CXXFLAGS=-O2 -std=c++17 -Wno-unused-parameter -DBUILD_METAL

# Linker flags
LDFLAGS=-L/opt/homebrew/opt/openssl/lib -L${LIBDIR} -framework Metal -framework Foundation

# Libraries
LIBS=-lkeyfinder -laddressutil -lsecp256k1 -lcryptoutil -lMetalKeySearchDevice -llogger -lutil -lcmdparse -lcrypto

# Source files
SRCS = $(wildcard util/*.cpp) \
$(wildcard AddressUtil/*.cpp) \
$(wildcard CmdParse/*.cpp) \
$(wildcard CryptoUtil/*.cpp) \
$(wildcard KeyFinderLib/*.cpp) \
$(wildcard MetalKeySearchDevice/*.cpp) \
$(wildcard secp256k1lib/*.cpp) \
$(wildcard Logger/*.cpp) \
KeyFinder/main.cpp \
KeyFinder/ConfigFile.cpp \
KeyFinder/DeviceManager.cpp

# Target
all: metalBitCrack

metalBitCrack:
mkdir -p ${BINDIR}
${CXX} -o ${BINDIR}/metalBitCrack ${SRCS} ${INCLUDE} ${CXXFLAGS} ${LDFLAGS} ${LIBS}

clean:
rm -rf ${BINDIR}

.PHONY: all clean
12 changes: 12 additions & 0 deletions MetalKeySearchDevice/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.PHONY: all clean

SRC=$(wildcard *.cpp)
OBJS=$(SRC:.cpp=.o)

all: ${OBJS}

%.o: %.cpp
${CXX} -c $< -o $@ ${INCLUDE} ${CXXFLAGS}

clean:
rm -rf *.o
127 changes: 127 additions & 0 deletions MetalKeySearchDevice/MetalKeySearchDevice.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#include "MetalKeySearchDevice.h"
#include "Logger.h"
#include "util.h"
#include <fstream>
#include <iostream>

MetalKeySearchDevice::MetalKeySearchDevice(int deviceId, uint64_t keysPerStep) {
_device = MTL::CreateSystemDefaultDevice();
if(!_device) {
throw KeySearchException("Failed to create Metal device");
}

_commandQueue = _device->newCommandQueue();
if(!_commandQueue) {
throw KeySearchException("Failed to create Metal command queue");
}

std::string source = util::readTextFile("MetalKeySearchDevice/keysearch.metal");
if(source.empty()) {
throw KeySearchException("Failed to read metal kernel file");
}

NS::Error* error = nullptr;
_library = _device->newLibrary(NS::String::string(source.c_str(), NS::UTF8StringEncoding), nullptr, &error);
if(!_library) {
throw KeySearchException("Failed to create Metal library: " + std::string(error->localizedDescription()->utf8String()));
}

_function = _library->newFunction(NS::String::string("generate_public_key", NS::UTF8StringEncoding));
if(!_function) {
throw KeySearchException("Failed to create Metal function");
}

_pipelineState = _device->newComputePipelineState(_function, &error);
if(!_pipelineState) {
throw KeySearchException("Failed to create Metal pipeline state: " + std::string(error->localizedDescription()->utf8String()));
}

this->_keysPerStep = keysPerStep;
Logger::log(LogLevel::Info, "MetalKeySearchDevice created");
}

MetalKeySearchDevice::~MetalKeySearchDevice() {
_pipelineState->release();
_function->release();
_library->release();
_commandQueue->release();
_device->release();
Logger::log(LogLevel::Info, "MetalKeySearchDevice destroyed");
}

void MetalKeySearchDevice::init(const secp256k1::uint256 &start, int compression, const secp256k1::uint256 &stride) {
this->_startKey = start;
this->_compression = compression;
this->_stride = stride;
Logger::log(LogLevel::Info, "MetalKeySearchDevice initialized");
}

void MetalKeySearchDevice::doStep() {
// Create buffers
MTL::Buffer* privateKeysBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysXBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysYBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);

// Generate private keys
uint256_t* privateKeys = (uint256_t*)privateKeysBuffer->contents();
for (uint64_t i = 0; i < _keysPerStep; i++) {
privateKeys[i] = _startKey + _stride * i;
}
Comment on lines +61 to +69
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Type mismatch: use secp256k1::uint256 instead of uint256_t

The code uses uint256_t which doesn't match the Metal shader's struct definition. The private key arithmetic should use secp256k1::uint256 and properly handle the conversion to the shader's format.

The buffer allocation and private key generation need to be rewritten to:

  1. Define a proper struct matching the Metal shader's uint256_t
  2. Convert from secp256k1::uint256 to the shader format
  3. Ensure proper memory layout compatibility
+    // Define struct matching Metal shader
+    struct metal_uint256_t {
+        uint32_t v[8];
+    };
+
     // Create buffers
-    MTL::Buffer* privateKeysBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
-    MTL::Buffer* publicKeysXBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
-    MTL::Buffer* publicKeysYBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
+    MTL::Buffer* privateKeysBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);
+    MTL::Buffer* publicKeysXBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);
+    MTL::Buffer* publicKeysYBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);

     // Generate private keys
-    uint256_t* privateKeys = (uint256_t*)privateKeysBuffer->contents();
+    metal_uint256_t* privateKeys = (metal_uint256_t*)privateKeysBuffer->contents();
     for (uint64_t i = 0; i < _keysPerStep; i++) {
-        privateKeys[i] = _startKey + _stride * i;
+        secp256k1::uint256 key = _startKey + _stride * i;
+        // Convert secp256k1::uint256 to metal_uint256_t
+        for (int j = 0; j < 8; j++) {
+            privateKeys[i].v[j] = key.v[j];
+        }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MTL::Buffer* privateKeysBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysXBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysYBuffer = _device->newBuffer(_keysPerStep * sizeof(uint256_t), MTL::ResourceStorageModeShared);
// Generate private keys
uint256_t* privateKeys = (uint256_t*)privateKeysBuffer->contents();
for (uint64_t i = 0; i < _keysPerStep; i++) {
privateKeys[i] = _startKey + _stride * i;
}
// Define struct matching Metal shader
struct metal_uint256_t {
uint32_t v[8];
};
// Create buffers
MTL::Buffer* privateKeysBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysXBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);
MTL::Buffer* publicKeysYBuffer = _device->newBuffer(_keysPerStep * sizeof(metal_uint256_t), MTL::ResourceStorageModeShared);
// Generate private keys
metal_uint256_t* privateKeys = (metal_uint256_t*)privateKeysBuffer->contents();
for (uint64_t i = 0; i < _keysPerStep; i++) {
secp256k1::uint256 key = _startKey + _stride * i;
// Convert secp256k1::uint256 to metal_uint256_t
for (int j = 0; j < 8; j++) {
privateKeys[i].v[j] = key.v[j];
}
}
🤖 Prompt for AI Agents
In MetalKeySearchDevice/MetalKeySearchDevice.cpp around lines 61 to 69, replace
the use of uint256_t with secp256k1::uint256 for private key arithmetic to match
the Metal shader's struct definition. Define a struct that matches the shader's
uint256_t layout, convert each secp256k1::uint256 private key to this struct
format before storing it in the buffer, and ensure the buffer memory layout
aligns with the shader expectations for correct data interpretation.


// Create a command buffer
MTL::CommandBuffer* commandBuffer = _commandQueue->commandBuffer();
MTL::ComputeCommandEncoder*- commandEncoder = commandBuffer->computeCommandEncoder();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix syntax error in variable declaration

There's a syntax error with an errant dash character in the variable name.

-    MTL::ComputeCommandEncoder*- commandEncoder = commandBuffer->computeCommandEncoder();
+    MTL::ComputeCommandEncoder* commandEncoder = commandBuffer->computeCommandEncoder();
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
MTL::ComputeCommandEncoder*- commandEncoder = commandBuffer->computeCommandEncoder();
MTL::ComputeCommandEncoder* commandEncoder = commandBuffer->computeCommandEncoder();
🤖 Prompt for AI Agents
In MetalKeySearchDevice/MetalKeySearchDevice.cpp at line 73, the variable
declaration for commandEncoder contains an incorrect dash character before the
variable name. Remove the dash so that the declaration correctly reads as a
pointer to MTL::ComputeCommandEncoder named commandEncoder without any
extraneous characters.


// Set pipeline state and buffers
commandEncoder->setComputePipelineState(_pipelineState);
commandEncoder->setBuffer(privateKeysBuffer, 0, 0);
commandEncoder->setBuffer(publicKeysXBuffer, 0, 1);
commandEncoder->setBuffer(publicKeysYBuffer, 0, 2);

// Dispatch the kernel
MTL::Size gridSize = MTL::Size(_keysPerStep, 1, 1);
NS::UInteger threadGroupSize = _pipelineState->maxTotalThreadsPerThreadgroup();
if (threadGroupSize > _keysPerStep) {
threadGroupSize = _keysPerStep;
}
MTL::Size threadgroupSize = MTL::Size(threadGroupSize, 1, 1);
commandEncoder->dispatchThreads(gridSize, threadgroupSize);

// End encoding and commit the command buffer
commandEncoder->endEncoding();
commandBuffer->commit();
commandBuffer->waitUntilCompleted();

// TODO: Read results and check for matches

// Clean up
privateKeysBuffer->release();
publicKeysXBuffer->release();
publicKeysYBuffer->release();

_startKey = _startKey + _stride * _keysPerStep;
}

void MetalKeySearchDevice::setTargets(const std::set<KeySearchTarget> &targets) {
}

size_t MetalKeySearchDevice::getResults(std::vector<KeySearchResult> &results) {
return 0;
}

uint64_t MetalKeySearchDevice::keysPerStep() {
return 0;
}
Comment on lines +112 to +114
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Return actual keys per step value

The method returns 0 instead of the stored _keysPerStep value.

 uint64_t MetalKeySearchDevice::keysPerStep() {
-    return 0;
+    return _keysPerStep;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uint64_t MetalKeySearchDevice::keysPerStep() {
return 0;
}
uint64_t MetalKeySearchDevice::keysPerStep() {
return _keysPerStep;
}
🤖 Prompt for AI Agents
In MetalKeySearchDevice/MetalKeySearchDevice.cpp at lines 112 to 114, the
keysPerStep() method incorrectly returns 0 instead of the actual stored value.
Modify the method to return the member variable _keysPerStep instead of 0 to
reflect the correct number of keys per step.


std::string MetalKeySearchDevice::getDeviceName() {
return "Metal Key Search Device";
}

void MetalKeySearchDevice::getMemoryInfo(uint64_t &freeMem, uint64_t &totalMem) {
freeMem = 0;
totalMem = 0;
}

secp256k1::uint256 MetalKeySearchDevice::getNextKey() {
return secp256k1::uint256(0);
}
35 changes: 35 additions & 0 deletions MetalKeySearchDevice/MetalKeySearchDevice.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#ifndef _METAL_KEY_SEARCH_DEVICE_H
#define _METAL_KEY_SEARCH_DEVICE_H

#include "KeySearchDevice.h"
#include <Metal/Metal.hpp>

class MetalKeySearchDevice : public KeySearchDevice {
private:
MTL::Device* _device;
MTL::CommandQueue* _commandQueue;
MTL::Library* _library;
MTL::Function* _function;
MTL::ComputePipelineState* _pipelineState;

secp256k1::uint256 _startKey;
secp256k1::uint256 _stride;
int _compression;
std::vector<KeySearchTarget> _targets;
uint64_t _keysPerStep;

public:
MetalKeySearchDevice(int deviceId, uint64_t keysPerStep);
virtual ~MetalKeySearchDevice();

virtual void init(const secp256k1::uint256 &start, int compression, const secp256k1::uint256 &stride);
virtual void doStep();
virtual void setTargets(const std::set<KeySearchTarget> &targets);
virtual size_t getResults(std::vector<KeySearchResult> &results);
virtual uint64_t keysPerStep();
virtual std::string getDeviceName();
virtual void getMemoryInfo(uint64_t &freeMem, uint64_t &totalMem);
virtual secp256k1::uint256 getNextKey();
};

#endif
Loading