Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ethereumjs-block

ethereumjs1.1mMPL-2.0deprecated2.2.2

New package name format for new versions: @ethereumjs/block. Please update.

Provides Block serialization and help functions

ethereum, block

readme

SYNOPSIS

NPM Package Build Status Coverage Status Gitter or #ethereumjs on freenode

js-standard-style

Implements schema and functions related to Ethereum's block.

INSTALL

npm install ethereumjs-block

BROWSER

This module work with browserify.

API

./docs

TESTING

Tests in the tests directory are partly outdated and testing is primarily done by running the BlockchainTests from within the ethereumjs-vm repository.

Relevant test folders:

  • bcTotalDifficultyTest
  • TODO

LICENSE

MPL-2.0

changelog

Changelog

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.

2.2.2 - 2019-12-17

MuirGlacier support by updating to the new difficulty formula as stated in EIP-2384.

Please note that this release does not contain all the changes merged into master since the v2.2.0 release and only backports the difficulty formula adjustments to support MuirGlacier without having to go through migration to the v3.0.0 which contains breaking changes.

2.2.1 - 2019-11-14

Istanbul support by updating to the most recent ethereumjs-tx version v2.1.1.

Please note that this release does not contain all the changes merged into master since the v2.2.0 release and only backports the most recent ethereumjs-tx version to allow users to support Istanbul without having to go through migration to the v3.0.0 which contains breaking changes.

2.2.0 - 2019-02-06

Petersburg (aka constantinopleFix) as well as Goerli support/readiness by updating to a supporting ethereumjs-common version v1.1.0, PR #64

Other Changes:

  • Fixed package size issue by excluding tests and docs from being included in the package, PR #66
  • Error message fixes in index.js, PR #62
  • Replace uses of deprecated new Buffer with Buffer.from, PR #60
  • Remove ethereumjs-testing dependency (much smaller dev dependencies), PR #61

2.1.0 - 2018-10-19

  • Constantinople support, added difficulty bomb delay (EIP-1234), PR #54
  • Updated test data, added Constantinople tests, PR #56, #57
  • Added timestamp field to setGenesisParams(), PR #52

2.0.1 - 2018-08-08

  • Fixes BlockHeader.prototype.validate() bug, see PR #49

2.0.0 - 2018-06-25

This release introduces both support for different chains (mainnet, ropsten, ...) and hardforks up to the latest applied HF (byzantium). Parameters and genesis values are provided by the new ethereumjs-common library which also defines the set of supported chains and forks.

Changes in detail:

  • New initialization parameters opts.chain (default: mainnet) and opts.hardfork (default: null, block number-based behaviour), PR #44
  • Alternatively a Common class object can be provided directly with the opts.common parameter, see API docs
  • Correct block validation for all know hardforks, PR #47, if no hardfork is set validation logic is determined by block number in combination with the chain set
  • Genesis block initialization depending on the chain set (see ethereumjs-common for supported chains)
  • Extensive test additions to cover the newly introduced capabilities and changes
  • Fix default value for nonce (empty buffer -> <Buffer 00 00 00 00 00 00 00 00>), PR #42

1.7.1 - 2018-02-15

  • Fix browserify issue blocking updates for packages depending on ethereumjs-block library, PR #40
  • Updated ethereumjs/common dependency, PR #38

1.7.0 - 2017-10-11

  • Metro-Byzantium compatible
  • New difficulty formula (EIP 100)
  • Difficulty bomb delay (EIP 649)
  • Removed isHomestead, isHomesteadReprice from API methods

1.6.0 - 2017-07-12

  • Breakout header-from-rpc as separate module

1.5.1 - 2017-06-04

  • Dev dependency updates
  • BN for gas limit

Older releases: