Multi Node
Following this page, you can run a localnet setup with docker that consists of a 4-node local chain. This setup can be useful for developers to test their applications and protocol features on a multi-node setup. A similar setup is used by the Paxeer Network team to get insights about the impact of new features and testing different user flows. This testing setup can be found on the Paxeer Network testing repository.Build & Start
To build start a 4 node testnet using docker, run:hyperpaxdnode Docker image.
The ports for each node are found in this table:
| Node ID | P2P Port | Tendermint RPC Port | REST/ Ethereum JSON-RPC Port | WebSocket Port |
|---|---|---|---|---|
Paxeer Networknode0 | 26656 | 26657 | 8545 | 8546 |
Paxeer Networknode1 | 26659 | 26660 | 8547 | 8548 |
Paxeer Networknode2 | 26661 | 26662 | 8549 | 8550 |
Paxeer Networknode3 | 26663 | 26664 | 8551 | 8552 |
Stop Localnet
Once you are done, execute:Configuration
Themake localnet-start creates files for a 4-node testnet in ./build by
calling the hyperpaxd testnet command. This outputs a handful of files in the
./build directory:
./build/nodeN directory is mounted to the /hyperpaxd directory in each container.
Logging
In order to see the logs of a particular node you can use the following command:Can't add peer's address to addrbook warning. As long as the blocks are
being produced and the app hashes are the same for each node, there should not be any issues.
:::
Whereas the logs for the REST & RPC server would look like:
Follow Logs
You can also watch logs as they are produced via Docker with the--follow (-f) flag, for
example:
Interact with the Localnet
Ethereum JSON-RPC & Websocket Ports
To interact with the testnet via WebSockets or RPC/API, you will send your request to the corresponding ports:| EVM JSON-RPC | Eth Websocket |
|---|---|
8545 | 8546 |
Keys & Accounts
To interact withhyperpaxd and start querying state or creating txs, you use the
hyperpaxd directory of any given node as your home, for example:
./build/nodeN/hyperpaxd/key_seed.json and can be restored to the CLI using the
hyperpaxd keys add --restore command
:::