changes for CLI updates (#699)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
MadelineMurray
2019-01-30 21:06:46 +10:00
committed by GitHub
parent 25275b070d
commit f4b0e1d0ce
9 changed files with 27 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ Ethereum networks have a **network ID** and a **chain ID**. The network ID can b
in the genesis file.
For most networks including MainNet and the public testnets, the network ID and the chain ID are the
same and Pantheon network id default values are defined according to the genesis chain id value.
same and Pantheon network ID values are defined from the genesis chain ID.
The network ID is automatically set by Pantheon to the chain ID when connecting to the Ethereum networks:

View File

@@ -37,9 +37,9 @@ the maximum number of peers. The default is 25.
## No Discovery
The [`--rpc-ws-enabled`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-enabled) command line option
enables P2P peer discovery.
Only set this option to `false` if you are running a test node or a test network with fixed nodes.
The [`--discovery-enabled`](../Reference/Pantheon-CLI-Syntax.md#discovery-enabled) option
can be used to disable P2P peer discovery.
Set this option to `false` if you are running a test node or a test network with fixed nodes.
## Monitoring Peer Connections

View File

@@ -7,7 +7,7 @@ Each node has a node key pair consisting of a node private key and node public k
## Node Private Key
If a `key` file does not exist in the data directory and the [`--node-private-key`](../Reference/Pantheon-CLI-Syntax.md#node-private-key)
If a `key` file does not exist in the data directory and the [`--node-private-key-file`](../Reference/Pantheon-CLI-Syntax.md#node-private-key-file)
option is not specified when Pantheon is started, a node private key is generated and written to the `key` file.
If Pantheon is stopped and restarted without deleting the `key` file, the same private key is used when Pantheon is restarted.
@@ -18,13 +18,13 @@ If a `key` file exists in the data directory when Pantheon is started, the node
## Node Public Key
The node public key is displayed in the log after starting Pantheon. Use the [`export-pub-key`](../Reference/Pantheon-CLI-Syntax.md#export-pub-key) subcommand to export the public key to a file.
The node public key is displayed in the log after starting Pantheon. Use the [`public-key`](../Reference/Pantheon-CLI-Syntax.md#public-key) subcommand to export the public key to a file.
The node public key is also referred to as the node ID. The node ID forms part of the [enode URL](Testing-Developing-Nodes.md#private-networks) for a node.
## Specifying a Custom Node Private Key File
Use the [`--node-private-key`](../Reference/Pantheon-CLI-Syntax.md#node-private-key) option to specify a custom `key` file in any location.
Use the [`--node-private-key-file`](../Reference/Pantheon-CLI-Syntax.md#node-private-key-file) option to specify a custom `key` file in any location.
If the `key` file exists, the node is started with the private key in the custom `key` file. If the custom `key` file does not exist,
a node private key is generated and written to the custom `key` file.
@@ -33,5 +33,5 @@ For example, the following command either reads the node private key from the `p
!!! example
```bash
bin/pantheon --node-private-key "/Users/username/privatekeyfile"
pantheon --node-private-key-file="/Users/username/privatekeyfile"
```

View File

@@ -21,7 +21,7 @@ To start a bootnode for a private network:
!!! example
```bash
pantheon --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath export-pub-key bootnode
pantheon --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath public-key export --to=bootnode
```
Where `privateNetworkGenesis.json` and `nodeDataPath` are changed to the relevant values for
your private network.

View File

@@ -29,8 +29,8 @@ Pantheon specifies the genesis configuration, and sets the network ID and bootno
to [Mainnet](#run-a-node-on-ethereum-mainnet), [Goerli](#run-a-node-on-goerli-testnet), [Rinkeby](#run-a-node-on-rinkeby-testnet), and [Ropsten](#run-a-node-on-ropsten-testnet).
When [`--network=dev`](../Reference/Pantheon-CLI-Syntax.md#network) is specified, Pantheon uses the
development mode genesis configuration associated to a low difficulty.
The default bootnodes setting for dev network is to have an empty bootnodes list.
development mode genesis configuration with a fixed low difficulty.
A node started with [`--network=dev`](../Reference/Pantheon-CLI-Syntax.md#network) has an empty bootnodes list by default.
The genesis files defining the genesis configurations are in the [Pantheon source files](https://github.com/PegaSysEng/pantheon/tree/master/config/src/main/resources).
@@ -75,7 +75,7 @@ call [JSON-RPC API methods](../Reference/JSON-RPC-API-Methods.md) to confirm the
To run a node that mines blocks at a rate suitable for testing purposes:
```bash
pantheon --network=dev --miner-enabled --miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --host-whitelist="all" --rpc-rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir
pantheon --network=dev --miner-enabled --miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --host-whitelist="all" --rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir
```
Alternatively, use the following [configuration file](../Configuring-Pantheon/Using-Configuration-File.md)

View File

@@ -433,7 +433,7 @@ Possible values are :
Values are case insensitive, so either `mainnet` or `MAINNET` works.
!!!important
The [`--network`](#network) and [`--genesis-file`](#genesis-file) option can't be used at the same time.
The [`--network`](#network) and [`--genesis-file`](#genesis-file) option cannot be used at the same time.
### network-id
@@ -449,10 +449,10 @@ Possible values are :
network-id="8675309"
```
P2P network identifier.
[P2P network identifier](../Configuring-Pantheon/NetworkID-And-ChainID.md).
This option can be used to override your current network ID.
The default value is the current network chain ID which is defined in the genesis file.
This option can be used to override the default network ID.
The default value is the network chain ID defined in the genesis file.
### node-private-key-file
@@ -665,6 +665,10 @@ The default is 127.0.0.1.
To allow remote connections, set to `0.0.0.0`
!!! caution
Setting the host to 0.0.0.0 exposes the RPC connection on your node to any remote connection. In a
production environment, ensure you are using a firewall to avoid exposing your node to the internet.
!!!note
This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#exposing-ports).
@@ -709,7 +713,7 @@ The available API options are: `ADMIN`, `ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`,
The default is: `ETH`, `NET`, `WEB3`.
!!!note
:construction: IBFT is not currently supported. Support for IBFT is in active development.
IBFT 2.0 is under development and will be available in v1.0.
!!!tip
The singular `--rpc-http-api` and plural `--rpc-http-apis` are available and are just two
@@ -788,7 +792,7 @@ The available API options are: `ETH`, `NET`, `WEB3`, `CLIQUE`, `IBFT`, `DEBUG`,
The default is: `ETH`, `NET`, `WEB3`.
!!!note
:construction: IBFT is not currently supported. Support for IBFT is in active development.
IBFT 2.0 is under development and will be available in v1.0.
!!!tip
The singular `--rpc-ws-api` and plural `--rpc-ws-apis` are available and are just two

View File

@@ -89,11 +89,11 @@ In the `Node-1` directory, use the [`export-pub-key` subcommand](../Reference/Pa
the [node public key](../Configuring-Pantheon/Node-Keys.md) to the specified file (`publicKeyNode1` in this example):
```bash tab="MacOS"
pantheon --data-path=Node-1-data-path --genesis-file=../privateNetworkGenesis.json export-pub-key Node-1-data-path/publicKeyNode1
pantheon --data-path=Node-1-data-path --genesis-file=../privateNetworkGenesis.json public-key export --to=Node-1-data-path/publicKeyNode1
```
```bash tab="Windows"
pantheon --data-path=Node-1-data-path --genesis-file=..\privateNetworkGenesis.json export-pub-key Node-1-data-path\publicKeyNode1
pantheon --data-path=Node-1-data-path --genesis-file=..\privateNetworkGenesis.json public-key export --to=Node-1-data-path\publicKeyNode1
```
Your node 1 directory now contains:

View File

@@ -5,7 +5,7 @@ description: Using Pantheon for PoW CPU mining
Start Pantheon with the following options to enable CPU mining:
```bash
bin/pantheon --miner-enabled --miner-coinbase <account>
pantheon --miner-enabled --miner-coinbase <account>
```
Where `<account>` is the account to which mining rewards are to be paid. For example, `fe3b557e8fb62b89f4916b721be55ceb828dbd73`.

View File

@@ -14,7 +14,8 @@ The RPC Pub/Sub methods are:
!!!important
Unlike other [JSON RPC-API methods](../Reference/JSON-RPC-API-Methods.md),
the RPC Pub/Sub methods cannot be called over HTTP.
the RPC Pub/Sub methods cannot be called over HTTP. Use the [`--rpc-ws-enabled`] option to enable
the WebSockets JSON-RPC service.
### Using RPC Pub/Sub