Easy-to-use RPC server

Post Reply
domob
Posts: 1127
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Easy-to-use RPC server

Post by domob »

Over the past two days, I got two requests with respect to my Namecoin integration projects (one for NameID and once for the Bitmessage patch). Both had the problem that the namecoind server was not found by the code, and I think in both cases the problem was that using Namecoin-Qt no RPC server is started in the background (if you don't manually add "server=1" to the namecoin.conf file).

I agree with those requests that for broader adoption in the future it is vital that users don't have to configure anything in order to make use of such Namecoin integration tools, and that they in particular don't have to manually create a namecoin.conf, set server=1 and enter rpcuser/rpcpassword there. (If that is present, then my integration code should automatically read the user/password from namecoin.conf so that there in theory no configuration should be necessary.)

So what's the general opinion on enabling a RPC server in the background "automatically", and possibly even write namecoin.conf with randomly generated rpcuser/rpcpassword if it is not present, when the UI is run? Or at least adding an easy-to-find option in the UI that does this? Note that this is not an attempt to make snailbrain implement this for me, but rather out of interest what the general opinion is. I believe this is a very important thing to have in the future, especially if more and more Namecoin applications are developed.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

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

Re: Easy-to-use RPC server

Post by phelix »

domob wrote:Over the past two days, I got two requests with respect to my Namecoin integration projects (one for NameID and once for the Bitmessage patch). Both had the problem that the namecoind server was not found by the code, and I think in both cases the problem was that using Namecoin-Qt no RPC server is started in the background (if you don't manually add "server=1" to the namecoin.conf file).

I agree with those requests that for broader adoption in the future it is vital that users don't have to configure anything in order to make use of such Namecoin integration tools, and that they in particular don't have to manually create a namecoin.conf, set server=1 and enter rpcuser/rpcpassword there. (If that is present, then my integration code should automatically read the user/password from namecoin.conf so that there in theory no configuration should be necessary.)

So what's the general opinion on enabling a RPC server in the background "automatically", and possibly even write namecoin.conf with randomly generated rpcuser/rpcpassword if it is not present, when the UI is run? Or at least adding an easy-to-find option in the UI that does this? Note that this is not an attempt to make snailbrain implement this for me, but rather out of interest what the general opinion is. I believe this is a very important thing to have in the future, especially if more and more Namecoin applications are developed.
I would like an option in QtGui that would let you activate local RPC listening with a random password.

Could your software modify the .conf file? I think on windows it would be possible after a security pop up. Not sure if this is a good idea. Of course the user would have to be asked first.
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: Easy-to-use RPC server

Post by biolizard89 »

It would definitely be useful to have a GUI option to handle RPC server options.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Re: Easy-to-use RPC server

Post by snailbrain »

might be easier to have a namecoin-qt installation... and upon installation you can select to install as server and enter a rpc user/password, this could generate the namecoin.conf with server=1 rpcallowip=127.0.0.1

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

Re: Easy-to-use RPC server

Post by biolizard89 »

snailbrain wrote:might be easier to have a namecoin-qt installation... and upon installation you can select to install as server and enter a rpc user/password, this could generate the namecoin.conf with server=1 rpcallowip=127.0.0.1
That sounds good to me.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

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

Re: Easy-to-use RPC server

Post by domob »

snailbrain wrote:might be easier to have a namecoin-qt installation... and upon installation you can select to install as server and enter a rpc user/password, this could generate the namecoin.conf with server=1 rpcallowip=127.0.0.1
Sounds good. However, I think the installer should encourage users to enable this - or there should still be an option to easily enable the RPC server later on. I can imagine that a lot of "newbie" users that install Namecoin-Qt but want (possibly later) to also use tools built on top of Namecoin are not aware at installation stage that they have to enable this option in order to use Bitmessage, NameID, File Verification, Convergence (which needs also NMControl as additional installation, I suppose?) or whatever else.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

omyno
Posts: 8
Joined: Wed Aug 28, 2013 8:43 am

Re: Easy-to-use RPC server

Post by omyno »

Thanks for starting this thread, domob.
I think zero configuration is essential. Running Namecoin shouldn't require an installer or setup. All a user should have to do is to download namecoin(-qt), fire it up, wait for the blockchain to be downloaded and now every other program can interact with the running instance of Namecoin.

Post Reply