Use this script to validate the status of the Pirate Chain light wallet servers. It checks that the domain names are resolvable, tests the server ping time, ensures it can get a valid gRPC response, and checks the current block height is similar between servers.
- Install dependencies (Requires Python 3)
pip3 install tabulate grpcio-tool
- clone into this repo:
git clone https://github.com/scott-ftf/lightwalletd_status.git
cd lightwalletd_status
- Make any changes to the configuration settings, then run the script:
python3 lightwalletd_status.py
These files are already included in the lib
library, but to generate the Protocol Buffer definition files manually, follow these steps:
- Install the protobuf compiler (specific to Ubuntu or Debian-based systems):
sudo apt install protobuf-compiler
- Install the protobuf package:
pip3 install protobuf==3.20
- Clone the lightwalletd repository:
git clone https://github.com/PirateNetwork/lightwalletd.git
- Generate the Python proto definitions:
cd lightwalletd/walletrpc
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. service.proto
python3 -m grpc_tools.protoc --proto_path=. --python_out=. --grpc_python_out=. compact_formats.proto
- Move the newly generated
service_pb2.py
,service_pb2_grpc.py
,compact_formats_pb2.py
, andcompact_formats_pb2_grpc.py
files to the same directory as the main script.