waves_logo Docs
  • Node Owner Guide
    Node Owner Guide
  • Install Waves Node
    • Deploy Node in Docker
      Deploy Node in Docker
    • Install Node on Ubuntu
      Install Node on Ubuntu
    • Install Node on macOS
      Install Node on macOS
    • Install Node on Windows
      Install Node on Windows
    • Install from Source (Building SBT)
      Install from Source (Building SBT)
    Install Waves Node
  • Synchronize Waves Blockchain
    • Import/Export Blockchain
      Import/Export Blockchain
    • Download the Latest Blockchain
      Download the Latest Blockchain
    • Rollback Waves Node
      Rollback Waves Node
    Synchronize Waves Blockchain
  • Upgrade Waves Node
    Upgrade Waves Node
  • Node Configuration
    Node Configuration
  • Logging Configuration
    Logging Configuration
  • Node Wallet
    Node Wallet
  • Features
    • Activation protocol
      Activation protocol
    Features
  • Custom Blockchain
    Custom Blockchain
  • Node REST API
    • API Key
      API Key
    • Working with Transactions
      Working with Transactions
    • Numeric Fields Format
      Numeric Fields Format
    • Pagination
      Pagination
    • CORS
      CORS
    • API Limitations of Pool of Public Nodes
      API Limitations of Pool of Public Nodes
    • Slow Requests
      Slow Requests
    • Response Codes and Errors
      Response Codes and Errors
    Node REST API
  • Extensions
    • gRPC Server
      gRPC Server
    • Blockchain Updates
      Blockchain Updates
    Extensions
  • Troubleshooting
    • Block Generation FAQ
      Block Generation FAQ
    Troubleshooting
  • Node Go
    Node Go
      • English
      • Русский
      On this page
        • Client Generation
        • gRPC Server Installation
        • gRPC on Public Nodes
      waves_logo Docs

          # 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:

          • accounts
          • blockchain
          • blocks
          • tokens
          • transactions

          # 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

          1. 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

          2. 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
            
          3. 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
            }
            
          4. Restart the node.

            Mainnet:

            sudo systemctl restart waves
            

            Testnet:

            sudo systemctl restart waves-testnet
            

            Stagenet:

            sudo systemctl restart waves-testnet
            

          # Installation via TGZ Archive

          1. 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

          2. Unpack the archive to the directory containing node's JAR-file.

          3. 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
            }
            
          4. 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.

          Extensions
          Blockchain Updates
          Extensions
          Blockchain Updates