diff --git a/docs/private-networks/concepts/permissioning/plugin.md b/docs/private-networks/concepts/permissioning/plugin.md index a4f62031d8b..8c8caed18b4 100644 --- a/docs/private-networks/concepts/permissioning/plugin.md +++ b/docs/private-networks/concepts/permissioning/plugin.md @@ -27,27 +27,23 @@ To enable permissioning in your plugin, implement the `PermissioningService` int ```java @AutoService(BesuPlugin.class) public class TestPermissioningPlugin implements BesuPlugin { - PermissioningService service; - - @Override - public void register(final BesuContext context) { - service = context.getService(PermissioningService.class).get(); - } - - @Override - public void start() { - service.registerNodePermissioningProvider((sourceEnode, destinationEnode) -> { - // perform logic for node permissioning - return true; - }); - - service.registerNodeMessagePermissioningProvider((destinationEnode, code) -> { - // perform logic for message permissioning - return true; - }); - } - - @Override - public void stop() {} + PermissioningService service; + @Override + public void register(final BesuContext context) { + service = context.getService(PermissioningService.class).get(); + } + @Override + public void start() { + service.registerNodePermissioningProvider((sourceEnode, destinationEnode) -> { + // perform logic for node permissioning + return true; + }); + service.registerNodeMessagePermissioningProvider((destinationEnode, code) -> { + // perform logic for message permissioning + return true; + }); + } + @Override + public void stop() {} } ``` diff --git a/docs/private-networks/concepts/privacy/plugin.md b/docs/private-networks/concepts/privacy/plugin.md index fbc34fb440f..591637206e1 100644 --- a/docs/private-networks/concepts/privacy/plugin.md +++ b/docs/private-networks/concepts/privacy/plugin.md @@ -66,46 +66,35 @@ Your plugin needs to register the `PrivateMarkerTransactionFactory` interface wh ## Register your plugin -To enable Besu to use your privacy plugin, you must implement the `PrivacyPluginService` interface and you must call `setPayloadProvider`. +To enable Besu to use your privacy plugin, implement the `PrivacyPluginService` interface and call `setPayloadProvider`. ```java - @AutoService(BesuPlugin.class) public class TestPrivacyPlugin implements BesuPlugin { - - private PrivacyPluginService service; - - @Override - public void register(BesuContext context) { - service = context.getService(PrivacyPluginService.class).get(); - } - - @Override - public void start() { - service.setPayloadProvider(new PrivacyPluginPayloadProvider() { - @Override - public Bytes generateMarkerPayload(PrivateTransaction privateTransaction, String privacyUserId) { - // perform logic to serialize the payload of the marker transaction - // in this example we are serialising the private transaction using rlp https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/ - return org.hyperledger.besu.ethereum.privacy.PrivateTransaction.serialize(privateTransaction).encoded(); - } - - @Override - public Optional getPrivateTransactionFromPayload(Transaction transaction) { - // perform logic to deserialize payload from the marker transaction - - final BytesValueRLPInput bytesValueRLPInput = - new BytesValueRLPInput(transaction.getPayload(), false); - - return Optional.of(org.hyperledger.besu.ethereum.privacy.PrivateTransaction.readFrom(bytesValueRLPInput)); - } - }); - } - - @Override - public void stop() { - - } + private PrivacyPluginService service; + @Override + public void register(BesuContext context) { + service = context.getService(PrivacyPluginService.class).get(); + } + @Override + public void start() { + service.setPayloadProvider(new PrivacyPluginPayloadProvider() { + @Override + public Bytes generateMarkerPayload(PrivateTransaction privateTransaction, String privacyUserId) { + // perform logic to serialize the payload of the marker transaction + // in this example we are serialising the private transaction using rlp https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/ + return org.hyperledger.besu.ethereum.privacy.PrivateTransaction.serialize(privateTransaction).encoded(); + } + @Override + public Optional getPrivateTransactionFromPayload(Transaction transaction) { + // perform logic to deserialize payload from the marker transaction + final BytesValueRLPInput bytesValueRLPInput = + new BytesValueRLPInput(transaction.getPayload(), false); + return Optional.of(org.hyperledger.besu.ethereum.privacy.PrivateTransaction.readFrom(bytesValueRLPInput)); + } + }); + } + @Override + public void stop() {} } - ``` diff --git a/docs/private-networks/concepts/privacy/private-transactions/index.md b/docs/private-networks/concepts/privacy/private-transactions/index.md index c149089080d..e978b359c2c 100644 --- a/docs/private-networks/concepts/privacy/private-transactions/index.md +++ b/docs/private-networks/concepts/privacy/private-transactions/index.md @@ -7,12 +7,17 @@ description: Private transaction overview Private transactions have the same parameters as public Ethereum transactions, with the following additions: - `privateFrom` - The Tessera public key of the transaction sender. + - One of the following: + - `privateFor` - The Tessera public keys of the transaction recipients. + - `privacyGroupId` - [The privacy group to receive the transaction](../privacy-groups.md). + - `restriction` - Whether the private transaction is `restricted` or `unrestricted`: - `restricted` - Only the nodes participating in the transaction receive and store the payload of the private transaction. + - `unrestricted` - All nodes in the network receive the payload of the private transaction, but only the nodes participating in the transaction can read the transaction. :::info diff --git a/docs/private-networks/how-to/configure/contracts.md b/docs/private-networks/how-to/configure/contracts.md index a38c58e3894..e57af951cd2 100644 --- a/docs/private-networks/how-to/configure/contracts.md +++ b/docs/private-networks/how-to/configure/contracts.md @@ -10,9 +10,7 @@ tags: To pre-deploy contracts when starting Besu, specify the contract code in the [genesis file](../../../public-networks/concepts/genesis-file.md). -:::tip Contract code in the genesis file - -```json +```json title="Contract code in the genesis file" { ... "alloc": { @@ -29,8 +27,6 @@ To pre-deploy contracts when starting Besu, specify the contract code in the [ge } ``` -::: - The contract code in the genesis file defines the: - Address. diff --git a/docs/private-networks/how-to/configure/free-gas.md b/docs/private-networks/how-to/configure/free-gas.md index b04399a43af..b0291586775 100644 --- a/docs/private-networks/how-to/configure/free-gas.md +++ b/docs/private-networks/how-to/configure/free-gas.md @@ -73,7 +73,7 @@ When starting nodes, set the [minimum gas price](../../../public-networks/refere - + ```bash --min-gas-price=0 @@ -81,7 +81,7 @@ When starting nodes, set the [minimum gas price](../../../public-networks/refere - + ```bash min-gas-price=0 @@ -91,8 +91,6 @@ min-gas-price=0 -# Command Line - :::danger Important In a free gas network, ensure the [minimum gas price](../../../public-networks/reference/cli/options.md#min-gas-price) is set to zero for every node. Any node with a minimum gas price set higher than zero will silently drop transactions with a zero gas price. You can query a node's gas configuration using [`eth_gasPrice`](../../../public-networks/reference/api/index.md#eth_gasprice). diff --git a/docs/private-networks/how-to/monitor/opentelemetry.md b/docs/private-networks/how-to/monitor/opentelemetry.md index 9fe1298e9ac..bdc90c326d2 100644 --- a/docs/private-networks/how-to/monitor/opentelemetry.md +++ b/docs/private-networks/how-to/monitor/opentelemetry.md @@ -115,9 +115,9 @@ You can also install exporters that send system metrics to OpenTelemetry to moni It is easiest to run the OpenTelemetry collector with Docker with the following command: - - - + + + ```bash docker run -d \ @@ -128,9 +128,9 @@ You can also install exporters that send system metrics to OpenTelemetry to moni otel/opentelemetry-collector-contrib:latest ``` - - - + + + ```bash docker run -d \ @@ -141,47 +141,43 @@ You can also install exporters that send system metrics to OpenTelemetry to moni otel/opentelemetry-collector-contrib:latest ``` - - - + + + You can also refer to this [Docker-compose example](https://github.com/splunk/splunk-connect-for-ethereum/blob/989dc2ccae7d8235bf3ce2a83a18cf0cd1713294/examples/besu-sync/full-sync/docker-compose.yaml). 2. Start Besu with the [`--metrics-enabled`](../../../public-networks/reference/cli/options.md#metrics-enabled) and [`--metrics-protocol=opentelemetry`](../../../public-networks/reference/cli/options.md#metrics-protocol) options. For example, run the following command to start a single node: - - - + + + ```bash OTEL_EXPORTER_OTLP_ENDPOINT=https://: besu --network=dev --miner-enabled --miner-coinbase --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry ``` - - - + + + ```bash OTEL_EXPORTER_OTLP_ENDPOINT=https://localhost:4317 besu --network=dev --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry ``` - - - + + + The [OpenTelemetry SDK](https://github.com/open-telemetry/opentelemetry-specification/blob/8f7cdb73618a0b3afa9532b8f8103d719e352781/specification/sdk-environment-variables.md) mandates how to configure the OpenTelemetry gRPC client, so data flows to the collector from Besu. You can use the following environment variables: - | Name | Description | Required | - | --- | --- | --- | - | OTEL_EXPORTER_OTLP_ENDPOINT | OpenTelemetry Collector endpoint, of the form `https://host:port`. The default value is `https://localhost:4317` | Yes | - | OTEL_EXPORTER_OTLP_INSECURE | Whether to allow insecure connections for OpenTelemetry data. False by default. | No | + | Name | Description | Required | + |-------------------------------|-------------------------------------------------------------------------------------------------------------|----------| + | `OTEL_EXPORTER_OTLP_ENDPOINT` | OpenTelemetry Collector endpoint, of the form `https://host:port`. The default is `https://localhost:4317`. | Yes | + | `OTEL_EXPORTER_OTLP_INSECURE` | Whether to allow insecure connections for OpenTelemetry data. The default is `false`. | No | [Monitoring Besu synchronization to chain with Splunk]: https://github.com/splunk/splunk-connect-for-ethereum/tree/master/examples/besu-sync - - - -\*[APM]: Application Performance Monitoring diff --git a/docs/private-networks/how-to/monitor/splunk.md b/docs/private-networks/how-to/monitor/splunk.md index 2b749536740..22b946aa470 100644 --- a/docs/private-networks/how-to/monitor/splunk.md +++ b/docs/private-networks/how-to/monitor/splunk.md @@ -1,6 +1,7 @@ --- title: Use Splunk sidebar_position: 5 +toc_max_heading_level: 2 description: Send Hyperledger Besu logs to Splunk tags: - private networks @@ -14,18 +15,10 @@ Splunk can aggregate multiple logs in one place and run complex queries without Options for running Splunk and Besu are: -- [Use Splunk](#use-splunk) - - [Developer Quickstart with Splunk](#developer-quickstart-with-splunk) - - [Splunk Connect for Ethereum Docker Compose](#splunk-connect-for-ethereum-docker-compose) - - [Requirements](#requirements) - - [Steps](#steps) - - [Use Splunk Enterprise as a Docker container](#use-splunk-enterprise-as-a-docker-container) - - [Prerequisites](#prerequisites) - - [Steps](#steps-1) - - [Run a Splunk Enterprise instance](#run-a-splunk-enterprise-instance) - - [Prerequisites](#prerequisites-1) - - [Steps](#steps-2) - - [Splunk options reference](#splunk-options-reference) +- [Developer Quickstart with Splunk](#developer-quickstart-with-splunk) +- [Splunk Connect for Ethereum Docker Compose](#splunk-connect-for-ethereum-docker-compose) +- [Use Splunk Enterprise as a Docker container](#use-splunk-enterprise-as-a-docker-container) +- [Run a Splunk Enterprise instance](#run-a-splunk-enterprise-instance) ## Developer Quickstart with Splunk @@ -177,16 +170,16 @@ If running [Besu as a Docker container](../../get-started/install/run-docker-ima | Name | Description | Required | | --- | --- | --- | -| LOGGER | Set to `Splunk` to activate sending logs to Splunk. | Yes | -| HOST | Current host. If in a Docker environment, the default value is the docker container ID. Otherwise, the default value is `localhost`. | No | -| SPLUNK_URL | URL of the Splunk HTTP Event Collector. For example, use `https://localhost:8088` | Yes | -| SPLUNK_TOKEN | Authentication token, usually of the form `11111111-1111-1111-1111-111111111111` | Yes | -| SPLUNK_INDEX | [Index](https://docs.splunk.com/Splexicon:Index) to store logs. Defaults to `besu` | No | -| SPLUNK_SOURCE | [Source of the logs](https://docs.splunk.com/Splexicon:Source). Defaults to `besu` | No | -| SPLUNK_SOURCETYPE | [Source type of the logs](https://docs.splunk.com/Splexicon:Sourcetype). Defaults to `besu` | No | -| SPLUNK_BATCH_SIZE_BYTES | Size of a log batch in bytes. Defaults to `65536` | No | -| SPLUNK_BATCH_SIZE_COUNT | Size of a log batch in number of events. Defaults to `1000` | No | -| SPLUNK_BATCH_INTERVAL | Interval at which to send log batches. Defaults to `500` | No | -| SPLUNK_SKIPTLSVERIFY | Whether to check the Splunk instance TLS certificate when sending data. Defaults to `false` | No | +| `LOGGER` | Set to `Splunk` to activate sending logs to Splunk. | Yes | +| `HOST` | Current host. If in a Docker environment, the default value is the docker container ID. Otherwise, the default value is `localhost`. | No | +| `SPLUNK_URL` | URL of the Splunk HTTP Event Collector. For example, use `https://localhost:8088` | Yes | +| `SPLUNK_TOKEN` | Authentication token, usually of the form `11111111-1111-1111-1111-111111111111` | Yes | +| `SPLUNK_INDEX` | [Index](https://docs.splunk.com/Splexicon:Index) to store logs. Defaults to `besu` | No | +| `SPLUNK_SOURCE` | [Source of the logs](https://docs.splunk.com/Splexicon:Source). Defaults to `besu` | No | +| `SPLUNK_SOURCETYPE` | [Source type of the logs](https://docs.splunk.com/Splexicon:Sourcetype). Defaults to `besu` | No | +| `SPLUNK_BATCH_SIZE_BYTES` | Size of a log batch in bytes. Defaults to `65536` | No | +| `SPLUNK_BATCH_SIZE_COUNT` | Size of a log batch in number of events. Defaults to `1000` | No | +| `SPLUNK_BATCH_INTERVAL` | Interval at which to send log batches. Defaults to `500` | No | +| `SPLUNK_SKIPTLSVERIFY` | Whether to check the Splunk instance TLS certificate when sending data. Defaults to `false` | No | [Create an event index]: https://docs.splunk.com/Documentation/Splunk/8.0.4/Indexer/Setupmultipleindexes#Create_events_indexes diff --git a/docs/private-networks/how-to/send-transactions/private-transactions.md b/docs/private-networks/how-to/send-transactions/private-transactions.md index 2aa206251a0..ea3866cb714 100644 --- a/docs/private-networks/how-to/send-transactions/private-transactions.md +++ b/docs/private-networks/how-to/send-transactions/private-transactions.md @@ -24,7 +24,7 @@ Private transactions either deploy contracts or call contract functions. Ether t ::: -## eea_sendRawTransaction +## `eea_sendRawTransaction` [`eea_sendRawTransaction`](../../reference/api/index.md#eea_sendrawtransaction) distributes the private transaction to the participating nodes, and signs and submits the PMT, as described in [Private transaction processing](../../concepts/privacy/private-transactions/processing.md). @@ -34,7 +34,7 @@ If [sending concurrent transactions](concurrent-private-transactions.md), you mu ::: -## priv_distributeRawTransaction +## `priv_distributeRawTransaction` Use [`priv_distributeRawTransaction`](../../reference/api/index.md#priv_distributerawtransaction) instead of [`eea_sendRawTransaction`](#eea_sendrawtransaction) when sending [concurrent private transactions](concurrent-private-transactions.md). diff --git a/docs/private-networks/how-to/use-permissioning/local.md b/docs/private-networks/how-to/use-permissioning/local.md index c1269a66d9e..780e85dd229 100644 --- a/docs/private-networks/how-to/use-permissioning/local.md +++ b/docs/private-networks/how-to/use-permissioning/local.md @@ -22,11 +22,9 @@ If using Kubernetes, enable domain name support and use the `--Xdns-update-enabl ::: -:::info Nodes allowlist in the permissions configuration file - -`nodes-allowlist=["enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.168.0.9:4567","enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.169.0.9:4568"]` - -::: +```toml title="Nodes allowlist in the permissions configuration file" +nodes-allowlist=["enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.168.0.9:4567","enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.169.0.9:4568"] +``` Node allowlisting is at the node level. That is, each node in the network has a [permissions configuration file](#permissions-configuration-file) file in the [data directory](../../../public-networks/reference/cli/options.md#data-path) for the node. @@ -60,8 +58,8 @@ The `PERM` API methods are not enabled by default. To enable the `PERM` API meth To update the nodes allowlist while the node is running, use the following JSON-RPC API methods: -- [perm_addNodesToAllowlist](../../reference/api/index.md#perm_addnodestoallowlist) -- [perm_removeNodesFromAllowlist](../../reference/api/index.md#perm_removenodesfromallowlist) +- [`perm_addNodesToAllowlist`](../../reference/api/index.md#perm_addnodestoallowlist) +- [`perm_removeNodesFromAllowlist`](../../reference/api/index.md#perm_removenodesfromallowlist) You can also update the [`permissions_config.toml`](#permissions-configuration-file) file directly and then update the allowlist using the [`perm_reloadPermissionsFromFile`](../../reference/api/index.md#perm_reloadpermissionsfromfile) method. @@ -69,7 +67,7 @@ Updates to the permissions configuration file persist across node restarts. ### View the node allowlist -To view the nodes allowlist, use the [perm_getNodesAllowlist](../../reference/api/index.md#perm_getnodesallowlist) method. +To view the nodes allowlist, use the [`perm_getNodesAllowlist`](../../reference/api/index.md#perm_getnodesallowlist) method. :::note @@ -77,8 +75,7 @@ Each node has a [permissions configuration file](#permissions-configuration-file ::: -```bash Example of different node allowlists - +```text title="Example of different node allowlists" Node 1 Allowlist = [Node 2, Node 3] Node 2 Allowlist = [Node 3, Node 5] @@ -119,8 +116,7 @@ The following diagram illustrates applying local and onchain permissioning rules ![Permissioning Flow](../../../assets/images/PermissioningFlow.png) -```bash title="Example of different account allowlists" - +```text title="Example of different account allowlists" Node 1 Allowlist = [Account A, Account B] Node 2 Allowlist = [Account B, Account C] @@ -134,7 +130,6 @@ the block created by the Mining Node. Node 2 now has a transaction in the blockchain from Account A, which is not on the accounts allowlist for Node 2. - ``` :::note diff --git a/docs/private-networks/how-to/use-privacy/performance-best-practices.md b/docs/private-networks/how-to/use-privacy/performance-best-practices.md index 5559d610189..d621873e589 100644 --- a/docs/private-networks/how-to/use-privacy/performance-best-practices.md +++ b/docs/private-networks/how-to/use-privacy/performance-best-practices.md @@ -1,7 +1,7 @@ --- title: Performance best practices description: Performance best practices -sidebar_position: 10 +sidebar_position: 9 tags: - private networks --- diff --git a/docs/private-networks/how-to/use-privacy/web3js-quorum.md b/docs/private-networks/how-to/use-privacy/web3js-quorum.md index 3efa9ec8f24..3ba8846f3eb 100644 --- a/docs/private-networks/how-to/use-privacy/web3js-quorum.md +++ b/docs/private-networks/how-to/use-privacy/web3js-quorum.md @@ -1,7 +1,7 @@ --- title: Use the web3js-quorum library description: web3js-quorum client library -sidebar_position: 9 +sidebar_position: 8 tags: - private networks --- @@ -40,9 +40,11 @@ npm install web3js-quorum ## Initialize the web3js-quorum client -Initialize your client where: - -- `` is the JSON-RPC HTTP endpoint of your Hyperledger Besu node. Specified by the [`--rpc-http-host`](../../../public-networks/reference/cli/options.md#rpc-http-host) and [`--rpc-http-port`](../../../public-networks/reference/cli/options.md#rpc-http-port) command line options. +Initialize your client where `` is the JSON-RPC HTTP endpoint of your +Hyperledger Besu node. +Specified by the [`--rpc-http-host`](../../../public-networks/reference/cli/options.md#rpc-http-host) +and [`--rpc-http-port`](../../../public-networks/reference/cli/options.md#rpc-http-port) command +line options. diff --git a/docs/private-networks/reference/cli/subcommands.md b/docs/private-networks/reference/cli/subcommands.md index fcf7b5da913..90f6378a147 100644 --- a/docs/private-networks/reference/cli/subcommands.md +++ b/docs/private-networks/reference/cli/subcommands.md @@ -107,9 +107,9 @@ Supported types are: 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 +:::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/). +Use the following JSON schema to validate that your JSON data is well-formatted. To validate your JSON content, use an online validation tool, such as [JSON Schema Validator](https://www.jsonschemavalidator.net/). ```json { @@ -134,7 +134,7 @@ Use the following JSON Schema to validate that your JSON data is well formed. To } ``` -Example IBFT_EXTRA_DATA encoding +Example `IBFT_EXTRA_DATA` encoding: diff --git a/docs/private-networks/tutorials/kubernetes/charts.md b/docs/private-networks/tutorials/kubernetes/charts.md index 5f42351c5b0..3e98adf4cc8 100644 --- a/docs/private-networks/tutorials/kubernetes/charts.md +++ b/docs/private-networks/tutorials/kubernetes/charts.md @@ -1,5 +1,5 @@ --- -title: Deploying Charts +title: Deploy charts sidebar_position: 3 description: Deploying Besu Helm Charts for a Kubernetes cluster tags: diff --git a/docs/private-networks/tutorials/kubernetes/nat-manager.md b/docs/private-networks/tutorials/kubernetes/nat-manager.md index 5a66ede1f48..9f02cfa45a8 100644 --- a/docs/private-networks/tutorials/kubernetes/nat-manager.md +++ b/docs/private-networks/tutorials/kubernetes/nat-manager.md @@ -14,14 +14,16 @@ Use mode [`--nat-method=NONE`](../../../public-networks/how-to/connect/specify-n Default mode is [`AUTO`](../../../public-networks/how-to/connect/specify-nat.md#auto) but Besu will fallback to [`NONE`](../../../public-networks/how-to/connect/specify-nat.md#none) mode if automatic configuration fails. -:::info The following log shows fallback to [`NONE`](../../../public-networks/how-to/connect/specify-nat.md#none) mode after an automatic detection failure. +:::info - ``` - INFO | KubernetesNatManager | Starting kubernetes NAT manager. - DEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK. - DEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used - INFO | NetworkRunner | Starting Network. - ``` +The following log shows fallback to [`NONE`](../../../public-networks/how-to/connect/specify-nat.md#none) mode after an automatic detection failure. + +```bash +INFO | KubernetesNatManager | Starting kubernetes NAT manager. +DEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK. +DEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used +INFO | NetworkRunner | Starting Network. +``` ::: diff --git a/docs/private-networks/tutorials/kubernetes/quorum-explorer.md b/docs/private-networks/tutorials/kubernetes/quorum-explorer.md index cd69831c806..6cc0430e8f0 100644 --- a/docs/private-networks/tutorials/kubernetes/quorum-explorer.md +++ b/docs/private-networks/tutorials/kubernetes/quorum-explorer.md @@ -1,5 +1,5 @@ --- -title: Using the Quorum Explorer +title: Use the Quorum Explorer sidebar_position: 4 description: Using the Quorum Explorer on a Kubernetes cluster tags: diff --git a/docs/private-networks/tutorials/permissioning/index.md b/docs/private-networks/tutorials/permissioning/index.md index 7ec44fb93c3..028b0cca36f 100644 --- a/docs/private-networks/tutorials/permissioning/index.md +++ b/docs/private-networks/tutorials/permissioning/index.md @@ -2,6 +2,7 @@ title: Create a permissioned network sidebar_position: 1 description: Hyperledger Besu create a permissioned network +toc_max_heading_level: 3 tags: - private networks --- @@ -452,7 +453,7 @@ The result confirms Node-1 (the node running the JSON-RPC service) has three pee #### Send a transaction from an account in the allowlist -Import the first account from the genesis file into MetaMask and send transactions, as described in [Quickstart tutorial]: +Import the first account from the genesis file into MetaMask and send transactions, as described in the [Quickstart tutorial]: :::info Account 1 @@ -468,9 +469,9 @@ Besu doesn't support [private key management](../../../public-networks/how-to/se ::: -### Try sending a transaction from an account not in the accounts allowlist +#### Try sending a transaction from an account not in the accounts allowlist -Import the third account from the genesis file into MetaMask and try to send a transaction, as described in [Quickstart tutorial]: +Import the third account from the genesis file into MetaMask and try to send a transaction, as described in the [Quickstart tutorial]: :::info Account 3 @@ -480,7 +481,7 @@ Import the third account from the genesis file into MetaMask and try to send a t ::: -### Start a node not on the nodes allowlist +#### Start a node not on the nodes allowlist In your `Permissioned-Network` directory, create a `Node-5` directory and `data` directory inside it. @@ -524,7 +525,7 @@ The result confirms Node-5 has no peers even though it specifies Node-1 as a boo ## Stop nodes -When finished using the permissioned network, stop all nodes using ++ctrl+c++ in each terminal window. +When finished using the permissioned network, stop all nodes using Ctrl+C in each terminal window. :::tip @@ -535,4 +536,4 @@ To restart the permissioned network in the future, start from [step 7](#7-start- [IBFT 2.0 proof of authority consensus protocol]: ../../how-to/configure/consensus/ibft.md -[Private network example tutorial]: ../quickstart.md#create-a-transaction-using-metamask +[Quickstart tutorial]: ../quickstart.md#create-a-transaction-using-metamask diff --git a/docs/private-networks/tutorials/privacy/index.md b/docs/private-networks/tutorials/privacy/index.md index a1cd0973c12..63047dbbb9d 100644 --- a/docs/private-networks/tutorials/privacy/index.md +++ b/docs/private-networks/tutorials/privacy/index.md @@ -29,7 +29,9 @@ In this tutorial we start Tessera nodes for the four Besu nodes and associate ea - [Install Tessera](https://docs.tessera.consensys.net/category/install). -## 1. Create Tessera directories +## Steps + +### 1. Create Tessera directories Inside each `Node-*` directory, create a `Tessera` directory: @@ -49,7 +51,7 @@ IBFT-Network/ ├── Tessera ``` -## 2. Generate Tessera keys +### 2. Generate Tessera keys This example creates an unlocked private key, meaning you do not need a password to decrypt the private key file. @@ -63,7 +65,7 @@ At the prompt, press **Enter** to create an unlocked key. Tessera generates the public/private key pair and saves the keys in the `nodeKey.pub` and `nodeKey.key` files. -## 3. Create Tessera configuration files +### 3. Create Tessera configuration files In the `Tessera` directory for each node, create a file called `tessera.conf`, with the following configuration: @@ -315,7 +317,7 @@ In the configuration file, specify: - The address of the Tessera nodes to discover, in the [`peer`](https://docs.tessera.consensys.net/HowTo/Configure/Peer-discovery/#specify-peers) section. - The location of the public/private key pair. -## 4. Start the Tessera nodes +### 4. Start the Tessera nodes In each `Tessera` directory, start Tessera specifying the [configuration file](#3-create-tessera-configuration-files) created in the previous step: @@ -329,7 +331,7 @@ After starting the first Tessera node and before starting the other nodes, the l ::: -## 5. Start Besu Node-1 +### 5. Start Besu Node-1 In the `Node-1` directory, start Besu Node-1: @@ -371,7 +373,7 @@ When the node starts, the [enode URL](../../../public-networks/concepts/node-key ![Node 1 Enode URL](../../../assets/images/EnodeStartup.png) -## 6. Start Besu Node-2 +### 6. Start Besu Node-2 In the `Node-2` directory, start Besu Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode: @@ -403,7 +405,7 @@ When running Besu from the [Docker image](../../get-started/install/run-docker-i ::: -## 7. Start Besu Node-3 +### 7. Start Besu Node-3 In the `Node-3` directory, start Besu Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode: @@ -429,7 +431,7 @@ besu --data-path=data --genesis-file=..\genesis.json --bootnodes= - -\*[JWT]: JSON Web Token diff --git a/docs/private-networks/tutorials/privacy/quickstart.md b/docs/private-networks/tutorials/privacy/quickstart.md index ed2bd72f0c7..d830e10da0c 100644 --- a/docs/private-networks/tutorials/privacy/quickstart.md +++ b/docs/private-networks/tutorials/privacy/quickstart.md @@ -32,9 +32,9 @@ To run this tutorial, you must have the following installed: - [Git command line](https://git-scm.com/) - [Curl command line](https://curl.haxx.se/download.html). -## Create Docker-compose file +## Steps -## Usage +### 1. Create Docker-compose file To create the docker-compose file and artifacts, run: @@ -44,7 +44,7 @@ npx quorum-dev-quickstart Follow the prompts displayed to run Hyperledger Besu, private transactions, and [logging with ELK](../../how-to/monitor/elastic-stack.md). Enter `n` for [Codefi Orchestrate](https://docs.orchestrate.consensys.net/en/stable/). -## Start the network +### 2. Start the network :::caution @@ -79,7 +79,7 @@ For more information on the endpoints and services, refer to README.md in the in **************************************************************** ``` -## Deploy the private contract and interact with the nodes +### 3. Deploy the private contract and interact with the nodes To deploy a private contract to another [privacy group](../../concepts/privacy/privacy-groups.md) member, use the [web3js-quorum](https://consensys.github.io/web3js-quorum/latest/index.html) library and the [`eea_sendRawTransaction`](../../../private-networks/reference/api/index.md#eea_sendrawtransaction) API call. You must use this API call instead of [`eth_sendTransaction`](https://ethereum.github.io/execution-apis/api-documentation) because Hyperledger Besu keeps account management separate for stronger security. @@ -135,15 +135,7 @@ The general contract deployment flow is: 1. Use the contract address in the privacy transaction receipt to [interact with the contract](../contracts/interact.md) from that point on. -## Further examples - -View the [web3js-quorum client library example](web3js-quorum.md) and view the [sample code examples](https://github.com/ConsenSys/web3js-quorum/tree/master/example). - -You can also test the erc20 token example by executing `erc20.js` which deploys a `HumanStandardToken` contract and transfers 1 token to Node2. - -This can be verified from the `data` field of the `logs` which is `1`. - -## Stop the network +### 4. Stop the network Do one of the following to stop the network: @@ -158,3 +150,13 @@ Do one of the following to stop the network: ```bash ./remove.sh ``` + +## More examples + +View the [web3js-quorum client library example](web3js-quorum.md) and +[code examples](https://github.com/ConsenSys/web3js-quorum/tree/master/example). + +You can also test the ERC-20 token example by executing `erc20.js`, which deploys a +`HumanStandardToken` contract and transfers one token to Node-2. + +You can verify this by observing the `data` field of the `logs`, which is `1`. diff --git a/docs/private-networks/tutorials/quickstart.md b/docs/private-networks/tutorials/quickstart.md index dd6012c88c1..df9f2841964 100644 --- a/docs/private-networks/tutorials/quickstart.md +++ b/docs/private-networks/tutorials/quickstart.md @@ -399,7 +399,6 @@ npm run deploy-quorumtoken The output is similar to the following: ```bash - # compile > quorumToken@1.0.0 compile > npx hardhat compile @@ -438,8 +437,7 @@ npm run dev ``` This starts the dapp, binding it to port `3001` on your machine. -```text - +```bash > webapp@0.1.0 dev > next dev -p 3001 diff --git a/docs/public-networks/how-to/bonsai-limit-trie-logs.md b/docs/public-networks/how-to/bonsai-limit-trie-logs.md index 5d0f0de3031..f1775d1031f 100644 --- a/docs/public-networks/how-to/bonsai-limit-trie-logs.md +++ b/docs/public-networks/how-to/bonsai-limit-trie-logs.md @@ -204,5 +204,5 @@ Check if you are running the command for a network other than Mainnet. To specify a network, run a command that looks similar to the following: ```bash -`sudo /usr/local/bin/besu/bin/besu --network=holesky --sync-mode=SNAP --data-storage-format=BONSAI --data-path=/var/lib/besu storage x-trie-log prune` +sudo /usr/local/bin/besu/bin/besu --network=holesky --sync-mode=SNAP --data-storage-format=BONSAI --data-path=/var/lib/besu storage x-trie-log prune ``` diff --git a/docs/public-networks/how-to/configure-java/manage-memory.md b/docs/public-networks/how-to/configure-java/manage-memory.md index cba1b64217b..410cb5e1fbf 100644 --- a/docs/public-networks/how-to/configure-java/manage-memory.md +++ b/docs/public-networks/how-to/configure-java/manage-memory.md @@ -32,7 +32,7 @@ You can set the maximum heap size using the `BESU_OPTS` environment variable and - + Set the variable for the whole shell before running Besu. @@ -42,7 +42,7 @@ export BESU_OPTS=-Xmx8g - + Set the variable only for the specific Besu command. @@ -50,7 +50,8 @@ Set the variable only for the specific Besu command. BESU_OPTS=-Xmx8g besu [Besu options] ``` -# `.service` file example + + ```bash [Service] diff --git a/docs/public-networks/how-to/develop/hardhat.md b/docs/public-networks/how-to/develop/hardhat.md index 06b4a800171..42c486e7e67 100644 --- a/docs/public-networks/how-to/develop/hardhat.md +++ b/docs/public-networks/how-to/develop/hardhat.md @@ -22,8 +22,8 @@ To add the wallet provider, update the `hardhat.config.ts` file in the project d - `` with the JSON-RPC endpoint (IP address and port) of a Besu node. - `` with the list of words that make up your account's mnemonic. -- ` your password if used -- `` your account's private key +- ` with your password if used. +- `` with your account's private key. ```js module.exports = { diff --git a/docs/public-networks/how-to/use-besu-api/authenticate.md b/docs/public-networks/how-to/use-besu-api/authenticate.md index d0a251c3bf9..fc42cb87370 100644 --- a/docs/public-networks/how-to/use-besu-api/authenticate.md +++ b/docs/public-networks/how-to/use-besu-api/authenticate.md @@ -43,9 +43,7 @@ Using [public key authentication](#jwt-public-key-authentication) disables the ` The `toml` credentials file defines user details and the JSON-RPC methods they can access. -:::info Sample `auth.toml` credentials file - -```toml +```toml title="auth.toml" [Users.username1] password = "$2a$10$l3GA7K8g6rJ/Yv.YFSygCuI9byngpEzxgWS9qEg5emYDZomQW7fGC" permissions=["net:*","eth:blockNumber"] @@ -57,8 +55,6 @@ permissions=["net:version","admin:*"] privacyPublicKey="quhb1pQPGN1w8ZSZSyiIfncEAlVY/M/rauSyQ5wVMRE=" ``` -::: - Each user requiring JSON-RPC access the configuration file lists the: - Username. `Users.` is mandatory and followed by the username. That is, replace `` in `[Users.]` with the username. diff --git a/docs/public-networks/how-to/use-besu-api/json-rpc.md b/docs/public-networks/how-to/use-besu-api/json-rpc.md index df52bfe67f2..43837f71cd5 100644 --- a/docs/public-networks/how-to/use-besu-api/json-rpc.md +++ b/docs/public-networks/how-to/use-besu-api/json-rpc.md @@ -40,34 +40,36 @@ The geth console is a REPL (Read, Evaluate, & Print Loop) JavaScript console. Us To use the geth console with Besu: 1. Start Besu with the [`--rpc-http-enabled`](../../reference/cli/options.md#rpc-http-enabled) or `--Xrpc-ipc-enabled` option. -1. Specify which APIs to enable using the [`--rpc-http-api`](../../reference/cli/options.md#rpc-http-api) or `--Xrpc-ipc-api` option. -1. Start the geth console specifying the JSON-RPC endpoint: - - - - -```bash -geth attach http://localhost:8545 -``` - - - - - -```bash -geth attach /path/to/besu.ipc -``` - - - - - -Use the geth console to call [JSON-RPC API methods](../../reference/api/index.md) that geth and Besu share. - -```bash -eth.syncing -``` +2. Specify which APIs to enable using the [`--rpc-http-api`](../../reference/cli/options.md#rpc-http-api) or `--Xrpc-ipc-api` option. + +3. Start the geth console specifying the JSON-RPC endpoint: + + + + + + ```bash + geth attach http://localhost:8545 + ``` + + + + + + ```bash + geth attach /path/to/besu.ipc + ``` + + + + + +4. Use the geth console to call [JSON-RPC API methods](../../reference/api/index.md) that geth and Besu share. + + ```bash + eth.syncing + ``` ## JSON-RPC authentication diff --git a/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md b/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md index d0ed530b497..c33baff8bb8 100644 --- a/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md +++ b/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md @@ -78,26 +78,11 @@ Subscribing to some events (for example, logs) can cause a flood of notification Use `eth_subscribe` to create subscriptions for the following event types: -- [Use RPC Pub/Sub over WebSockets](#use-rpc-pubsub-over-websockets) - - [Introduction](#introduction) - - [Use RPC Pub/Sub](#use-rpc-pubsub) - - [Subscription ID](#subscription-id) - - [Notifications when synchronizing](#notifications-when-synchronizing) - - [Subscribe](#subscribe) - - [New headers](#new-headers) - - [Logs](#logs) -- [All logs](#all-logs) -- [Specific address, topic, fromBlock and toBlock](#specific-address-topic-fromblock-and-toblock) -- [Result](#result) -- [Notification](#notification) -- [All logs for privacy group](#all-logs-for-privacy-group) -- [Specific address and topic](#specific-address-and-topic) -- [Result](#result-1) -- [Notification](#notification-1) - - [Pending transactions](#pending-transactions) - - [Dropped transactions](#dropped-transactions) - - [Synchronizing](#synchronizing) - - [Unsubscribe](#unsubscribe) +- [New headers](#new-headers) +- [Logs](#logs) +- [Pending transactions](#pending-transactions) +- [Dropped transactions](#dropped-transactions) +- [Synchronizing](#synchronizing) Use `priv_subscribe` to [create subscriptions for logs on private contracts](#logs). @@ -205,7 +190,7 @@ Example notification with the `{"includeTransactions": true}` parameter included To notify you about [logs](../../concepts/events-and-logs.md) included in new blocks, use the `logs` parameter with `eth_subscribe` or `priv_subscribe`. Specify a filter object to receive notifications only for logs matching your filter. -Logs subscriptions have an filter object parameter with the following fields: +Logs subscriptions have a filter object parameter with the following fields: - `address` - (optional) Either an address or an array of addresses. Returns only logs created from these addresses. - `topics` - (optional) Returns only logs that match the [specified topics](../../concepts/events-and-logs.md#topic-filters). @@ -223,10 +208,15 @@ The logs subscription returns [log objects](../../reference/api/objects.md#log-o ```json -{ "id": 1, "method": "eth_subscribe", "params": ["logs", {}] } +{ + "id": 1, + "method": "eth_subscribe", + "params": ["logs", {}] +} ``` -# Specific address, topic, fromBlock and toBlock + + ```json { @@ -300,7 +290,7 @@ The logs subscription returns [log objects](../../reference/api/objects.md#log-o - + ```json { diff --git a/docs/public-networks/how-to/use-pow/mining.md b/docs/public-networks/how-to/use-pow/mining.md index 6dbd9b29f52..decec599dfc 100644 --- a/docs/public-networks/how-to/use-pow/mining.md +++ b/docs/public-networks/how-to/use-pow/mining.md @@ -16,11 +16,8 @@ GPU mining tests used [Ethminer](https://github.com/ethereum-mining/ethminer) wi 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. - - The Ropsten testnet is now deprecated. It transitioned to proof of stake consensus before deprecation. - ::: ## Configure CPU mining diff --git a/docs/public-networks/reference/engine-api/index.md b/docs/public-networks/reference/engine-api/index.md index 9b8db91b651..65b72c4140b 100644 --- a/docs/public-networks/reference/engine-api/index.md +++ b/docs/public-networks/reference/engine-api/index.md @@ -1,6 +1,7 @@ --- title: Engine API description: Engine API methods reference +toc_max_heading_level: 3 tags: - public networks --- @@ -229,11 +230,11 @@ Returns the bodies of the execution payloads corresponding to the specified bloc #### Parameters -`blockHashes`: **array** of **strings** - Block hashes +`blockHashes`: *array* of *strings* - Block hashes #### Returns -`engineGetPayloadBodiesResultV1`: **array** of **objects** - Execution payload body objects +`engineGetPayloadBodiesResultV1`: *array* of *objects* - Execution payload body objects diff --git a/docs/public-networks/reference/evm-tool.md b/docs/public-networks/reference/evm-tool.md index 27a04ad630a..4d3012f1b24 100644 --- a/docs/public-networks/reference/evm-tool.md +++ b/docs/public-networks/reference/evm-tool.md @@ -1,6 +1,7 @@ --- title: EVM tool options sidebar_position: 5 +toc_max_heading_level: 3 description: Besu EVM tool options reference tags: - public networks diff --git a/docusaurus.config.js b/docusaurus.config.js index 1a4c41a2f1e..869fc6375ec 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -245,7 +245,7 @@ const config = { prism: { theme: lightCodeTheme, darkTheme: darkCodeTheme, - additionalLanguages: ["solidity", "toml"], + additionalLanguages: ["solidity", "toml", "java"], }, languageTabs: [ {