Git Product home page Git Product logo

warden_terminal's People

Contributors

nvk avatar pxsocs avatar tehelsper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

warden_terminal's Issues

Debug file - Tail lines too long

lines = 40

Viewing last 40 lines does not work well when the widget may not be able to display more than 18 lines or so. Should this number of lines to tail from the debug file be a dynamic value based on row count and if you have a small screen or not?

Tested 16 lines when the display was 63 rows high looks awesome
image

Large price defaults to Loading... over time

BTC price will display but after a bit it goes to Loading... and stays there. refresh of program sometimes fixes this issue. thought maybe it was an issue with the free API key hitting request limit so made price fetch longer but issue still persisted.

Warden doesn't start with startup

Precise steps I took:

  • flashed Umbrel on my sd card
  • started syncing the bitcoin blockchain (is not finished yet, could this be the problem ?)
  • logged in on my raspberry pi through ssh
  • and followed every step of the WARDEN readme (retried multiple times)
  • after rebooting the raspberry pi I'm just back at the default "Your Umbrel is u and running at..." and it just stays on this screen.

Bug

I'm getting this warning :

/home/admin/.local/lib/python3.8/site-packages/apscheduler/triggers/interval.py
    :66: PytzUsageWarning:
        The normalize method in no longer necessary, as this time zone supports the fold
        attribute (PEP 495). For more details on migrating to a PEP 495-compliant
        implementation, see
        https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html 
    return self.timezone.normalize(next_fire_time)

I will look into how to fix this and submit a PR if I find a fix, but my skills are not on par with yours.

I like this, because I can simply ssh into my Nodebox (running on a VM, hosted on my PowerEge-T410) and fire up WARden.

Thanks for your hard work.

Peace.

Test_Tor site not working for non-tor connections

r = session.get("http://httpbin.org/ip")

r = session.get("http://httpbin.org/ip")

This website is not cooperating with non-tor connections and is failing the "Test Tor" portion of the code.
I replaced the website with https://api.myip.com and

if pre_proxy["origin"] != post_proxy["origin"]:

changed to
if pre_proxy["ip"] != post_proxy["ip"]:
and
Tor IP Address {warning(tor['post_proxy']['origin'])}

Global IP Address {warning(tor['pre_proxy']['origin'])}

needed to point to "ip" instead of "origin"

Is this issue only happening on my end or do you see it too?

Also:

post_proxy_difference = post_proxy_ping / pre_proxy_ping

should that be a "-" instead of "/" since you're saying this is a difference in ping response times?

means of acquiring the whitepaper

Prazer, sou nyx.

url = 'https://bitcoin.org/bitcoin.pdf'

Using bitcoin.org, but it is a central server and even if their copy is taken down?

Consider sourcing from the blockchain,

sudo -u bitcoin bitcoin-cli getblock 00000000000000ecbbff6bafb7efa2f7df05b227d5c73dca8f2635af32a2e949 0 | tail -c+92167 | for ((o=0;o<946;++o)) ; do read -rN420 x ; echo -n ${x::130}${x:132:130}${x:264:130} ; done | xxd -r -p | tail -c+9 | head -c184292 > bitcoin.pdf

of course user can scp to another computer if running headless, but a solution to show the text from the terminal is:

pdftotext bitcoin.pdf
less bitcoin.txt

Feature Requests

  1. After initial run and auto-connection to node (umbrel, raspiblitz, Mynode) we set a flag, maybe in the config.ini that tells Warden that it is connected to an Umbrel node for example, and to stop attempting to connect to the other node types?

  2. Logging of the Specter desktop connection process and requests to Specter desktop; any failures or successes can be observed for troubleshooting, wallets gathered, balances, etc. Perhaps this should live in its own debug file since there is a lot going on here.

On the topic of Specter, where are you getting the URLs that are defined in Specter_importer.py?
self.login_url = self.base_url + 'auth/login'
self.tx_url = self.base_url + 'wallets/wallets_overview/txlist'
self.core_url = self.base_url + 'settings/bitcoin_core?'
These three URLs do not resolve to anything in the Specter Desktop running on Umbrel V0.4.0

Tor Connection fail

Hi!

I was testing node_warden.py on several OS like Mac/Raspbian/Ubuntu. One of them is a Tor Relay and I have the same problem.

imagen

Is there something that I need to change or do some installation?
One of my other Ubuntu OS works perfectly and in MyNode too. Maybe modifying torrc?

Fee addition getting KeyError

