Ravin Perera 1473d2b059 Improvements for large test cluster management. (#59)
* VM script improvements.
* Modified docker-pull to create new container
* Replaced vpnkit with slirp4netns for better containerized network performance.
* Added swap allocation config.
Co-authored-by: chalith <desaman.chalith@gmail.com>
2021-09-17 12:07:56 +05:30
2021-06-02 10:15:07 +05:30

Sashimono Agent

What's here?

In development

A C++ version of sashimono agent

Libraries

Setting up Sashimono Agent development environment

Tested on Ubuntu 18.04 and 20.04

  1. Run sudo ./prereq.sh
  2. Reboot the machine.
  3. Run ./dev-setup.sh

Build Sashimono Agent

  1. Run cmake . (You only have to do this once)
  2. Run make (Sashimono agent binary 'sagent' and dependencies will be placed in build directory)

Build Sashimono installer

Run make installer ('sashimono-installer.tar.gz' will be placed in build directory)

Run Sashimono

  1. cd examples/message-board && npm install (You only have to do this once)
  2. node message-board.js (Message board simulator will start listening at port 5000)
  3. ./build/sagent new (This will create the Sashimono config in build directory. You only have to do this once)
  4. sudo ./build/sagent run

Sashimono Client

  • Replace the sashimono-client.key file created inside dataDir in the first run by the key file found on this link. This is because we have hardcoded the pubkey in message board. This will generate the same pubkey we have hardcoded.
  • A sample bundle.zip bundle can be found here.

Sample user wallet

  1. Node app which is is connected with user xrpl account.
  2. cd examples/sample-user-wallet && npm install (You only have to do this once)
  3. node user-wallet.js (User wallet will start and create a user.cfg with ixrpl account data)
  4. Redeem transactions can be sent to the hooks xrpl account with "create" command.

XRPL message board

  1. Node app which is listening to the hook xrpl account.
  2. cd mb-xrpl && npm install (You only have to do this once)
  3. sudo node mb-xrpl.js wss://hooks-testnet.xrpl-labs.com --dev (Message board will start and create a mb-xrpl.cfg with ixrpl account data)
  4. Frist Command line param is ripple server url which is required.
  5. Optional command line param --dev for dev mode, if not given it'll be prod mode.
  6. Optional Command line param --enable-logging will keeps logging in a log file inside log directory.
  7. This will listen to redeems in the particular xrpl account.
  8. If sashimono agent and sashi CLI is up, this will issue instance creation commands to the CLI.
  9. Responses data will be encrypted with redeem transaction account's pubke and sent back to the hook account as a transaction.

Code structure

Code is divided into subsystems via namespaces.

comm:: Handles socket related functionality.

conf:: Handles configuration. Loads and holds the central configuration object. Used by most of the subsystems.

crypto:: Handles cryptographic activities. Wraps libsodium and offers convenience functions.

hp:: Contains hotpocket instance management related helper functions.

hpfs:: Contains hpfs instance management related helper functions.

msg:: Extract message data from received raw messages.

salog:: Handles logging. Creates and prints the logs according to the configured log section in the json config.

sqlite:: Contains sqlite database management related helper functions.

util:: Contains shared data structures/helper functions used by multiple subsystems.

Description
No description provided
Readme 9.2 MiB
Languages
C++ 34.7%
Shell 32.5%
JavaScript 32%
CMake 0.7%
C 0.1%