Installation and usage of the platform
Precise platform configuration: node gRPC and REST API configuration¶
The gRPC and REST API parameters for each node are in the api section of the configuration file:
api {
rest {
# Enable/disable REST API
enable = yes
# Network address to bind to
bind-address = "0.0.0.0"
# Port to listen to REST API requests
port = 6862
# Enable/disable TLS for REST
tls = no
# Enable/disable CORS support
cors = yes
# Max number of transactions
# returned by /transactions/address/{address}/limit/{limit}
transactions-by-address-limit = 10000
distribution-address-limit = 1000
}
grpc {
# Enable/disable gRPC API
enable = yes
# Network address to bind to
bind-address = "0.0.0.0"
# Port to listen to gRPC API requests
port = 6865
# Enable/disable TLS for GRPC
tls = no
# Parameters for internal gRPC services. Recommended to be left as is.
services {
blockchain-events {
max-connections = 5
history-events-buffer {
enable: false
size-in-bytes: 50MB
}
}
privacy-events {
max-connections = 5
history-events-buffer {
enable: false
size-in-bytes: 50MB
}
}
contract-status-events {
max-connections = 5
}
}
}
rest { } block¶
The rest { } block is used for setting of the REST API interface. It includes following parameters:
enable– activation of the node REST API. Enabling –yes, disabling –no.bind-address– network address of the node where the REST API interface will be available.port– the listening port of the REST API requests.tls– enable or disable TLS for REST API requests. Specifyyesto enable the option , or ``no``enable to disable it. This option requires the node TLS setup.Note
The TLS protocol is not available in the opensource version of the platform.
cors– support of cross-domain requests to REST API. Enable –yes, disable –no.transactions-by-address-limit– maximum number of transactions returned by theGET /transactions/address/{address}/limit/{limit}method.distribution-address-limit– the maximum number of addresses specified in thelimitfield and returned by theGET /assets/{assetId}/distribution/{height}/limit/{limit}method.
grpc { } block¶
The grpc { } block is used to configure the gRPC toolkit of a node. It includes the following parameters:
enable– activation of the node gRPC interface.bind-address– the network address of the node where the gRPC interface will be available.port– the listening port of the gRPC requests.tls– enable or disable TLS for gRPC requests. Specifyyesto enable the option , ornoto disable it. This option requires the node TLS setup.Note
The TLS protocol is not available in the opensource version of the platform.
The services{ } section contains parameters of public gRPC services that collect data from the platform components:
blockchain-events– service for collecting data on events in the blockchain network;privacy-events– service for collecting data on events related to privacy groups;contract-status-events– service for collecting data on statuses of smart contracts.
In this section, we recommend to use the default parameters mentioned in the example.