mirror of
https://github.com/EvernodeXRPL/sashimono.git
synced 2026-04-29 15:38:00 +00:00
Merge branch 'main' into beta-v3
This commit is contained in:
@@ -35,7 +35,7 @@ Run `make installer` ('installer.tar.gz' will be placed in build directory)
|
||||
## Run Sashimono
|
||||
|
||||
1. `./build/sagent new <data_dir> <ip> <init_peer_port> <init_user_port> <docker_registry_port(optional[0])> <instant_count> <cpu_us> <ram_kbytes> <swap_kbytes> <disk_kbytes>` (This will create the Sashimono config in build directory. You only have to do this once)
|
||||
1. Example: `sudo ./build/sagent new 22861 26201 0 3 900000 1048576 3145728 5242880`
|
||||
1. Example: `sudo ./build/sagent new ./build 127.0.0.1 22861 26201 0 3 900000 1048576 3145728 5242880`
|
||||
1. `sudo ./build/sagent run`
|
||||
|
||||
## Sashimono Client
|
||||
|
||||
Submodule evernode-bootstrap-contract updated: 97051604a1...e40c3ae705
@@ -17,7 +17,7 @@ const funcs = {
|
||||
'validate-server': async (args) => {
|
||||
checkParams(args, 1);
|
||||
const rippledUrl = args[0];
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl);
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl, { autoReconnect: false });
|
||||
await xrplApi.connect();
|
||||
await xrplApi.disconnect();
|
||||
return { success: true };
|
||||
@@ -29,7 +29,7 @@ const funcs = {
|
||||
const accountAddress = args[2];
|
||||
const validateFor = args[3] || "register";
|
||||
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl);
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl, { autoReconnect: false });
|
||||
await xrplApi.connect();
|
||||
|
||||
const hostClient = new evernode.HostClient(accountAddress, null, {
|
||||
@@ -76,7 +76,7 @@ const funcs = {
|
||||
const accountAddress = args[1];
|
||||
const accountSecret = args[2];
|
||||
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl);
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl, { autoReconnect: false });
|
||||
await xrplApi.connect();
|
||||
|
||||
const xrplAcc = new evernode.XrplAccount(accountAddress, accountSecret, {
|
||||
@@ -96,7 +96,7 @@ const funcs = {
|
||||
const accountAddress = args[2];
|
||||
const configName = args[3];
|
||||
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl);
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl, { autoReconnect: false });
|
||||
await xrplApi.connect();
|
||||
|
||||
const hostClient = new evernode.HostClient(accountAddress, null, {
|
||||
@@ -125,7 +125,7 @@ const funcs = {
|
||||
const accountSecret = args[3];
|
||||
const transfereeAddress = args[4];
|
||||
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl);
|
||||
const xrplApi = new evernode.XrplApi(rippledUrl, { autoReconnect: false });
|
||||
await xrplApi.connect();
|
||||
|
||||
const hostClient = new evernode.HostClient(accountAddress, accountSecret, {
|
||||
|
||||
@@ -28,7 +28,7 @@ appenv = {
|
||||
ORPHAN_PRUNE_SCHEDULER_INTERVAL_HOURS: 4,
|
||||
SASHIMONO_SCHEDULER_INTERVAL_SECONDS: 2,
|
||||
SASHI_CLI_PATH: appenv.IS_DEV_MODE ? "../build/sashi" : "/usr/bin/sashi",
|
||||
MB_VERSION: '0.6.6',
|
||||
MB_VERSION: '0.6.7',
|
||||
TOS_HASH: '757A0237B44D8B2BBB04AE2BAD5813858E0AECD2F0B217075E27E0630BA74314' // This is the sha256 hash of TOS text.
|
||||
}
|
||||
Object.freeze(appenv);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace hp
|
||||
// We keep docker logs at size limit of 10mb, We only need these logs for docker instance failure debugging since all other logs are kept in files.
|
||||
// For the local log driver compression, minimum max-file should be 2. So we keep two logs each max-size is 5mb
|
||||
constexpr const char *DOCKER_CREATE = "DOCKER_HOST=unix:///run/user/$(id -u %s)/docker.sock timeout --foreground -v -s SIGINT %ss %s/dockerbin/docker create -t -i --stop-signal=SIGINT --log-driver local \
|
||||
--log-opt max-size=5m --log-opt max-file=2 --name=%s -p %s:%s -p %s:%s --restart unless-stopped --mount type=bind,source=%s,target=/contract %s run /contract";
|
||||
--log-opt max-size=5m --log-opt max-file=2 --name=%s -p %s:%s -p %s:%s -p %s:%s/udp --restart unless-stopped --mount type=bind,source=%s,target=/contract %s run /contract";
|
||||
constexpr const char *DOCKER_START = "DOCKER_HOST=unix:///run/user/$(id -u %s)/docker.sock %s/dockerbin/docker start %s";
|
||||
constexpr const char *DOCKER_STOP = "DOCKER_HOST=unix:///run/user/$(id -u %s)/docker.sock %s/dockerbin/docker stop %s";
|
||||
constexpr const char *DOCKER_REMOVE = "DOCKER_HOST=unix:///run/user/$(id -u %s)/docker.sock %s/dockerbin/docker rm -f %s";
|
||||
@@ -310,10 +310,10 @@ namespace hp
|
||||
const std::string user_port = std::to_string(assigned_ports.user_port);
|
||||
const std::string peer_port = std::to_string(assigned_ports.peer_port);
|
||||
const std::string timeout = std::to_string(DOCKER_CREATE_TIMEOUT_SECS);
|
||||
const int len = 367 + username.length() + timeout.length() + conf::ctx.exe_dir.length() + container_name.length() + (user_port.length() * 2) + (peer_port.length() * 2) + contract_dir.length() + image_name.length();
|
||||
const int len = 376 + username.length() + timeout.length() + conf::ctx.exe_dir.length() + container_name.length() + (user_port.length() * 2) + (peer_port.length() * 4) + contract_dir.length() + image_name.length();
|
||||
char command[len];
|
||||
sprintf(command, DOCKER_CREATE, username.data(), timeout.data(), conf::ctx.exe_dir.data(), container_name.data(),
|
||||
user_port.data(), user_port.data(), peer_port.data(), peer_port.data(), contract_dir.data(), image_name.data());
|
||||
user_port.data(), user_port.data(), peer_port.data(), peer_port.data(), peer_port.data(), peer_port.data(), contract_dir.data(), image_name.data());
|
||||
LOG_INFO << "Creating the docker container. name: " << container_name;
|
||||
if (system(command) != 0)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace version
|
||||
{
|
||||
// Sashimono agent version. Written to new configs.
|
||||
constexpr const char *AGENT_VERSION = "0.6.6";
|
||||
constexpr const char *AGENT_VERSION = "0.6.7";
|
||||
|
||||
// Minimum compatible config version (this will be used to validate configs).
|
||||
constexpr const char *MIN_CONFIG_VERSION = "0.5.0";
|
||||
|
||||
Reference in New Issue
Block a user