-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #584 from Deralden/master
Daemon release version 5.1.3
- Loading branch information
Showing
40 changed files
with
718 additions
and
757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,19 +17,21 @@ nonce of the channel. | |
It then sends and ON-Chain transaction to claim funds.The daemons continue their work independently without any | ||
confirmation from the treasurer on the blockchain. | ||
|
||
## Usage (without compiling) | ||
|
||
Users interested in deploying SingularityNET services using SingularityNET | ||
Daemon should install the appropriate [binary from releases](https://github.com/singnet/snet-daemon/releases). | ||
|
||
## Development | ||
|
||
These instructions are intended to facilitate the development and testing of SingularityNET Daemon. Users interested in | ||
deploying SingularityNET services using SingularityNET Daemon should install the appropriate binary as | ||
[released](#release). | ||
These instructions are intended to facilitate the development and testing of SingularityNET Daemon. | ||
|
||
### Prerequisites and dependencies | ||
|
||
* [Go 1.21+](https://golang.org/dl/) | ||
* [NodeJS 15+ w/npm](https://nodejs.org/en/download/) | ||
* [Protoc v25.0+](https://github.com/protocolbuffers/protobuf/releases) | ||
|
||
Protoc, nodejs, go and go/bin should be in environment variables. | ||
**Protoc (libprotoc), golang and $GOPATH/bin should be in environment variables.** | ||
|
||
### Installing | ||
|
||
|
@@ -40,40 +42,46 @@ $ git clone [email protected]:singnet/snet-daemon.git | |
$ cd snet-daemon | ||
``` | ||
|
||
* Install development/test dependencies | ||
* Install dependencies and generate bindings | ||
|
||
```bash | ||
$ ./scripts/install | ||
``` | ||
|
||
* Build snet-daemon. Please note using ldflags, the latest tagged version , sha1 revision and the build time are set as part of the build. | ||
* Build snet-daemon. Please note using ldflags, the latest tagged version , sha1 revision and the build time are set as | ||
part of the build. | ||
You need to pass the version as shown in the example below | ||
|
||
```bash | ||
$ ./scripts/build <linux/windows/darwin> <amd64/arm/arm64> <version> | ||
``` | ||
|
||
Example: | ||
|
||
```bash | ||
$ ./scripts/build linux amd64 v5.1.2 | ||
``` | ||
|
||
* Generate default config file snet-daemon (on Linux amd64 platform) | ||
#### Generate default minimum config file for snet-daemon | ||
|
||
```bash | ||
$ ./build/snetd-linux-amd64 init | ||
``` | ||
|
||
**** Please update the registry address in daemon config based on the test network used | ||
#### Generate default full config file for snet-daemon | ||
|
||
```bash | ||
$ ./build/snetd-linux-amd64 init-full | ||
``` | ||
|
||
#### Multi-compiling | ||
|
||
If you want to build snetd for several platforms, run `./scripts/build-all <version>` instead | ||
of `./scripts/build`. | ||
|
||
You can edit the script to choose a specific platforms, but by default it will build for Linux, OSX, and Windows | ||
You can edit the script to choose a specific platforms, but by default it will build for Linux, OSX, and Windows. | ||
|
||
#### Run Deamon | ||
#### Run Daemon | ||
|
||
```bash | ||
$ ../build/snetd-linux-amd64 | ||
|
@@ -117,6 +125,7 @@ Available Commands: | |
freecall Manage operations on free call users | ||
help Help about any command | ||
init Write default configuration to file | ||
init-full Write full default configuration to file | ||
list List channels, claims in progress, etc | ||
serve Is the default option which starts the Daemon. | ||
version List the current version of the Daemon. | ||
|
@@ -141,7 +150,7 @@ can be set via environment variables or command line parameters see [table | |
below](#environment-variables-and-cli-parameters). Use `--config` | ||
parameter with any command to set configuration file name. By default daemon | ||
use configuration file in JSON format `snetd.config.json` but other formats are | ||
also supported via [Viper](https://github.com/spf13/viper). Use `snet init` | ||
also supported via [Viper](https://github.com/spf13/viper). Use `snet init-full` | ||
command to save configuration file with default values. Following | ||
configuration properties can be set using configuration file. | ||
|
||
|
@@ -155,34 +164,14 @@ time. | |
Daemon will automatically read the Registry address associated with this network For local network ( you can also | ||
specify the registry address manually),see the blockchain_network_config.json | ||
|
||
* **service_credentials** (optional, for service_type http only): | ||
Array of credentials, example: | ||
|
||
``` | ||
"service_credentials": [ | ||
{ | ||
"key": "example_body_param", | ||
"value": 12345, | ||
"location": "body" | ||
}, | ||
{ | ||
"key": "X-API-Key", | ||
"value": "546bd7d4-d3e1-46ba-b752-bc45e4dc5b39", | ||
"location": "header" | ||
} | ||
], | ||
``` | ||
|
||
Location can be: query, header or body. Query and header values must be string. | ||
|
||
* **daemon_end_point** (required;) - | ||
Defines the ip and the port on which the daemon listens to. | ||
format is :`<host>:<port>`. | ||
|
||
* **ethereum_json_rpc_endpoint** (optional, default: `"http://127.0.0.1:8545"`) - | ||
endpoint to which daemon sends ethereum JSON-RPC requests; | ||
Based on the network selected blockchain_network_selected the end point is auto determined | ||
Example `"https://kovan.infura.io"` for kovan testnet. | ||
Example `"https://sepolia.infura.io/v3"` for sepolia testnet. | ||
|
||
* **blockchain_provider_api_key** (optional) - basic header authorization key for blockchain providers. Tested with | ||
infura api | ||
|
@@ -213,10 +202,27 @@ Location can be: query, header or body. Query and header values must be string. | |
* **executable_path** (required if `service_type` == `executable`) - | ||
path to executable to expose as a service. | ||
|
||
|
||
#### Blockchain network config | ||
|
||
You can update the registry address or ethereum_json_rpc_endpoint in `resources/blockchain_network_config.json` | ||
|
||
#### Other properties | ||
|
||
This options are less frequently needed. | ||
|
||
* **service_credentials** (optional, for service_type http only): | ||
Array of credentials, example: | ||
|
||
``` | ||
"service_credentials": [ | ||
{"key": "example_body_param", "value": 12345,"location": "body"}, | ||
{"key": "X-API-Key", "value": "546bd7d4-d3e1-46ba-b752-bc45e4dc5b39", "location": "header"} | ||
], | ||
``` | ||
|
||
Location can be: query, header or body. Query and header values must be string. | ||
|
||
* **allowed_users_flag** (optional;default:`false`) - You may need to protect the service provider 's service in test | ||
environment from being called by anyone, only Authorized users can make calls , when this flag is defined in the | ||
config, you can enforce this behaviour.You cannot set this flag to true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.