# gRPC Server
gRPC Server is a node extension that allows running gRPC (opens new window) services on a node. gRPC interaface can be used to run apps on your own node.
gRPC services provide information about:
# Client Generation
The clients generated (opens new window) from .proto files (opens new window) are used to connect to gRPC services.
Example of usage of gRPC client generated from .proto files: Retrieving blocks in C# (opens new window)
# gRPC Server Installation
The gRPC Server extension can be installed on the node by two methods: using DEB package or TGZ archive.
# Installation via DEB Package
Download the latest version of the DEB package from the Releases (opens new window) page (Assets section).
The extension package name is as follows:
• for Mainnet
grpc-server_{version number}_all.deb
• for Testnet
grpc-server-testnet_{version number}_all.deb
• for Stagenet
grpc-server-stagenet_{version number}_all.deb
Install the package.
Mainnet:
sudo dpkg -i grpc-server_{version number}_all.deb
Testnet:
sudo dpkg -i grpc-server-testnet_{version number}_all.deb
Stagenet:
sudo dpkg -i grpc-server-stagenet_{version number}_all.deb
Edit the node configuration file as described in the Node Configuration article. For Mainnet, the configuration file is located at
/etc/waves/waves.conf
, for Testnet at/etc/waves-testnet/waves.conf
, for Stagenet at/etc/waves-stagenet/waves.conf
.3.1. Add gRPC Server to the
waves.extensions
section:waves { ... extensions = [ com.wavesplatform.api.grpc.GRPCServerExtension ] }
3.2. If you want to change the port for client connection (default is 6870), add the following setting:
waves { ... grpc { port = 6877 # Specify port }
Restart the node.
Mainnet:
sudo systemctl restart waves
Testnet:
sudo systemctl restart waves-testnet
Stagenet:
sudo systemctl restart waves-testnet
# Installation via TGZ Archive
Download the TGZ archive with the extension from the Releases (opens new window) page (Assets section) on Github.
The TGZ archive name is as follows:
• for Mainnet
grpc-server-{version number}.tgz
• for Testnet
grpc-server-testnet-{version number}.tgz
• for Stagenet
grpc-server-stagenet-{version number}.tgz
Unpack the archive to the directory containing node's JAR-file.
Create a new configuration file or open the existing one, see the Node Configuration article.
3.1. Add gRPC Server to the
waves.extensions
section:waves { ... extensions = [ com.wavesplatform.api.grpc.GRPCServerExtension ] }
3.2. If you want to change the port for client connection (default is 6870), add the following setting:
waves { ... grpc { port = 6877 # Specify port }
Run the command:
Mainnet
java -cp 'waves-all-{version number}.jar:grpc-server-{version number}/lib/*' com.wavesplatform.Application {configuration file name}.conf
Testnet:
java -cp 'waves-all-{version number}.jar:grpc-server-testnet-{version number}/lib/*' com.wavesplatform.Application {configuration file name}.conf
Stagenet:
java -cp 'waves-all-{version number}.jar:grpc-server-stagenet-{version number}/lib/*' com.wavesplatform.Application {configuration file name}.conf
On Windows, use
;
instead of:
, for example:java -cp 'waves-all-{version number}.jar;grpc-server-{version number}/lib/*' com.wavesplatform.Application {configuration file name}.conf
# gRPC on Public Nodes
You can connect to the public gRPC services provided by the Waves team for getting acquainted:
- Mainnet: https://nodes.wavesnodes.com:6870
- Testnet: https://nodes-testnet.wavesnodes.com:6870
- Stagenet: https://nodes-stagenet.wavesnodes.com:6870
The maximum number of simultaneous connections per IP address is 5. The maximum number of the requests per second (r/s) from IP address is 20.