Skip to content

Commit 02d9330

Browse files
authored
client: readme updates for new dev param (#1496)
1 parent 5b86cc1 commit 02d9330

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/client/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,31 @@ ethereumjs --mine --unlock=[ADDRESS1],[ADDRESS2],...
132132

133133
Note that this feature is in `beta` and shouldn't be used with accounts holding a substantial amount of `Ether` on mainnet (or other valuable assets) for security reasons.
134134

135+
### Custom network for development
136+
137+
The client provides a quick way to get a local instance of a blockchain up and running using the `--dev` command. This will start up a private PoA clique
138+
network with a prefunded account that mines block on 10 second intervals. The prefunded account and its private key are printed to the screen when the client starts. When paired with the `--rpc` command, you have a ready-made environment for local development.
139+
140+
```shell
141+
ethereumjs --dev --rpc
142+
143+
==================================================
144+
Account generated for mining blocks:
145+
Address: 0xd8066d5822138e7c76d1565deb249f5f7ae370fa
146+
Private key: 0x6239e36ab8b27212868a1aa3f9c3b88b084075ea56aa4979d206371f065d3feb
147+
WARNING: Do not use this account for mainnet funds
148+
==================================================
149+
```
150+
151+
Please **heed** the warning and do not use the provided account/private key for mainnet funds.
152+
153+
This can also be paired with the `--unlock` command if you would like to specify the miner/prefunded account:
154+
155+
```shell
156+
ethereumjs --dev --rpc --unlock=0xd8066d5822138e7c76d1565deb249f5f7ae370fa
157+
```
158+
159+
Note: If the `--dev` command is used in conjunction with `--unlock` to use a predefined account, the blockchain's state will be preserved between consecutive runs. If you try to use a different predefined account, you may see errors related to incompatible genesis blocks. Simply run the client with the `--dev` flag by itself and use the new prefunded account provided by the client in further rounds of execution.
135160
## API
136161

137162
[API Reference](./docs/README.md)

0 commit comments

Comments
 (0)