Skip to content

Commit 5e9d80f

Browse files
committed
ethash, other: fixed README example, small fixes
1 parent fd6dc5d commit 5e9d80f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ This monorepo uses [Lerna](https://lerna.js.org/). It links the local packages t
4343
TLDR: Setup
4444
```sh
4545
npm install
46-
npm build
46+
npm run build
4747
```
4848

4949
TLDR: To update dependencies and (re-)link packages
5050
```sh
5151
npm run bootstrap
52-
npm build
52+
npm run build
5353
```
5454

5555
Above is the quickest way to set you up. Going down the road, there are two sets of commands: *project* and *package-specific* commands. You can find them at `./package.json` and `./packages/*/package.json`, respectively. Here's a breakdown:

packages/blockchain/CHANGELOG.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ in performance benefits for Node.js consumers, see [here](https://github.com/eth
122122
- Fixed blockchain hanging forever in case code throws between a semaphore `lock`/`unlock`,
123123
Issue [#877](https://github.com/ethereumjs/ethereumjs-vm/issues/877)
124124

125-
[5.0.0]: https://github.com/ethereumjs/ethereumjs-vm/compare/%40ethereumjs%2Fblockchain%404.0.2...%40ethereumjs%2Fblockchain%405.0.0
126-
127125
## 4.0.4 - 2020-07-27
128126

129127
This release replaces the tilde (`~`) dependency from `ethereumjs-util` for a caret (`^`) one, meaning that any update to `ethereumjs-util` v6 will also be available for this library.

packages/common/docs/classes/_index_.common.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@ ___
368368

369369
### hardfork
370370

371-
**hardfork**(): *string | null*
371+
**hardfork**(): *string*
372372

373373
*Defined in [index.ts:599](https://github.com/ethereumjs/ethereumjs-vm/blob/master/packages/common/src/index.ts#L599)*
374374

375375
Returns the hardfork set
376376

377-
**Returns:** *string | null*
377+
**Returns:** *string*
378378

379379
Hardfork name
380380

packages/common/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ export default class Common {
596596
* Returns the hardfork set
597597
* @returns Hardfork name
598598
*/
599-
hardfork(): string | null {
599+
hardfork(): string {
600600
return this._hardfork
601601
}
602602

packages/ethash/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@
88

99
Implements [Ethash](https://github.com/ethereum/wiki/wiki/Ethash).
1010

11+
Note: this `README` reflects the state of the library from `v1.0.0` onwards. See `README` from the [standalone repository](https://github.com/ethereumjs/ethashjs) for an introduction on the last preceeding release.
12+
1113
# INSTALL
1214

13-
`npm install ethashjs`
15+
`npm install @ethereumjs/ethash`
1416

1517
# USAGE
1618

17-
```javascript
18-
const Ethash = require('@ethereumjs/ethash')
19-
const Block = require('@ethereumjs/block')
19+
```typescript
20+
import Ethash from '@ethereumjs/ethash'
21+
import { Block } from '@ethereumjs/block'
2022
const level = require('level-mem')
2123

2224
const cacheDB = level()
@@ -25,7 +27,7 @@ const ethash = new Ethash(cacheDB)
2527
const validblockRlp =
2628
'f90667f905fba0a8d5b7a4793baaede98b5236954f634a0051842df6a252f6a80492fd888678bda01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347948888f1f195afa192cfee860698584c030f4c9db1a0f93c8db1e931daa2e22e39b5d2da6fb4074e3d544094857608536155e3521bc1a0bb7495628f9160ddbcf6354380ee32c300d594e833caec3a428041a66e7bade1a0c7778a7376099ee2e5c455791c1885b5c361b95713fddcbe32d97fd01334d296b90100000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000400000000000000000000000000000000000000000000000000000008302000001832fefd882560b84559c17b9b9040001020304050607080910111213141516171819202122232410000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000100000000000000000002000000000000000000030000000000000000000400000000000000000005000000000000000000060000000000000000000700000000000000000008000000000000000000090000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004000000000000000000050000000000000000000600000000000000000007000000000000000000080000000000000000000900000000000000000001000000000000000000010000000000000000000200000000000000000003000000000000000000040000000000000000000500000000000000000006000000000000000000070000000000000000000800000000000000000009000000000000000000010000000000000000000a09c7b47112a3afb385c12924bf6280d273c106eea7caeaf5131d8776f61056c148876ae05d46b58d1fff866f864800a82c35094095e7baea6a6c7c4c2dfeb977efac326af552d8785012a05f200801ba01d2c92cfaeb04e53acdff2b5d42005ff6aacdb0105e64eb8c30c273f445d2782a01e7d50ffce57840360c57d94977b8cdebde614da23e8d1e77dc07928763cfe21c0'
2729

28-
const validBlock = new Block(Buffer.from(validblockRlp, 'hex'))
30+
const validBlock = Block.fromRLPSerializedBlock(Buffer.from(validblockRlp, 'hex'))
2931

3032
const result = await ethash.verifyPOW(validBlock)
3133
console.log(result) // => true

packages/ethash/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"miller-rabin": "^4.0.0"
4141
},
4242
"devDependencies": {
43-
"@ethereumjs/block": "3.0.0-beta.1",
43+
"@ethereumjs/block": "3.0.0-beta.2",
4444
"@ethereumjs/config-coverage": "^2.0.0",
4545
"@ethereumjs/config-typescript": "^2.0.0",
4646
"@ethereumjs/eslint-config-defaults": "^2.0.0",

0 commit comments

Comments
 (0)