11---
2- description : Hyperledger Besu private network example tutorial
2+ description : Quorum dev quickstart tutorial
33---
44
5- # Private network example tutorial
5+ # Quorum Developer Quickstart tutorial
66
7- The private network example uses the Hyperledger Besu Docker image to run a private network of Besu
7+ The Quorum Developer Quickstart uses the Hyperledger Besu Docker image to run a private network of Besu
88nodes managed by Docker Compose.
99
1010!!! important
@@ -14,44 +14,39 @@ nodes managed by Docker Compose.
1414
1515## Prerequisites
1616
17- To run this tutorial, you must have the following installed:
18-
1917* [ Docker and Docker-compose] ( https://docs.docker.com/compose/install/ )
18+ * [ Nodejs] ( https://nodejs.org/en/download/ )
19+ * On Windows:
20+ * Windows Subsystem for Linux 2
21+ * Docker desktop configured to use the WSL2-based engine.
2022
21- !!! important
22-
23- If using [MacOS](https://docs.docker.com/docker-for-mac/) or
24- [Windows](https://docs.docker.com/docker-for-windows/), set Docker to use up to 6GB of
25- memory on the _Advanced_ tab in _Preferences_.
23+ !!! important
24+ Ensure you allow Docker up to 4G of memory or 6G if running the privacy examples.
25+ Refer to the _ Resources_ section in [ Docker for Mac] ( https://docs.docker.com/docker-for-mac/ ) and
26+ [ Docker Desktop] ( https://docs.docker.com/docker-for-windows/ ) for details.
2627
2728* [ Git command line] ( https://git-scm.com/ )
2829* [ Curl command line] ( https://curl.haxx.se/download.html )
2930* A web browser that supports [ Metamask] ( https://metamask.io/ ) (currently Chrome, Firefox, Opera,
3031 and Brave), and has the MetaMask plug-in installed. This tutorial uses screenshots from Brave.
3132
32- ## Clone Besu sample networks source code
33+ ## Create Docker-compose file
3334
34- Clone the repository from the ` besu-sample-networks ` repository:
35-
36- === "Linux/MacOS"
35+ ## Usage
3736
38- ```bash
39- git clone https://github.com/PegaSysEng/besu-sample-networks.git
40- ```
37+ To create the docker-compose file and artifacts, run:
4138
42- !!!note
39+ ``` bash
40+ npx quorum-dev-quickstart
41+ ```
4342
44- To use a specific version of Hyperledger Besu, set the `BESU_VERSION` environment variable.
43+ Follow the prompts displayed to run Hyperledger Besu and [ logging with ELK] ( ../../HowTo/Monitor/Elastic-Stack.md ) .
44+ Enter ` n ` for [ Codefi Orchestrate] ( https://docs.orchestrate.consensys.net/en/stable/ ) and
45+ [ private transactions] ( ../../Concepts/Privacy/Privacy-Overview.md ) .
4546
4647## Start the network
4748
48- !!!important
49-
50- If running in Windows, run commands from the GitBash shell.
51-
52- This tutorial uses [ Docker Compose] ( https://docs.docker.com/compose/ ) to assemble the images and
53- run the private network. To build the docker images and run the containers, go to the
54- ` besu-sample-networks ` directory and run:
49+ To start the network, go to the installation directory and run:
5550
5651=== "Linux/MacOS"
5752
@@ -68,51 +63,40 @@ When the process ends, it lists the running services:
6863
6964 ```log
7065 *************************************
71- Sample Network for Besu at latest
66+ Quorum Dev Quickstart
7267 *************************************
68+ Setting up the index patterns in kibana............
69+ {"type":"index-pattern","id":"metricbeat","attributes":{"title":"metricbeat-*","timeFieldName":"@timestamp"},
70+ "references":[],"migrationVersion":{"index-pattern":"7.6.0"},"updated_at":"2020-11-04T10:43:34.252Z",
71+ "version":"WzgsMV0=","namespaces":["default"]}{"success":true,"successCount":7}{"type":"index-pattern",
72+ "id":"besu","attributes":{"title":"besu-*","timeFieldName":"@timestamp"},"references":[],"migrationVersion":
73+ {"index-pattern":"7.6.0"},"updated_at":"2020-11-04T10:43:36.927Z","version":"WzE2LDFd","namespaces":
74+ ["default"]}{"type":"index-pattern","id":"orion","attributes":{"title":"orion-*","timeFieldName":"@timestamp"},
75+ "references":[],"migrationVersion":{"index-pattern":"7.6.0"},"updated_at":"2020-11-04T10:43:37.982Z","version":
76+ "WzE3LDFd","namespaces":["default"]}{"type":"index-pattern","id":"quorum","attributes":{"title":"quorum-*",
77+ "timeFieldName":"@timestamp"},"references":[],"migrationVersion":{"index-pattern":"7.6.0"},"updated_at":
78+ "2020-11-04T10:43:39.003Z","version":"WzE4LDFd","namespaces":["default"]}{"type":"index-pattern","id":
79+ "tessera","attributes":{"title":"tessera-*","timeFieldName":"@timestamp"},"references":[],"migrationVersion":
80+ {"index-pattern":"7.6.0"},"updated_at":"2020-11-04T10:43:40.053Z","version":"WzE5LDFd","namespaces":
81+ ["default"]}
82+
7383 List endpoints and services
7484 ----------------------------------
75- Name Command State Ports
76- -----------------------------------------------------------------------------------------------------------------------------------------------------------
77- besu-sample-network_bootnode_1 /opt/besu/bootnode_start.s ... Up 0.0.0.0:30303->30303/tcp, 0.0.0.0:30303->30303/udp, 8545/tcp, 8546/tcp, 8547/tcp
78- besu-sample-network_elasticsearch_1 /usr/local/bin/docker-entr ... Up 9200/tcp, 9300/tcp
79- besu-sample-network_explorer_1 nginx -g daemon off; Up 0.0.0.0:25000->80/tcp
80- besu-sample-network_filebeat_1 /usr/local/bin/docker-entr ... Up
81- besu-sample-network_grafana_1 /run.sh Up 0.0.0.0:3000->3000/tcp
82- besu-sample-network_kibana_1 /usr/local/bin/dumb-init - ... Up 0.0.0.0:5601->5601/tcp
83- besu-sample-network_logstash_1 /usr/local/bin/docker-entr ... Up 5044/tcp, 9600/tcp
84- besu-sample-network_minernode_1 /opt/besu/node_start.sh -- ... Up 30303/tcp, 8545/tcp, 8546/tcp, 8547/tcp
85- besu-sample-network_node_1 /opt/besu/node_start.sh -- ... Up 30303/tcp, 8545/tcp, 8546/tcp, 8547/tcp
86- besu-sample-network_prometheus_1 /bin/prometheus --config.f ... Up 0.0.0.0:9090->9090/tcp
87- besu-sample-network_redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
88- besu-sample-network_rpcnode_1 /opt/besu/node_start.sh -- ... Up 30303/tcp, 0.0.0.0:8545->8545/tcp, 8546/tcp, 8547/tcp
89- Setting up the besu index pattern in kibana
90- {"type":"index-pattern","id":"besu","attributes":{"title":"besu-*","timeFieldName":"@timestamp"},"references":[],"migrationVersion":{"index-pattern":"6.5.0"},"updated_at":"2019-12-27T04:41:07.665Z","version":"WzMsMV0="}
91- Orion not running, skipping the orion index pattern in kibana.
92- ```
93-
94- Followed by a list of the endpoints:
95-
96- !!! example "Endpoint list example"
97-
98- ```log
99- ****************************************************************
10085 JSON-RPC HTTP service endpoint : http://localhost:8545
10186 JSON-RPC WebSocket service endpoint : ws://localhost:8546
102- GraphQL HTTP service endpoint : http://localhost:8547
10387 Web block explorer address : http://localhost:25000/
10488 Prometheus address : http://localhost:9090/graph
10589 Grafana address : http://localhost:3000/d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s&from=now-30m&to=now&var-system=All
10690 Kibana logs address : http://localhost:5601/app/kibana#/discover
91+
92+ For more information on the endpoints and services, refer to README.md in the installation directory.
10793 ****************************************************************
10894 ```
10995
11096* Use the ** JSON-RPC HTTP service endpoint** to access the RPC node service from your Dapp or from
11197 cryptocurrency wallets such as Metamask.
11298* Use the ** JSON-RPC WebSocket service endpoint** to access the web socket node service from your
11399 Dapp.
114- * Use the ** GraphQL HTTP service endpoint** to access the
115- [ HTTP GraphQL] ( ../../HowTo/Interact/APIs/GraphQL.md ) node service from your Dapp.
116100* Use the ** Web block explorer address** to display the block explorer web application. View the
117101 block explorer by entering the URL in your web browser.
118102* Use the ** Prometheus address** to access the
@@ -139,12 +123,7 @@ This tutorial uses the Alethio Ethereum Lite Explorer.
139123Access the explorer by copying and pasting the ` Web block explorer address ` displayed when starting
140124the private network to your browser.
141125
142- The block explorer displays a summary of the private network:
143-
144- ![ Block Explorer] ( ../../images/ExplorerSummary.png )
145-
146- See that the explorer indicates six peers: the four regular nodes, the mining node, and the
147- bootnode.
126+ The block explorer displays a summary of the private network, indicating four peers.
148127
149128Click the block number to the right of ** Best Block** to display the block details:
150129
@@ -187,7 +166,7 @@ time you run the network.
187166Run the following command from the host shell:
188167
189168``` bash
190- curl -X POST --data ' {"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' < http-rpc-endpoint >
169+ curl -X POST --data ' {"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}' http://localhost:8545
191170```
192171
193172The result specifies the client version:
@@ -213,29 +192,27 @@ Peers are the number of other nodes connected to the RPC node.
213192Poll the peer count using ` net_peerCount ` :
214193
215194``` bash
216- curl -X POST --data ' {"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' < http-rpc-endpoint >
195+ curl -X POST --data ' {"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}' http://localhost:8545
217196```
218197
219- The result indicates that there are six peers:
198+ The result indicates that there are four peers:
220199
221200``` json
222201{
223202 "jsonrpc" : " 2.0" ,
224203 "id" : 1 ,
225- "result" : " 0x6 "
204+ "result" : " 0x4 "
226205}
227206```
228207
229- ### Request the most recently mined block number
208+ ### Request the most recent block number
230209
231210Call ` eth_blockNumber ` to retrieve the number of the most recent block:
232211
233212``` bash
234- curl -X POST --data ' {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' < http-rpc-endpoint >
213+ curl -X POST --data ' {"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545
235214```
236215
237- The result provides the most recently mined block:
238-
239216``` json
240217{
241218 "jsonrpc" : " 2.0" ,
@@ -244,41 +221,7 @@ The result provides the most recently mined block:
244221}
245222```
246223
247- The hexadecimal value ` 0x8b8 ` translates to ` 2232 ` in decimal, the number of mined blocks so far.
248-
249- ### Check the miner account balance
250-
251- Call ` eth_getBalance ` to retrieve the balance of the mining address (coinbase) defined in the miner
252- node:
253-
254- ``` bash
255- curl -X POST --data ' {"jsonrpc":"2.0","method":"eth_getBalance","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","latest"],"id":1}' < http-rpc-endpoint>
256- ```
257-
258- The result specifies the miner account balance:
259-
260- ``` json
261- {
262- "jsonrpc" : " 2.0" ,
263- "id" : 1 ,
264- "result" : " 0x79f905c6fd34e80000"
265- }
266- ```
267-
268- !!!info
269-
270- 0x79f905c6fd34e80000 = 2250000000000000000000 Wei (2250 Ether).
271-
272- !!!tip
273-
274- Use a [unit converter](https://www.etherchain.org/tools/unitConverter) to translate values from
275- Wei to Ether.
276-
277- Wait a few seconds until there are new mined blocks then call ` eth_getBalance ` again. The balance
278- increases, meaning the miner address successfully received the mining reward.
279-
280- You can also view this information in the block explorer. It does exactly the same thing as this
281- call, connecting to the RPC node using HTTP JSON-RPC, and displaying information on a web page.
224+ The hexadecimal value ` 0x8b8 ` translates to ` 2232 ` in decimal, the number of blocks so far.
282225
283226## Create a transaction using MetaMask
284227
0 commit comments