What is Quickstart?
Quickstart is a tool that makes it easy to set up a local GoQuorum network for development purposes. It is a command-line tool that handles the following for you:
- Starting Quorum nodes: Quickstart launches the required number of Quorum nodes with the desired configuration.
- Deploying contracts: Quickstart automatically deploys sample contracts to the network.
- Setting up a web console: Quickstart sets up a web console for interacting with the network.
Why is Quickstart important?
Quickstart streamlines the development workflow by providing a simple and consistent way to set up a local GoQuorum network. It eliminates the need for manual configuration, allowing developers to focus on building their applications.
Installation
Prerequisites:
- Go: Go 1.13 or later is required. https://go.dev/
- Docker: Docker is required to run the Quorum nodes. https://www.docker.com/
Installing Quickstart:
- Install Quickstart using the following command:
go get github.com/consensys/quorum/cmd/quorum-dev-quickstart
Running Quickstart
To run Quickstart, use the following command:
quorum-dev-quickstart
This will start a local GoQuorum network with four nodes and deploy the sample contracts.
Usage
Options:
Quickstart offers a variety of options to customize the network setup:
- Number of nodes: The
-n
or--nodes
flag specifies the number of nodes to create. The default value is 4.quorum-dev-quickstart -n 3
- Genesis block: The
-g
or--genesis
flag specifies the path to a custom genesis block file.quorum-dev-quickstart -g ./custom-genesis.json
- Private transaction manager: The
-p
or--private
flag enables the private transaction manager.quorum-dev-quickstart -p
- Geth configuration: The
-c
or--config
flag specifies the path to a custom Geth configuration file.quorum-dev-quickstart -c ./custom-geth.toml
- Web console: The
-w
or--web
flag enables the web console. The default value is true.quorum-dev-quickstart -w false
- Verbose output: The
-v
or--verbose
flag enables verbose output.quorum-dev-quickstart -v
Sample Contracts:
Quickstart deploys the following sample contracts:
- SimpleStorage: A simple contract that stores and retrieves values.
- Token: A basic ERC20 token contract.
Web Console:
The web console provides a graphical interface for interacting with the network. It allows you to:
- View the blockchain: Explore the blockchain blocks, transactions, and accounts.
- Deploy contracts: Deploy and interact with smart contracts.
- Monitor nodes: Monitor the status of the Quorum nodes.
Example
The following command will start a local GoQuorum network with two nodes, a custom genesis block, and a private transaction manager:
quorum-dev-quickstart -n 2 -g ./custom-genesis.json -p
Further Reading
For more detailed information about Quickstart, please refer to the following resources:
- GoQuorum Documentation: https://www.goquorum.com/docs/
- Quorum Repository: https://github.com/consensys/quorum