Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
e07eef9
Refactor/contributor content (#126)
faraggi Jan 30, 2020
7e8f125
Added default data location (#123)
MadelineMurray Jan 31, 2020
7f65eba
Moved license note (#129)
MadelineMurray Jan 31, 2020
ed9f892
Windows is now supported in the quickstart (#143)
EdJoJob Feb 6, 2020
c557aa6
quickstart updates all round (#141)
joshuafernandes Feb 9, 2020
bceab84
Fixed typo (#150)
MadelineMurray Feb 10, 2020
911f834
Add multi-tenancy information. (#131)
bgravenorst Feb 10, 2020
450fa9d
Apply renames for the quickstart repo (#152)
EdJoJob Feb 12, 2020
f2f8512
Added content on protocol upgrades (#132)
MadelineMurray Feb 13, 2020
e6e523b
Fixed Ansible link and renamed topic (#168)
MadelineMurray Feb 14, 2020
90a242d
permissioning (#170)
wslyvh Feb 14, 2020
d39c52c
Vale and mdlint editorial updates - DCO.md (#162)
Feb 14, 2020
df5cfd8
updated CI and customised checks (#165)
NicolasMassart Feb 19, 2020
3834884
Added new NAT options (#179)
MadelineMurray Feb 20, 2020
a458260
Editorial mdlint vale updates for Concepts/Transactions directory (#185)
Feb 20, 2020
bd07077
Editorial mklint and vale updates in Concepts/Permissioning dir (#181)
Feb 20, 2020
bac6f80
mdlint and vale editorial updates in Concepts/Consensus-Protocols dir…
Feb 20, 2020
eab1155
mdlint and vale editorial edits in the Concepts directory (#177)
Feb 20, 2020
56fa882
vale and mklint editorial updates - CONTRIBUTING.md (#163)
Feb 20, 2020
a8e3e32
mdlint and vale editorial updates - index.md (#169)
Feb 20, 2020
2d6e01c
Added plugins_reloadPluginConfig (#184)
MadelineMurray Feb 21, 2020
37fb5f4
[BESU-163] Add inbound and outbound TLS information. (#124)
bgravenorst Feb 21, 2020
49d696c
Add multi-tenancy whitelist info. (#193)
bgravenorst Feb 24, 2020
79f8652
add redirect plugin and initial configuration from RTD redirects (#172)
NicolasMassart Feb 24, 2020
5acf6f7
Editorial mdlint and vale updates in the Concepts/Privacy dir (#183)
Feb 25, 2020
18d5879
Editorial mdlink and vale updates for HowTo/Configure directory (#187)
Feb 25, 2020
a88c61e
Editorial mdlint and vale updates to Howto/Backup directory (#186)
Feb 25, 2020
7420b08
add an info pass for md linting (#205)
NicolasMassart Feb 25, 2020
9399bf5
add postman collection locally and fix the postman button style (#174)
NicolasMassart Feb 25, 2020
d4f8554
fix code blocks in doc by updating mkdocs and dependencies (#158)
NicolasMassart Feb 25, 2020
3c6e337
Add links to TLS content. (#191)
bgravenorst Feb 25, 2020
9ff489f
Add TLS diagram. (#194)
bgravenorst Feb 25, 2020
5c4a5dc
Moved license note (#129)
MadelineMurray Jan 31, 2020
33dba7e
Windows is now supported in the quickstart (#143)
EdJoJob Feb 6, 2020
60429d2
quickstart updates all round (#141)
joshuafernandes Feb 9, 2020
099f1b9
Fixed typo (#150)
MadelineMurray Feb 10, 2020
ed0f2c5
Add multi-tenancy information. (#131)
bgravenorst Feb 10, 2020
6f1713b
Apply renames for the quickstart repo (#152)
EdJoJob Feb 12, 2020
7101e2b
Added content on protocol upgrades (#132)
MadelineMurray Feb 13, 2020
522854d
Fixed Ansible link and renamed topic (#168)
MadelineMurray Feb 14, 2020
4c6bd49
updated CI and customised checks (#165)
NicolasMassart Feb 19, 2020
6eae848
Added new NAT options (#179)
MadelineMurray Feb 20, 2020
7526654
Editorial mklint and vale updates in Concepts/Permissioning dir (#181)
Feb 20, 2020
ab00f15
mdlint and vale editorial edits in the Concepts directory (#177)
Feb 20, 2020
66a8fe8
[BESU-163] Add inbound and outbound TLS information. (#124)
bgravenorst Feb 21, 2020
28106e5
Editorial mdlint and vale updates in the Concepts/Privacy dir (#183)
Feb 25, 2020
02e0f6b
Editorial mdlink and vale updates for HowTo/Configure directory (#187)
Feb 25, 2020
c3c35bb
Editorial mdlint and vale updates to Howto/Backup directory (#186)
Feb 25, 2020
f23506b
add an info pass for md linting (#205)
NicolasMassart Feb 25, 2020
05bc6d9
Add links to TLS content. (#191)
bgravenorst Feb 25, 2020
46a18bb
Editorial mdlint and vale updates in Develop/Dapps directory
Feb 26, 2020
8427b24
minor update
Feb 26, 2020
72cf7e4
Add Besu Plugin information (#142)
bgravenorst Feb 26, 2020
ea1fe38
Added reorg compatible privacy (#192)
MadelineMurray Feb 26, 2020
094ce6e
add priv_call API Method (#144)
Feb 26, 2020
3e7b5c5
Added tracing API (#182)
MadelineMurray Feb 26, 2020
84e174a
Add Grant as a maintainer (#199)
NicolasMassart Feb 26, 2020
6a4582b
Added auto log bloom caching option (#210)
MadelineMurray Feb 26, 2020
a9ec8d6
A couple of EOL spaces fixed
Feb 26, 2020
40857b0
One more minor update
Feb 26, 2020
680f3ad
Merge branch 'master' into grantnoble-develop-dapps-mdlint-vale
Feb 27, 2020
3ec2930
Merge branch 'master' into grantnoble-develop-dapps-mdlint-vale
Feb 27, 2020
5f2f50f
Merge branch 'master' into grantnoble-develop-dapps-mdlint-vale
Feb 28, 2020
782b2ce
Merge branch 'master' into grantnoble-develop-dapps-mdlint-vale
Mar 1, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Concepts/Privacy/Multi-Tenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ JSON-RPC requests, and the tenant has access to the requested privacy data. Ther
private data, and each tenant uses a JWT token for authentication.

You can create the JWT token either
[externally or internally](../../HowTo/Interact/APIs/Authentication.md).
[externally or internally](../../HowTo/Interact/APIs/Authentication.md).
4 changes: 0 additions & 4 deletions docs/Concepts/Privacy/Privacy-Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ nodes participating in the transaction.
By default, each participant in a privacy network uses its own Besu and Orion node.
[Multi-tenancy](Multi-Tenancy.md) allows multiple participants to use the same Besu and Orion node.

By default, each participant in a privacy network uses its own Besu and Orion
node. [Multi-tenancy](Multi-Tenancy.md) allows multiple participants to use the same Besu and Orion
node.

!!! tip
Private Transaction Managers are also known as Enclaves.

Expand Down
1 change: 0 additions & 1 deletion docs/Concepts/TLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ or server ([Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Commun

![Besu TLS](../images/Besu_TLS.png)


Private keys and certificates must be stored in a password-protected PKCS #12
keystore files.

Expand Down
14 changes: 10 additions & 4 deletions docs/HowTo/Configure/Configure-TLS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ description: Configure TLS
# Configure TLS

Hyperledger Besu supports TLS for client and server communication. For example, you can
[configure TLS](../../Concepts/TLS.md) for communication between [EthSigner](https://docs.ethsigner.pegasys.tech/en/latest/Concepts/TLS/) and Besu, and Besu and [Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Communication/).
[configure TLS](../../Concepts/TLS.md) for communication between
[EthSigner](https://docs.ethsigner.pegasys.tech/en/latest/Concepts/TLS/) and Besu, and Besu and
[Orion](https://docs.orion.pegasys.tech/en/latest/Concepts/TLS-Communication/).

Configure TLS communication from the command line.

Expand All @@ -20,7 +22,7 @@ Allow clients (for example a dApp, curl, or EthSigner) to send and receive secur

**Client Prerequisites**:

* [Configure the client for TLS](https://docs.ethsigner.pegasys.tech/en/latest/HowTo/Configure-TLS/#server-tls-connection).
* [Configure the client for TLS]
* Client's PKCS #12 keystore information.

### Create the Known Clients File
Expand Down Expand Up @@ -84,7 +86,7 @@ Allow Besu to securely communicate with the server (Orion).

**Server Prerequisites**:

* [Configure the server to allow TLS communication](https://docs.orion.pegasys.tech/en/latest/Tutorials/TLS/).
* [Configure the server to allow TLS communication]
* Server's certificate information.

### Create the Known Servers file
Expand Down Expand Up @@ -124,4 +126,8 @@ The command line:
* Specifies the file that contains the password to decrypt the keystore using the
[`--privacy-tls-keystore-password-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-keystore-password-file) option.
* Specifies the trusted servers using the
[`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option.
[`--privacy-tls-known-enclave-file`](../../Reference/CLI/CLI-Syntax.md#privacy-tls-known-enclave-file) option.

<!-- Links -->
[Configure the client for TLS]: https://docs.ethsigner.pegasys.tech/en/latest/HowTo/Configure-TLS/#server-tls-connection
[Configure the server to allow TLS communication]: https://docs.orion.pegasys.tech/en/latest/Tutorials/TLS/
36 changes: 18 additions & 18 deletions docs/HowTo/Develop-Dapps/Truffle.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
---
description: Using Hyperledger Besu with Truffle
<!--- END of page meta data -->
---

# Using Hyperledger Besu with Truffle
# Using Hyperledger Besu with Truffle

Developing for Hyperledger Besu using Truffle is the same as using Truffle to develop for the public
Ethereum networks.
Truffle supports Besu with the only difference being Besu does not implement private key management.
To use Besu with Truffle, you must configure a Truffle wallet.
Developing for Hyperledger Besu using Truffle is the same as developing for public Ethereum
networks using Truffle. Truffle supports Besu with the only difference being Besu does not support
private key management. To use Besu with Truffle, you must configure a Truffle wallet.

## Install Truffle Wallet
## Install a Truffle wallet

To install the Truffle wallet:
To install a Truffle wallet:

```bash
npm install --save @truffle/hdwallet-provider
```

!!!note

With Truffle 5, you must use a Web3 1.0 enabled wallet or the Truffle tasks hang.

#### Modify the Truffle Configuration File
### Update the Truffle configuration file

Modify the `truffle-config.js` file in the project directory to add the wallet provider. Replace:
To add the wallet provider, update the `truffle-config.js` file in the project directory. Replace:

* `<JSON-RPC-http-endpoint>` with the JSON-RPC endpoint (IP address and port) of a Besu node
* `<account-private-key>` with the private key of an Ethereum account containing Ether
* `<JSON-RPC-http-endpoint>` with the JSON-RPC endpoint (IP address and port) of a Besu node.
* `<account-private-key>` with the private key of an Ethereum account containing Ether.

```javascript
const PrivateKeyProvider = require("@truffle/hdwallet-provider");
Expand All @@ -43,16 +44,15 @@ module.exports = {
};
```

### Start Besu Node
### Start a Besu node

Start a Besu node with JSON-RPC enabled on the endpoint specified in the Truffle configuration
file.
Start a Besu node with JSON-RPC enabled on the endpoint specified in the Truffle configuration
file.

### Deploy Contract
### Deploy a contract

To deploy a contract onto the Besu network:
To deploy a contract onto the Besu network:

```bash
truffle migrate --network besuWallet
```

112 changes: 67 additions & 45 deletions docs/HowTo/Develop-Dapps/Use-web3js.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,72 @@
description: Hyperledger Besu client libraries
<!--- END of page meta data -->
---
description: Hyperledger Besu client libraries
---

# Create a Signed Transaction using Web3.js
# Create a signed transaction using Web3.js

You can use the example Javascript scripts to create and send raw transactions in the private network
created by the [Private Network Example](../../Tutorials/Examples/Private-Network-Example.md).
You can use the example JavaScript scripts to create and send raw transactions in the private
network created by the
[Private Network Example](../../Tutorials/Examples/Private-Network-Example.md).

Update the `JSON-RPC endpoint` in the following examples to the endpoint for the private
network displayed after running the `./run.sh` script.
In the following examples update the `JSON-RPC endpoint` to the endpoint for the private network
displayed after running the `./run.sh` script.

!!! warning "Private keys"

Do not use the accounts in the examples on mainnet or any public network except for testing.
The private keys are displayed which means the accounts are not secure.

All accounts and private keys in the examples are from the `dev.json` genesis file in the
[`/besu/ethereum/core/src/main/resources`](https://github.com/hyperledger/besu/tree/master/config/src/main/resources) directory.
They display the private keys, which means the accounts are not secure.

In production environments avoid exposing your private keys by creating signed transactions
offline, or use [EthSigner](https://docs.ethsigner.pegasys.tech/) to isolate your private keys and
sign transactions with [`eth_sendTransaction`](https://docs.ethsigner.pegasys.tech/Using-EthSigner/Using-EthSigner/#eth_sendtransaction).

## Example Javascript scripts
All accounts and private keys in the examples are from the `dev.json` genesis file in the
[`/besu/ethereum/core/src/main/resources`](https://github.com/hyperledger/besu/tree/master/config/src/main/resources)
directory.

In production environments avoid exposing your private keys by creating signed transactions
offline, or use [EthSigner](https://docs.ethsigner.pegasys.tech/) to isolate your private keys
and sign transactions with
[`eth_sendTransaction`](https://docs.ethsigner.pegasys.tech/Using-EthSigner/Using-EthSigner/#eth_sendtransaction).

## Example JavaScript scripts

### 1. Requirements

- [Node.js (version > 10)](https://nodejs.org/en/download/)
- [web3.js 1.0.0 beta](https://github.com/ethereum/web3.js/) and [ethereumjs 1.3](https://github.com/ethereumjs/ethereumjs-tx).
These dependencies are defined in the included [`package.json`](../../scripts/transactions/package.json) file.
* [Node.js (version > 10)](https://nodejs.org/en/download/)
* [web3.js 1.0.0 beta](https://github.com/ethereum/web3.js/) and
[ethereumjs 1.3](https://github.com/ethereumjs/ethereumjs-tx).

The included [`package.json`](../../scripts/transactions/package.json) file defines these
dependencies.

### 2. Create a directory

### 2. Create Directory
```bash
mkdir example_scripts
```

### 3. Copy Files
### 3. Copy files

Copy the following files to the `example_scripts` directory:

- [`package.json`](../../scripts/transactions/package.json)
- [`create_value_raw_transaction.js`](../../scripts/transactions/create_value_raw_transaction.js)
- [`create_contract_raw_transaction.js`](../../scripts/transactions/create_contract_raw_transaction.js)
* [`package.json`](../../scripts/transactions/package.json)
* [`create_value_raw_transaction.js`](../../scripts/transactions/create_value_raw_transaction.js)
* [`create_contract_raw_transaction.js`](../../scripts/transactions/create_contract_raw_transaction.js).

### 4. Retrieve dependencies

### 4. Retrieve Dependencies
```bash
cd example_scripts
npm install
```

### 5. Send Ether
The following is the example JavaScript script that displays a signed raw transaction string to send Ether.

The following is the example JavaScript script displaying a signed raw transaction string to send
Ether.

!!! example "Send Ether example : create_value_raw_transaction.js"

```javascript linenums="1"
{! scripts/transactions/create_value_raw_transaction.js !}

```

Run the `create_value_raw_transaction.js` script:
Expand All @@ -67,23 +80,29 @@ node create_value_raw_transaction.js http://localhost:8545
```

!!! tip
The default JSON-RPC HTTP endpoint for `create_value_raw_transaction.js` is `http://localhost:8545`.
If Besu is listening on `http://localhost:8545`, you can run the command without specifying the endpoint.

A signed raw transaction string is displayed.

You can send the raw transaction yourself or let the script send it using the web3.js library.
The default JSON-RPC HTTP endpoint for `create_value_raw_transaction.js` is
`http://localhost:8545`. If Besu is listening on `http://localhost:8545`, you can run the
command without specifying the endpoint.

A signed raw transaction string displays.

You can send the raw transaction yourself or let the script send it using the web3.js client
library.

If sending the transaction yourself, the curl command displays, which you can copy and paste.
Otherwise, the script sends the transaction and the transaction receipt displays.

If sending it yourself, the cURL command is displayed and can be copied and pasted. Otherwise, the script sends it and
the transaction receipt is displayed.
### 6. Create a smart contract

### 6. Create A Smart Contract
The following is the example JavaScript script that displays a signed raw transaction string to create a contract.
The following is the example JavaScript script displaying a signed raw transaction string to create
a contract.

!!! example "Create a contract example : create_contract_raw_transaction.js"

!!! example "Create a contract example : create_contract_raw_transaction.js"
```javascript linenums="1"
{! scripts/transactions/create_contract_raw_transaction.js !}

```

Run the `create_contract_raw_transaction.js` script:
Expand All @@ -97,12 +116,15 @@ node create_contract_raw_transaction.js http://localhost:8545
```

!!! tip
The default JSON-RPC HTTP endpoint for `create_contract_raw_transaction.js` is `http://localhost:8545`.
If using `http://localhost:8545`, run `node create_contract_raw_transaction.js`.

A signed raw transaction string is displayed.

You can send the raw transaction yourself or let the script send it using the web3.js library.
The default JSON-RPC HTTP endpoint for `create_contract_raw_transaction.js` is
`http://localhost:8545`. If using `http://localhost:8545`, run
`node create_contract_raw_transaction.js`.

A signed raw transaction string displays.

You can send the raw transaction yourself or let the script send it using the web3.js client
library.

If sending it yourself, the cURL command is displayed and can be copied and pasted. Otherwise, the script sends it and
the transaction receipt is displayed.
If sending the transaction yourself, the curl command displays, which you can copy and paste.
Otherwise, the script sends the transaction and the transaction receipt displays.