Releases: ethereumjs/ethereumjs-monorepo
@ethereumjs/blockchain v5.0.0-beta.2
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
Releases feedback issue #923 or our Discord channel.
This is the second beta release towards a final library release, see beta.1 release notes for an overview on the full changes since the last publicly released version.
This release introduces new breaking changes, so please carefully read the additional release note sections!
Safe Static Constructor
The library now has an additional safe static constructor Blockchain.create()
which awaits the init method and throws if the init method throws:
const common = new Common({ chain: 'ropsten' })
const blockchain = await Blockchain.create({ common })
This is the new recommended way to instantiate a Blockchain
object, see PR #930.
Refactored Genesis Block Handling Mechanism
Genesis handling has been reworked to now be safer and reduce the risk of wiping a blockchain by setting a new genesis, see PR #930.
Breaking: The dedicated setGenesisBlock()
methods and the optional isGenesis
option on Blockchain.putBlock()
have been removed. Instead the genesis block is created on initialization either from the Common
library instance passed or a custom genesis block passed along with the genesisBlock
option. If a custom genesis block is used, this custom block now always has to be passed along on Blockchain
initialization, also when operating on an already existing DB.
Changes and Refactoring
- Refactored
DBManager
with the introduction of an abstract DB operation handling mechanism, if you have modifiedDBManager
in your code this will be a potentially breaking change for you, PR #927 - Renaming of internal variables like
Blockchain._headBlock
, if you are using these variables in your code this will be a potentially breaking change for you, PR #930 - Made internal
_
methods like_saveHeads()
private, if you are using these functions in your code this will be a potentially breaking change for you, PR #930 - Improved code documentation, PR #930
- Fixed potential blockchain DB concurrency issues along PR #930
Testing and CI
- Dedicated
blockchain
reorg test setup and executable test, PR #926 - Breaking:
validatePow
option has been renamed tovalidateConsensus
to prepare for a future integration of non-PoW (PoA) consensus mechanisms,validateConsensus
as well asvalidateBlocks
options now throw when set totrue
for validation on a non-PoW chain (determined byCommon
, e.g. 'goerli'), see PR #937
@ethereumjs/block v3.0.0-beta.2
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
Releases feedback issue #923 or our Discord channel.
This is the second beta release towards a final library release, see beta.1 release notes for an overview on the full changes since the last publicly released version.
- Added
freeze
option to allow for block freeze deactivation (e.g. to allow for subclassing block and adding additional parameters), see PR #941 - Breaking: Difficulty-depending methods
canonicalDifficulty()
andvalidateDifficulty()
in block and header now throw on non-PoW chains, see PR #937 - Breaking: Non-blockchain dependent validation checks have been extracted from
validate()
to its ownBlock.validateData()
function. For thevalidate()
method in block and headerblockchain
is now a mandatory parameter, see PR #942 - Fixed bug where block options have not been passed on to the main constructor from the static factory methods, see PR #941
@ethereumjs/vm v5.0.0-beta.1
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:
ethereumjs-vm
->@ethereumjs/vm
Please update your library references accordingly or install with:
npm i @ethereumjs/vm
Support for all current Hardforks / HF API Changes
This is the first release of the VM which supports all hardforks currently applied on mainnet starting with the support of the Frontier HF rules all along up to MuirGlacier. 🎉
The following HFs have been added:
- Spurious Dragon, PR #791
- Tangerine Whistle, PR #807
- DAO, PR #843
- Homestead, PR #815
- Frontier, PR #828
A VM with the specific HF rules (on the chain provided) can be instantiated by passing in a Common
instance:
import VM from '@ethereumjs/vm'
import Common from '@ethereumjs/common'
const common = new Common({ chain: 'mainnet', hardfork: 'spuriousDragon' })
const vm = new VM({ common })
Breaking: The default HF from the VM has been updated from petersburg
to instanbul
. The HF setting is now automatically taken from the HF set for Common.DEAULT_HARDFORK
, see PR #906.
Breaking: Please note that the options to directly pass in chain
and hardfork
strings have been removed to simplify the API. Providing a Common
instance is now the only way to change the chain setup, see PR #863
Berlin HF Support / HF-independent EIPs
This releases adds support for subroutines (EIP-2315
) which gets activated under the berlin
HF setting which can now be used as a hardfork
instantiation option, see PR #754.
Attention! Berlin HF support is still considered experimental and implementations can change on non-major VM releases!
Support for BLS12-381 precompiles (EIP-2537
) is added as an independent EIP implementation - see PR #785 - since there is still an ongoing discussion on taking this EIP in for Berlin or using a more generalized approach on curve computation with the Ethereum EVM (evm384
by the eWASM team).
Another new EIP added is the EIP-2929
with gas cost increases for state access opcodes, see PR #889.
These integrations come along with an API addition to the VM to support the activation of specific EIPs, see PR #856, PR #869 and PR #872.
This API can be used as follows:
import VM from '@ethereumjs/vm'
const vm = new VM({ eips: [2537] })
API Change: New Major Library Versions
The following EthereumJS
libraries which are used within the VM internally and can be passed in on instantiation have been updated to new major versions.
merkle-patricia-tree
v3
(VM optionstate
) ->merkle-patricia-tree
v4
, PR #787ethereumjs-blockchain
v4
->@ethereumjs/blockchain
v5
, PR #833ethereumjs-common
v1
->@ethereumjs/common
v2
Breaking: If you pass in instances of these libraries to the VM please make sure to update these library versions as stated. Please also take a note on the package name changes!
All these libraries are now written in TypeScript
and use promises instead of callbacks for accessing their APIs.
New StateManager Interface / StateManager API Changes
There is now a new TypeScript
interface for the StateManager
, see PR #763. If you are using a custom StateManager
you can use this interface to get better assurance that you are using a StateManager
which conforms with the current StateManager
API and will run in the VM without problems.
The integration of this new interface is highly encouraged since this release also comes with StateManager
API changes. Usage of the old ethereumjs-account package (this package will be retired) has been replaced by the new Account class
from the ethereumjs-util
package. This affects all Account
related StateManager
methods, see PR #911.
The Util package also introduces a new Address class. This class replaces all current Buffer
inputs on StateManager
methods representing an address.
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
Changes and Refactoring
- Group opcodes based upon hardfork, PR #798
- Split opcodes logic into codes, fns, and utils files, PR #896
- Group precompiles based upon hardfork, PR #783
- Breaking: the
step
event now emits anethereumjs-util
Account object instead of an ethereumjs-account (package retired) object - Breaking:
NewContractEvent
now emits anaddress
of typeAddress
(seeethereumjs-util
) instead of aBuffer
, PR #919 - Breaking:
EVMResult
now returns acreatedAddress
of typeAddress
(seeethereumjs-util
) instead of aBuffer
, PR #919 - Breaking:
RunTxResult
now returns acreatedAddress
of typeAddress
(seeethereumjs-util
) instead of aBuffer
, PR #919 - Breaking:
RunCallOpts
now expectsorigin
,caller
andto
inputs to be of typeAddress
(seeethereumjs-util
) instead of aBuffer
, PR #919 - Breaking:
RunCodeOpts
now expectsorigin
,caller
and
address
inputs to be of typeAddress
(seeethereumjs-util
) instead of aBuffer
, PR #919 - Make
memory.ts
use Buffers instead of Arrays, PR #850 - Use
Map
forOpcodeList
andopcode
handlers, PR #852 - Compare buffers directly, PR #851
- Moved gas base fees from VM to Common, PR #806
- Return precompiles on
getPrecompile()
based on hardfork,
PR #783 - Removed
async
dependency, PR #779 - Updated
ethereumjs-util
to v7, PR #748
CI and Test Improvements
- New benchmarking tool for the VM, CI integration on GitHub actions, PR #794 and PR #830
- Various updates, fixes and refactoring work on the test runner, PR #752 and PR #849
- Integrated
ethereumjs-testing
code logic into VM for more flexible future test load optimizations, PR #808 - Transition VM tests to TypeScript, PR #881 and PR #882
Bug Fixes
@ethereumjs/tx v3.0.0-beta.1
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:
ethereumjs-tx
->@ethereumjs/tx
Please update your library references accordingly or install with:
npm i @ethereumjs/tx
Major Refactoring - Breaking Changes
This release is a major refactoring of the transaction library to simplify and strengthen its code base. Refactoring work has been done along PR #812 and PR #887.
New Constructor Params
The constructor used to accept a varying amount of options but now has the following shape:
Transaction(
nonce: BN,
gasPrice: BN,
gasLimit: BN,
to: Address | undefined,
value: BN,
data: Buffer,
v?: BN,
r?: BN,
s?: BN,
opts?: TxOptions
)
Initializing from other data types is assisted with new static factory helpers fromTxData
, fromRlpSerializedTx
, and fromValuesArray
.
Examples:
// Initializing from serialized data
const s1 = tx1.serialize().toString('hex')
const tx = Transaction.fromRlpSerializedTx(toBuffer('0x' + s1))
// Initializing with object
const txData = {
gasPrice: 1000,
gasLimit: 10000000,
value: 42,
}
const tx = Transaction.fromTxData(txData)
// Initializing from array of 0x-prefixed strings.
// First, convert to array of Buffers.
const arr = txFixture.raw.map(toBuffer)
const tx = Transaction.fromValuesArray(arr)
Learn more about the full API in the docs.
Immutability
The returned transaction is now frozen and immutable. To work with a maliable transaction, copy it with const fakeTx = Object.create(tx)
.
from
The tx.from
alias was removed, please use const from = tx.getSenderAddress()
.
Message to sign
Getting a message to sign has been changed from calling tx.hash(false)
to tx.getMessageToSign()
.
Fake Transaction
The FakeTransaction
class was removed since its functionality can now be implemented with less code. To create a fake tansaction for use in e.g. VM.runTx()
overwrite getSenderAddress
with your own Address
. See a full example in the section in the README.
New Default Hardfork
Breaking: The default HF on the library has been updated from petersburg
to instanbul
, see PR #906.
The HF setting is now automatically taken from the HF set for Common.DEAULT_HARDFORK
, see PR #863.
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
Changes and Refactoring
@ethereumjs/ethash v1.0.0-beta.1
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
@ethereumjs/common v2.0.0-beta.1
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:
ethereumjs-common
->@ethereumjs/common
Please update your library references accordingly or install with:
npm i @ethereumjs/common
New constructor
Breaking: The constructor has been changed to require an options dict to be passed, PR #863
Example:
import Common from '@ethereumjs/common'
const common = new Common({ chain: 'mainnet', hardfork: 'muirGlacier' })
EIP Support
EIPs are now native citizens within the Common
library, see PRs #856, #869 and #872. Supported EIPs have their own configuration file like the eips/2537.json file for the BLS precompile EIP and EIP settings can be activated by passing supported EIP numbers to the constructor:
const c = new Common({ chain: 'mainnet', eips: [2537] })
The following EIPs are initially supported within this release:
EIPs provided are then activated and parameters requested with Common.param()
being present in these EIPs take precedence over the setting from the latest hardfork.
There are two new utility functions which return hardfork and EIP values respectively:
Common.paramByHardfork()
Common.paramByEIP()
Breaking: It is now not possible any more to pass a dedicated HF setting to Common.param()
. Please update your code to explicitly use Common.paramByHardfork()
for requesting a parameter for a HF deviating from the HF currently set within your Common
instance.
For setting and requesting active EIPs there is Common.setEIPs()
and Common.eips()
added to the mix.
There is also a new EIP-based hardfork file format which delegates parameter definition to dedicated EIP files (see PR #876). This is in preparation for an upcoming Yolo v2
testnet integration.
Side note: with this new structural setup it gets now possible for all EIPs still implicitly contained within the hardfork files to be extracted as an EIP parameter set within its own dedicated EIP file (which can then be activated via the eip
parameter on initialization) without loosing on functionality. If you have a need there feel free to open a PR!
Gas Parameter Completeness for all Hardforks
Remaining gas base fees which still resided in the VM have been moved over to Common
along PR #806.
Gas fees for all hardforks up to MuirGlacier
are now completely present within the Common
library.
Eth/64 Forkhash Support
There is a new Common.forkHash()
method returning pre-calculated Forkhash values or alternatively use the internal Common._calcForkHash()
implementation to calculate a forkhash on the fly.
Forkhashes are used to uniquely identify a set of hardforks passed to be able to better differentiate between different dedicated chains. This is used for the Eth/64
devp2p protocol update and specificed in EIP-2124 to help improve the devp2p networking stack.
New Block/Hardfork related Utility Functions
The following block and hardfork related utility functions have been added with PRs #863 and #805 respectively:
setHardforkByBlockNumber()
- Sets the hardfork determined by the block number passednextHardforkBlock()
- Returns the next HF block for a HF provided or setisNextHardforkBlock()
- Some convenience additional utility method, matching the existinghardforkBlock()
/isHardforkBlock()
method setuphardforkForForkHash()
- Returns the data available for a HF given a specific forkHash
Default Hardfork
The default hardfork has been added as an accessible readonly property DEFAULT_HARDFORK
, PR #863. This setting is used starting with the latest major releases of the monorepo libraries like the VM to keep the HF setting in sync across the different libraries.
Current default hardfork is set to istanbul
, PR #906.
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
Changes and Refactoring
@ethereumjs/blockchain v5.0.0-beta.1
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:
ethereumjs-blockchain
->@ethereumjs/blockchain
Please update your library references accordingly or install with:
npm i @ethereumjs/blockchain
Library Promisification
The Blockchain
library has been promisified and callbacks have been removed along PR #833 and preceeding PR
#779.
Old API example:
blockchain.getBlock(blockId, (block) => {
console.log(block)
})
New API example:
const block = await blockchain.getBlock(blockId)
console.log(block)
See Blockchain
README for a complete example.
Constructor API Changes
Constructor options for chain setup on all VM monorepo libraries have been simplified and the plain chain
and hardfork
options have been removed. Passing in a Common
instance is now the single way to switch to a non-default chain (mainnet
) or start a blockchain with a higher than chainstart
hardfork, see PR #863.
Example:
import Blockchain from '@ethereumjs/blockchain'
const common = new Common({ chain: 'ropsten', hardfork: 'byzantium' })
const blockchain = new Blockchain({ common })
Removed deprecated validate
option
The deprecated validate
option has been removed, please use valdiateBlock
and validatePow
for options when instantiating a new Blockchain
.
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
Changes and Refactoring
- Use
@ethereumjs/block
v3.0.0
block library version, PR #883 - Removed
async
dependency, PR #779 - Updated
ethereumjs-util
to v7, PR #748
Bug Fixes
- Fixed blockchain hanging forever in case code throws between a semaphore
lock
/unlock
, Issue #877
@ethereumjs/block v3.0.0-beta.1
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:
ethereumjs-block
->@ethereumjs/block
Please update your library references accordingly or install with:
npm i @ethereumjs/block
TypeScript/Library Import
This is the first TypeScript based release of the library, see PR #72.
The import structure has slightly changed along:
TypeScript
import { BlockHeader } from 'ethereumjs-block'
import { Block } from 'ethereumjs-block'
JavaScript/Node.js
const BlockHeader = require('ethereumjs-block').BlockHeader
const Block = require('ethereumjs-block').Block
The library now also comes with a type declaration file distributed along with the package published.
Major Refactoring - Breaking Changes
This release is a major refactoring of the block library to simplify and strengthen its code base. Refactoring work has been done along PR #72 (Promises) and PR #883 (refactoring of API and internal code structure).
New Constructor Params
The way to instantiate a new BlockHeader
or Block
object has been completely reworked and is now more explicit, less error prone and produces more TypeScript
friendly and readable code.
The old direct constructor usage is now discouraged in favor of different dedicated static factory methods to create new objects.
Breaking: While the main constructors can still be called, signatures changed significantly and your old new Block(...)
, new BlockHeader(...)
instantiations won't work any more and needs to be updated.
BlockHeader Class
There are three new factory methods to create a new BlockHeader
:
- Pass in a Header-attribute named dictionary to
BlockHeader.fromHeaderData(headerData: HeaderData = {}, opts: BlockOptions = {})
:
const headerData = {
number: 15,
parentHash: '0x6bfee7294bf44572b7266358e627f3c35105e1c3851f3de09e6d646f955725a7',
difficulty: 131072,
gasLimit: 8000000,
timestamp: 1562422144,
}
const header = BlockHeader.fromHeaderData(headerData, {})
- Create a
BlockHeader
from an RLP-serialized headerBuffer
withBlockHeader.fromRLPSerializedHeader(serialized: Buffer, opts: BlockOptions)
.
const serialized = Buffer.from(
'f901f7a06bfee7294bf44572b7266358e627f3c35105e1c3851f3de09e6d646f955725a7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830200000f837a120080845d20ab8080a00000000000000000000000000000000000000000000000000000000000000000880000000000000000',
'hex',
)
const header = BlockHeader.fromRLPSerializedHeader(serialized, {})
- Create a
BlockHeader
from an array ofBuffer
values, you can do a first short roundtrip test with:
const valuesArray = header.raw()
BlockHeader.fromValuesArray(valuesArray, {})
Generally internal types representing block header values are now closer to their domain representation (number, difficulty, gasLimit) instead of having everthing represented as a Buffer
.
Block Class
There are analogue new static factories for the Block
class:
Block.fromBlockData(blockData: BlockData = {}, opts: BlockOptions = {})
Block.fromRLPSerializedBlock(serialized: Buffer, opts: BlockOptions = {})
Block.fromValuesArray(values: BlockBuffer, opts: BlockOptions = {})
Learn more about the full API in the docs.
Immutability
The returned block is now frozen and immutable. To work with a maliable block, copy it with const fakeBlock = Object.create(block)
.
Promise-based API
The API of this library is now completely promise-based and the old callback-style interface has been dropped.
This affects the following methods of the API now being defined as async
and returning a Promise
:
Header Class
BlockHeader.validate(blockchain: Blockchain, height?: BN): Promise<void>
Block Class
Block.genTxTrie(): Promise<void>
Block.validate(blockChain: Blockchain): Promise<void>
Block.validateUncles(blockchain: Blockchain): Promise<void>
Usage example:
try {
await block.validate(blockchain)
// Block validation has passed
} catch (err) {
// handle errors appropriately
}
Header Validation Methods > Signature Changes
Breaking: The signatures of the following header validation methods have been updated to take a parentBlockHeader
instead of a
parentBlock
input parameter for consistency and removing a circling dependency with Block
:
BlockHeader.canonicalDifficulty(parentBlockHeader: BlockHeader): BN
BlockHeader.validateDifficulty(parentBlockHeader: BlockHeader): boolean
BlockHeader.validateGasLimit(parentBlockHeader: BlockHeader): boolean
On the Block
library new corresponding methods have been added which both operate on a block instance and expect a parentBlock
as an input parameter.
New Default Hardfork
Breaking: The default HF on the library has been updated from petersburg
to instanbul
, see PR #906.
The HF setting is now automatically taken from the HF set for Common.DEAULT_HARDFORK
, see PR #863.
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
Features
- Added
Block.genesis()
andBlockHeader.genesis()
aliases to create a genesis block or header, PR #883 - Added
DAO
hardfork support (check forextraData
attribute ifDAO
HF is active), PR #843
Changes and Refactoring
- Added Node
10
,12
support, dropped Node7
support, PR #72 - Passing in a blockchain is now optional on
Block.validate()
, PR #883 - Breaking:
Block.validateTransactions(stringError: true)
now returns astring[]
, PR #883 - Breaking: Decoupling of the
Block.serialize()
andBlock.raw()
methods,Block.serialize()
now always returns the RLP-encoded block (signature change!),Block.raw()
always returns the pureBuffer
array, PR #883 - Breaking:
Block.toJSON()
now always returns the labeledJSON
representation, removal of thelabeled
function parameter, PR #883 - Updated
merkle-patricia-tree
dependency tov4
, PR #787 - Updated
ethereumjs-util
dependency tov7
, PR #748 - Removal of the
async
dependency, PR #72
CI and Testing
- Browser test run on CI, PR #72
- Karma browser test run config modernization and simplification PR #72
- Updated test source files to
TypeScript
, PR #72
Bug Fixes
- Signature fix for pre-homestead blocks, PR #67
ethereumjs-blockchain v4.0.4
This release replaces the tiled (~
) dependency from ethereumjs-util
for a caret (^
) one, meaning that any update to ethereumjs-util
v6 will also be available for this library.
ethereumjs-common v1.5.2
Updates Goerli chain ID, PR #792.