Skip to content

Commit a8fa832

Browse files
committed
rename merkle-patricia-tree uses to @ethereumjs/trie
1 parent d8f95ad commit a8fa832

File tree

17 files changed

+27
-27
lines changed

17 files changed

+27
-27
lines changed

packages/block/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@
4040
"homepage": "https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/block#readme",
4141
"dependencies": {
4242
"@ethereumjs/common": "^2.0.0",
43+
"@ethereumjs/trie": "^4.0.0",
4344
"@ethereumjs/tx": "^3.0.0",
4445
"@types/bn.js": "^4.11.6",
45-
"ethereumjs-util": "^7.0.7",
46-
"merkle-patricia-tree": "^4.0.0"
46+
"ethereumjs-util": "^7.0.7"
4747
},
4848
"devDependencies": {
4949
"@ethereumjs/config-coverage": "^2.0.0",

packages/block/src/block.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-dupe-class-members */
22

3-
import { BaseTrie as Trie } from 'merkle-patricia-tree'
3+
import { BaseTrie as Trie } from '@ethereumjs/trie'
44
import { BN, rlp, keccak256, KECCAK256_RLP } from 'ethereumjs-util'
55
import Common from '@ethereumjs/common'
66
import { Transaction, TxOptions } from '@ethereumjs/tx'

packages/client/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For the `ethereumjs` CLI command to work run:
3232
npm link
3333
```
3434

35-
Note: for development purposes you can invoke the client by build with `npm run build:node` and
35+
Note: for development purposes you can invoke the client by build with `npm run build:node` and
3636
then run `node ./dist/bin/cli.js`.
3737

3838
### Running the Client
@@ -45,7 +45,7 @@ You can run the current state of the client with:
4545
ethereumjs --network=mainnet [--loglevel=debug]
4646
```
4747

48-
For development you might want to connect to `rinkeby` as the network with the currently
48+
For development you might want to connect to `rinkeby` as the network with the currently
4949
most reliable connection:
5050

5151
```shell
@@ -347,9 +347,9 @@ To update the structure diagram files in the root folder open the `client.drawio
347347
**EthereumJS Ecosystem**
348348

349349
This project will be embedded in the EthereumJS ecosystem and many submodules already exist and
350-
can be used within the project, have a look e.g. at [ethereumjs-block](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/block), [ethereumjs-vm](https://github.com/ethereumjs/ethereumjs-vm), the
351-
[merkle-patricia-tree](https://github.com/ethereumjs/merkle-patricia-tree) or the
352-
[ethereumjs-devp2p](https://github.com/ethereumjs/vm/packages/devp2p) implementation. Work needs to be done both within this repos and related libraries.
350+
can be used within the project, have a look e.g. at [@ethereumjs/block](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/block), [@ethereumjs/vm](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/vm),
351+
[@ethereumjs/trie](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/trie) or the
352+
[@ethereumjs/devp2p](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/devp2p) implementation. Work needs to be done both within these repos and related libraries.
353353

354354
## EthereumJS
355355

packages/client/lib/util/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parse } from 'url'
22
import { BlockHeader } from '@ethereumjs/block'
3-
import { SecureTrie as Trie } from 'merkle-patricia-tree'
3+
import { SecureTrie as Trie } from '@ethereumjs/trie'
44
import { Account, BN, keccak, rlp, toBuffer, unpadBuffer, isHexPrefixed } from 'ethereumjs-util'
55
import { Bootnode, BootnodeLike, Multiaddrs, MultiaddrsLike } from '../types'
66

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@ethereumjs/block": "^3.0.0",
5555
"@ethereumjs/blockchain": "^5.0.0",
5656
"@ethereumjs/common": "^2.0.0",
57+
"@ethereumjs/trie": "^4.0.0",
5758
"@ethereumjs/vm": "^5.0.0",
5859
"chalk": "^2.4.2",
5960
"ethereumjs-devp2p": "^3.0.3",
@@ -68,7 +69,6 @@
6869
"libp2p-secio": "^0.11.1",
6970
"libp2p-tcp": "^0.13.0",
7071
"libp2p-websockets": "^0.12.0",
71-
"merkle-patricia-tree": "^4.0.0",
7272
"peer-id": "^0.12.2",
7373
"peer-info": "^0.15.1",
7474
"pull-catch": "^1.0.0",

packages/trie/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This release introduces a major API upgrade from callbacks to Promises.
1919
Example using async/await syntax:
2020

2121
```typescript
22-
import { BaseTrie as Trie } from 'merkle-patricia-tree'
22+
import { BaseTrie as Trie } from '@ethereumjs/trie'
2323
const trie = new Trie()
2424
async function test() {
2525
await trie.put(Buffer.from('test'), Buffer.from('one'))

packages/trie/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Note: this `README` reflects the state of the library from `v5.0.0` (UNRELEASED)
1616

1717
# INSTALL
1818

19-
`npm install merkle-patricia-tree`
19+
`npm install @ethereumjs/trie`
2020

2121
# USAGE
2222

@@ -26,7 +26,7 @@ There are 3 variants of the tree implemented in this library, namely: `BaseTrie`
2626

2727
```typescript
2828
import level from 'level'
29-
import { BaseTrie as Trie } from 'merkle-patricia-tree'
29+
import { BaseTrie as Trie } from '@ethereumjs/trie'
3030

3131
const db = level('./testdb')
3232
const trie = new Trie(db)
@@ -59,7 +59,7 @@ test()
5959

6060
```typescript
6161
import level from 'level'
62-
import { SecureTrie as Trie } from 'merkle-patricia-tree'
62+
import { SecureTrie as Trie } from '@ethereumjs/trie'
6363

6464
const db = level('YOUR_PATH_TO_THE_GETH_CHAIN_DB')
6565
// Set stateRoot to block #222
@@ -82,7 +82,7 @@ import level from 'level'
8282
import rlp from 'rlp'
8383
import { BN, bufferToHex } from 'ethereumjs-util'
8484
import Account from 'ethereumjs-account'
85-
import { SecureTrie as Trie } from 'merkle-patricia-tree'
85+
import { SecureTrie as Trie } from '@ethereumjs/trie'
8686

8787
const stateRoot = 'STATE_ROOT_OF_A_BLOCK'
8888

packages/trie/src/baseTrie.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export type FoundNodeFunction = (
3434
) => void
3535

3636
/**
37-
* The basic trie interface, use with `import { BaseTrie as Trie } from 'merkle-patricia-tree'`.
37+
* The basic trie interface, use with `import { BaseTrie as Trie } from '@ethereumjs/trie'`.
3838
* In Ethereum applications stick with the {@link SecureTrie} overlay.
3939
* The API for the base and the secure interface are about the same.
4040
*/

packages/trie/src/secure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Proof } from './baseTrie'
44

55
/**
66
* You can create a secure Trie where the keys are automatically hashed
7-
* using **keccak256** by using `import { SecureTrie as Trie } from 'merkle-patricia-tree'`.
7+
* using **keccak256** by using `import { SecureTrie as Trie } from '@ethereumjs/trie'`.
88
* It has the same methods and constructor as `Trie`.
99
* @class SecureTrie
1010
* @extends Trie

packages/vm/lib/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SecureTrie as Trie } from 'merkle-patricia-tree'
1+
import { SecureTrie as Trie } from '@ethereumjs/trie'
22
import { Account, Address } from 'ethereumjs-util'
33
import Blockchain from '@ethereumjs/blockchain'
44
import Common from '@ethereumjs/common'
@@ -61,7 +61,7 @@ export interface VMOpts {
6161
*/
6262
stateManager?: StateManager
6363
/**
64-
* A [merkle-patricia-tree](https://github.com/ethereumjs/merkle-patricia-tree) instance for the state tree (ignored if stateManager is passed)
64+
* An [@ethereumjs/trie](https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/trie) instance for the state tree (ignored if stateManager is passed)
6565
* @deprecated
6666
*/
6767
state?: any // TODO

0 commit comments

Comments
 (0)