Initial restructure PoC (#1085)
* [WIP] initial restructure PoC Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * finish public networks restructure Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * private network restructure except tutorials Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * finish private networks restructure Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * add monitoring index page Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * fix link errors Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * more link fixes Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * mkdocs fixes Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * fix link and add nav tabs Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * more link fixes Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * update and move mining, onchain permissioning, and key mgmt content Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * Update home page and add network index pages Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * md fix Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * update and restructure tls, bootnode, and protocol upgrade content Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * initial add global variables Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * final variable files Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * mkdocs changes Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * Some link fixes and content updates Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * more link fixes Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * restructure #3 - no variables Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * update private network links Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * fix private network links + md Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * update headings Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * remove dead link Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * minor homepage fix Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * fix links and address feedback Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * add HA and plugins material Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * minor addition Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * fix typo Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * Integrate more feedback Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net> * minor edits Signed-off-by: Alexandra Tran <alexandra.tran@consensys.net>pull/1121/head
parent
6c3912c219
commit
4a96954293
@ -1,12 +0,0 @@ |
|||||||
--- |
|
||||||
description: Hyperledger Besu architecture |
|
||||||
--- |
|
||||||
|
|
||||||
# Hyperledger Besu architecture |
|
||||||
|
|
||||||
The following diagram outlines the Hyperledger Besu high-level architecture. |
|
||||||
|
|
||||||
![Architecture](../images/Architecture.png) |
|
||||||
|
|
||||||
For more information about the Hyperledger Besu architecture, contact us on the |
|
||||||
[Besu channel on Hyperledger Discord](https://discord.gg/hyperledger). |
|
@ -1,17 +0,0 @@ |
|||||||
--- |
|
||||||
description: Mining overview |
|
||||||
--- |
|
||||||
|
|
||||||
# Mining |
|
||||||
|
|
||||||
Hyperledger Besu supports CPU and GPU mining, which are |
|
||||||
[configured using command line options](../HowTo/Configure/Configure-Mining.md). |
|
||||||
|
|
||||||
GPU mining support testing used [Ethminer](https://github.com/ethereum-mining/ethminer) with the |
|
||||||
`stratum+tcp` and `getwork` schemes. |
|
||||||
|
|
||||||
Ethminer has been used with Hyperledger Besu to mine blocks on the [Ropsten testnet](https://ropsten.etherscan.io/address/0x2f14582947E292a2eCd20C430B46f2d27CFE213c#mine), |
|
||||||
[ETC Mainnet (uncle block only)](https://etc.tokenview.com/en/uncleblock/10555173) and Mordor ETC testnet. |
|
||||||
|
|
||||||
!!! note |
|
||||||
Some mining software supports the `getwork` scheme as the `http` scheme. |
|
@ -1,16 +0,0 @@ |
|||||||
--- |
|
||||||
description: Configuring Besu at the network level compared to the node level |
|
||||||
--- |
|
||||||
|
|
||||||
# Network vs node configuration |
|
||||||
|
|
||||||
You can configure Besu at the network level and the node level. |
|
||||||
|
|
||||||
Specify network-wide settings in the [genesis file](../Reference/Config-Items.md). For example, |
|
||||||
include `evmStackSize` or specify the |
|
||||||
[consensus mechanism](Consensus-Protocols/Overview-Consensus.md). |
|
||||||
|
|
||||||
Specify node settings on the command line or in the |
|
||||||
[node configuration file](../HowTo/Configure/Using-Configuration-File.md). For example, enable |
|
||||||
[JSON-RPC API methods](../Reference/API-Methods.md) or specify the |
|
||||||
[data directory](../Reference/CLI/CLI-Syntax.md#data-path) for the node. |
|
@ -1,30 +0,0 @@ |
|||||||
--- |
|
||||||
description: Protocol upgrades |
|
||||||
--- |
|
||||||
|
|
||||||
# Network upgrades in private networks |
|
||||||
|
|
||||||
Network upgrades are the mechanism for upgrading the Ethereum protocol. The time when the protocol |
|
||||||
upgrade occurs is the network upgrade. |
|
||||||
|
|
||||||
For the Ethereum Mainnet and public testnets (for example, Rinkeby), the milestone block |
|
||||||
definitions are in Hyperledger Besu. Upgrading your Besu client applies the network upgrade. |
|
||||||
|
|
||||||
For private networks, all network participants must agree on the protocol upgrades and then |
|
||||||
coordinate the network upgrades. The genesis file specifies the |
|
||||||
[milestone block](../Reference/Config-Items.md#milestone-blocks) at which to apply the |
|
||||||
[protocol upgrade](../HowTo/Upgrade/Upgrade-Protocol.md). |
|
||||||
|
|
||||||
## Backward compatibility |
|
||||||
|
|
||||||
Some protocol upgrades include changes that might break existing contracts (for example, gas cost |
|
||||||
changes). Before upgrading your protocol, review included EIPs for possible impact. A |
|
||||||
[meta EIP](https://eips.ethereum.org/meta) for each protocol upgrade lists included EIPs. For |
|
||||||
example, [Istanbul](https://eips.ethereum.org/EIPS/eip-1679). |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
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. |
|
@ -1,22 +0,0 @@ |
|||||||
--- |
|
||||||
description: Pruning concept information. |
|
||||||
--- |
|
||||||
|
|
||||||
# Pruning |
|
||||||
|
|
||||||
In Besu, pruning reduces the storage required by removing state trie nodes that are unreachable |
|
||||||
from [recent blocks](../Reference/CLI/CLI-Syntax.md#pruning-blocks-retained). |
|
||||||
|
|
||||||
Pruning is disabled by default, and can be enabled with the |
|
||||||
[`--pruning-enabled`](../Reference/CLI/CLI-Syntax.md#pruning-enabled) command line option. |
|
||||||
|
|
||||||
!!! Important |
|
||||||
|
|
||||||
Using pruning with [private transactions](Privacy/Privacy-Overview.md) is not supported. |
|
||||||
|
|
||||||
Pruning might increase block import times, but it does not affect the ability of nodes to stay in |
|
||||||
sync. |
|
||||||
|
|
||||||
!!! Important |
|
||||||
|
|
||||||
Pruning is being deprecated for [Bonsai Tries](Data-Storage-Formats.md#bonsai-tries) and is currently not being updated. |
|
@ -1,22 +0,0 @@ |
|||||||
--- |
|
||||||
description: TLS overview |
|
||||||
--- |
|
||||||
|
|
||||||
# TLS communication |
|
||||||
|
|
||||||
Hyperledger Besu supports TLS to secure client and server communication, or [secure P2P communication] between nodes. |
|
||||||
|
|
||||||
!!! important |
|
||||||
|
|
||||||
To secure client and server communication, you also need to configure the client ([EthSigner](https://docs.ethsigner.consensys.net/en/latest/Concepts/TLS/)) |
|
||||||
or server ([Tessera](https://docs.tessera.consensys.net/HowTo/Configure/TLS/)) for TLS. |
|
||||||
|
|
||||||
The following diagram displays an example client and server TLS configuration. |
|
||||||
|
|
||||||
![Besu client and server TLS](../images/Besu_TLS.png) |
|
||||||
|
|
||||||
You must store private keys and certificates in password-protected PKCS12 keystore files. |
|
||||||
|
|
||||||
Use the command line options to [enable and configure](../HowTo/Configure/TLS/Configure-TLS.md) TLS. |
|
||||||
|
|
||||||
[secure P2P communication]: ../HowTo/Configure/TLS/P2P-TLS.md |
|
@ -1,57 +0,0 @@ |
|||||||
--- |
|
||||||
description: Configuring bootnodes in production networks |
|
||||||
--- |
|
||||||
|
|
||||||
# Configuring bootnodes in a production network |
|
||||||
|
|
||||||
A network must have at least one operating bootnode. To allow for continuity in the event of |
|
||||||
failure, configure two or more bootnodes. |
|
||||||
|
|
||||||
We do not recommend putting bootnodes behind a load balancer because the |
|
||||||
[enode](../../Concepts/Node-Keys.md#enode-url) relates to the node public key, IP address, and |
|
||||||
discovery ports. Any changes to a bootnode enode prevents other nodes from being able to establish |
|
||||||
a connection with the bootnode. This is why we recommend putting more bootnodes on the network |
|
||||||
itself. |
|
||||||
|
|
||||||
To ensure that a bootnode enode does not change when recovering from a complete bootnode failure: |
|
||||||
|
|
||||||
1. Create the [node key pair](../../Concepts/Node-Keys.md) (that is, the private and public key) |
|
||||||
before starting the bootnode. |
|
||||||
1. When creating bootnodes in the cloud (for example, AWS and Azure), attempt to assign a static IP |
|
||||||
address to them. If your network is: |
|
||||||
|
|
||||||
* Publicly accessible, assign an elastic IP. |
|
||||||
* Internal only, specify a private IP address when you create the instance and record this IP |
|
||||||
address. |
|
||||||
|
|
||||||
We recommend that you store the bootnode configuration under source control. |
|
||||||
|
|
||||||
## Specifying bootnodes |
|
||||||
|
|
||||||
To allow for failure, specify all bootnodes on the command line (even to the bootnodes themselves). |
|
||||||
|
|
||||||
!!! example |
|
||||||
|
|
||||||
If your network has two bootnodes, pass the following parameter to all nodes, including the |
|
||||||
bootnodes. |
|
||||||
|
|
||||||
```bash |
|
||||||
--bootnodes=enode://<publicKeyBootnode1>@<ipBootnode1>:30303,<publicKeyBootnode2>@<ipBootnode2>:30303 |
|
||||||
``` |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
Having each bootnode list the other bootnodes increases the speed of discovery. Nodes ignore |
|
||||||
their own enode in the bootnodes list so it is not required to specify different bootnode lists |
|
||||||
to the bootnodes themselves. |
|
||||||
|
|
||||||
## Adding and removing bootnodes |
|
||||||
|
|
||||||
Adding new bootnodes is a similar process to creating bootnodes. After creating the bootnodes and |
|
||||||
adding them to the network,update the [`--bootnodes`](../../Reference/CLI/CLI-Syntax.md#bootnodes) |
|
||||||
command line option for each node to include the new bootnodes. |
|
||||||
|
|
||||||
When adding bootnodes, you do not need to restart running nodes. By updating the |
|
||||||
[`--bootnodes`](../../Reference/CLI/CLI-Syntax.md#bootnodes) option, the next time you restart the |
|
||||||
nodes (for example, when [upgrading](../Upgrade/Upgrade-Node.md)), the nodes connect to the new |
|
||||||
bootnodes. |
|
@ -1,38 +0,0 @@ |
|||||||
--- |
|
||||||
description: Deploying Hyperledger Besu permissioning management dapp for production |
|
||||||
--- |
|
||||||
|
|
||||||
# Deploying the Hyperledger Besu permissioning management dapp for production |
|
||||||
|
|
||||||
To deploy the permissioning management dapp for production: |
|
||||||
|
|
||||||
1. Retrieve the most recent release (tarball or zip) from the [projects release page]. |
|
||||||
|
|
||||||
1. Unpack the distribution into a directory available to your Web server. |
|
||||||
|
|
||||||
1. In the root of the unpack directory, add a file called `config.json` replacing the placeholders |
|
||||||
shown below. |
|
||||||
|
|
||||||
!!!example "`config.json`" |
|
||||||
|
|
||||||
```json |
|
||||||
|
|
||||||
{ |
|
||||||
"accountIngressAddress": "<Address of the account ingress contract>", |
|
||||||
"nodeIngressAddress": "<Address of the node ingress contract>", |
|
||||||
"networkId": "<ID of your Ethereum network>" |
|
||||||
} |
|
||||||
``` |
|
||||||
|
|
||||||
1. On your Web server, host the contents of the directory as static files and direct root requests |
|
||||||
to `index.html`. |
|
||||||
|
|
||||||
## Starting a production permissioned network |
|
||||||
|
|
||||||
Follow the procedure as for [Getting started with onchain permissioning], but do not perform the |
|
||||||
steps using `yarn` to install, build, and start the development server. Instead, follow the |
|
||||||
procedure above to deploy the permissioning management dapp to your Web server. |
|
||||||
|
|
||||||
<!-- Links --> |
|
||||||
[projects release page]: https://github.com/ConsenSys/permissioning-smart-contracts/releases/latest |
|
||||||
[Getting started with onchain permissioning]: ../../Tutorials/Permissioning/Getting-Started-Onchain-Permissioning.md |
|
@ -1,50 +0,0 @@ |
|||||||
--- |
|
||||||
description: Configuring bootnodoes |
|
||||||
--- |
|
||||||
|
|
||||||
# Bootnodes |
|
||||||
|
|
||||||
You can use bootnodes to initially discover peers. |
|
||||||
Bootnodes are regular nodes used to discover other nodes. |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
Bootnodes and static nodes are parallel methods for finding peers. Depending on your use case, |
|
||||||
you can use only bootnodes, only static nodes, or both bootnodes and statics nodes. For |
|
||||||
example, you run multiple nodes on Mainnet (discovery using bootnodes), but want to ensure your |
|
||||||
nodes are always connected (using static nodes). |
|
||||||
|
|
||||||
To find peers, configure one or more bootnodes as described below. To configure a specific set |
|
||||||
of peer connections, use [static nodes](Static-Nodes.md). |
|
||||||
|
|
||||||
## Mainnet and public testnets |
|
||||||
|
|
||||||
For Mainnet and the Rinkeby, Ropsten, Sepolia, and Goerli testnets, Hyperledger Besu has an internal list of |
|
||||||
enode URLs and uses this list automatically when you specify the |
|
||||||
[`--network`](../../Reference/CLI/CLI-Syntax.md#network) option. |
|
||||||
|
|
||||||
## Private networks |
|
||||||
|
|
||||||
In private networks for development or testing purposes, specify at least one bootnode. |
|
||||||
|
|
||||||
In production networks, [configure two or more nodes as bootnodes](../Deploy/Bootnodes.md). |
|
||||||
|
|
||||||
### Specify a bootnode |
|
||||||
|
|
||||||
To start a node, specifying a bootnode [enode](../../Concepts/Node-Keys.md) for P2P discovery, |
|
||||||
using the [`--bootnodes`](../../Reference/CLI/CLI-Syntax.md#bootnodes) option. |
|
||||||
|
|
||||||
!!! example |
|
||||||
|
|
||||||
```bash |
|
||||||
besu --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath --bootnodes=enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb99bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303 |
|
||||||
``` |
|
||||||
|
|
||||||
The default host and port advertised to other peers for P2P discovery is `127.0.0.1:30303`. To |
|
||||||
specify a different host or port, use the |
|
||||||
[`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) and |
|
||||||
[`--p2p-port`](../../Reference/CLI/CLI-Syntax.md#p2p-port) options. |
|
||||||
|
|
||||||
By default, peer discovery listens on all available network interfaces. If the device Besu is |
|
||||||
running on must bind to a specific network interface, specify the interface using the |
|
||||||
[`--p2p-interface`](../../Reference/CLI/CLI-Syntax.md#p2p-interface) option. |
|
@ -1,61 +0,0 @@ |
|||||||
--- |
|
||||||
description: To enable communication you must expose Hyperledger Besu ports appropriately |
|
||||||
--- |
|
||||||
|
|
||||||
# Configuring ports |
|
||||||
|
|
||||||
To enable communication you must expose Hyperledger Besu ports appropriately. The following shows |
|
||||||
an example port configuration for a Besu node on AWS. |
|
||||||
|
|
||||||
![Port Configuration](../../images/PortConfiguration.png) |
|
||||||
|
|
||||||
When running Besu from the [Docker image](../Get-Started/Installation-Options/Run-Docker-Image.md), |
|
||||||
[expose ports](../Get-Started/Installation-Options/Run-Docker-Image.md#exposing-ports). |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
Besu supports [UPnP](Specifying-NAT.md) for home or small office environments where a wireless |
|
||||||
router or modem provides NAT isolation. |
|
||||||
|
|
||||||
## P2P networking |
|
||||||
|
|
||||||
To enable peer discovery, the P2P UDP port must be open for inbound connections. Specify the P2P |
|
||||||
port using the [`--p2p-port`](../../Reference/CLI/CLI-Syntax.md#p2p-port) option. The default is |
|
||||||
`30303`. |
|
||||||
|
|
||||||
We also recommend opening the P2P TCP port for inbound connections. This is not strictly required |
|
||||||
because Besu attempts to open outbound TCP connections. But if no nodes on the network are |
|
||||||
accepting inbound TCP connections, nodes cannot communicate. |
|
||||||
|
|
||||||
Combine the P2P port with the values for the |
|
||||||
[`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) and |
|
||||||
[`--p2p-interface`](../../Reference/CLI/CLI-Syntax.md#p2p-interface) options when specifying the |
|
||||||
[P2P host](../../Reference/CLI/CLI-Syntax.md#p2p-host) and |
|
||||||
[P2P network interface](../../Reference/CLI/CLI-Syntax.md#p2p-interface). |
|
||||||
|
|
||||||
!!! info |
|
||||||
|
|
||||||
By default, peer discovery listens on `0.0.0.0:30303` (all interfaces). If the device Besu is |
|
||||||
running on must bind to a specific network interface, specify the interface using the |
|
||||||
[`--p2p-interface`](../../Reference/CLI/CLI-Syntax.md#p2p-interface) option. |
|
||||||
|
|
||||||
## JSON-RPC API |
|
||||||
|
|
||||||
To enable access to the [JSON-RPC API](../Interact/APIs/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. |
|
||||||
|
|
||||||
Specify the HTTP and WebSockets JSON-RPC ports using the |
|
||||||
[`--rpc-http-port`](../../Reference/CLI/CLI-Syntax.md#rpc-http-port) and |
|
||||||
[`--rpc-ws-port`](../../Reference/CLI/CLI-Syntax.md#rpc-ws-port) options. The defaults are `8545` |
|
||||||
and `8546`. |
|
||||||
|
|
||||||
## Metrics |
|
||||||
|
|
||||||
To enable |
|
||||||
[Prometheus to access Besu](../Monitor/Metrics.md#monitor-node-performance-using-prometheus), open |
|
||||||
the metrics port or metrics push port to Prometheus or the Prometheus push gateway on TCP. |
|
||||||
|
|
||||||
Specify the ports for Prometheus and Prometheus push gateway using the |
|
||||||
[`--metrics-port`](../../Reference/CLI/CLI-Syntax.md#metrics-port) and |
|
||||||
[`--metrics-push-port`](../../Reference/CLI/CLI-Syntax.md#metrics-push-port) options. The defaults |
|
||||||
are `9545` and `9001`. |
|
@ -1,17 +0,0 @@ |
|||||||
--- |
|
||||||
title: Installation options |
|
||||||
description: Options for getting started with Hyperledger Besu |
|
||||||
--- |
|
||||||
|
|
||||||
# Options for getting started |
|
||||||
|
|
||||||
## New to Hyperledger Besu? |
|
||||||
|
|
||||||
Get started with the [Developer Quickstart](../../../Tutorials/Developer-Quickstart.md). |
|
||||||
Use the quickstart to rapidly generate local blockchain networks. |
|
||||||
|
|
||||||
## Installation options |
|
||||||
|
|
||||||
* [Docker image](Run-Docker-Image.md) |
|
||||||
* [Binaries](Install-Binaries.md) |
|
||||||
* [Build from source](Build-from-source.md) |
|
@ -1,17 +0,0 @@ |
|||||||
--- |
|
||||||
description: Migrate to Besu guide |
|
||||||
--- |
|
||||||
|
|
||||||
# Migrate to Besu |
|
||||||
|
|
||||||
Migrate from a different Ethereum [execution client](../../Concepts/Merge.md#execution-and-consensus-clients) |
|
||||||
to Besu to contribute to [client diversity](https://clientdiversity.org/). |
|
||||||
|
|
||||||
When migrating from a different client, you are [configuring Besu as an execution client](../Upgrade/Prepare-for-The-Merge.md#configure-besu-as-an-execution-client) |
|
||||||
and connecting your [consensus client](../../Concepts/Merge.md#consensus-clients) to Besu instead of your original execution client. |
|
||||||
|
|
||||||
To minimize downtime while [Besu syncs](../../Concepts/Node-Types.md) and avoid downtime penalties, |
|
||||||
you can sync Besu with a new consensus layer instance. |
|
||||||
Once Besu has fully synced you can connect it to your existing consensus client. |
|
||||||
|
|
||||||
Find guides to switch from specific clients on the [client diversity website](https://clientdiversity.org/#switch). |
|
@ -1,20 +0,0 @@ |
|||||||
--- |
|
||||||
description: Specify the permissioning interface version |
|
||||||
--- |
|
||||||
|
|
||||||
# Specify the permissioning contract interface version |
|
||||||
|
|
||||||
Use the [`--permissions-nodes-contract-version`](../../Reference/CLI/CLI-Syntax.md#permissions-nodes-contract-version) |
|
||||||
command line option to specify the version of the [permissioning contract interface](../../Concepts/Permissioning/Onchain-Permissioning.md#permissioning-contracts). |
|
||||||
The default is 1. |
|
||||||
|
|
||||||
Specify the contract interface version that maps to the version of the [Enterprise Ethereum Alliance Client Specification](https://entethalliance.org/technical-specifications/) |
|
||||||
the contract interface implements. |
|
||||||
|
|
||||||
| | EEA Client Specification | Contract interface | |
|
||||||
|:--------|:-------------------------|:-------------------| |
|
||||||
| Version | 5 | 1 | |
|
||||||
| Version | 6 | 2 | |
|
||||||
|
|
||||||
The permissioning contracts in the [`ConsenSys/permissioning-smart-contracts`](https://github.com/ConsenSys/permissioning-smart-contracts) |
|
||||||
repository implement the version 2 contract interface. |
|
@ -1,78 +0,0 @@ |
|||||||
--- |
|
||||||
description: Updating Hyperledger Besu onchain allowlists |
|
||||||
--- |
|
||||||
|
|
||||||
# Updating nodes and accounts allowlists |
|
||||||
|
|
||||||
When using [onchain permissioning](../../Concepts/Permissioning/Onchain-Permissioning.md), you can update |
|
||||||
[nodes](#update-nodes-allowlist) and [accounts](#update-accounts-allowlist) allowlists. |
|
||||||
|
|
||||||
## Update nodes allowlist |
|
||||||
|
|
||||||
To add a node to the Hyperledger Besu nodes allowlist: |
|
||||||
|
|
||||||
1. On the **Nodes** tab of the [permissioning management dapp](../../Tutorials/Permissioning/Getting-Started-Onchain-Permissioning.md), |
|
||||||
select **Add Node**. |
|
||||||
The **Add Node** window displays. |
|
||||||
2. Enter the [enode URL](../../Concepts/Node-Keys.md#enode-url) of the node you are adding and select **Add Node**. |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
If your node has two different IP addresses for ingress and egress |
|
||||||
(for example, if you use Kubernetes implementing a load balancer for ingress and a NAT gateway IP address for egress), |
|
||||||
add both addresses to the allowlist, using the same public key for each IP address. This will allow the node to connect. |
|
||||||
|
|
||||||
!!! important |
|
||||||
|
|
||||||
Node allowlists [support domain names] in enode URLs as an experimental feature. Use the `--Xdns-enabled` option |
|
||||||
to enable domain name support. |
|
||||||
|
|
||||||
If using Kubernetes, enable domain name support and use the `--Xdns-update-enabled` option to ensure that Besu can |
|
||||||
connect to a container after being restarted, even if the IP address of the container changes. |
|
||||||
|
|
||||||
To remove a node from the nodes allowlist: |
|
||||||
|
|
||||||
1. On the **Nodes** tab of the permissioning management dapp, hover over the row of the |
|
||||||
node you are removing. A trash can displays. |
|
||||||
1. Select the trash can. |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
If you add a running node, the node does not attempt to reconnect to the bootnode and |
|
||||||
synchronize until peer discovery restarts. To add an allowlisted node as a peer without waiting |
|
||||||
for peer discovery to restart, use |
|
||||||
[`admin_addPeer`](../../Reference/API-Methods.md#admin_addpeer). |
|
||||||
|
|
||||||
If you add the node to the allowlist before starting the node, using `admin_addPeer` is not |
|
||||||
required because peer discovery is run on node startup. |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
If nodes are not connecting as expected, set the [log level to `TRACE`](../../Reference/CLI/CLI-Syntax.md#logging) |
|
||||||
and search for messages containing `Node permissioning` to identify the issue. |
|
||||||
|
|
||||||
Ensure the [`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) command line option has been |
|
||||||
correctly configured for all nodes with the |
|
||||||
externally accessible address. |
|
||||||
|
|
||||||
If you change your network configuration, you may need to update the node allowlist. |
|
||||||
|
|
||||||
## Update accounts allowlist |
|
||||||
|
|
||||||
To add an account to the accounts allowlist: |
|
||||||
|
|
||||||
1. On the **Accounts** tab of the [permissioning management dapp](../../Tutorials/Permissioning/Getting-Started-Onchain-Permissioning.md), |
|
||||||
select **Add Account**. The **Add Account** window displays. |
|
||||||
1. Enter the account address in the **Account Address** field and select **Add Account**. |
|
||||||
|
|
||||||
To remove an account from the accounts allowlist: |
|
||||||
|
|
||||||
1. On the **Accounts** tab of the permissioning management dapp, hover over the row of |
|
||||||
the account you are removing. A trash can displays. |
|
||||||
1. Select the trash can. |
|
||||||
|
|
||||||
## Update admins |
|
||||||
|
|
||||||
You can add or remove admins in the same way as [accounts](#update-accounts-allowlist), except on the **Admins** tab. |
|
||||||
|
|
||||||
[support domain names]: ../../Concepts/Node-Keys.md#domain-name-support |
|
@ -1,27 +0,0 @@ |
|||||||
--- |
|
||||||
description: Using third party wallets for account management with Hyperledger Besu |
|
||||||
--- |
|
||||||
|
|
||||||
# Using wallets for key management |
|
||||||
|
|
||||||
Hyperledger Besu does not support key management inside the client. Use: |
|
||||||
|
|
||||||
* [EthSigner](http://docs.ethsigner.consensys.net/en/latest/) with Besu to provide access to your |
|
||||||
key store and sign transactions. |
|
||||||
* Third-party tools (for example, [MetaMask](https://metamask.io/) and [web3j](https://web3j.io/)) |
|
||||||
for creating accounts. |
|
||||||
|
|
||||||
In Besu, you can use the JSON-RPC methods: |
|
||||||
|
|
||||||
* [`eth_getBalance`](../../Reference/API-Methods.md#eth_getbalance) to retrieve the account balance. |
|
||||||
* [`eth_sendRawTransaction`](../../Reference/API-Methods.md#eth_sendrawtransaction) to transfer |
|
||||||
ether or create and interact with contracts. For more information, see |
|
||||||
[Transactions](Transactions.md#transactions)). |
|
||||||
* [`eea_sendRawTransaction`](../../Reference/API-Methods.md#eea_sendrawtransaction) to send |
|
||||||
[private transactions](Creating-Sending-Private-Transactions.md). |
|
||||||
|
|
||||||
!!! tip |
|
||||||
|
|
||||||
[EthSigner](http://docs.ethsigner.consensys.net/en/latest/) implements |
|
||||||
[`eth_sendTransaction`](http://docs.ethsigner.consensys.net/en/latest/Using-EthSigner/Using-EthSigner/#eth_sendtransaction) |
|
||||||
and [`eea_sendTransaction`](http://docs.ethsigner.consensys.net/en/latest/Using-EthSigner/Using-EthSigner/#eea_sendtransaction). |
|
@ -1,48 +0,0 @@ |
|||||||
--- |
|
||||||
description: How to trace transactions |
|
||||||
--- |
|
||||||
|
|
||||||
# Trace transactions |
|
||||||
|
|
||||||
To get detailed information about transaction processing, use the |
|
||||||
[`TRACE` API](../../Reference/API-Methods.md#trace-methods). |
|
||||||
Enable the `TRACE` API using the |
|
||||||
[`--rpc-http-api`](../../Reference/CLI/CLI-Syntax.md#rpc-http-api) or |
|
||||||
[`--rpc-ws-api`](../../Reference/CLI/CLI-Syntax.md#rpc-ws-api) command line options. |
|
||||||
|
|
||||||
The `TRACE` API has two sets of trace calls, [ad-hoc tracing APIs](#ad-hoc-tracing-apis) and |
|
||||||
[transaction-trace filtering APIs](#transaction-trace-filtering-apis). |
|
||||||
|
|
||||||
## Ad-hoc tracing APIs |
|
||||||
|
|
||||||
These APIs allow different diagnostic options when tracing calls or transactions. |
|
||||||
The options are [`trace`, `vmTrace`, or `stateDiff`](../../Reference/Trace-Types.md). |
|
||||||
|
|
||||||
To use the ad-hoc tracing APIs, the requested block or transaction must be within the |
|
||||||
number of [blocks retained](../../Reference/CLI/CLI-Syntax.md#pruning-blocks-retained) with [pruning enabled](../../Reference/CLI/CLI-Syntax.md#pruning-enabled) |
|
||||||
(by default, 1024). |
|
||||||
|
|
||||||
The ad-hoc tracing APIs are: |
|
||||||
|
|
||||||
* [trace_call](../../Reference/API-Methods.md#trace_call) |
|
||||||
* [trace_callMany](../../Reference/API-Methods.md#trace_callmany) |
|
||||||
* [trace_rawTransaction](../../Reference/API-Methods.md#trace_rawtransaction) |
|
||||||
* [trace_replayBlockTransactions](../../Reference/API-Methods.md#trace_replayblocktransactions) |
|
||||||
|
|
||||||
## Transaction-trace filtering APIs |
|
||||||
|
|
||||||
These APIs allow you to filter and search by specific information such as the block, address, or transaction. |
|
||||||
These APIs only use the [`trace` type](../../Reference/Trace-Types.md#trace). |
|
||||||
|
|
||||||
To use the transaction-trace filtering APIs, your node must be an archive node |
|
||||||
(that is, synchronized without pruning or fast sync) or the |
|
||||||
requested block or transaction must be within the |
|
||||||
number of [blocks retained](../../Reference/CLI/CLI-Syntax.md#pruning-blocks-retained) with [pruning enabled](../../Reference/CLI/CLI-Syntax.md#pruning-enabled) |
|
||||||
(by default, 1024). |
|
||||||
|
|
||||||
The transaction-trace filtering APIs are: |
|
||||||
|
|
||||||
* [trace_block](../../Reference/API-Methods.md#trace_block) |
|
||||||
* [trace_filter](../../Reference/API-Methods.md#trace_filter) |
|
||||||
* [trace_get](../../Reference/API-Methods.md#trace_get) |
|
||||||
* [trace_transaction](../../Reference/API-Methods.md#trace_transaction) |
|
@ -1,25 +0,0 @@ |
|||||||
--- |
|
||||||
description: Upgrading protocol versions |
|
||||||
--- |
|
||||||
|
|
||||||
# Upgrading your protocol in a private network |
|
||||||
|
|
||||||
To [upgrade the protocol](../../Concepts/Protocol-Upgrades.md) (also known as a hard fork) in a |
|
||||||
private network: |
|
||||||
|
|
||||||
1. Review included EIPs for breaking changes. A [meta EIP](https://eips.ethereum.org/meta) for each |
|
||||||
protocol upgrade lists included EIPs. For example, |
|
||||||
[Istanbul](https://eips.ethereum.org/EIPS/eip-1679). |
|
||||||
1. Network participants agree on the block number at which to |
|
||||||
[upgrade](../../Concepts/Protocol-Upgrades.md). |
|
||||||
1. For each node in the network: |
|
||||||
|
|
||||||
a. Add the |
|
||||||
[milestone block number](../../Reference/Config-Items.md#milestone-blocks) to the genesis |
|
||||||
file. |
|
||||||
b. Restart the node before reaching milestone block. |
|
||||||
|
|
||||||
!!! caution |
|
||||||
|
|
||||||
To avoid a forked network, all network participants must update their genesis file to include |
|
||||||
the agreed on milestone block and restart their node before reaching the milestone block. |
|
@ -1,47 +0,0 @@ |
|||||||
--- |
|
||||||
description: Hyperledger Besu resources including blog posts, webinars, and meetup recordings. |
|
||||||
--- |
|
||||||
|
|
||||||
# Hyperledger Besu resources |
|
||||||
|
|
||||||
## Blog posts |
|
||||||
|
|
||||||
[ConsenSys Quorum Blog] |
|
||||||
|
|
||||||
[Understanding Proof of Authority via Clique and IBFT 2.0 Private Networks] |
|
||||||
|
|
||||||
[Security Challenges for Enterprise Blockchain Solutions] |
|
||||||
|
|
||||||
[Why We Rebuilt Ethereum from Scratch] |
|
||||||
|
|
||||||
[Why Java for Blockchain] |
|
||||||
|
|
||||||
[Case Study: How Poste Italiane brings value to loyalty with Hyperledger Besu] |
|
||||||
|
|
||||||
## Webinars |
|
||||||
|
|
||||||
[Besu Plugin API: Learn How to Leverage Plugin APIs on Hyperledger Besu] |
|
||||||
|
|
||||||
[Permissioning in Blockchain: A Technical Look at Benefits and Best Practices] |
|
||||||
|
|
||||||
[Privacy in Besu: How PegaSys Redefined Blockchain for Enterprises] |
|
||||||
|
|
||||||
[The Final Word: IBFT 2.0 and Enterprise Consensus] |
|
||||||
|
|
||||||
[De-Mystifying Besu: Understanding an Ethereum Codebase] |
|
||||||
|
|
||||||
[Getting Started with Besu] |
|
||||||
|
|
||||||
<!-- Links --> |
|
||||||
[Consensys Quorum Blog]: https://consensys.net/quorum/blog/ |
|
||||||
[Understanding Proof of Authority via Clique and IBFT 2.0 Private Networks]: https://consensys.net/blog/quorum/hyperledger-besu-understanding-proof-of-authority-via-clique-and-ibft-2-0-private-networks-part-1/ |
|
||||||
[Security Challenges for Enterprise Blockchain Solutions]: https://consensys.net/blog/enterprise-blockchain/how-pegasys-orchestrate-solves-4-key-security-challenges-for-enterprise-blockchain-solutions/ |
|
||||||
[Why We Rebuilt Ethereum from Scratch]: https://media.consensys.net/why-we-rebuilt-ethereum-from-scratch-9e38b6ebd4a2 |
|
||||||
[Why Java for Blockchain]: https://media.consensys.net/why-java-for-blockchain-73f1b444c2d |
|
||||||
[Besu Plugin API: Learn How to Leverage Plugin APIs on Hyperledger Besu]: https://youtu.be/78sa2WuA1rg |
|
||||||
[Permissioning in Blockchain: A Technical Look at Benefits and Best Practices]: https://www.youtube.com/watch?v=CD0pHtNDqZs |
|
||||||
[Privacy in Besu: How PegaSys Redefined Blockchain for Enterprises]: https://www.youtube.com/watch?v=8l7SSZLyFL8 |
|
||||||
[The Final Word: IBFT 2.0 and Enterprise Consensus]: https://www.youtube.com/watch?v=YmTUP_dWfME |
|
||||||
[De-Mystifying Besu: Understanding an Ethereum Codebase]: https://www.youtube.com/watch?v=OJfib9kTK7U&feature=youtu.be |
|
||||||
[Getting Started with Besu]: https://www.youtube.com/watch?v=OKWBr94J9rY&t=1s |
|
||||||
[Case Study: How Poste Italiane brings value to loyalty with Hyperledger Besu]: https://www.hyperledger.org/learn/publications/posteitaliane-case-study |
|
@ -0,0 +1,16 @@ |
|||||||
|
--- |
||||||
|
description: Configuring Besu at the network level compared to the node level |
||||||
|
--- |
||||||
|
|
||||||
|
# Network vs node configuration |
||||||
|
|
||||||
|
You can configure Besu at the network level and the node level. |
||||||
|
|
||||||
|
Specify network-wide settings in the [genesis file](../../public-networks/reference/genesis-items.md). For example, |
||||||
|
include `evmStackSize` or specify the |
||||||
|
[consensus mechanism](../../private-networks/how-to/configure/consensus/index.md). |
||||||
|
|
||||||
|
Specify node settings on the command line or in the |
||||||
|
[node configuration file](../../public-networks/how-to/configuration-file.md). For example, enable |
||||||
|
[JSON-RPC API methods](../../public-networks/reference/api/index.md) or specify the |
||||||
|
[data directory](../../public-networks/reference/cli/options.md#data-path) for the node. |
@ -0,0 +1,22 @@ |
|||||||
|
--- |
||||||
|
description: Pruning concept information. |
||||||
|
--- |
||||||
|
|
||||||
|
# Pruning |
||||||
|
|
||||||
|
In Besu, pruning reduces the storage required by removing state trie nodes that are unreachable |
||||||
|
from [recent blocks](../../public-networks/reference/cli/options.md#pruning-blocks-retained). |
||||||
|
|
||||||
|
Pruning is disabled by default, and can be enabled with the |
||||||
|
[`--pruning-enabled`](../../public-networks/reference/cli/options.md#pruning-enabled) command line option. |
||||||
|
|
||||||
|
!!! Important |
||||||
|
|
||||||
|
Using pruning with [private transactions] is not supported. |
||||||
|
|
||||||
|
Pruning might increase block import times, but it does not affect the ability of nodes to stay in |
||||||
|
sync. |
||||||
|
|
||||||
|
!!! Important |
||||||
|
|
||||||
|
Pruning is being deprecated for [Bonsai Tries] and is currently not being updated. |
@ -0,0 +1,19 @@ |
|||||||
|
--- |
||||||
|
description: private networks concepts overview |
||||||
|
--- |
||||||
|
|
||||||
|
# Concepts |
||||||
|
|
||||||
|
This section provides background information and context about private network features. |
||||||
|
|
||||||
|
The following features are shared with [public networks](../../public-networks/index.md) and the |
||||||
|
content can be found in the public networks section: |
||||||
|
|
||||||
|
- Transactions: |
||||||
|
- [Transaction types](../../public-networks/concepts/transactions/types.md) |
||||||
|
- [Transaction pool](../../public-networks/concepts/transactions/pool.md) |
||||||
|
- [Transaction validation](../../public-networks/concepts/transactions/validation.md) |
||||||
|
- [Network ID and chain ID](../../public-networks/concepts/network-and-chain-id.md) |
||||||
|
- [Events and logs](../../public-networks/concepts/events-and-logs.md) |
||||||
|
- [Genesis file](../../public-networks/concepts/genesis-file.md) |
||||||
|
- [Node keys](../../public-networks/concepts/node-keys.md) |
@ -0,0 +1,29 @@ |
|||||||
|
--- |
||||||
|
title: Installation options |
||||||
|
description: Options for getting started with Hyperledger Besu |
||||||
|
--- |
||||||
|
|
||||||
|
# Options for getting started |
||||||
|
|
||||||
|
## New to Hyperledger Besu? |
||||||
|
|
||||||
|
Get started with the [Developer Quickstart](../../../private-networks/tutorials/quickstart.md). |
||||||
|
Use the quickstart to rapidly generate local blockchain networks. |
||||||
|
|
||||||
|
## Installation options |
||||||
|
|
||||||
|
* [Docker image](run-docker-image.md) |
||||||
|
* [Binaries](binary-distribution.md) |
||||||
|
|
||||||
|
## Build from source |
||||||
|
|
||||||
|
If you want to use the latest development version of Hyperledger Besu or a specific commit, |
||||||
|
build from source. Otherwise, use the [binary] or [Docker image] for more stable |
||||||
|
versions. |
||||||
|
|
||||||
|
View the [Hyperledger Wiki] for instructions to install Hyperledger Besu from source. |
||||||
|
|
||||||
|
<!-- link --> |
||||||
|
[Hyperledger Wiki]: https://wiki.hyperledger.org/display/BESU/Building+from+source |
||||||
|
[binary]: binary-distribution.md |
||||||
|
[Docker image]: run-docker-image.md |
@ -0,0 +1,138 @@ |
|||||||
|
--- |
||||||
|
description: Run Hyperledger Besu using the official docker image |
||||||
|
--- |
||||||
|
|
||||||
|
# Run Besu from a Docker image |
||||||
|
|
||||||
|
Hyperledger Besu provides a Docker image to run a Besu node in a Docker container. |
||||||
|
|
||||||
|
Use this Docker image to run a single Besu node without installing Besu. |
||||||
|
|
||||||
|
## Prerequisites |
||||||
|
|
||||||
|
* [Docker](https://docs.docker.com/install/) |
||||||
|
|
||||||
|
* MacOS or Linux |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
The Docker image does not run on Windows. |
||||||
|
|
||||||
|
## Default node for Mainnet |
||||||
|
|
||||||
|
To run a Besu node in a container connected to the Ethereum Mainnet: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run hyperledger/besu:latest |
||||||
|
``` |
||||||
|
|
||||||
|
!!! note |
||||||
|
|
||||||
|
https://hub.docker.com/r/hyperledger/besu/tags lists the available tags for the image. |
||||||
|
|
||||||
|
If you previously pulled `latest`, Docker runs the cached version. |
||||||
|
|
||||||
|
To ensure your image is up to date, pull the `latest` version again using `docker pull hyperledger/besu:latest`. |
||||||
|
|
||||||
|
## Expose ports |
||||||
|
|
||||||
|
Expose ports for P2P discovery, GraphQL, metrics, and HTTP and WebSocket JSON-RPC. You need |
||||||
|
to expose the ports to use the default ports or the ports specified using |
||||||
|
[`--rpc-http-port`](../../../public-networks/reference/cli/options.md#rpc-http-port), |
||||||
|
[`--p2p-port`](../../../public-networks/reference/cli/options.md#p2p-port), |
||||||
|
[`--rpc-ws-port`](../../../public-networks/reference/cli/options.md#rpc-ws-port), |
||||||
|
[`--metrics-port`](../../../public-networks/reference/cli/options.md#metrics-port), |
||||||
|
[`--graphql-http-port`](../../../public-networks/reference/cli/options.md#graphql-http-port), and |
||||||
|
[`--metrics-push-port`](../../../public-networks/reference/cli/options.md#metrics-push-port) options. |
||||||
|
|
||||||
|
To run Besu exposing local ports for access: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p <localportJSON-RPC>:8545 -p <localportWS>:8546 -p <localportP2P>:30303 hyperledger/besu:latest --rpc-http-enabled --rpc-ws-enabled |
||||||
|
``` |
||||||
|
|
||||||
|
!!! note |
||||||
|
|
||||||
|
The examples on this page expose TCP ports only. |
||||||
|
To expose UDP ports, specify `/udp` at the end of the argument for the `-p` Docker subcommand option: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p <port>:<port>/udp |
||||||
|
``` |
||||||
|
|
||||||
|
See the [`docker run -p` documentation](https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose). |
||||||
|
|
||||||
|
!!! example |
||||||
|
|
||||||
|
To enable JSON-RPC HTTP calls to `127.0.0.1:8545` and P2P discovery on `127.0.0.1:13001`: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p 8545:8545 -p 13001:30303 hyperledger/besu:latest --rpc-http-enabled |
||||||
|
``` |
||||||
|
|
||||||
|
## Start Besu |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
Don't mount a volume at the default data path (`/opt/besu`). Mounting a volume at the default |
||||||
|
data path interferes with the operation of Besu and prevents Besu from safely launching. |
||||||
|
|
||||||
|
To run a node that maintains the node state (key and database), |
||||||
|
[`--data-path`](../../../public-networks/reference/cli/options.md#data-path) must be set to a location other |
||||||
|
than `/opt/besu` and a storage volume mounted at that location. |
||||||
|
|
||||||
|
When running in a Docker container, [`--nat-method`](../../../public-networks/how-to/connect/specify-nat.md) |
||||||
|
must be set to `DOCKER` or `AUTO` (default). Don't set |
||||||
|
[`--nat-method`](../../../public-networks/how-to/connect/specify-nat.md) to `NONE` or `UPNP`. |
||||||
|
|
||||||
|
You can specify |
||||||
|
[Besu environment variables](../../../public-networks/reference/cli/options.md#besu-environment-variables) with the |
||||||
|
Docker image instead of the command line options. |
||||||
|
|
||||||
|
!!! example |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p 30303:30303 -p 8545:8545 -e BESU_RPC_HTTP_ENABLED=true -e BESU_NETWORK=goerli hyperledger/besu:latest |
||||||
|
``` |
||||||
|
|
||||||
|
### Run a node for testing |
||||||
|
|
||||||
|
To run a node that mines blocks at a rate suitable for testing purposes with WebSockets enabled: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p 8546:8546 --mount type=bind,source=/<myvolume/besu/testnode>,target=/var/lib/besu hyperledger/besu:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-ws-enabled --network=dev --data-path=/var/lib/besu |
||||||
|
``` |
||||||
|
|
||||||
|
### Run a node on Rinkeby testnet |
||||||
|
|
||||||
|
To run a node on Rinkeby: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p 30303:30303 --mount type=bind,source=/<myvolume/besu/rinkeby>,target=/var/lib/besu hyperledger/besu:latest --network=rinkeby --data-path=/var/lib/besu |
||||||
|
``` |
||||||
|
|
||||||
|
### Run a node on Ethereum Mainnet |
||||||
|
|
||||||
|
To run a node on Ethereum Mainnet with the HTTP JSON-RPC service enabled: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker run -p 8545:8545 --mount type=bind,source=/<myvolume/besu/rinkeby>,target=/var/lib/besu -p 30303:30303 hyperledger/besu:latest --rpc-http-enabled --data-path=/var/lib/besu |
||||||
|
``` |
||||||
|
|
||||||
|
## Stop Besu and clean up resources |
||||||
|
|
||||||
|
When done running nodes, you can shut down the node container without deleting resources or you can |
||||||
|
delete the container after stopping it. Run `docker container ls` and `docker volume ls` to get the |
||||||
|
container and volume names. |
||||||
|
|
||||||
|
To stop a container: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker stop <container-name> |
||||||
|
``` |
||||||
|
|
||||||
|
To delete a container: |
||||||
|
|
||||||
|
```bash |
||||||
|
docker rm <container-name> |
||||||
|
``` |
@ -0,0 +1,222 @@ |
|||||||
|
--- |
||||||
|
description: Starting Hyperledger Besu |
||||||
|
--- |
||||||
|
|
||||||
|
# Start Besu |
||||||
|
|
||||||
|
Use the [`besu`](../reference/cli/options.md) command with the required command line options |
||||||
|
to start a node. Alternatively, use the [launcher](#besu-launcher) to start Besu interactively |
||||||
|
with the most common options. |
||||||
|
|
||||||
|
## Prerequisites |
||||||
|
|
||||||
|
[Besu installed](install/binary-distribution.md) |
||||||
|
|
||||||
|
## Local block data |
||||||
|
|
||||||
|
When connecting to a network other than the network previously connected to, you must either delete |
||||||
|
the local block data or use the [`--data-path`](../../public-networks/reference/cli/options.md#data-path) option |
||||||
|
to specify a different data directory. |
||||||
|
|
||||||
|
To delete the local block data, delete the `database` directory in the |
||||||
|
`besu/build/distribution/besu-<version>` directory. |
||||||
|
|
||||||
|
## Genesis configuration |
||||||
|
|
||||||
|
Besu specifies the genesis configuration, and sets the network ID and bootnodes when connecting to |
||||||
|
[Ropsten](#run-a-node-on-ropsten-testnet), [Rinkeby](#run-a-node-on-rinkeby-testnet), |
||||||
|
[Goerli](#run-a-node-on-goerli-testnet), [Kiln](#run-a-node-on-kiln-testnet), |
||||||
|
[Sepolia](#run-a-node-on-sepolia-testnet), and [Mainnet](#run-a-node-on-ethereum-mainnet). |
||||||
|
|
||||||
|
When you specify [`--network=dev`](../../public-networks/reference/cli/options.md#network), Besu uses the |
||||||
|
development mode genesis configuration with a fixed low difficulty. A node started with |
||||||
|
[`--network=dev`](../../public-networks/reference/cli/options.md#network) has an empty bootnodes list by |
||||||
|
default. |
||||||
|
|
||||||
|
The genesis files defining the genesis configurations are in the |
||||||
|
[Besu source files](https://github.com/hyperledger/besu/tree/master/config/src/main/resources). |
||||||
|
|
||||||
|
To define a genesis configuration, create a genesis file (for example, `genesis.json`) and specify |
||||||
|
the file using the [`--genesis-file`](../../public-networks/reference/cli/options.md#genesis-file) option. |
||||||
|
|
||||||
|
## Syncing and storage |
||||||
|
|
||||||
|
By default, Besu syncs to the current state of the blockchain using |
||||||
|
[fast sync](../../public-networks/how-to/connect/sync-node.md#fast-synchronization) in: |
||||||
|
|
||||||
|
- Networks specified using [`--network`](../../public-networks/reference/cli/options.md#network) except for the `dev` |
||||||
|
development network. |
||||||
|
- Ethereum Mainnet. |
||||||
|
|
||||||
|
We recommend using [snap sync](../../public-networks/how-to/connect/sync-node.md#snap-synchronization) for a faster sync, by starting Besu |
||||||
|
with [`--sync-mode=X_SNAP`](../../public-networks/reference/cli/options.md#sync-mode). |
||||||
|
|
||||||
|
By default, Besu stores data in the [Forest of Tries](../../public-networks/concepts/data-storage-formats.md#forest-of-tries) format. |
||||||
|
We recommend using [Bonsai Tries](../../public-networks/concepts/data-storage-formats.md#bonsai-tries) for lower storage requirements, |
||||||
|
by starting Besu with [`--data-storage-format=BONSAI`](../../public-networks/reference/cli/options.md#data-storage-format). |
||||||
|
|
||||||
|
## Confirm node is running |
||||||
|
|
||||||
|
If you started Besu with the |
||||||
|
[`--rpc-http-enabled`](../../public-networks/reference/cli/options.md#rpc-http-enabled) option, use |
||||||
|
[cURL](https://curl.haxx.se/) to call [JSON-RPC API methods](../reference/api/index.md) to |
||||||
|
confirm the node is running. |
||||||
|
|
||||||
|
!!!example |
||||||
|
|
||||||
|
* `eth_chainId` returns the chain ID of the network. |
||||||
|
|
||||||
|
```bash |
||||||
|
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545 |
||||||
|
``` |
||||||
|
|
||||||
|
* `eth_syncing` returns the starting, current, and highest block. |
||||||
|
|
||||||
|
```bash |
||||||
|
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545 |
||||||
|
``` |
||||||
|
|
||||||
|
For example, after connecting to Mainnet, `eth_syncing` will return something similar to: |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"jsonrpc" : "2.0", |
||||||
|
"id" : 1, |
||||||
|
"result" : { |
||||||
|
"startingBlock" : "0x0", |
||||||
|
"currentBlock" : "0x2d0", |
||||||
|
"highestBlock" : "0x66c0" |
||||||
|
} |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
## Run a node for testing |
||||||
|
|
||||||
|
To run a node that mines blocks at a rate suitable for testing purposes: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=dev --miner-enabled --miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --host-allowlist="*" --rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir |
||||||
|
``` |
||||||
|
|
||||||
|
You can also use the following [configuration file](../../public-networks/how-to/configuration-file.md) |
||||||
|
on the command line to start a node with the same options as above: |
||||||
|
|
||||||
|
```toml |
||||||
|
network="dev" |
||||||
|
miner-enabled=true |
||||||
|
miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73" |
||||||
|
rpc-http-cors-origins=["all"] |
||||||
|
host-allowlist=["*"] |
||||||
|
rpc-ws-enabled=true |
||||||
|
rpc-http-enabled=true |
||||||
|
data-path="/tmp/tmpdata-path" |
||||||
|
``` |
||||||
|
|
||||||
|
!!! caution |
||||||
|
|
||||||
|
The following settings are a security risk in production environments: |
||||||
|
|
||||||
|
* Enabling the HTTP JSON-RPC service |
||||||
|
([`--rpc-http-enabled`](../../public-networks/reference/cli/options.md#rpc-http-enabled)) and setting |
||||||
|
[`--rpc-http-host`](../../public-networks/reference/cli/options.md#rpc-http-host) to 0.0.0.0 exposes the |
||||||
|
RPC connection on your node to any remote connection. |
||||||
|
* Setting [`--host-allowlist`](../../public-networks/reference/cli/options.md#host-allowlist) to `"*"` |
||||||
|
allows JSON-RPC API access from any host. |
||||||
|
* Setting |
||||||
|
[`--rpc-http-cors-origins`](../../public-networks/reference/cli/options.md#rpc-http-cors-origins) to |
||||||
|
`"all"` or `"*"` allows cross-origin resource sharing (CORS) access from any domain. |
||||||
|
|
||||||
|
## Run a node on Ropsten testnet |
||||||
|
|
||||||
|
To run a node on Ropsten: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=ropsten |
||||||
|
``` |
||||||
|
|
||||||
|
To run a node on Ropsten with the HTTP JSON-RPC service enabled and allow Remix to access the node: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=ropsten --rpc-http-enabled --rpc-http-cors-origins "http://remix.ethereum.org" |
||||||
|
``` |
||||||
|
|
||||||
|
## Run a node on Rinkeby testnet |
||||||
|
|
||||||
|
To run a node on Rinkeby specifying a data directory: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=rinkeby --data-path=<path>/<rinkebydata-path> |
||||||
|
``` |
||||||
|
|
||||||
|
Where `<path>` and `<rinkebydata-path>` are the path and directory to save the Rinkeby chain data |
||||||
|
to. |
||||||
|
|
||||||
|
## Run a node on Goerli testnet |
||||||
|
|
||||||
|
To run a node on [Goerli](https://github.com/goerli/testnet) specifying a data directory: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=goerli --data-path=<path>/<goerlidata-path> |
||||||
|
``` |
||||||
|
|
||||||
|
Where `<path>` and `<goerlidata-path>` are the path and directory to save the Goerli chain data to. |
||||||
|
|
||||||
|
## Run a node on Sepolia testnet |
||||||
|
|
||||||
|
To run a node on [Sepolia](https://github.com/goerli/sepolia) specifying a data directory: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --network=sepolia --data-path=<path>/<sepoliadata-path> |
||||||
|
``` |
||||||
|
|
||||||
|
Where `<path>` and `<sepoliadata-path>` are the path and directory to save the Sepolia chain data |
||||||
|
to. |
||||||
|
|
||||||
|
## Run a node on Ethereum Mainnet |
||||||
|
|
||||||
|
To run a node on the Ethereum Mainnet: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu |
||||||
|
``` |
||||||
|
|
||||||
|
To run a node on Mainnet with the HTTP JSON-RPC service enabled and available for localhost only: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --rpc-http-enabled |
||||||
|
``` |
||||||
|
|
||||||
|
## Besu launcher |
||||||
|
|
||||||
|
Use the Besu launcher to interactively configure and start a node with the most common options. The |
||||||
|
launcher asks a series of questions and generates a [configuration file](../../public-networks/how-to/configuration-file.md). |
||||||
|
|
||||||
|
To run the Besu launcher: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --Xlauncher |
||||||
|
``` |
||||||
|
|
||||||
|
Answer each question, or press ++Enter++ to accept the default value. |
||||||
|
|
||||||
|
```bash |
||||||
|
? Which Ethereum network would you like to use ? rinkeby |
||||||
|
? Which synchronization mode? fast |
||||||
|
? Do you want to enable pruning? no |
||||||
|
? What is the data directory ? /Users/me/besu |
||||||
|
? Do you want to enable the JSON-RPC HTTP service ? yes |
||||||
|
? Do you want to configure the JSON-RPC options now ? yes |
||||||
|
? What is the JSON RPC HTTP host address ? 127.0.0.1 |
||||||
|
? What is the JSON RPC HTTP port ? 8545 |
||||||
|
? Select the list of APIs to enable on JSON-RPC HTTP service [eth, net, web3] |
||||||
|
? Do you want to enable the JSON-RPC Websocket service ? no |
||||||
|
? Do you want to enable GraphQL functionality ? no |
||||||
|
? Do you want to use Ethstats ? no |
||||||
|
? Do you want to enable NAT ? no |
||||||
|
? Do you want to enable mining ? no |
||||||
|
``` |
||||||
|
|
||||||
|
If a configuration file is already present in the directory where the command is executed, |
||||||
|
Besu will start and use the values in the configuration file. To force the launcher to interact |
||||||
|
during a restart, use the `--Xlauncher-force` option, or delete the configuration |
||||||
|
file. |
@ -0,0 +1,89 @@ |
|||||||
|
--- |
||||||
|
description: Configuring bootnodoes |
||||||
|
--- |
||||||
|
|
||||||
|
# Configure bootnodes |
||||||
|
|
||||||
|
You can use bootnodes to initially discover peers. |
||||||
|
Bootnodes are regular nodes used to discover other nodes. |
||||||
|
|
||||||
|
In private networks for development or testing purposes, specify at least one bootnode. |
||||||
|
|
||||||
|
In production networks, [configure two or more nodes as bootnodes](#configure-bootnodes-in-a-production-network). |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
Bootnodes and static nodes are parallel methods for finding peers. Depending on your use case, |
||||||
|
you can use only bootnodes, only static nodes, or both bootnodes and statics nodes. |
||||||
|
|
||||||
|
To find peers, configure one or more bootnodes. To configure a specific set |
||||||
|
of peer connections, use [static nodes](../../../public-networks/how-to/connect/static-nodes.md). |
||||||
|
|
||||||
|
!!! note "Mainnet and public testnets" |
||||||
|
|
||||||
|
For Mainnet and the Rinkeby, Ropsten, Sepolia, and Goerli testnets, Hyperledger Besu has an |
||||||
|
internal list of enode URLs and uses this list automatically when you specify the |
||||||
|
[`--network`](../../../public-networks/reference/cli/options.md#network) option. |
||||||
|
|
||||||
|
## Specify a bootnode |
||||||
|
|
||||||
|
To start a node, specify a bootnode [enode](../../../public-networks/concepts/node-keys.md) for P2P discovery, |
||||||
|
using the [`--bootnodes`](../../../public-networks/reference/cli/options.md#bootnodes) option. |
||||||
|
|
||||||
|
!!! example |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath --bootnodes=enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb99bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303 |
||||||
|
``` |
||||||
|
|
||||||
|
The default host and port advertised to other peers for P2P discovery is `127.0.0.1:30303`. To |
||||||
|
specify a different host or port, use the |
||||||
|
[`--p2p-host`](../../../public-networks/reference/cli/options.md#p2p-host) and |
||||||
|
[`--p2p-port`](../../../public-networks/reference/cli/options.md#p2p-port) options. |
||||||
|
|
||||||
|
By default, peer discovery listens on all available network interfaces. If the device Besu is |
||||||
|
running on must bind to a specific network interface, specify the interface using the |
||||||
|
[`--p2p-interface`](../../../public-networks/reference/cli/options.md#p2p-interface) option. |
||||||
|
|
||||||
|
## Configure bootnodes in a production network |
||||||
|
|
||||||
|
A network must have at least one operating bootnode. To allow for continuity in the event of |
||||||
|
failure, configure two or more bootnodes in a production network. |
||||||
|
|
||||||
|
We don't recommend putting bootnodes behind a load balancer because the |
||||||
|
[enode](../../../public-networks/concepts/node-keys.md#enode-url) relates to the node public key, IP address, and |
||||||
|
discovery ports. Any changes to a bootnode enode prevents other nodes from being able to establish |
||||||
|
a connection with the bootnode. This is why we recommend putting more bootnodes on the network |
||||||
|
itself. |
||||||
|
|
||||||
|
To ensure a bootnode enode doesn't change when recovering from a complete bootnode failure: |
||||||
|
|
||||||
|
1. Create the [node key pair](../../../public-networks/concepts/node-keys.md) (that is, the private and public key) |
||||||
|
before starting the bootnode. |
||||||
|
1. When creating bootnodes in the cloud (for example, AWS and Azure), attempt to assign a static IP |
||||||
|
address to them. If your network is: |
||||||
|
|
||||||
|
* Publicly accessible, assign an elastic IP. |
||||||
|
* Internal only, specify a private IP address when you create the instance and record this IP |
||||||
|
address. |
||||||
|
|
||||||
|
We recommend storing the bootnode configuration under source control. |
||||||
|
|
||||||
|
To allow for failure, specify all bootnodes on the command line (even to the bootnodes themselves). |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
Having each bootnode list the other bootnodes increases the speed of discovery. |
||||||
|
Nodes ignore their own enode in the bootnodes list so it isn't required to specify different |
||||||
|
bootnode lists to the bootnodes themselves. |
||||||
|
|
||||||
|
## Add and remove bootnodes |
||||||
|
|
||||||
|
Adding new bootnodes is a similar process to creating bootnodes. After creating the bootnodes and |
||||||
|
adding them to the network, update the [`--bootnodes`](../../../public-networks/reference/cli/options.md#bootnodes) |
||||||
|
command line option for each node to include the new bootnodes. |
||||||
|
|
||||||
|
When adding bootnodes, you don't need to restart running nodes. By updating the |
||||||
|
[`--bootnodes`](../../../public-networks/reference/cli/options.md#bootnodes) option, the next time you restart the |
||||||
|
nodes (for example, when [upgrading](../../../public-networks/how-to/upgrade-node.md)), the nodes |
||||||
|
connect to the new bootnodes. |
@ -0,0 +1,34 @@ |
|||||||
|
--- |
||||||
|
description: private networks how to overview |
||||||
|
--- |
||||||
|
|
||||||
|
# How to |
||||||
|
|
||||||
|
This section provides instructional content for private network features. |
||||||
|
|
||||||
|
The following features are shared with [public networks](../../public-networks/index.md) and the |
||||||
|
content can be found in the public networks section: |
||||||
|
|
||||||
|
- Configuration: |
||||||
|
- [Use a configuration file](../../public-networks/how-to/configuration-file.md) |
||||||
|
- [Pass JVM options](../../public-networks/how-to/pass-jvm-options.md) |
||||||
|
- [Configure high availability](../../public-networks/how-to/configure-ha/index.md) |
||||||
|
- [Configure mining](../../public-networks/how-to/use-pow/mining.md) |
||||||
|
- [Use the Besu API](../../public-networks/how-to/use-besu-api/index.md): |
||||||
|
- [Use JSON-RPC over HTTP, WS, and IPC](../../public-networks/how-to/use-besu-api/json-rpc.md) |
||||||
|
- [Use RPC Pub/Sub over WS](../../public-networks/how-to/use-besu-api/rpc-pubsub.md) |
||||||
|
- [Use GraphQL over HTTP](../../public-networks/how-to/use-besu-api/graphql.md) |
||||||
|
- [Authenticate JSON-RPC requests](../../public-networks/how-to/use-besu-api/authenticate.md) |
||||||
|
- [Access logs using JSON-RPC API](../../public-networks/how-to/use-besu-api/access-logs.md) |
||||||
|
- Find and connect to peers: |
||||||
|
- [Configure static nodes](../../public-networks/how-to/connect/static-nodes.md) |
||||||
|
- [Configure ports](../../public-networks/how-to/connect/configure-ports.md) |
||||||
|
- [Manage peers](../../public-networks/how-to/connect/manage-peers.md) |
||||||
|
- [Specify NAT method](../../public-networks/how-to/connect/specify-nat.md) |
||||||
|
- Develop dapps: |
||||||
|
- [Use Truffle](../../public-networks/how-to/develop/truffle.md) |
||||||
|
- [Use client libraries](../../public-networks/how-to/develop/client-libraries.md) |
||||||
|
- Troubleshoot: |
||||||
|
- [Use EVM tool](../../public-networks/how-to/troubleshoot/evm-tool.md) |
||||||
|
- [Use Java Flight Recorder](../../public-networks/how-to/troubleshoot/java-flight-recorder.md) |
||||||
|
- [Trace transactions](../../public-networks/how-to/troubleshoot/trace-transactions.md) |
@ -0,0 +1,19 @@ |
|||||||
|
--- |
||||||
|
description: Monitoring using metrics and logging |
||||||
|
--- |
||||||
|
|
||||||
|
# Monitoring |
||||||
|
|
||||||
|
Use monitoring to identify node and network issues. In private networks, you can |
||||||
|
[configure metrics and logging](../../../public-networks/how-to/monitor/index.md) as in public |
||||||
|
networks. |
||||||
|
|
||||||
|
You can also use the following monitoring tools in private networks: |
||||||
|
|
||||||
|
- [Elastic Stack](elastic-stack.md) |
||||||
|
- [Quorum Hibernate](quorum-hibernate.md) |
||||||
|
- [Splunk](splunk.md) |
||||||
|
- [OpenTelemetry](opentelemetry.md) |
||||||
|
|
||||||
|
For an overview of monitoring Hyperledger Besu, view |
||||||
|
[this recording](https://www.youtube.com/watch?v=7BuutRe0I28&feature=youtu.be). |
@ -0,0 +1,14 @@ |
|||||||
|
--- |
||||||
|
description: private networks send transactions overview |
||||||
|
--- |
||||||
|
|
||||||
|
# Create and send transactions |
||||||
|
|
||||||
|
In private networks, you can create and [send regular transactions](../../../public-networks/how-to/send-transactions.md) |
||||||
|
as in public networks. |
||||||
|
|
||||||
|
You can also: |
||||||
|
|
||||||
|
- [Send private transactions](private-transactions.md). |
||||||
|
- [Send concurrent private transactions](concurrent-private-transactions.md). |
||||||
|
- [Include revert reason in transactions](revert-reason.md). |
@ -0,0 +1,45 @@ |
|||||||
|
--- |
||||||
|
description: Upgrading protocol versions |
||||||
|
--- |
||||||
|
|
||||||
|
# Network and protocol upgrades |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
Node upgrades upgrade your Besu client to a later version. |
||||||
|
In private networks, you can [upgrade your node](../../public-networks/how-to/upgrade-node.md) |
||||||
|
as in public networks. |
||||||
|
|
||||||
|
Network upgrades are the mechanism for upgrading the Ethereum protocol. |
||||||
|
Protocol upgrades occur during the network upgrades. |
||||||
|
|
||||||
|
For Ethereum Mainnet and public testnets, the milestone block definitions are included in Besu. |
||||||
|
Upgrading your Besu client applies the network upgrade. |
||||||
|
|
||||||
|
For private networks, all network participants must agree on the protocol upgrades and coordinate |
||||||
|
the network upgrades. |
||||||
|
The genesis file specifies the milestone block at which to apply the protocol upgrade. |
||||||
|
|
||||||
|
## Upgrade the protocol |
||||||
|
|
||||||
|
To upgrade the protocol in a private network: |
||||||
|
|
||||||
|
1. Review included EIPs for breaking changes. |
||||||
|
A [meta EIP](https://eips.ethereum.org/meta) for each protocol upgrade lists included EIPs. |
||||||
|
For example, [Istanbul](https://eips.ethereum.org/EIPS/eip-1679). |
||||||
|
1. Network participants agree on the block number at which to upgrade. |
||||||
|
1. For each node in the network: |
||||||
|
1. Add the [milestone block number](../../public-networks/reference/genesis-items.md#milestone-blocks) to |
||||||
|
the genesis file. |
||||||
|
1. Restart the node before reaching milestone block. |
||||||
|
|
||||||
|
!!! caution |
||||||
|
|
||||||
|
To avoid a forked network, all network participants must update their genesis file to include |
||||||
|
the agreed on milestone block and restart their node before reaching the milestone block. |
||||||
|
|
||||||
|
!!! tip "Tips" |
||||||
|
|
||||||
|
- For compatibility with future protocol upgrades, don't hardcode any gas price assumptions. |
||||||
|
- Implementing upgradeable contracts enables contracts to be upgraded if a protocol upgrade does |
||||||
|
include breaking changes. |
@ -0,0 +1,128 @@ |
|||||||
|
--- |
||||||
|
description: Updating Hyperledger Besu onchain allowlists |
||||||
|
--- |
||||||
|
|
||||||
|
# Use onchain permissioning |
||||||
|
|
||||||
|
When using [onchain permissioning](../../concepts/permissioning/onchain.md), you can update |
||||||
|
[nodes](#update-nodes-allowlist) and [accounts](#update-accounts-allowlist) allowlists using the |
||||||
|
Besu [permissioning management dapp](#deploy-the-permissioning-management-dapp). |
||||||
|
|
||||||
|
## Deploy the permissioning management dapp |
||||||
|
|
||||||
|
To deploy the permissioning management dapp for production: |
||||||
|
|
||||||
|
1. Retrieve the most recent release (tarball or zip) from the [projects release page]. |
||||||
|
|
||||||
|
1. Unpack the distribution into a directory available to your Web server. |
||||||
|
|
||||||
|
1. In the root of the unpack directory, add a file called `config.json` replacing the placeholders |
||||||
|
shown below. |
||||||
|
|
||||||
|
!!! example "`config.json`" |
||||||
|
|
||||||
|
```json |
||||||
|
|
||||||
|
{ |
||||||
|
"accountIngressAddress": "<Address of the account ingress contract>", |
||||||
|
"nodeIngressAddress": "<Address of the node ingress contract>", |
||||||
|
"networkId": "<ID of your Ethereum network>" |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
1. On your Web server, host the contents of the directory as static files and direct root requests |
||||||
|
to `index.html`. |
||||||
|
|
||||||
|
!!! note "Start a production permissioned network" |
||||||
|
|
||||||
|
To start a production permissioned network, follow the [onchain permissioning tutorial], but don't |
||||||
|
perform the steps using `yarn` to install, build, and start the development server. |
||||||
|
Instead, follow the steps in this section to deploy the permissioning management dapp to your Web server. |
||||||
|
|
||||||
|
## Update nodes allowlist |
||||||
|
|
||||||
|
To add a node to the Hyperledger Besu nodes allowlist: |
||||||
|
|
||||||
|
1. On the **Nodes** tab of the permissioning management dapp, select **Add Node**. |
||||||
|
The **Add Node** window displays. |
||||||
|
2. Enter the [enode URL](../../../public-networks/concepts/node-keys.md#enode-url) of the node you are adding and select **Add Node**. |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
If your node has two different IP addresses for ingress and egress |
||||||
|
(for example, if you use Kubernetes implementing a load balancer for ingress and a NAT gateway IP address for egress), |
||||||
|
add both addresses to the allowlist, using the same public key for each IP address. This will allow the node to connect. |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
Node allowlists [support domain names] in enode URLs as an experimental feature. Use the `--Xdns-enabled` option |
||||||
|
to enable domain name support. |
||||||
|
|
||||||
|
If using Kubernetes, enable domain name support and use the `--Xdns-update-enabled` option to ensure that Besu can |
||||||
|
connect to a container after being restarted, even if the IP address of the container changes. |
||||||
|
|
||||||
|
To remove a node from the nodes allowlist: |
||||||
|
|
||||||
|
1. On the **Nodes** tab of the permissioning management dapp, hover over the row of the |
||||||
|
node you are removing. A trash can displays. |
||||||
|
1. Select the trash can. |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
If you add a running node, the node does not attempt to reconnect to the bootnode and |
||||||
|
synchronize until peer discovery restarts. To add an allowlisted node as a peer without waiting |
||||||
|
for peer discovery to restart, use |
||||||
|
[`admin_addPeer`](../../../public-networks/reference/api/index.md#admin_addpeer). |
||||||
|
|
||||||
|
If you add the node to the allowlist before starting the node, using `admin_addPeer` is not |
||||||
|
required because peer discovery is run on node startup. |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
If nodes are not connecting as expected, set the [log level to `TRACE`](../../../public-networks/reference/cli/options.md#logging) |
||||||
|
and search for messages containing `Node permissioning` to identify the issue. |
||||||
|
|
||||||
|
Ensure the [`--p2p-host`](../../../public-networks/reference/cli/options.md#p2p-host) command line option has been |
||||||
|
correctly configured for all nodes with the |
||||||
|
externally accessible address. |
||||||
|
|
||||||
|
If you change your network configuration, you may need to update the node allowlist. |
||||||
|
|
||||||
|
## Update accounts allowlist |
||||||
|
|
||||||
|
To add an account to the accounts allowlist: |
||||||
|
|
||||||
|
1. On the **Accounts** tab of the permissioning management dapp, select **Add Account**. |
||||||
|
The **Add Account** window displays. |
||||||
|
1. Enter the account address in the **Account Address** field and select **Add Account**. |
||||||
|
|
||||||
|
To remove an account from the accounts allowlist: |
||||||
|
|
||||||
|
1. On the **Accounts** tab of the permissioning management dapp, hover over the row of |
||||||
|
the account you are removing. A trash can displays. |
||||||
|
1. Select the trash can. |
||||||
|
|
||||||
|
## Update admins |
||||||
|
|
||||||
|
You can add or remove admins in the same way as [accounts](#update-accounts-allowlist), except on the **Admins** tab. |
||||||
|
|
||||||
|
## Specify the permissioning contract interface version |
||||||
|
|
||||||
|
Use the [`--permissions-nodes-contract-version`](../../reference/cli/options.md#permissions-nodes-contract-version) |
||||||
|
command line option to specify the version of the [permissioning contract interface](../../concepts/permissioning/onchain.md#permissioning-contracts). |
||||||
|
The default is 1. |
||||||
|
|
||||||
|
Specify the contract interface version that maps to the version of the [Enterprise Ethereum Alliance Client Specification](https://entethalliance.org/technical-specifications/) |
||||||
|
the contract interface implements. |
||||||
|
|
||||||
|
| | EEA Client Specification | Contract interface | |
||||||
|
|:--------|:-------------------------|:-------------------| |
||||||
|
| Version | 5 | 1 | |
||||||
|
| Version | 6 | 2 | |
||||||
|
|
||||||
|
The permissioning contracts in the [`ConsenSys/permissioning-smart-contracts`](https://github.com/ConsenSys/permissioning-smart-contracts) |
||||||
|
repository implement the version 2 contract interface. |
||||||
|
|
||||||
|
[support domain names]: ../../../public-networks/concepts/node-keys.md#domain-name-support |
||||||
|
[projects release page]: https://github.com/ConsenSys/permissioning-smart-contracts/releases/latest |
||||||
|
[onchain permissioning tutorial]: ../../tutorials/permissioning/onchain.md |
@ -0,0 +1,21 @@ |
|||||||
|
--- |
||||||
|
description: Private networks overview |
||||||
|
--- |
||||||
|
|
||||||
|
# Hyperledger Besu for private networks |
||||||
|
|
||||||
|
You can use Besu to develop enterprise applications requiring secure, high-performance transaction |
||||||
|
processing in a private network. |
||||||
|
|
||||||
|
A private network is a network not connected to Ethereum Mainnet or an Ethereum testnet. |
||||||
|
Private networks typically use a different [chain ID](../public-networks/concepts/network-and-chain-id.md) and |
||||||
|
proof of authority consensus ([QBFT](how-to/configure/consensus/qbft.md), |
||||||
|
[IBFT 2.0](how-to/configure/consensus/ibft.md), or [Clique](how-to/configure/consensus/clique.md)). |
||||||
|
|
||||||
|
You can also [create a local development network](tutorials/ethash.md) using proof of work (Ethash). |
||||||
|
|
||||||
|
Besu supports enterprise features including [privacy](concepts/privacy/index.md) and |
||||||
|
[permissioning](concepts/permissioning/index.md). |
||||||
|
|
||||||
|
Get started with the [Developer Quickstart](tutorials/quickstart.md) to rapidly generate local |
||||||
|
blockchain networks. |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,55 @@ |
|||||||
|
--- |
||||||
|
description: Hyperledger Besu private network API objects reference |
||||||
|
--- |
||||||
|
|
||||||
|
# Private network API objects |
||||||
|
|
||||||
|
The following objects are parameters for or returned by Besu private network API methods. |
||||||
|
|
||||||
|
!!! attention |
||||||
|
|
||||||
|
This reference contains API objects that apply to only private networks. |
||||||
|
For API objects that apply to both private and public networks, see the |
||||||
|
[public network API objects reference](../../../public-networks/reference/api/objects.md). |
||||||
|
|
||||||
|
## Private transaction object |
||||||
|
|
||||||
|
Returned by [`priv_getPrivateTransaction`](index.md#priv_getprivatetransaction). |
||||||
|
|
||||||
|
| Key | Type | Value | |
||||||
|
|-----|:----:|-------| |
||||||
|
| **from** | Data, 20 bytes | Address of the sender. | |
||||||
|
| **gas** | Quantity | Gas provided by the sender. | |
||||||
|
| **gasPrice** | Quantity | Gas price, in Wei, provided by the sender. | |
||||||
|
| **input** | Data | The data to create or invoke a contract. | |
||||||
|
| **nonce** | Quantity | Number of transactions made by the sender to the privacy group before this one. | |
||||||
|
| **to** | Data, 20 bytes | `null` if a contract creation transaction, otherwise, the contract address. | |
||||||
|
| **value** | Quantity | `null` because private transactions cannot transfer Ether. | |
||||||
|
| **v** | Quantity | ECDSA Recovery ID. | |
||||||
|
| **r** | Data, 32 bytes | ECDSA signature r. | |
||||||
|
| **s** | Data, 32 bytes | ECDSA signature s. | |
||||||
|
| **privateFrom** | Data, 32 bytes | [Tessera](https://docs.tessera.consensys.net/) public key of the sender. | |
||||||
|
| **privateFor** | Array of Data, 32 bytes each | [Tessera](https://docs.tessera.consensys.net/) public keys of recipients. Not returned if using `privacyGroupId` to [send the transaction](../../../private-networks/concepts/privacy/privacy-groups.md#privacy-types). | |
||||||
|
| **privacyGroupId** | Data, 32 bytes | [Tessera](https://docs.tessera.consensys.net/) privacy group ID of recipients. Not returned if using `privateFor` to [send the transaction](../../../private-networks/concepts/privacy/privacy-groups.md#privacy-types). | |
||||||
|
| **restriction** | String | Must be [`restricted`](../../../private-networks/concepts/privacy/private-transactions/index.md). | |
||||||
|
|
||||||
|
## Private transaction receipt object |
||||||
|
|
||||||
|
Returned by [`priv_getTransactionReceipt`](index.md#priv_gettransactionreceipt). |
||||||
|
|
||||||
|
| Key | Type | Value | |
||||||
|
|-----|:----:|-------| |
||||||
|
| **blockHash** | Data, 32 bytes | Hash of block containing this transaction. | |
||||||
|
| **blockNumber** | Quantity | Block number of block containing this transaction. | |
||||||
|
| **contractAddress** | Data, 20 bytes | Contract address created if a contract creation transaction, otherwise, `null`. A failed contract creation transaction still produces a contract address value. | |
||||||
|
| **from** | Data, 20 bytes | Address of the sender. | |
||||||
|
| **logs** | Array | Array of [log objects](#log-object) generated by this private transaction. | |
||||||
|
| **to** | Data, 20 bytes | Address of the receiver, if sending ether, otherwise, null. | |
||||||
|
| **transactionIndex** | Quantity, Integer | Index position of transaction in the block. | |
||||||
|
| **revertReason** | String | ABI-encoded string that displays the [reason for reverting the transaction](../../../private-networks/how-to/send-transactions/revert-reason.md). Only available if revert reason is [enabled](../cli/options.md#revert-reason-enabled). | |
||||||
|
| **output** | Data | RLP-encoded return value of a contract call if a value returns, otherwise, `null`. | |
||||||
|
| **commitmentHash** | Data, 32 bytes | Hash of the privacy marker transaction. | |
||||||
|
| **status** | Quantity | Either `0x1` (success) or `0x0` (failure). | |
||||||
|
| **privateFrom** | Data, 32 bytes | [Tessera](https://docs.tessera.consensys.net/) public key of the sender. | |
||||||
|
| **privateFor** or **privacyGroupId** | Array or Data, 32 bytes | [Tessera](https://docs.tessera.consensys.net/) public keys or privacy group ID of the recipients. | |
||||||
|
| **logsBloom** | Data, 256 bytes | Bloom filter for light clients to quickly retrieve related logs. | |
@ -0,0 +1,640 @@ |
|||||||
|
--- |
||||||
|
description: Hyperledger Besu private networks CLI reference |
||||||
|
--- |
||||||
|
|
||||||
|
# Private network command line options |
||||||
|
|
||||||
|
This reference describes the syntax of the Hyperledger Besu private network command line interface |
||||||
|
(CLI) options. |
||||||
|
|
||||||
|
!!! attention |
||||||
|
|
||||||
|
This reference contains options that apply to only private networks. |
||||||
|
For options that apply to both private and public networks, see the |
||||||
|
[public network options reference](../../../public-networks/reference/cli/options.md). |
||||||
|
|
||||||
|
## Specify options |
||||||
|
|
||||||
|
You can specify Besu options: |
||||||
|
|
||||||
|
* On the command line. |
||||||
|
|
||||||
|
```bash |
||||||
|
besu [OPTIONS] [SUBCOMMAND] |
||||||
|
``` |
||||||
|
|
||||||
|
* As an environment variable. |
||||||
|
For each command line option, the equivalent environment variable is: |
||||||
|
* Uppercase. |
||||||
|
* `_` replaces `-`. |
||||||
|
* Has a `BESU_` prefix. |
||||||
|
|
||||||
|
For example, set `--miner-coinbase` using the `BESU_MINER_COINBASE` environment variable. |
||||||
|
|
||||||
|
* In a [configuration file](../../../public-networks/how-to/configuration-file.md). |
||||||
|
|
||||||
|
If you specify an option in more than one place, the order of priority is command line, environment |
||||||
|
variable, configuration file. |
||||||
|
|
||||||
|
If using Bash or Z shell, you can view option suggestions by entering `--` and pressing the Tab key twice. |
||||||
|
|
||||||
|
```bash |
||||||
|
besu --Tab+Tab |
||||||
|
``` |
||||||
|
|
||||||
|
## Options |
||||||
|
|
||||||
|
### `permissions-accounts-config-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-config-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-config-file=/home/me/me_configFiles/myPermissionsFile |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_ACCOUNTS_CONFIG_FILE=/home/me/me_configFiles/myPermissionsFile |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-accounts-config-file="/home/me/me_configFiles/myPermissionsFile" |
||||||
|
``` |
||||||
|
|
||||||
|
The [accounts permissions configuration file]. The default is the `permissions_config.toml` file in |
||||||
|
the [data directory](../../../public-networks/reference/cli/options.md#data-path). |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
`--permissions-accounts-config-file` and |
||||||
|
[`--permissions-nodes-config-file`](#permissions-nodes-config-file) can use the same file. |
||||||
|
|
||||||
|
### `permissions-accounts-config-file-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-config-file-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-config-file-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_ACCOUNTS_CONFIG_FILE_ENABLED=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-accounts-config-file-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables file-based account level permissions. The default is `false`. |
||||||
|
|
||||||
|
### `permissions-accounts-contract-address` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-contract-address=<ContractAddress> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-contract-address=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_ACCOUNTS_CONTRACT_ADDRESS=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-accounts-contract-address=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
The contract address for |
||||||
|
[onchain account permissioning](../../concepts/permissioning/onchain.md). |
||||||
|
|
||||||
|
### `permissions-accounts-contract-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-contract-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-accounts-contract-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_ACCOUNTS_CONTRACT_ENABLED=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-accounts-contract-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables contract-based |
||||||
|
[onchain account permissioning](../../concepts/permissioning/onchain.md). The default |
||||||
|
is `false`. |
||||||
|
|
||||||
|
### `permissions-nodes-config-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-config-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-config-file=/home/me/me_configFiles/myPermissionsFile |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_NODES_CONFIG_FILE=/home/me/me_configFiles/myPermissionsFile |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-nodes-config-file="/home/me/me_configFiles/myPermissionsFile" |
||||||
|
``` |
||||||
|
|
||||||
|
The [nodes permissions configuration file]. The default is the `permissions_config.toml` file in |
||||||
|
the [data directory](../../../public-networks/reference/cli/options.md#data-path). |
||||||
|
|
||||||
|
!!! tip |
||||||
|
|
||||||
|
`--permissions-nodes-config-file` and |
||||||
|
[`--permissions-accounts-config-file`](#permissions-accounts-config-file) can use the same |
||||||
|
file. |
||||||
|
|
||||||
|
### `permissions-nodes-config-file-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-config-file-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-config-file-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_NODES_CONFIG_FILE_ENABLED=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-nodes-config-file-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables file-based node level permissions. The default is `false`. |
||||||
|
|
||||||
|
### `permissions-nodes-contract-address` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-address=<ContractAddress> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-address=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_NODES_CONTRACT_ADDRESS=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-nodes-contract-address=xyz |
||||||
|
``` |
||||||
|
|
||||||
|
The contract address for |
||||||
|
[onchain node permissioning](../../concepts/permissioning/onchain.md). |
||||||
|
|
||||||
|
### `permissions-nodes-contract-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_NODES_CONTRACT_ENABLED=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-nodes-contract-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables contract-based |
||||||
|
[onchain node permissioning](../../concepts/permissioning/onchain.md). The default is |
||||||
|
`false`. |
||||||
|
|
||||||
|
### `permissions-nodes-contract-version` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-version=<ContractVersion> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--permissions-nodes-contract-version=2 |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PERMISSIONS_NODES_CONTRACT_VERSION=2 |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
permissions-nodes-contract-version=2 |
||||||
|
``` |
||||||
|
|
||||||
|
Version of the EEA [node permissioning interface](../../how-to/use-permissioning/onchain.md#specify-the-permissioning-contract-interface-version). |
||||||
|
The default is 1. |
||||||
|
|
||||||
|
### `privacy-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_ENABLED=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables [private transactions](../../concepts/privacy/index.md). The default |
||||||
|
is `false`. |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
Using private transactions with [pruning](../../../public-networks/concepts/data-storage-formats.md) |
||||||
|
or [fast sync](../../../public-networks/reference/cli/options.md#sync-mode) is not supported. |
||||||
|
|
||||||
|
### `privacy-marker-transaction-signing-key-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-marker-transaction-signing-key-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-marker-transaction-signing-key-file=/home/me/me_node/myPrivateKey |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_MARKER_TRANSACTION_SIGNING_KEY_FILE=/home/me/me_node/myPrivateKey |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-marker-transaction-signing-key-file="/home/me/me_node/myPrivateKey" |
||||||
|
``` |
||||||
|
|
||||||
|
`<FILE>` is the name of the private key file used to |
||||||
|
[sign privacy marker transactions](../../how-to/use-privacy/sign-pmts.md). |
||||||
|
|
||||||
|
!!! note |
||||||
|
|
||||||
|
This can be the same file used by [`--node-private-key-file`](../../../public-networks/reference/cli/options.md#node-private-key-file), |
||||||
|
or a different key file to identify who signed the privacy marker transaction. |
||||||
|
|
||||||
|
You must specify this option if you're using: |
||||||
|
|
||||||
|
* a privacy network where you pay gas. Also, the associated account must contain adequate funds. |
||||||
|
* [account permissioning] and privacy. You must include the corresponding public key in the |
||||||
|
accounts allowlist. |
||||||
|
|
||||||
|
If you do not specify this option (for example, in a free gas network), Besu signs each transaction |
||||||
|
with a different randomly generated key. |
||||||
|
|
||||||
|
### `privacy-multi-tenancy-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-multi-tenancy-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-multi-tenancy-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_MULTI_TENANCY_ENABLED=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-multi-tenancy-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables [multi-tenancy](../../concepts/privacy/multi-tenancy.md) for private |
||||||
|
transactions. The default is `false`. |
||||||
|
|
||||||
|
### `privacy-flexible-groups-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-flexible-groups-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-flexible-groups-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_FLEXIBLE_GROUPS_ENABLED=true |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-flexible-groups-enabled=true |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables [flexible privacy groups](../../concepts/privacy/flexible-privacy.md). The default is `false`. |
||||||
|
|
||||||
|
Deprecated syntax for this option is `--privacy-onchain-groups-enabled`. |
||||||
|
|
||||||
|
### `privacy-public-key-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-public-key-file=<privacyPublicKeyFile> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-public-key-file=Tessera/nodeKey.pub |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_PUBLIC_KEY_FILE=Tessera/nodeKey.pub |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-public-key-file="Tessera/nodeKey.pub" |
||||||
|
``` |
||||||
|
|
||||||
|
The [public key of the Tessera node](https://docs.tessera.consensys.net/). |
||||||
|
|
||||||
|
!!! important |
||||||
|
|
||||||
|
You cannot specify `privacy-public-key-file` when |
||||||
|
[`--privacy-multi-tenancy-enabled`](#privacy-multi-tenancy-enabled) is `true` |
||||||
|
|
||||||
|
### `privacy-tls-enabled` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-enabled[=<true|false>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_TLS_ENABLED=false |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-tls-enabled=false |
||||||
|
``` |
||||||
|
|
||||||
|
Enables or disables [TLS on communication with the private transaction manager]. The default is |
||||||
|
false. |
||||||
|
|
||||||
|
### `privacy-tls-keystore-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-keystore-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy--keystore-file=/home/me/me_node/key |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_TLS_KEYSTORE_FILE=/home/me/me_node/key |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-tls-keystore-file="/home/me/me_node/key" |
||||||
|
``` |
||||||
|
|
||||||
|
The keystore file (in PKCS #12 format) containing the private key and the certificate presented |
||||||
|
during authentication. |
||||||
|
|
||||||
|
You must specify `privacy-tls-keystore-file` if [`--privacy-tls-enabled`](#privacy-tls-enabled) is |
||||||
|
`true`. |
||||||
|
|
||||||
|
### `privacy-tls-keystore-password-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-keystore-password-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-keystore-password-file=/home/me/me_node/password |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_TLS_KEYSTORE_PASSWORD_FILE=/home/me/me_node/password |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-tls-keystore-password-file="/home/me/me_node/password" |
||||||
|
``` |
||||||
|
|
||||||
|
The path to the file containing the password to decrypt the keystore. |
||||||
|
|
||||||
|
### `privacy-tls-known-enclave-file` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-known-enclave-file=<FILE> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-tls-known-enclave-file=/home/me/me_node/knownEnclave |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_TLS_KNOWN_ENCLAVE_FILE=/home/me/me_node/knownEnclave |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-tls-known-enclave-file="/home/me/me_node/knownEnclave" |
||||||
|
``` |
||||||
|
|
||||||
|
The path to the file containing the hostnames, ports, and SHA256 certificate fingerprints of the |
||||||
|
[authorized privacy enclave](../../how-to/configure/tls/client-and-server.md#create-the-known-servers-file). |
||||||
|
|
||||||
|
### `privacy-url` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-url=<privacyUrl> |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
--privacy-url=http://127.0.0.1:8888 |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Environment variable" |
||||||
|
|
||||||
|
```bash |
||||||
|
BESU_PRIVACY_URL=http://127.0.0.1:8888 |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Configuration file" |
||||||
|
|
||||||
|
```bash |
||||||
|
privacy-url="http://127.0.0.1:8888" |
||||||
|
``` |
||||||
|
|
||||||
|
The URL on which the |
||||||
|
[Tessera node](../../tutorials/privacy/index.md#3-create-tessera-configuration-files) is |
||||||
|
running. |
||||||
|
|
||||||
|
<!-- Links --> |
||||||
|
[accounts permissions configuration file]: ../../how-to/use-permissioning/local.md#permissions-configuration-file |
||||||
|
[nodes permissions configuration file]: ../../how-to/use-permissioning/local.md#permissions-configuration-file |
||||||
|
[account permissioning]: ../../concepts/permissioning/index.md#account-permissioning |
||||||
|
[TLS on communication with the private transaction manager]: ../../concepts/privacy/index.md#private-transaction-manager |
@ -0,0 +1,139 @@ |
|||||||
|
--- |
||||||
|
description: Hyperledger Besu command line interface subcommands |
||||||
|
--- |
||||||
|
|
||||||
|
# Private network subcommands |
||||||
|
|
||||||
|
This reference describes the syntax of the Hyperledger Besu private network command line interface |
||||||
|
(CLI) subcommands. |
||||||
|
|
||||||
|
!!! attention |
||||||
|
|
||||||
|
This reference contains subcommands that apply to only private networks. |
||||||
|
For subcommands that apply to both private and public networks, see the |
||||||
|
[public network subcommands reference](../../../public-networks/reference/cli/subcommands.md). |
||||||
|
|
||||||
|
To start a Besu node using subcommands, run: |
||||||
|
|
||||||
|
```bash |
||||||
|
besu [OPTIONS] [SUBCOMMAND] [SUBCOMMAND OPTIONS] |
||||||
|
``` |
||||||
|
|
||||||
|
If using Bash or Z shell, you can view subcommand suggestions by pressing the Tab key twice. |
||||||
|
|
||||||
|
```bash |
||||||
|
besu Tab+Tab |
||||||
|
``` |
||||||
|
|
||||||
|
## `operator` |
||||||
|
|
||||||
|
Provides operator actions. |
||||||
|
|
||||||
|
### `generate-blockchain-config` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
besu operator generate-blockchain-config --config-file=<FILE> --to=<DIRECTORY> [--genesis-file-name=<FILE>] [--private-key-file-name=<FILE>] [--public-key-file-name=<FILE>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Example" |
||||||
|
|
||||||
|
```bash |
||||||
|
besu operator generate-blockchain-config --config-file=config.json --to=myNetworkFiles |
||||||
|
``` |
||||||
|
Generates an |
||||||
|
[IBFT 2.0](../../how-to/configure/consensus/ibft.md#genesis-file) or |
||||||
|
[QBFT](../../how-to/configure/consensus/qbft.md#genesis-file) genesis file. |
||||||
|
|
||||||
|
The configuration file has two nested JSON nodes. |
||||||
|
The first is the `genesis` property defining the IBFT 2.0 or QBFT genesis file, except for the |
||||||
|
`extraData` string. |
||||||
|
The second is the `blockchain` property defining the number of key pairs to generate. |
||||||
|
|
||||||
|
## `rlp` |
||||||
|
|
||||||
|
Provides RLP related actions. |
||||||
|
|
||||||
|
### `encode` |
||||||
|
|
||||||
|
=== "Syntax" |
||||||
|
|
||||||
|
```bash |
||||||
|
besu rlp encode [--from=<FILE>] [--to=<FILE>] [--type=<type>] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "File example" |
||||||
|
|
||||||
|
```bash |
||||||
|
besu rlp encode --from=ibft_extra_data.json --to=extra_data_for_ibft_genesis.txt --type=IBFT_EXTRA_DATA |
||||||
|
``` |
||||||
|
|
||||||
|
=== "Standard input/output example" |
||||||
|
|
||||||
|
```bash |
||||||
|
cat extra_data.json | besu rlp encode > rlp.txt |
||||||
|
``` |
||||||
|
|
||||||
|
Encodes the RLP hexadecimal string for use in an [IBFT 2.0](../../how-to/configure/consensus/ibft.md#genesis-file) |
||||||
|
or [QBFT](../../how-to/configure/consensus/qbft.md#genesis-file) genesis file. |
||||||
|
The default type is `IBFT_EXTRA_DATA`. |
||||||
|
|
||||||
|
Supported types are: |
||||||
|
|
||||||
|
* `IBFT_EXTRA_DATA` - The IBFT 2.0 genesis file includes the `IBFT_EXTRA_DATA` type in the |
||||||
|
[`extraData`](../../how-to/configure/consensus/ibft.md#extra-data) property. |
||||||
|
|
||||||
|
* `QBFT_EXTRA_DATA` - The QBFT genesis file includes the `QBFT_EXTRA_DATA` type in the |
||||||
|
[`extraData`](../../how-to/configure/consensus/qbft.md#extra-data) property. |
||||||
|
|
||||||
|
???+ summary "IBFT 2.0 extra data" |
||||||
|
|
||||||
|
To generate the RLP encoded `extraData` string, specify a JSON input that is an array of |
||||||
|
validator addresses in ascending order. |
||||||
|
|
||||||
|
??? tip "JSON Schema for IBFT_EXTRA_DATA" |
||||||
|
|
||||||
|
Use the following JSON Schema to validate that your JSON data is well formed. |
||||||
|
To validate your JSON content, use an online validation tool, such as |
||||||
|
[JSON Schema Validator](https://www.jsonschemavalidator.net/). |
||||||
|
|
||||||
|
```json |
||||||
|
{ |
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#", |
||||||
|
"$id": "http://org.hyperledger.besu/cli_rlp_ibft_extra_data.json", |
||||||
|
"type": "array", |
||||||
|
"definitions": {}, |
||||||
|
"title": "IBFT extra data", |
||||||
|
"description":"JSON format used as input to generate an IBFT extra data RLP string", |
||||||
|
"items": { |
||||||
|
"$id": "#/address", |
||||||
|
"type": "string", |
||||||
|
"title": "Validator address", |
||||||
|
"description":"The validator node address", |
||||||
|
"default": "", |
||||||
|
"examples": [ |
||||||
|
"be068f726a13c8d46c44be6ce9d275600e1735a4", |
||||||
|
"5ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193" |
||||||
|
], |
||||||
|
"pattern":"^([0-9a-f]{40})$" |
||||||
|
} |
||||||
|
} |
||||||
|
``` |
||||||
|
|
||||||
|
!!! example "Example IBFT_EXTRA_DATA encoding" |
||||||
|
|
||||||
|
=== "JSON input" |
||||||
|
|
||||||
|
```json |
||||||
|
[ |
||||||
|
"be068f726a13c8d46c44be6ce9d275600e1735a4", |
||||||
|
"5ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193" |
||||||
|
] |
||||||
|
``` |
||||||
|
|
||||||
|
=== "RLP output" |
||||||
|
|
||||||
|
``` |
||||||
|
0xf853a00000000000000000000000000000000000000000000000000000000000000000ea94be068f726a13c8d46c44be6ce9d275600e1735a4945ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193808400000000c0 |
||||||
|
``` |
@ -0,0 +1,22 @@ |
|||||||
|
--- |
||||||
|
description: private networks reference overview |
||||||
|
--- |
||||||
|
|
||||||
|
# Reference |
||||||
|
|
||||||
|
This section provides reference material for private network features. |
||||||
|
|
||||||
|
The following features and resources are shared with [public networks](../../public-networks/index.md) |
||||||
|
and the content can be found in the public networks section: |
||||||
|
|
||||||
|
- Besu command line: |
||||||
|
- [Standard options](../../public-networks/reference/cli/options.md) |
||||||
|
- [Standard subcommands](../../public-networks/reference/cli/subcommands.md) |
||||||
|
- Besu API: |
||||||
|
- [Standard Besu API methods](../../public-networks/reference/api/index.md) |
||||||
|
- [Standard Besu API objects](../../public-networks/reference/api/objects.md) |
||||||
|
- [Genesis file items](../../public-networks/reference/genesis-items.md) |
||||||
|
- [EVM tool options](../../public-networks/reference/evm-tool.md) |
||||||
|
- [Transaction trace types](../../public-networks/reference/trace-types.md) |
||||||
|
- [Projects using Besu](../../public-networks/reference/projects-using-besu.md) |
||||||
|
- [Security disclosure policy](../../public-networks/reference/disclosure.md) |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue