nameGUI - an RPC frontend GUI

Forum rules
Warning !
Avoid using binary softwares from untrusted users.
Prefer compiling it yourself and verify sources.
phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

nameGUI - an RPC frontend GUI

Post by phelix »

Image

v0.3.3 secure Name trading transaction creation, better value display with clickable links, data input forms for d/ and id/, client auth cookie (needs testing), bugfixes, value parsing, more bugfixes, unit testing introduced, better value display, even more bugfixes

v0.2 featuring handling of locked wallets and instant name lookup. Also I actually switched to Namecoin Core for development (but it should still work with v0.3.80, too, let me know if it does not). There now are two command line options you can use to change folders nameGUI is searching for it's own data and the namecoin conf file: 'datadir' and 'namecoindatadir'.

github/phelix/nameGUI
Windows installer (see signed sha256 below)

To run from source (Linux/OSX/Windows):
'pip install validators'
'python ./namegui.py'

The Namecoin Core client needs to be up and running with synced blockchain. Find source and binaries here.
See the NMControl readme for info on how to set up the client conf file: https://github.com/namecoin/nmcontrol

Please help and test but don't bet the farm on it yet.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

$ shasum -a 256 nameGUI_v0.3.3_setup.exe
915fafc8e5470940a31353df6856befa3c356bc3907257189983ed2ad97f9d73 nameGUI_v0.3.3_setup.exe

id/phelix


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWp6nPAAoJEMv5QLdyEy4Y0T4IAKpKjMpPXDGBpH/ERq58XavU
DuWEKhgykprTrU7xeJjRzDLQPU3tatIdlKAPqMBHcxURziBRF4GzV4hIdy7meKX9
AXw5yIGKGzKZQORjyRPsizdvYIwMPlEKr3EjfvNw8D44SvpFNBMKiHKapYP2MEuj
del/XjhRDyxnXP468gz7jCIzrlYmZTLPXzUaY1VQFUa36nGs8ko+xU1b/PYyNCu2
fEqAr2VXgP4WdmUT0H5znxWwkPtXSTeqj9JaKJ2SxFxdWiBNHa8v+m6dAmvrRq9O
8Y+twCP9pQf2CZc+YF17RSlj/Cpw+pC3AtNXH+H/0es0a1jV3OrgjoZs8WQ6Neg=
=SG+Y
-----END PGP SIGNATURE-----



[heavily edited]
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: nameGUI - an RPC frontend GUI

Post by phelix »

btw: I did only test it with Namecoin v0.3.80. It would be nice if somebody could tell me whether it works with Namecoin Core.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: nameGUI - an RPC frontend GUI

Post by biolizard89 »

Hmm, nice work. Haven't tested yet.

