Coder Social home page Coder Social logo

powkit's Introduction

Proof of Work Algorithms

Go Test PkgGoDev

Overview

Note: This library is still in active development and is subject to breaking changes

Even though there are a wide variety of Proof of Work algorithms, finding the technical details for the implementations is quite a task. For example, both Kawpow and Firopow are variations off of ProgPow but finding the exact differences is painful. This is meant to be a unified library to make the specification of existing Proof of Work algorithms more standardized.

All DAG-based algorithms only implement a light DAG, which is sufficient for validation but not full nodes or miners. For the DAG-based algorithms, data is cached in ~/.powcache. Ethash will generally be between 40-80Mb per epoch (and generally 3 caches are stored). At the time of writing, running make test will throw about 800Mb of data into ~/.powcache due to the variety and breadth of tests.

Algorithms

Algorithm DAG Supported
Ethash yes yes
Etchash yes yes
Kawpow yes yes
Firopow yes yes
Octopus yes yes
Equihash no yes
HeavyHash no yes
Autolykos2 no yes
Cuckoo Cycle no yes
Eaglesong no yes
BeamHashIII no yes
ZelHash no yes
Cortex no yes

Things to Note

  • Most of these algorithms are partially optimized but I'm sure they could be improved. That being said, that will probably never happen since these have never been intended to be used for miner clients. All of these algorithms far surpass a reasonable threshold for performance and I have no intention of hypertuning them.
  • The base ProgPow implementation ("ProgPow094") exists in the internal/progpow package.
  • Since ZelHash is such a minor Equihash variant, it is treated as just "twisted Equihash" (in equihash/).
  • All testing is done on linux, windows support is hazy at best.
  • The library assumes the host architecture is little-endian, I'm fairly confident big-endian architectures will not function properly.
  • As of now, the only other algorithms that are on the list of "maybes" are: cryptonight, randomx, X25X, and cuckatoo.

Roadmap

Currently, though powkit is used in production internally, it probably isn't a good idea to use yourself. The API is still in flux and each minor version will probably be breaking. Once we do a v1.0.0 release, the structure will probably be pretty set in stone.

References

powkit's People

Contributors

nottug 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.