ethereumjs / Ethashjs
Licence: mpl-2.0
Project is in active development and has been moved to the EthereumJS VM monorepo.
Stars: ✭ 52
Programming Languages
javascript
184084 projects - #8 most used programming language
Labels
Projects that are alternatives of or similar to Ethashjs
0x Tracker Client
React single page application which powers the frontend of 0x Tracker
Stars: ✭ 49 (-5.77%)
Mutual labels: ethereum
Scaffold Eth
🏗 forkable Ethereum dev stack focused on fast product iterations
Stars: ✭ 1,017 (+1855.77%)
Mutual labels: ethereum
Solidity
🔐 Ethereum smart contracts developed for the Hanzo Platform.
Stars: ✭ 46 (-11.54%)
Mutual labels: ethereum
Trace
Supply chain transparency platform proof-of-concept based on the Ethereum blockchain ✍️
Stars: ✭ 52 (+0%)
Mutual labels: ethereum
Homework
HomeWork is an autonomous utility for finding, sharing and reusing home addresses for contracts.
Stars: ✭ 50 (-3.85%)
Mutual labels: ethereum
Cryptex
Gemini, GDAX, Bitfinex, Poloniex, Binance, Kraken, Cryptopia, Koinex, BitGrail and CoinMarketCap cryptocurrency exchange API clients in Swift / iOS SDK. Check prices and account balances using Sample iOS app.
Stars: ✭ 51 (-1.92%)
Mutual labels: ethereum
Mydicebot.github.io
★MyDiceBot★ - Ultimate Bitcoin Dice Bot. Bet More, Earn More!
Stars: ✭ 48 (-7.69%)
Mutual labels: ethereum
Presale Token
main smart-contract and crowdsale application
Stars: ✭ 49 (-5.77%)
Mutual labels: ethereum
Ethereumbook
Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood
Stars: ✭ 11,663 (+22328.85%)
Mutual labels: ethereum
Aragon Monthly
Aragon Monthly is a community curated monthly digital newspaper about DAOs and the Aragon ecosystem
Stars: ✭ 47 (-9.62%)
Mutual labels: ethereum
Smartwallet App
A decentralized self sovereign identity solution developed by Jolocom.
Stars: ✭ 51 (-1.92%)
Mutual labels: ethereum
Solpp
A solidity preprocessor and flattener CLI and library
Stars: ✭ 44 (-15.38%)
Mutual labels: ethereum
Web3e
Web3E Ethereum for Embedded devices running Arduino framework
Stars: ✭ 50 (-3.85%)
Mutual labels: ethereum
Gdax Python Api
GDAX API written in Python3 using async/await
Stars: ✭ 52 (+0%)
Mutual labels: ethereum
Remix
This has been moved to https://github.com/ethereum/remix-project
Stars: ✭ 1,063 (+1944.23%)
Mutual labels: ethereum
SYNOPSIS
Implements Ethash.
INSTALL
npm install ethashjs
USAGE
const Ethash = require('ethashjs')
const Block = require('ethereumjs-block')
const levelup = require('levelup')
const memdown = require('memdown')
var cacheDB = levelup('', {
db: memdown
})
var ethash = new Ethash(cacheDB)
var validblockRlp =
'f90667f905fba0a8d5b7a4793baaede98b5236954f634a0051842df6a252f6a80492fd888678bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f93c8db1e931daa2e22e39b5d2da6fb4074e3d544094857608536155e3521bc1a0bb7495628f9160ddbcf6354380ee32c300d594e833caec3a428041a66e7bade1a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84559c17b9b9040001020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a09c7b47112a3afb385c12924bf6280d273c106eea7caeaf5131d8776f61056c148876ae05d46b58d1fff866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ba01d2c92cfaeb04e53acdff2b5d42005ff6aacdb0105e64eb8c30c273f445d2782a01e7d50ffce57840360c57d94977b8cdebde614da23e8d1e77dc07928763cfe21c0'
var validblock = new Block(Buffer.from(validblockRlp, 'hex'))
ethash.verifyPOW(validblock, function (result) {
console.log(result)
})
BROWSER
Yep, you can browserify it.
API
new Ethash([cacheDB])
ethash.verifyPOW(block, cb)
ethash.mkcache(cacheSize, seed)
ethash.run(val, nonce, fullsize)
new Ethash([cacheDB])
Creates a new instance of Ethash
.
Parameters
-
cacheDB
- an instance of a levelup db which is used to store the cache(s)
ethash.verifyPOW(block, cb)
Verifies the POW on a block and its uncles
Parameters
-
block
- the block to verify -
cb
- the callback which is given aBoolean
determining the validaty of the block
ethash.mkcache(cacheSize, seed)
Creates a cache. NOTE: this is automatically done for in - ethash.verifyPOW(block, cb)
so you do not need to use this function if you are just validating blocks
Parameters
-
cachSize
- the size of the cach -
seed
- the seed as aBuffer
ethash.run(val, nonce, fullsize)
Runs ethash on a give val/nonce pair. NOTE: you need to run ethash.mkcache(cacheSize, seed)
first before using this function.
Parameters
-
val
- value to run ethash on e.g. the header hash -
nonce
- the nonce used for this hash attempt -
fullsize
- the fullsize of the cache.
Returns
An Object
containing:
-
hash
- the hash of the value -
mix
- the mis result
TESTS
npm test
LICENSE
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].