Skip to content
This repository has been archived by the owner on Nov 4, 2019. It is now read-only.

Commit

Permalink
update the doc with latest changes from original repos
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasMassart committed Aug 7, 2019
1 parent 467062b commit 62f9fc7
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/Configuring-Pantheon/Networking/Configuring-Ports.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The default is `30303`.

## JSON-RPC API

To enable access to the [JSON-RPC API](../../Pantheon-API/Pantheon-API.md), open the HTTP JSON-RPC and WebSockets JSON-RPC ports to the intended users
To enable access to the [JSON-RPC API](../../Pantheon-API/Using-JSON-RPC-API.md), open the HTTP JSON-RPC and WebSockets JSON-RPC ports to the intended users
of the JSON-RPC API on TCP.

The [`--rpc-http-port`](../../Reference/Pantheon-CLI-Syntax.md#rpc-http-port) and [`--rpc-ws-port`](../../Reference/Pantheon-CLI-Syntax.md#rpc-ws-port)
Expand Down
2 changes: 1 addition & 1 deletion docs/Monitoring/Alethio/Lite-Block-Explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To run the Ethereum Lite Explorer using the Docker image:
docker run --rm -p 8080:80 -e APP_NODE_URL=http://localhost:8545 alethio/ethereum-lite-explorer
```

1. Open [http://localhost:8080](http://localhost) in your browser to view the Lite Explorer.
1. Open [http://localhost:8080](http://localhost:8080) in your browser to view the Lite Explorer.

![Ethereum Lite Explorer](explorer.png)

Expand Down
18 changes: 11 additions & 7 deletions docs/Privacy/Tutorials/Configuring-Privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ description: Configuring Privacy

# Configuring a Network for Private Transactions

### Prerequisites

* [Orion](https://docs.orion.pegasys.tech/en/latest/Installation/Overview/)

Configuring a network that supports private transactions requires starting an Orion node for each
Pantheon node. Pantheon command line options associate the Pantheon node with the Orion node.

Expand Down Expand Up @@ -110,11 +114,11 @@ orion orion.conf
In the `Node-1` directory, start Pantheon Node-1:

```bash tab="MacOS"
pantheon --data-path=data --genesis-file=../ibftGenesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:8888 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:8888 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
```

```bash tab="Windows"
pantheon --data-path=data --genesis-file=..\ibftGenesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:8888 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=..\genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:8888 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
```

The command line specifies privacy options:
Expand All @@ -123,7 +127,7 @@ The command line specifies privacy options:
* [`--privacy-url`](../../Reference/Pantheon-CLI-Syntax.md#privacy-url) specifies the Orion node URL (`clienturl` in `orion.conf`)
* [`--privacy-public-key-file`](../../Reference/Pantheon-CLI-Syntax.md#privacy-public-key-file) specifies the file containing
Orion node public key (created in [3. Generate Orion Keys](#3-generate-orion-keys))
* [`--rpc-http-api`](../../Reference/Pantheon-CLI-Syntax.md#rpc-http-api) includes `EEA` in the list of
* [`--rpc-http-api`](../../Reference/Pantheon-CLI-Syntax.md#rpc-http-api) includes `EEA` and `PRIV` in the list of
JSON-RPC APIs to enable privacy JSON-RPC API methods.
* [`--min-gas-price`](../../Reference/Pantheon-CLI-Syntax.md#min-gas-price) set to 0 for a [free gas network](../../Configuring-Pantheon/FreeGas.md).

Expand All @@ -137,11 +141,11 @@ Copy the enode URL to specify Node-1 as the bootnode in the following steps.
In the `Node-2` directory, start Pantheon Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:

```bash tab="MacOS"
pantheon --data-path=data --genesis-file=../ibftGenesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:8889 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=../genesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:8889 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
```

```bash tab="Windows"
pantheon --data-path=data --genesis-file=..\ibftGenesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:8889 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=..\genesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:8889 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
```

The command line specifies the same options as for Node-1 with different ports and Orion node URL. The
Expand All @@ -155,11 +159,11 @@ The command line specifies the same options as for Node-1 with different ports a
In the `Node-3` directory and start Pantheon Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:

```bash tab="MacOS"
pantheon --data-path=data --genesis-file=../ibftGenesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:8890 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=../genesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:8890 --privacy-public-key-file=Orion/nodeKey.pub --min-gas-price=0
```

```bash tab="Windows"
pantheon --data-path=data --genesis-file=..\ibftGenesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:8890 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
pantheon --data-path=data --genesis-file=..\genesis.json --bootnodes=<Node-1 Enode URL> --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-whitelist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:8890 --privacy-public-key-file=Orion\nodeKey.pub --min-gas-price=0
```

The command line specifies the same options as for Node-1 with different ports and Orion node URL. The
Expand Down
119 changes: 119 additions & 0 deletions docs/Reference/Pantheon-API-Methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2738,6 +2738,65 @@ Lists [signers for the specified block](../Consensus-Protocols/Clique.md#adding-
"result" : [ "0x42eb768f2244c8811c63729a21a3569731535f06", "0x7ffc57839b00206d1ad20c69a1981b489f772031", "0xb279182d99e65703f0076e4812653aab85fca0f0" ]
}
```

### clique_getSignerMetrics

Provides validator metrics for the specified range:

- Number of blocks from each validator
- Block number of the last block proposed by each validator (if any proposed in the specified range)
- All validators present in the last block

**Parameters**

`fromBlockNumber` - Integer representing a block number or the string tag `earliest` as described in [Block Parameter](../Pantheon-API/Using-JSON-RPC-API.md#block-parameter)

`toBlockNumber` - Integer representing a block number or one of the string tags `latest` or `pending`, as described in [Block Parameter](../Pantheon-API/Using-JSON-RPC-API.md#block-parameter)

If no parameters are specified, metrics are provided for the last 100 blocks or all blocks if there are less than 100 blocks.

If only the first parameter is specified, metrics are provided for all blocks from the block specified by the first
parameter to the latest block.

**Returns**

`result`: _object_ - List of validator objects

!!! note
The proposer of the genesis block has address `0x0000000000000000000000000000000000000000`.

!!! example
```bash tab="curl HTTP"
curl -X POST --data '{"jsonrpc":"2.0","method":"clique_getSignerMetrics","params":["1", "100"], "id":1}' http://127.0.0.1:8545
```

```bash tab="wscat WS"
{"jsonrpc":"2.0","method":"clique_getSignerMetrics","params":["1", "100"], "id":1}
```

```json tab="JSON result"
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0x7ffc57839b00206d1ad20c69a1981b489f772031",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x61"
},
{
"address": "0x42eb768f2244c8811c63729a21a3569731535f06",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x63"
},
{
"address": "0xb279182d99e65703f0076e4812653aab85fca0f0",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x62"
}
]
}
```

### clique_getSignersAtHash

Expand Down Expand Up @@ -3452,6 +3511,66 @@ Proposes [adding or removing a validator](../Consensus-Protocols/IBFT.md#adding-
}
```

### ibft_getSignerMetrics

Provides validator metrics for the specified range:

- Number of blocks from each validator
- Block number of the last block proposed by each validator (if any proposed in the specified range)
- All validators present in the last block of the range

**Parameters**

`fromBlockNumber` - Integer representing a block number or the string tag `earliest` as described in [Block Parameter](../Pantheon-API/Using-JSON-RPC-API.md#block-parameter)

`toBlockNumber` - Integer representing a block number or one of the string tags `latest` or `pending`, as described in [Block Parameter](../Pantheon-API/Using-JSON-RPC-API.md#block-parameter)

If no parameters are specified, metrics are provided for the last 100 blocks or all blocks if there are less than 100 blocks.

If only the first parameter is specified, metrics are provided for all blocks from the block specified by the first
parameter to the latest block.

**Returns**

`result`: _object_ - List of validator objects

!!! note
The proposer of the genesis block has address `0x0000000000000000000000000000000000000000`.

!!! example
```bash tab="curl HTTP"
curl -X POST --data '{"jsonrpc":"2.0","method":"ibft_getSignerMetrics","params":["1", "100"], "id":1}' http://127.0.0.1:8545
```

```bash tab="wscat WS"
{"jsonrpc":"2.0","method":"ibft_getSignerMetrics","params":["1", "100"], "id":1}
```

```json tab="JSON result"
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"address": "0x7ffc57839b00206d1ad20c69a1981b489f772031",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x61"
},
{
"address": "0x42eb768f2244c8811c63729a21a3569731535f06",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x63"
},
{
"address": "0xb279182d99e65703f0076e4812653aab85fca0f0",
"proposedBlockCount": "0x21",
"lastProposedBlockNumber": "0x62"
}
]
}
```


## Permissioning Methods

!!! note
Expand Down
2 changes: 0 additions & 2 deletions docs/Resources/Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ description: Pantheon resources including blog posts, webinars, and meetup recor

## Webinars

//FIXME
[Permissioning in Blockchain: A Technical Look at Benefits and Best Practices](https://pegasys.wistia.com/medias/3px9eo2sf5)
[Permissioning in Blockchain: A Technical Look at Benefits and Best Practices](https://www.youtube.com/watch?v=CD0pHtNDqZs)

[Privacy in Pantheon: How PegaSys Redefined Blockchain for Enterprises](https://www.youtube.com/watch?v=8l7SSZLyFL8)
Expand Down

0 comments on commit 62f9fc7

Please sign in to comment.