Raspiblitz: [Feature request] SphinX relay

Created on 11 Nov 2020  路  27Comments  路  Source: rootzoll/raspiblitz

Most helpful comment

Lets give it a shot if we can include this into v1.6.2

All 27 comments

Lets give it a shot if we can include this into v1.6.2

OK I got the SphinxRelay working in the local network and I prepared now to also have it as an option for IP2TOR.

Tested recovery/update. Next todos:

  • [x] finish IP2Tor option
  • [x] add to "MobileApp" with instructions and offering of IP2Tor
  • [x] get pairing code and display as QR on LCD
  • [x] adapt main menu with hint mobile menu
  • [x] Test IP2TOR with iOS SphinxApp
  • [x] Test install on recover (correct app.json)

OK Sphinx Relay Feature should now be ready to test.

First way:

Go to MAINMENU > UPDATE > PATCH > PATCH-MENU > PATCH & reboot ... you need todo this two times because the patch script itself gets updates the first time. -> then you should find the "Sphinx Relay" option under MAINMENU > SERICES.

Second way:

Wait for the first release candidate for the v1.6.2 coming up the next days.

Awesome 鈥撀爐hat worked! 馃憤

Feelin' #reckless again 馃殌

OK did some improvements for IP2TOR setup ... works fine on my machine. Will keep issue open for one last setup test when RC1 is out.

RaspiBlitz v1.6.2RC1 is out for testing: https://github.com/rootzoll/raspiblitz/issues/1785

Installed First way:
Go to MAINMENU > UPDATE > PATCH > PATCH-MENU > PATCH & reboot ... you need todo this two times because the patch script itself gets updates the first time. -> then you should find the "Sphinx Relay" option under MAINMENU > SERICES.

I don't get a QR Code to scan? Display and Terminal - nothing to scan ?

Error on Terminal: Failed to encode the input data: Invalid argument

@Lace79 can you go to the terminal and run /home/admin/config.scripts/bonus.sphinxrelay.sh status .. has the connectionCode a value?

connectionCode=''
it seems it has now value

Sometime it takes some time. If the connection code has no or outdated value it should give you a warning when you open SPHINX in main menu. Did you saw that warning?

Yes i saw the warning - it is not locally responding and not over tor. how long does it take?

From the status output test in your browser: http://[localIP]:3300 ... it should answere with Cannot GET / then its running locally OK.

With PR #1796 I made the warning message stronger when Sphinx is not ready yet.

https://github.com/stakwork/sphinx-relay/releases
new version v1.1.1
Would it worth it to test and maybe include an update option too?

Will update the version and quick test. If you like to add an "update option" within th next day that would be great ... I target to package 1.6.2 final (if nothing critical shows up) tomorrow.

OK updated the version & added an update option. Ready for merge & final testing.

got a permission error see PR: https://github.com/rootzoll/raspiblitz/pull/1809

also I followed the update method in https://github.com/stakwork/sphinx-relay/blob/master/docs/raspiblitz_deployment.md#fast-method because the THub method would fail to fetch and overwrite the config (since it is in the sphinx-relay dir)

@openoms ah OK the config overwrite could be a think still on my impelementation. Please rebase again against my latest merge.

@openoms to preserve the config with the git stash
does not seem to work - see my test results:

./config.scripts/bonus.sphinxrelay.sh update
# making sure services are not running
# Updating Sphinx-Relay
# Stashing the config

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <sphinxrelay@raspberrypi>) not allowed
Cannot save the current index state

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident name (for <sphinxrelay@raspberrypi>) not allowed
Cannot save the current index state
# Pulling latest changes...
M   config/app.json
M   config/config.json
Previous HEAD position was b13aec5 Merge pull request #111 from stakwork/fixboost
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
Already up to date.
# Reset to the latest release tag
HEAD is now at c545d76 Merge pull request #112 from stakwork/fixboost2
# Reapplying the config
No stash entries found.
# Installing NPM dependencies
npm WARN [email protected] requires a peer of @types/bluebird@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @types/validator@* but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/nodemon/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

audited 880 packages in 102.693s

1 package is looking for funding
  run `npm fund` for details

found 0 vulnerabilities

# Updated to version v1.1.1

# Starting the sphinxrelay.service ...
admin@raspberrypi:~ $ sudo cat /home/sphinxrelay/sphinx-relay/config/config.json
{
  "development": {
    "dialect": "sqlite",
    "storage": "/Users/Shared/sphinx.db"
  },
  "docker_development": {
    "dialect": "sqlite",
    "storage": "./sphinx.db"
  },
  "test": {
    "dialect": "sqlite",
    "storage": "/home/ubuntu/sphinx.db"
  },
  "production": {
    "dialect": "sqlite",
    "storage": "/relay/.lnd/sphinx.db"
  }
}

Maybe a better and safer solution woulds be also to rewrite the config.json on every start with the write-environment part of the script ... let me try this out.

OK this looks good now on my testing :) config gets updated on every start now - so we can just update the code and it will be rewritten on restart.

found only one last thing when testing the update: https://github.com/rootzoll/raspiblitz/pull/1812

Good to have the update option, the releases are very frequent: https://github.com/stakwork/sphinx-relay/releases/tag/v1.1.3

Update v1.1.3 tested - will be part of v1.6.2 release. Closing issue.

Was this page helpful?
0 / 5 - 0 ratings