Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
28c4fdf
Moved license note (#129)
MadelineMurray Jan 31, 2020
a629dcf
Windows is now supported in the quickstart (#143)
EdJoJob Feb 6, 2020
c9d054d
quickstart updates all round (#141)
joshuafernandes Feb 9, 2020
05d87bf
Fixed typo (#150)
MadelineMurray Feb 10, 2020
77b4e83
Add multi-tenancy information. (#131)
bgravenorst Feb 10, 2020
302fdf5
Apply renames for the quickstart repo (#152)
EdJoJob Feb 12, 2020
bcf450f
Added content on protocol upgrades (#132)
MadelineMurray Feb 13, 2020
fad0e68
Fixed Ansible link and renamed topic (#168)
MadelineMurray Feb 14, 2020
a126ecd
permissioning (#170)
wslyvh Feb 14, 2020
990d789
Vale and mdlint editorial updates - DCO.md (#162)
Feb 14, 2020
b3d392f
updated CI and customised checks (#165)
NicolasMassart Feb 19, 2020
5ee78fb
Added new NAT options (#179)
MadelineMurray Feb 20, 2020
0dcbdbb
Editorial mdlint vale updates for Concepts/Transactions directory (#185)
Feb 20, 2020
ea23198
Editorial mklint and vale updates in Concepts/Permissioning dir (#181)
Feb 20, 2020
c720730
mdlint and vale editorial updates in Concepts/Consensus-Protocols dir…
Feb 20, 2020
c316eb5
mdlint and vale editorial edits in the Concepts directory (#177)
Feb 20, 2020
d7de540
vale and mklint editorial updates - CONTRIBUTING.md (#163)
Feb 20, 2020
8f6a2c5
mdlint and vale editorial updates - index.md (#169)
Feb 20, 2020
d2160ec
Added plugins_reloadPluginConfig (#184)
MadelineMurray Feb 21, 2020
059ecbe
[BESU-163] Add inbound and outbound TLS information. (#124)
bgravenorst Feb 21, 2020
bb4d707
Moved license note (#129)
MadelineMurray Jan 31, 2020
efd71b6
Fixed typo (#150)
MadelineMurray Feb 10, 2020
9cc2671
Added content on protocol upgrades (#132)
MadelineMurray Feb 13, 2020
b9de061
Fixed Ansible link and renamed topic (#168)
MadelineMurray Feb 14, 2020
02d9c33
Editorial mklint and vale updates in Concepts/Permissioning dir (#181)
Feb 20, 2020
b7d2ee5
mdlint and vale editorial edits in the Concepts directory (#177)
Feb 20, 2020
6531310
Editorial mdlink and vale updates for HowTo/Configure directory
Feb 20, 2020
2284a3a
Updates based on @MadelineMurrray review
Feb 23, 2020
4a06b5b
Line length updates.
Feb 23, 2020
0807416
Add multi-tenancy whitelist info. (#193)
bgravenorst Feb 24, 2020
2362e2c
add redirect plugin and initial configuration from RTD redirects (#172)
NicolasMassart Feb 24, 2020
844d0a6
Replacing html comment after metadata with markdown comment
Feb 25, 2020
df9f5c2
A few more mdlint and vale updates
Feb 25, 2020
daf17cb
One last vale update
Feb 25, 2020
cb92c47
Merge branch 'master' into grantnoble-howto-configure-mdlint-vale
Feb 25, 2020
cd2a9a9
Merge branch 'master' into grantnoble-howto-configure-mdlint-vale
MadelineMurray Feb 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Concepts/Protocol-Upgrades.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ example, [Istanbul](https://eips.ethereum.org/EIPS/eip-1679).
For compatibility with future protocol upgrades, do not hardcode any gas price assumptions.

Implementing upgradeable contracts enables contracts to be upgraded if a protocol upgrade does
include breaking changes.
include breaking changes.
61 changes: 40 additions & 21 deletions docs/HowTo/Configure/Configure-Mining.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,67 @@
---
description: Using Hyperledger Besu for PoW CPU mining
<!--- END of page meta data -->
---

# Mining

## Configure CPU Mining
## Configure CPU mining

To enable CPU mining, start Hyperledger Besu with the following options:

Start Hyperledger Besu with the following options to enable CPU mining:
```bash
besu --rpc-http-api=ETH,MINER --miner-enabled --miner-coinbase=<account>
```

Where `<account>` is the account to which mining rewards are to be paid. For example, `fe3b557e8fb62b89f4916b721be55ceb828dbd73`.
Where `<account>` is the account you pay mining rewards to. For example,
`fe3b557e8fb62b89f4916b721be55ceb828dbd73`.

Start and stop mining using the [`miner_start`](../../Reference/API-Methods.md#miner_start) and
[`miner_stop`](../../Reference/API-Methods.md#miner_stop) APIs.

Use the [`miner_start`](../../Reference/API-Methods.md#miner_start) and [`miner_stop`](../../Reference/API-Methods.md#miner_stop) APIs to start and stop mining.
## Configure GPU mining

## Configure GPU Mining
Besu supports GPU mining, tested using [Ethminer](https://github.com/ethereum-mining/ethminer) with
the `stratum+tcp` scheme.

Besu supports GPU mining and has been tested using [Ethminer](https://github.com/ethereum-mining/ethminer) with the `stratum+tcp` scheme. Start Hyperledger Besu with the following options to enable GPU mining:
To enable GPU mining, start Hyperledger Besu with the following options:

```bash
besu --rpc-http-api=ETH,MINER --miner-enabled --miner-stratum-enabled --miner-coinbase=<account>
```

Where `<account>` is the account to which mining rewards are to be paid. For example, `fe3b557e8fb62b89f4916b721be55ceb828dbd73`.
Where `<account>` is the account you pay mining rewards to. For example,
`fe3b557e8fb62b89f4916b721be55ceb828dbd73`.

Optional command line options are:

* [`--miner-stratum-host`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-host) to specify the host of the mining service.
* [`--miner-stratum-port`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-port) to specify the port of the mining service.
* [`--miner-stratum-host`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-host) to specify the
host of the mining service.
* [`--miner-stratum-port`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-port) to specify the
port of the mining service.

!!! note
Besu also supports the `getwork` scheme. Use the [`--miner-stratum-enabled`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-enabled) option and [enable the `ETH` RPCs](../../Reference/CLI/CLI-Syntax.md#rpc-http-api).


Besu also supports the `getwork` scheme. Use the
[`--miner-stratum-enabled`](../../Reference/CLI/CLI-Syntax.md#miner-stratum-enabled) option and
[enable the `ETH` RPCs](../../Reference/CLI/CLI-Syntax.md#rpc-http-api).

The `getwork` scheme is supported as the `http` scheme in certain mining software.

Use the [`miner_start`](../../Reference/API-Methods.md#miner_start) and [`miner_stop`](../../Reference/API-Methods.md#miner_stop) APIs to start and stop mining.
Start and stop mining using the [`miner_start`](../../Reference/API-Methods.md#miner_start) and
[`miner_stop`](../../Reference/API-Methods.md#miner_stop) APIs.

## Mining APIs

JSON-RPC API methods for mining are:

* [`miner_start`](../../Reference/API-Methods.md#miner_start) to start mining.
* [`miner_stop`](../../Reference/API-Methods.md#miner_stop) to stop mining.
* [`eth_mining`](../../Reference/API-Methods.md#eth_mining) to determine whether the client is actively mining new blocks.
* [`eth_hashrate`](../../Reference/API-Methods.md#eth_hashrate) to get the number of hashes per second with which the node is mining. Is not supported for GPU mining.
* [`eth_getWork`](../../Reference/API-Methods.md#eth_getwork) to get the hash of the current block, the seed hash, and the target boundary condition to be met. Only used when using the `getwork` scheme.
* [`eth_submitWork`](../../Reference/API-Methods.md#eth_submitwork) to submit the PoW solution. Only used when using the `getwork` scheme.
The JSON-RPC API methods for mining are:

* [`miner_start`](../../Reference/API-Methods.md#miner_start) to start mining.
* [`miner_stop`](../../Reference/API-Methods.md#miner_stop) to stop mining.
* [`eth_mining`](../../Reference/API-Methods.md#eth_mining) to determine whether the client is
actively mining new blocks.
* [`eth_hashrate`](../../Reference/API-Methods.md#eth_hashrate) to get the number of hashes per
second with which the node is mining. Not supported for GPU mining.
* [`eth_getWork`](../../Reference/API-Methods.md#eth_getwork) to get the hash of the current block,
the seed hash, and the target boundary condition. Only used when using the `getwork`
scheme.
* [`eth_submitWork`](../../Reference/API-Methods.md#eth_submitwork) to submit the PoW solution.
Only used when using the `getwork` scheme.
86 changes: 50 additions & 36 deletions docs/HowTo/Configure/Configure-TLS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
description: Configure TLS
<!--- END of page meta data -->
---

# Configure TLS

Hyperledger Besu supports TLS for client and server communication. For example, you can
[configure TLS](../../Concepts/TLS.md) for communication between EthSigner and Besu, and Besu and Orion.
[configure TLS](../../Concepts/TLS.md) for communication between EthSigner and Besu, and Besu and
Orion.

Configure TLS communication from the command line.

Expand All @@ -15,39 +17,41 @@ Configure TLS communication from the command line.

## Configure Client TLS

Allow clients (for example a dApp, curl, or EthSigner) to send and receive
secure HTTP JSON-RPCs.
Allow clients (for example a dApp, curl, or EthSigner) to send and receive secure HTTP JSON-RPCs.

**Client Prerequisites**:

* The client must be configured for TLS.
* Configure the client for TLS.
* Client's PKCS #12 keystore information.

### Create the Known Clients File

The known clients file allows clients with self-signed certificates or
non-public certificates to connect to Besu.
The known clients file allows clients with self-signed certificates or non-public certificates to
connect to Besu.

Create a file (in this example, `knownClients`) that lists one or more trusted
clients. Use the format`<common_name> <hex-string>` where:
Create a file (in this example, `knownClients`) that lists one or more trusted clients. Use the
format`<common_name> <hex-string>` where:

* `<common_name>` is the Common Name specified in the client certificate.
* `<hex-string>` is the SHA-256 fingerprint of the client certificate.

!!! example

```
ethsigner 8E:E0:85:9F:FC:2E:2F:21:31:46:0B:82:4C:A6:88:AB:30:34:9A:C6:EA:4F:04:31:ED:0F:69:A7:B5:C2:2F:A7
curl FC:18:BF:39:45:45:9A:15:46:76:A6:E7:C3:94:64:B8:34:84:A3:8E:B8:EA:67:DC:61:C0:29:E6:38:B8:B7:99
```

You can use [`openssl`](https://www.openssl.org/) or [`keytool`](https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html)
to display the SHA256 fingerprint.

You can use [`openssl`](https://www.openssl.org/) or
[`keytool`](https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html) to display
the SHA256 fingerprint.

!!! example

```
keytool -list -v -keystore <keystore> -storetype PKCS12 -storepass <MY_PASSWORD>`.
```

### Start Besu

```bash
Expand All @@ -56,49 +60,55 @@ besu --rpc-http-enabled --rpc-http-tls-enabled --rpc-http-tls-client-auth-enable

The command line:

* Enables the HTTP JSON-RPC service using the [`--rpc-http-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-enabled) option.
* Enables TLS for the HTTP JSON-RPC service using the [`--rpc-http-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-enabled)
option.
* Enables TLS client authentication using the [`--rpc-http-tls-client-auth-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-client-auth-enabled) option.
* Specifies the keystore using the [`--rpc-http-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-file) option.
* Specifies the file that contains the password to decrypt the keystore using
the [`--rpc-http-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-password-file) option.
* [Specifies the clients](#create-the-known-clients-file) that are allowed to connect to Besu using the
[`--rpc-http-tls-known-clients-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-known-clients-file) option.
* Enables the HTTP JSON-RPC service using the
[`--rpc-http-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-enabled) option.
* Enables TLS for the HTTP JSON-RPC service using the
[`--rpc-http-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-enabled) option.
* Enables TLS client authentication using the
[`--rpc-http-tls-client-auth-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-client-auth-enabled) option.
* Specifies the keystore using the
[`--rpc-http-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-file)
option.
* Specifies the file that contains the password to decrypt the keystore using the
[`--rpc-http-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-keystore-password-file) option.
* [Specifies the clients](#create-the-known-clients-file) allowed to connect to Besu using the
[`--rpc-http-tls-known-clients-file`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-known-clients-file) option.

!!! note

Set [`--rpc-http-tls-ca-clients-enabled`](../../Reference/CLI/CLI-Syntax.md#rpc-http-tls-ca-clients-enabled)
to `true` to allow access to clients with signed and trusted root CAs.

## Configure Server TLS

Allow Besu to securely communicate with the server (Orion).

**Server Prerequisites**:

* The server must be configured to allow TLS communication
* Configure the server to allow TLS communication.
* Server's certificate information.

### Create the Known Servers file

Create a file (in this example, `knownServers`) that lists one or more trusted
servers. The file contents use the format `<hostame>:<port> <hex-string>`
where:
Create a file (in this example, `knownServers`) that lists one or more trusted servers. The file
contents use the format `<hostame>:<port> <hex-string>` where:

* `<hostname>` is the server hostname
* `<port>` is the port used for communication
* `<hex-string>` is the SHA-256 fingerprint of the server's certificate.

!!! example

```
localhost:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC
127.0.0.1:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC
```

!!! note
Specify both hostname and IP address in the file if unsure which is used in
requests.


If you are unsure whether requests use the hostname or an IP address, configure both in the
file.

### Start Besu

```bash
Expand All @@ -107,8 +117,12 @@ besu --privacy-tls-enabled --privacy-tls-keystore-file=/Users/me/my_node/keystor

The command line:

* Enables TLS with the server using the [`--privacy-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-enabled) option.
* Specifies the keystore using the [`--privacy-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-file) option.
* Specifies the file that contains the password to decrypt the keystore using
the [`--privacy-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-password-file) option.
* Specifies the trusted servers using the [`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option.
* Enables TLS with the server using the
[`--privacy-tls-enabled`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-enabled) option.
* Specifies the keystore using the
[`--privacy-tls-keystore-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-file)
option.
* Specifies the file that contains the password to decrypt the keystore using the
[`--privacy-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-password-file) option.
* Specifies the trusted servers using the
[`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option.
24 changes: 13 additions & 11 deletions docs/HowTo/Configure/Contracts-in-Genesis.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
description: Pre-deploying contracts in genesis file
<!--- END of page meta data -->
---
description: Predeploying contracts in the genesis file
---

# Predeploying Contracts in the Genesis File
# Predeploying contracts in the genesis file

To predeploy contracts when starting Besu, specify contract code in the genesis file.
To predeploy contracts when starting Besu, specify the contract code in the genesis file.

!!! example "Contract code in the genesis file"

!!! example "Contract Code in Genesis File"
```json
{
...
Expand All @@ -22,10 +24,10 @@ To predeploy contracts when starting Besu, specify contract code in the genesis
...
}
```

The contract code in the genesis file defines:

* Address
* Balance
* Bytecode
* Key value pairs for contract storage.
The contract code in the genesis file defines the:

* Address
* Balance
* Bytecode
* Key value pairs for contract storage.
Loading