if tx["category"] == "send":
try:
# save a copy, as the original is still needed if it gets updated
fee = tx["fee"]
# accounting for CoinJoins is unique because there's no realized fee for re-mixes
if tx["amount"] == fee:
tx["fee"] = 0
tx["amount"] -= fee
# ensure positivity for WARden (this needs to happen last)
tx["fee"] = abs(tx["fee"])
except KeyError:
tx["fee"] = 0

this fee adjustment to the transaction amount fails on a Keyerror and therefore the "send transactions" that get included in the overall specter wallet balance do not include the fees. Are we sure the fees are getting captured in the txlist?

Wallet Ballance

wallets = False

Although the variable "wallets" is defined earlier in the code, the addition of wallets = rpc_connection.getbalances() is needed for the confirmed and unconfirmed balances to return values.

Feature Request - Portfolio Value

I was playing around and thought about having a real-time BTC portfolio value in the header. By adding a variable in the Config.ini called "Own", we can easily pull that quantity of BTC, multiply by the current price of BTC, and then show it in the header. This would allow users to see their BTC portfolio value even if they do not have any Sats in their node's BTC wallet. If there is ever trending added, this would be a cool point to watch. Thoughts?

Config.ini:
[CURRENCIES]
primary_fx = 'USD'
fx_list = ['USD','EUR', 'GBP', 'CAD']
Own = 3.18688358

dashboard.py
if small_display is True:
from node_warden import load_config
config = load_config(quiet=True)
config = config['CURRENCIES']
Own = config.getfloat("Own")
primary_fx = ast.literal_eval(config.get('primary_fx'))
Worth = float(btc_price * Own)
txt = 'WARden Node Edition (Version: ' + version(
) + ") | " f"${jformat(btc_price, 0)} {primary_fx}/BTC " + " | " + f"Own: {Own} BTC | " + f"Net: ${jformat(Worth, 0)} {primary_fx}"
Screen Shot 2021-07-30 at 3 05 06 PM

Could not connect to Tor

$ python node_warden.py

โœ…  Loading config.ini
    Config Loaded [Success]

๐Ÿ’ฅ  Testing Tor
    Tor NOT connected [ERROR]
    Could not connect to Tor. WARden requires Tor to run. Quitting...
    Download Tor at: https://www.torproject.org/download/

However Tor works:

$ curl -x socks5h://localhost:9050 -s https://check.torproject.org/api/ip

{"IsTor":true,"IP":"xxx.xxx.xxx.xxx"}

What am I doing wrong?

Fails on raspiblitz v1.7.0

After git clone https://github.com/pxsocs/warden_terminal, cd warden_terminal, pip3 install -r requirements.txt, I see the following warnings:

  The script tabulate is installed in '/home/admin/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  The script pyfiglet is installed in '/home/admin/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

After running python3 node_warden.py:

admin@raspberrypi:~/warden_terminal $ python3 node_warden.py
Traceback (most recent call last):
  File "node_warden.py", line 793, in store_local_ip
    pickle_it('save', 'ip.pkl', ip)
  File "node_warden.py", line 777, in pickle_it
    with open(filename, 'wb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/home/admin/warden_terminal/static/save/ip.pkl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "node_warden.py", line 914, in <module>
    main()
  File "node_warden.py", line 800, in main
    store_local_ip()
  File "node_warden.py", line 795, in store_local_ip
    pickle_it('save', 'ip.pkl', None)
  File "node_warden.py", line 777, in pickle_it
    with open(filename, 'wb') as handle:
FileNotFoundError: [Errno 2] No such file or directory: '/home/admin/warden_terminal/static/save/ip.pkl'

Umbrel Data

We need to nclude "data_umbrel" in the import from data.py

from data import (btc_price_data, data_tor, data_btc_price, data_login,
data_mempool, data_random_satoshi, data_large_price,
data_whitepaper, data_sys, pickle_it, data_logger,
data_large_block, data_large_message, data_btc_rpc_info,
data_sync, data_specter, data_services)

Then Dashboard.py needs something like this:
def umbrel_updater(_loop, __data):
data = translate_text_for_urwid(data_umbrel())
mp_box.base_widget.set_text(data)
main_loop.set_alarm_in(1, umbrel_updater)

and
main_loop.set_alarm_in(0, umbrel_updater)

RTL on port 3001

port_list = [(80, 'Web Server'), (3010, 'Ride the Lightning'),

I think the default port for RTL is 3001 not 3010

Also, maybe in the widget, we can show the port next to the IP address like "192.168.0.5:3001"

Logging

Can we please increase the level of logging that gets pushed to the debug.log? Spinners are nice during startup and when things are all working great, but they all disappear once the main dashboard loads

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.