Alert messages are sent through the email Id : no-reply@signularitynet.io Subject : The service ‘service-name’ is terminated for Mainnet network
The platform uses exponential back-off retry to test the health of the service. Each time a health check fails, an email message is sent to Service developer ( progressive delay in the next health check ).
Note: The maximum time a test can take on the health service is 12hrs.
Obtain the latest version of snet-cli and run the following command:
snet service metadata-add-contributor <CONTACTNAME> <EMAILID> --metadata-file <MD_FILE>
Your metadata snippet should look like the following:
"contributors": [
{
"name": "dummy dummy",
"email_id": "dummy@dummy.io"
}
Note: The service must use the same proto and implement the heartbeat functionality.
Prior to the expiration of certificate, an email message is sent and a slack alert within 30 days. The email message is sent frequently until the certificate is renewed.
Note This task is performed once in three days.
Alert messages are sent through the email Id : no-reply@signularitynet.io Subject :
certificates are about to expire for service %s for %s network.
Alert messages are sent through the mail id : test-no-reply@singularitynet.io Subject :
certificates are about to expire for service %s for %s network.
Since there is no direct support for grpc-web(dapp)from nginx, we can make a below hack in the config file of the nginx to work with both grpc-web(dapp) and grpc(sdk,snet-cli) calls.
server {
listen 1449 ssl http2;
server_name domain-name
;
ssl_certificate pem-file
; # managed by Certbot
ssl_certificate_key key-file
; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
#
## Any request with the content-type application/grpc+(json|proto|customType) will not enter the
## if condition block and make a grpc_pass while rest of the requests enters into the if block
## and makes a proxy_prass request. Explicitly grpc-web will also enter the if block.
#
if ($content_type !~ 'application\/grpc(?!-web)(.*)'){
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Transfer-Encoding,Custom-Header-1,X-Accept-Content-Transfer-Encoding,X-Accept-Response-Streaming,X-User-Agent,X-Grpc-Web,content-type,snet-current-block-number,snet-free-call-user-id,snet-payment-channel-signature-bin,snet-payment-type,x-grpc-web';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
proxy_pass http://reroute_url;
}
grpc_pass grpc://reroute_url;
}}
The above config works based on the content-type of the request. Whenever the grpc-web(dapp) makes a call to nginx, the content-type would be application/grpc-web and this content-type is not been handled by nginx with grpc_pass. Hence, only those requests with grpc specified content-type application/grpc+(proto|json|customType) works with grpc_pass while rest of the requests will work with proxy_pass.
To set up your own ETCD cluster please follow the link
To renew the ETCD Client Certificates for SNET Organisation:
For other Organizations, follow the below steps to regenerate the etcd client certificates.
[curl -s -L -o cfssl] (https://pkg.cfssl.org/R1.2/cfssl_linux-amd64)
[curl -s -L -o cfssl] (https://pkg.cfssl.org/R1.2/cfssl_linux-amd64)
Complete the following steps listed in the document
###You need to specify a valid signer address, such as ‘free_call_signer_address’ as part of the curation process to support free calls”
snet service metadata-set-freecall-signer-address default_group $SIGNERADDRESS --metadata-file $MD_FILE
When you enable the free calls and Metering, specify the private key to initialize the Daemon Otherwise, the Daemon sends the request to metering, which checks the associated public address mapped in the configuration of that Daemon.
snet service metadata-add-daemon-addresses default_group $DAEMONADDRESS --metadata-file $MD_FILE
To learn about how to configure the etcd certificate, refer to the document for configuration with example.
When you enable the free calls and Metering, specify the private key to initialize the Daemon. The Daemon will initialize, only if the configured Pvt key config matches the public Address of the Daemon registered for metering.
Daemon addresses are registered for a given Org, Group id and service id . You need to re-publish the service again with the correct public address . Please use the Following command to do so
snet service metadata-add-daemon-addresses default_group $DAEMONADDRESS --metadata-file $MD_FILE
Check if the port number of your daemon matches exactly to what was deployed on Service metadata.
snet service metadata-set-freecall-signer-address default_group $SIGNERADDRESS --metadata-file $MD_FILE
You have exceeded the number of permitted free calls. So, calls can now be done only using the paid mode alone
The number of request has increased along with the rate limiting, either retry again later or configure your daemon for rate limiting
The supported payment types are free-call / escrow
github.com/singnet/snet-daemon/etcddb.getTlsConfig(0xc4207800c0, 0x1, 0x4)
/ext-go/1/src/github.com/singnet/snet-daemon/etcddb/etcddb_client.go:107 +0x3f6
Please re check the etcd end point in organization metadata ,if the end point is valid , please check if you have the correct certificates ( for https connection) on your daemon config
If one (or more) of your components shows these kind of log:
Daemon:
level=warning msg="gRPC handler returned error" error="rpc error: code = ResourceExhausted desc = Received message larger than max (5937252 vs. 4194304)"
SNET-CLI and/or your service’s gRPC server:
Error: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "Received message larger than max (5937252 vs. 4194304)"
debug_error_string = "{"created":"@1585584826.407968689","description":"Received message larger than max (5937252 vs. 4194304)","file":"src/core/ext/filters/message_size/message_size_filter.cc","file_line":191,"grpc_status":8}"
>
Then you need to increase the MAX_MESSAGE_SIZE of the gRPC components, first set it in your Daemon by adding
this key to its snetd.config.json
:
"max_message_size_in_mb": 10,
Note: You can find out more about this key here.
Next step is to increase the message size in your service’s gRPC server:
server : = grpc.NewServer(
grpc.MaxSendMsgSize(10 * 1024 * 1024),
grpc.MaxRecvMsgSize(10 * 1024 * 1024),
)
server = grpc.server(futures.ThreadPoolExecutor(max_workers=max_workers), options=[
('grpc.max_send_message_length', 10 * 1024 * 1024),
('grpc.max_receive_message_length', 10 * 1024 * 1024)])
A practical python example can be found here.
If you make calls using SDK / snet-cli, the issue is resolved once if the daemon supports metering.
Ignore: This was more towards the operator UI use case, need modification in the next release.
Add the the following link:
"ethereum_json_rpc_endpoint": "https://mainnet.infura.io/v3/e7732e1f679e461b9bb4da5653ac3fc2"
In your daemon configuration. Ideally you should have your own project Id on infura.
Typically you will need to do the below
All latest released versions of Daemon are available here
You need to manually configure the path to refer to this binary.
pip install --upgrade snet-cli
Note: manually configure the path to refer to this binary.
Ensure that you re deploy the service with the latest proto
snet service metadata-init --metadata-file $MD_FILE `pwd`/$YOURGITREPONAME/$PATHFORSERVICESPEC "$DISPLAYNAME" --encoding proto --service-type grpc --group-name default_group
Also make sure your stubs are updated on the Dapp Components
Ensure the services have been published on the network for testing
After curation, the service becomes available on Dapp
Keep the below links for reference
Dapp for Ropsten: http://enhanced-marketplace.s3-website-us-east-1.amazonaws.com/
Dapp for Mainnet: http://beta.singularitynet.io/
Click on the RUN FOR FREE button. (If your free calls are exhausted, you will find options to create a wallet or to use your existing MetaMask wallet )
You will be taken to the service’s input screen.
Note: Don’t close the application, until the results are displayed on the same screen after service execution.
If your changes are seen in ropsten.
Inform the concerned authority to merge the changes from development to master. This is then deployed to Mainnet network: http://beta.singularitynet.io/
Use the email tech-support@singularitynet.io for any questions / issues related to the platform.
Last modified on : 15-Oct-24