Skip to content

@ethereumjs/ethash v1.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@holgerd77 holgerd77 released this 22 Oct 10:07
· 4978 commits to master since this release
97345b5

ATTENTION: This is a pre-release and only meant to be used for testing purposes.

Do not use in production!

Feedback is extremely welcome, please use the beta.1 Releases feedback issue #923 or our Discord channel.


New Package Name

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

Library Promisification

The Ethash library has been promisified and callbacks have been removed along PR #833 and preceeding 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.

Dual ES5 and ES2017 Builds

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.

Other Changes

  • Updated Block dependency to @ethereumjs/block v3.0.0, PR #883
  • Removed async dependency, PR #779