Skip to content
Storage server for Loki Service Nodes
C++ CMake Dockerfile Python Makefile Shell C
Branch: master
Clone or download
Latest commit 16af3f7 Aug 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
.vscode check the difficulty every 10 mins Jun 6, 2019
common
contrib Missing files Mar 4, 2019
crypto Boost log -> spdlog Jun 25, 2019
external use ports instead of snode addresses for testing Mar 21, 2019
httpserver Reduce warn to debug for a socket-related log message Aug 9, 2019
pow run clang format Jun 24, 2019
storage
unit_test unit test for command line Jul 3, 2019
utils Boost log -> spdlog Jun 25, 2019
vendors attempt to fix travis Jul 1, 2019
.clang-format
.dockerignore
.gitignore Ignore swapfiles and reject localhost binding Jul 25, 2019
.gitmodules
.travis.yml attempt to fix travis Jul 1, 2019
CMakeLists.txt Default to snode sigs on Jul 11, 2019
Dockerfile
LICENSE
Makefile Update readme and makefile to use good defaults Jul 13, 2019
README.md Rename binary name to loki-storage Jul 15, 2019
install-deps-linux.sh attempt to fix travis Jul 1, 2019
mock_lokid.py Always strip the 05 from start of client request pubkeys Mar 28, 2019

README.md

loki-storage-server

Storage server for Loki Service Nodes

Requirements:

  • Boost >= 1.66 (for boost.beast)
  • OpenSSL >= 1.1.1a (for X25519 curves)
  • sodium >= 1.0.16 (for ed25119 to curve25519 conversion)
git submodule update --init
mkdir build && cd build
cmake -DDISABLE_SNODE_SIGNATURE=OFF -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
./loki-storage 0.0.0.0 8080

The paths for Boost and OpenSSL can be specified by exporting the variables in the terminal before running make:

export OPENSSL_ROOT_DIR = ...
export BOOST_ROOT= ...

Then using something like Postman (https://www.getpostman.com/) you can hit the API:

post data

HTTP POST http://127.0.0.1/store
body: "hello world"
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-ttl: "86400"
- X-Loki-timestamp: "1540860811000"
- X-Loki-pow-nonce: "xxxx..."

get data

HTTP GET http://127.0.0.1/retrieve
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-last-hash: "" (optional)

unit tests

mkdir build_test
cd build_test
cmake ../unit_test -DBOOST_ROOT="path to boost" -DOPENSSL_ROOT_DIR="path to openssl"
cmake --build .
./Test --log_level=all
You can’t perform that action at this time.