Git Product home page Git Product logo

equihash-x's Introduction

equihash-xenon

Equihash proof-of-work solvers

cd Linux/demo
make
./solver_avx2

API:

#define CONTEXT_SIZE 178033152
Application should allocate CONTEXT_SIZE bytes of memory as context for the solver. Memory alignment should be 4096. Failure to align by 32 will cause general protection exception.
Multiple threads can be launched with separate context to solve multiple instances of equihash.
Consider allocating HugePage (2MiB) for performance.

void EhPrepare(void *context, void *input);
EhPrepare takes in 136 bytes of input. The remaining 4 bytes of input is fed as nonce to EhSolver.
EhPrepare saves midstate in context, EhSolver can then be called repeatedly with different nonce.
context does not need to be initialized by the caller.

int32_t EhSolver(void *context, uint32_t nonce);
Conversion between uint32_t nonce and the byte array of block header is little endian byte order.
nonce = *(uint32_t *)(inputheader+136);
Return value is the number of solutions.
First solution is located at context byte 0.
Second solution is located at context byte 1344.
And so on.

equihash-x's People

Contributors

xenoncat avatar kost avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.