Would it be feasible to rebase on Py3Qt5? That way we could share the UI code with Armory (less work, yay!). FYI indolering and I are playing around with a JSON generator GUI (just letting you know so that we don't accidentally have duplicated effort).

@indolering, feedback on the usability of this UI would be awesome.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

cassini
Posts: 336
Joined: Sun May 26, 2013 6:36 pm

Re: nameGUI - an RPC frontend GUI

Post by cassini »

Definitely needs some instructions on how to run an MS-Win program on OSX and Linux. :lol:
Here we go:


edit namegui.py, line 8, remove favicon
edit namegui.py, line 104, remove default favicon
edit lib/namerpc.py, line 222, replace os.environ["HOME"] with environ["HOME"]
(because "os" and "os.environ" result in "global name is not defined" errors)

python namegui.py

... and lo and behold, it works! Just amazing. It was developed on a Windows PC (I guess), and it runs on OSX out of the box, with only minor tweaking.


Tested with Namecoin-Qt 0.3.80 for OSX.


Namecoin Core does not cooperate with namegui.py.
Line 262 in lib/namerpc.py (sendtoname "") throws an InvalidAddressOrKeyError.


Haven't tried any name operations, yet.
I found one serious bug, so far. Enter any combining character (e.g. grave, acute, tilde, circumflex) in a text box, and the program crashes with
Python[1989:5194914] -[__NSCFConstantString characterAtIndex:]: Range or index out of bounds

and one minor issue:
Every 3 seconds the line "Model RPC update" flickers with alternating text messages "waiting..." and "working...". At the same rate of once every 3 seconds, debug.log gets filled with these 385 bytes worth of text:
ThreadRPCServer method=sendtoaddress
ThreadRPCServer method=getblockcount
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockcount
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getbalance

which results in 4.05 Gigabytes a year.

Aside that, excellent work!

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: nameGUI - an RPC frontend GUI

Post by phelix »

biolizard89 wrote:Hmm, nice work. Haven't tested yet.

Would it be feasible to rebase on Py3Qt5? That way we could share the UI code with Armory (less work, yay!).
Sorry, at the moment I don't feel like doing it. nameGUI is very lightweight don't want to burden it with Py3Qt5. Also I know my way around Tkinter but not Qt. I plan on making it work with Python3, though.
FYI indolering and I are playing around with a JSON generator GUI (just letting you know so that we don't accidentally have duplicated effort).
Would it be useful to stuff it into nameGUI? If you make it available to me I will be happy to take a look.

In any case I will try to separate GUI and JSON generation to some extent. More important than saving a little work would be uniform JSON output.
@indolering, feedback on the usability of this UI would be awesome.
open for suggestions.

cassini wrote:Definitely needs some instructions on how to run an MS-Win program on OSX and Linux. :lol:
Here we go:

edit namegui.py, line 8, remove favicon
edit namegui.py, line 104, remove default favicon
edit lib/namerpc.py, line 222, replace os.environ["HOME"] with environ["HOME"]
(because "os" and "os.environ" result in "global name is not defined" errors)

python namegui.py
thanks for the feedback. Should be fixed / worked around now.
... and lo and behold, it works! Just amazing. It was developed on a Windows PC (I guess), and it runs on OSX out of the box, with only minor tweaking.
Welcome to Python TTK/Tkinter :mrgreen:
Namecoin Core does not cooperate with namegui.py.
Line 262 in lib/namerpc.py (sendtoname "") throws an InvalidAddressOrKeyError.
Hopefully it works now or at least gives another error?
Haven't tried any name operations, yet.
I found one serious bug, so far. Enter any combining character (e.g. grave, acute, tilde, circumflex) in a text box, and the program crashes with
Python[1989:5194914] -[__NSCFConstantString characterAtIndex:]: Range or index out of bounds
oops. Will have to take a look at that
and one minor issue:
Every 3 seconds the line "Model RPC update" flickers with alternating text messages "waiting..." and "working...".
That is expected behaviour :)
At the same rate of once every 3 seconds, debug.log gets filled with these 385 bytes worth of text:
ThreadRPCServer method=sendtoaddress
ThreadRPCServer method=getblockcount
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getblock
ThreadRPCServer method=getblockcount
ThreadRPCServer method=getblockhash
ThreadRPCServer method=getbalance

which results in 4.05 Gigabytes a year.
oh noes! Yeah, I noticed this, too. Depending on how much Namecoin Core Outputs we will have to change that.
Aside that, excellent work!
Thanks :mrgreen:
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: nameGUI - an RPC frontend GUI

Post by domob »

Regarding the InvalidAddress error: I don't remember implementing "sendtoname" in Namecoin Core. This is something that can be easily replaced by a call to name_show followed by sendtoaddress. However, if we believe it should still be there for convenience, feel free to open an issue.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

cassini
Posts: 336
Joined: Sun May 26, 2013 6:36 pm

Re: nameGUI - an RPC frontend GUI

Post by cassini »

domob wrote:"sendtoname"
...
if we believe it should still be there for convenience, feel free to open an issue.
Opened namecore issue #5

The "sendtoname" phelix used, however, has a different purpose at the moment. This is a way of finding out if the wallet is locked. Meanwhile I've come across the official wallet-lock detection method. See nameGUI issue #1

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: nameGUI - an RPC frontend GUI

Post by phelix »

You are mixing something here, "sendtoname" is never used in namerpc. Only "sendtoaddress". And this bug with Namecoin Core should already be fixed. Nevertheless it might be cleaner to switch to simply using getinfo as Cassini suggested on Github.

Note that all this is solely for the purpose of displaying to the user whether the wallet is locked - for all other cases I plan to react to an WALLET_UNLOCK_NEEDED error code.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: nameGUI - an RPC frontend GUI

Post by phelix »

Sooo.... is this the right way to go? There is a long todo list, should I put more work into this? Can we make this official software so that we can move completely to the new client?
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: nameGUI - an RPC frontend GUI

Post by biolizard89 »

phelix wrote:Sooo.... is this the right way to go? There is a long todo list, should I put more work into this? Can we make this official software so that we can move completely to the new client?
Well, I'd really like to see it use the same GUI toolkit that a Bitcoin wallet uses, so that we could integrate it later. For Armory this would be Py3Qt5 (they're currently using Py2Qt4 but plan to switch to Py3Qt5 in the very near future); Electrum appears to be using Py2Qt4 (I hope they're planning to upgrade, but I don't know for sure). Doing this would make the code substantially more versatile. FreeSpeechMe might be willing to put up a bounty for this, depending on funding availability (which I don't have on me right now).

Other than that, I don't really have any opinion on it.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

Post Reply