All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog (modification: no type change headlines) and this project adheres to Semantic Versioning.
There is now a new simple CPU miner added to the Ethash
package which can be used for testing purposes.
See the following example on how to use the new Miner
class:
import { Block } from '@ethereumjs/block'
import Ethash from '@ethereumjs/ethash'
import Common from '@ethereumjs/common'
import { BN } from 'ethereumjs-util'
const level = require('level-mem')
const cacheDB = level()
const block = Block.fromBlockData({
header: {
difficulty: new BN(100),
number: new BN(1),
},
})
const e = new Ethash(cacheDB)
const miner = e.getMiner(block.header)
const solution = await miner.iterate(-1) // iterate until solution is found
Source files from the src
folder are now included in the distribution build, see PR #1301. This allows for a better debugging experience in debug tools like Chrome DevTools by having working source map references to the original sources available for inspection.
Attention! This new version is part of a series of EthereumJS releases all moving to a new scoped package name format. In this case the library is renamed as follows:
ethashjs
->@ethereumjs/ethash
Please update your library references accordingly or install with:
npm i @ethereumjs/ethash
The Ethash
library has been promisified and callbacks have been removed along PR #833 and preceding PR #779.
Old API:
ethash.verifyPOW(validblock, (result) => {
console.log(result)
})
New API:
const result = await ethash.verifyPOW(validBlock)
console.log(result) // => true
See Ethash
README for a complete example.
We significantly updated our internal tool and CI setup along the work on PR #913 with an update to ESLint
from TSLint
for code linting and formatting and the introduction of a new build setup.
Packages now target ES2017
for Node.js builds (the main
entrypoint from package.json
) and introduce a separate ES5
build distributed along using the browser
directive as an entrypoint, see PR #921. This will result in performance benefits for Node.js consumers, see here for a releated discussion.
This is the first release candidate towards a final library release, see beta.1 release notes for an overview on the full changes since the last publicly released version.
No changes since beta.1
release.
Attention! This new version is part of a series of EthereumJS releases all moving to a new scoped package name format. In this case the library is renamed as follows:
ethashjs
->@ethereumjs/ethash
Please update your library references accordingly or install with:
npm i @ethereumjs/ethash
The Ethash
library has been promisified and callbacks have been removed along
PR #833 and preceding PR
#779.
Old API:
ethash.verifyPOW(validblock, (result) => {
console.log(result)
})
New API:
const result = await ethash.verifyPOW(validBlock)
console.log(result) // => true
See Ethash
README
for a complete example.
We significantly updated our internal tool and CI setup along the work on
PR #913 with an update to ESLint
from TSLint
for code linting and formatting and the introduction of a new build setup.
Packages now target ES2017
for Node.js builds (the main
entrypoint from package.json
) and introduce
a separate ES5
build distributed along using the browser
directive as an entrypoint, see
PR #921. This will result
in performance benefits for Node.js consumers, see here for a releated discussion.
0.0.8 - 2020-05-27
This is a maintenance release with dependency updates, CI improvements, and some code modernization.
Changes from PR #23:
- Upgraded CI from travis to GH Actions
- Node versions tested updated from [4, 5] to [10, 12, 13, 14]
- Upgraded dev deps (ethereumjs-block, nyc, standard)
- Added
ethash_tests.json
to test dir and removes ethereumjs-testing dep - Use single imports for ethereumjs-util, upgrades to v7.0.2
- Modernizes buffer init syntax
Further/preceding dependency updates in PR #19, PR #11, PR #8 and PR #7