Home > Technology peripherals > It Industry > Using Puppeth, the Ethereum Private Network Manager

Using Puppeth, the Ethereum Private Network Manager

William Shakespeare
Release: 2025-02-16 12:59:42
Original
730 people have browsed it

Using Puppeth, the Ethereum Private Network Manager

This article introduces Puppeth, a powerful tool for managing and deploying private Ethereum blockchains, which is provided with Geth, one of the most popular Ethereum nodes. You can also install Puppeth independently (provided that Go is installed):

go get github.com/ethereum/go-ethereum/cmd/puppeth
Copy after login

Key points:

  • Puppeth is a practical tool for Geth, which simplifies the management and deployment of private Ethereum networks and can also be used independently.
  • Puppeth setup requires two remote machines (virtual machines or servers) to effectively run independent Ethereum nodes.
  • Puppeth uses Docker container to run auxiliary applications and Ethereum nodes, and needs to install and configure Docker on the host.
  • Puppeth's main features include: creating genesis blocks, deploying network components such as Ethstats and boot nodes, and managing network validators through a user-friendly command line interface.
  • Puppeth is ideal for developers who want to experiment with blockchain technology by setting up private networks, making it easy to deploy smart contracts and decentralized applications (dApps).

Startup process:

This tutorial will use two virtual machines. Due to Puppeth restrictions, it is impossible to deploy sealed nodes on the same machine.

If you are not familiar with Vagrant, we recommend that you read the relevant starting guide.

mkdir my_project; cd my_project
git clone https://github.com/swader/homestead_improved hi_puppeth1
git clone https://github.com/swader/homestead_improved hi_puppeth2
Copy after login

Modify the IP address in the hi_puppeth2 folder to 192.168.10.11 (rather than 192.168.10.10).

Modify the Homestead.yaml file of each clone and open the following port:

ports:
    - send: 8545
      to: 8545
    - send: 30301
      to: 30301
    - send: 30302
      to: 30302
    - send: 30303
      to: 30303
    - send: 30304
      to: 30304
    - send: 30305
      to: 30305
    - send: 30306
      to: 30306
Copy after login

Add virtual host in host/etc/hosts file:

<code>192.168.10.10 homestead.test
192.168.10.11 puppethnode.test</code>
Copy after login

(If your VM address is different, please change the IP address.)

Runvagrant up and use vagrant ssh to enter each virtual machine. Please run in two separate terminals to keep both machines running at the same time.

Prerequisite:

Install the following software on

Each machine:

Puppeth runs auxiliary applications and Ethereum nodes in the Docker container, so Docker is required. Installing Geth is also useful.

sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common \
    ethereum \
    docker.io \
    docker-compose
Copy after login
Allow the current user to operate Docker commands:

sudo usermod -a -G docker $USER
Copy after login
Create a new Ethereum account in the

folder on the host (external to VM): myproject

mkdir node1 node2
geth --datadir node1 account new
geth --datadir node2 account new
Copy after login
Record the generated address. At least two signers are required to run the Proof of Authorization blockchain.

Puppeth Guide:

After the virtual machine is running and the account is initialized, start using Puppeth. Run Puppeth in the new terminal of the host.

First, enter the network name (for example, "puptest").

Connect to remote server: Select option 3, enter the server address (for example

), and provide the SSH key password or password. Repeat this process to connect to the second VM. vagrant@192.168.10.10

Configure the new Genesis Block: Select Option 2, select Consensus Engine (PoA is recommended), set block time, specify the account that allows sealing and pre-funded accounts.

Deploy network components:

  • Ethstats: Select option 1, specify the port and domain name, and set the API key.
  • Bootnode: Select Option 2 to specify the data storage location, port, and node name.
  • Sealnode: Select option 3, specify the data storage location, port, and node name, paste the signer's key JSON and unlock password, and set gas limit and gas price. Repeat this process to deploy Sealnode on the second VM, using a different key and node name.
  • Wallet: Deploy MyEtherWallet, specifying the port, data storage location, node port, and name.
  • Faucet: Deploy Faucet, specify the port, data storage location, node port, name, paste Faucet's funding account key JSON and unlock password, and set relevant parameters.

After the deployment is complete, visit the Ethstats page (for example homestead.test:8081) to view the node status.

Conclusion:

You can now easily develop and deploy smart contracts. Puppeth is a one-stop blockchain service management tool that simplifies the blockchain development process. The Docker container is configured to start automatically, so restarting the VM does not require reconfiguration.

Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager Using Puppeth, the Ethereum Private Network Manager

(Because I cannot access the image link, I used the placeholders "Image 1" to "Image 8". Please replace it with the actual image link.)

The above is the detailed content of Using Puppeth, the Ethereum Private Network Manager. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template