Skip to content

Commit cfb5d89

Browse files
authored
Merge pull request ethereumjs#637 from ethereumjs/update-to-muir-glacier-and-release
New release v4.1.2, dependency updates + simple test for MuirGlacier support
2 parents cbec94b + bd6b10a commit cfb5d89

File tree

5 files changed

+56
-6
lines changed

5 files changed

+56
-6
lines changed

CHANGELOG.md

+25
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
(modification: no type change headlines) and this project adheres to
77
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).
88

9+
## [4.1.2] - 2019-12-19
10+
11+
Release adds support for the `MuirGlacier` hardfork by updating relevant
12+
dependencies:
13+
14+
- `ethereumjs-tx`:
15+
[v2.1.2](https://github.com/ethereumjs/ethereumjs-tx/releases/tag/v2.1.2)
16+
- `ethereumjs-block`:
17+
[v2.2.2](https://github.com/ethereumjs/ethereumjs-block/releases/tag/v2.2.2)
18+
- `ethereumjs-blockchain`:
19+
[v4.0.3](https://github.com/ethereumjs/ethereumjs-blockchain/releases/tag/v4.0.3)
20+
- `ethereumjs-common`:
21+
[v1.5.0](https://github.com/ethereumjs/ethereumjs-common/releases/tag/v1.5.0)
22+
23+
Other changes:
24+
25+
- Upgraded `ethereumjs-util` to `v6.2.0`,
26+
PR [#621](https://github.com/ethereumjs/ethereumjs-vm/pull/621)
27+
- Removed outdated cb param definition in `runBlockchain`,
28+
PR [#623](https://github.com/ethereumjs/ethereumjs-vm/pull/623)
29+
- Properly output zero balance in `examples/run-transactions-complete`,
30+
PR [#624](https://github.com/ethereumjs/ethereumjs-vm/pull/624)
31+
32+
[4.1.2]: https://github.com/ethereumjs/ethereumjs-vm/compare/v4.1.1...v4.1.2
33+
934
## [4.1.1] - 2019-11-19
1035

1136
First stable `Istanbul` release passing all `StateTests` and `BlockchainTests`

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,16 @@ The VM currently supports the following hardfork rules:
1717
- `Constantinople`
1818
- `Petersburg` (default)
1919
- `Istanbul`
20+
- `MuirGlacier` (only `mainnet` and `ropsten`)
2021

2122
If you are still looking for a [Spurious Dragon](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-607.md) compatible version of this library install the latest of the `2.2.x` series (see [Changelog](./CHANGELOG.md)).
2223

24+
##### MuirGlacier Hardfork Support
25+
26+
An Ethereum test suite compliant `MuirGlacier` HF implementation is available
27+
since the `v4.1.2` VM release. You can activate a `MuirGlacier` VM by using the
28+
`muirGlacier` `hardfork` option flag.
29+
2330
##### Istanbul Harfork Support
2431

2532
An Ethereum test suite compliant `Istanbul` HF implementation is available

lib/index.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ export default class VM extends AsyncEventEmitter {
9898
} else {
9999
const chain = opts.chain ? opts.chain : 'mainnet'
100100
const hardfork = opts.hardfork ? opts.hardfork : 'petersburg'
101-
const supportedHardforks = ['byzantium', 'constantinople', 'petersburg', 'istanbul']
101+
const supportedHardforks = [
102+
'byzantium',
103+
'constantinople',
104+
'petersburg',
105+
'istanbul',
106+
'muirGlacier',
107+
]
102108

103109
this._common = new Common(chain, hardfork, supportedHardforks)
104110
}

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereumjs-vm",
3-
"version": "4.1.1",
3+
"version": "4.1.2",
44
"description": "An Ethereum VM implementation",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -53,10 +53,10 @@
5353
"async-eventemitter": "^0.2.2",
5454
"core-js-pure": "^3.0.1",
5555
"ethereumjs-account": "^3.0.0",
56-
"ethereumjs-block": "^2.2.1",
57-
"ethereumjs-blockchain": "^4.0.2",
58-
"ethereumjs-common": "^1.3.2",
59-
"ethereumjs-tx": "^2.1.1",
56+
"ethereumjs-block": "^2.2.2",
57+
"ethereumjs-blockchain": "^4.0.3",
58+
"ethereumjs-common": "^1.5.0",
59+
"ethereumjs-tx": "^2.1.2",
6060
"ethereumjs-util": "^6.2.0",
6161
"fake-merkle-patricia-tree": "^1.0.1",
6262
"functional-red-black-tree": "^1.0.1",

tests/api/muirGlacier/index.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const tape = require('tape')
2+
const util = require('ethereumjs-util')
3+
const VM = require('../../../dist/index').default
4+
5+
tape('General MuirGlacier VM tests', (t) => {
6+
t.test('should accept muirGlacier harfork option for supported chains', (st) => {
7+
let vm = new VM({ hardfork: 'muirGlacier' })
8+
st.ok(vm.stateManager)
9+
st.deepEqual(vm.stateManager._trie.root, util.KECCAK256_RLP, 'it has default trie')
10+
st.end()
11+
})
12+
})

0 commit comments

Comments
 (0)