[NMDF] Namecoin API Server [0.5BTC] [frozen]

indolering
Posts: 800
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by indolering » Fri Feb 28, 2014 8:22 am

sugarpuff wrote:
sugarpuff wrote:
sugarpuff wrote: 1. It's not a 3rd party. It's you, your own party. That is what... 1st party?
OkTurtles white paper wrote:DNSNMC provides the missing “glue” to the Namecoin blockchain that makes it immediately accessible to clients of all types with zero configuration. A network administrator need only enter the IP address of a DNSNMC-compliant DNS server to instantly make the information within the blockchain accessible to all of the users that she (or he) provides internet access to.
Clients trusting servers ... that is a one party trusting a third party.
That piece of documentation describes one possible setup. Plastered throughout that same PDF in other locations, and all over the GitHub README, it is emphasized:
GitHub README wrote:DNSChain is meant to be run by individuals!
If the client owns the server, that is by definition a first party.

If their friend owns the server, well, that's either 2nd or 3rd party, and I hope they have a good friend.

This is a completely different reality than the one we currently live in. Go register your own CA and get browsers to accept it if you don't believe me. To argue that DNSChain and CAs are "the same thing" is to display complete ignorance about these realities.

Edit: that previous paragraph isn't clear. Please see next post for clarification.
No, it's perfectly clear: you are twisting your use cases so any direct comparison to anything is utterly meaningless. Do you really expect people to install Namecoin and administer a server on top of that? You expect that to scale?

And no, I don't need an introduction to the problems with certificate authorities.
sugarpuff wrote: That is how much data is needed for a wallet to "verify its own balance". That is not the same as verifying an arbitrary namecoin entry, which is what is needed.
The estimate I gave previously was based on the ratio of compression seen in the actual Bitcoin blockchain. I quoted some highlights from very detailed discussions, it was not meant to be a comprehensive overview of how it works, just enough to get you started.
sugarpuff wrote: Case closed on the UXTO thing?
Uhh, no, it's the future of the client-side blockchain storage. UXTO tracks the unspent outputs instead of the entire blockchain and it can verify future transactions as well.

SCIP takes this one step further: clients will be able to verify the integrity of what a third party server tells them without needing to track the unspent outputs. I don't understand how that technology works at all, but do understand the ramifications of it: trust-free clients.
sugarpuff wrote:
indolering wrote:In our last conversation on IRC, you told me that I sounded like a bad politician. That's because whenever someone gives you feedback on your project you take it as a personal attack.
It's because to me, you sound like a bad politician, and that's all.
Or because you are an egotistical jerk.
sugarpuff wrote:I haven't gotten that vibe from anyone else who has critiqued my work so far.
Then you haven't been paying attention, I was actually quoting another developer's description of your reactions to feedback.
sugarpuff wrote: Your self-criticism, that you write/say too much, is a near acknowledgement of this. Too many words, without enough quality content to justify them.
Ahh, well, fuck you too.

At any rate, it's Phelix's money, he can do what he wants with it. However, I certainly don't feel it would be childish of me to not give you a cut now.
DNS is much more than a key->value datastore.

sugarpuff
Posts: 110
Joined: Tue Oct 22, 2013 10:17 pm

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by sugarpuff » Fri Feb 28, 2014 5:24 pm

indolering wrote:Then you haven't been paying attention, I was actually quoting another developer's description of your reactions to feedback.
Like I said, I haven't gotten the politician vibe from anyone else here. Your statement is orthogonal to that observation.

Give it to me straight instead. You did a great job here:
indolering wrote:Or because you are an egotistical jerk.
indolering wrote:Ahh, well, fuck you too.
That's the stuff. :)
indolering wrote:At any rate, it's Phelix's money, he can do what he wants with it. However, I certainly don't feel it would be childish of me to not give you a cut now.
I never started this work for monetary gain, and do not care whether I receive 0.5BTC, or whether you receive it (and should you receive it, whether you share it or not).

sugarpuff
Posts: 110
Joined: Tue Oct 22, 2013 10:17 pm

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by sugarpuff » Fri Feb 28, 2014 6:13 pm

Given that DNSChain was made not in response to this thread, but for other reasons, and the hostility that has come up over this topic*, I withdraw my application for the 0.5BTC.

phelix, you're welcome to give the 0.5BTC to indolering if you think his solution is superior to DNSChain, give it to another submission, or (and this one gets my vote) keep it for yourself and/or another cause. Don't worry, DNSChain will continue to be updated without it.

* I apologize for any role I played in said hostilities.

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

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by phelix » Tue Mar 25, 2014 3:49 pm

Sorry it took me so long, I see in the meantime you had fun with drama. :p

I realize both of have put some work into this and much more in the underlying tech which I hope will bring Namecoin forward independently of this bounty.

Indolering was first (to post a working version here?), also sugarpuff withdrew his claim.

The node.js/couchDB solution is so different than what I had asked for that I can not pay out any NMDF funds for it with good conscience at this point of time.
I know nothing about couchDB and node.js but others pointed out some of advantages of this implementation to me (replication, fast querying, single reliable software for DB and server). So maybe we can use it after all for a very light client which should get some donations moving (including from me personally). Pretty much the same goes for the DNSChain solution btw.

Some issues with the node.js/couchDB solution (thanks you know who):
- only "d/" namespace names are currently exported
- how are "/" within the name handled?
- only the value is exported, not the address of the name owner and the other fields

What I had hoped for was a complete solution that would make it easy for people to set up their own server including config files.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

sugarpuff
Posts: 110
Joined: Tue Oct 22, 2013 10:17 pm

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by sugarpuff » Tue Mar 25, 2014 7:45 pm

phelix wrote:Pretty much the same goes for the DNSChain solution btw.
Sorry, not sure I understand, what do you mean by that? What doesn't DNSChain do for you?

indolering
Posts: 800
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by indolering » Wed Mar 26, 2014 3:35 am

phelix wrote: The node.js/couchDB solution is so different than what I had asked for that I can not pay out any NMDF funds for it with good conscience at this point of time.

I know nothing about couchDB and node.js but others pointed out some of advantages of this implementation to me (replication, fast querying, single reliable software for DB and server). So maybe we can use it after all for a very light client which should get some donations moving (including from me personally). Pretty much the same goes for the DNSChain solution btw.
I appreciate that, I didn't start out on this for the bounty originally, it just fit together nicely.

I would like to note, however, that Node.js is only used for the scraper. After speaking domob, it appears that Libcoin will be able to make calls directly to CouchDB as items are added and the middle-man script will be removed entirely. And, again, no NMControl functionality is duplicated here; name_show and name_filter are implemented in Namecoind directly. My "solution" is little more than a database config.
phelix wrote: Some issues with the node.js/couchDB solution (thanks you know who):

- only "d/" namespace names are currently exported
That's only due to it being originally setup for Speech.js. After speaking with Domob about both NameID and the Libcoin port, I decided to hold off on supporting /id until I either have time to redo the Namecoin to CouchDB functionality in something other than JavaScript (maybe Python!) or wait until I can program RPC calls in Libcoin directly. If it's an urgent need, I can patch it in.
phelix wrote: - how are "/" within the name handled?
This comes down to URL rewriting, it will be transparent to the client: api.namecoin.info/d/name
phelix wrote: - only the value is exported, not the address of the name owner and the other fields
Right now it just takes the raw output of name_filter from Namecoind, I've put a Github ticket requesting the full name_show information but that can hacked in as well.
phelix wrote: What I had hoped for was a complete solution that would make it easy for people to set up their own server including config files.
Assuming you have Namecoind, CouchDB, and Node.js installed, you can theoretically clone this git repo and setup a Cron job. Now that finals are over, I can finally put some polish on it.

However, Ryan-C and I already have plans for a DNS signing server that will do double-duty signing the CouchDB records as well. It's probably more secure for everyone to just import the CouchDB database from the official server (which is trivial).

I'm working on an API explorer as well. The service comes with libraries for a range of programming languages, above and beyond the existing CouchDB libraries.
DNS is much more than a key->value datastore.

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

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by phelix » Thu Mar 27, 2014 5:47 pm

sugarpuff wrote:
phelix wrote:Pretty much the same goes for the DNSChain solution btw.
Sorry, not sure I understand, what do you mean by that? What doesn't DNSChain do for you?
It's not about what it does but about how it does what it does. This was a tightly constrained bounty.

The DNSChain solution is so different than what I had asked for that I can not pay out any NMDF funds for it with good conscience at this point of time. I know nothing about the tools (coffee?) DNSChain is built upon.


@indolering: Sounds good.


The bounty is closed/frozen for now. There are two proposed solutions further up the thread. I will try to make the next bounties more clear with less "should" and more "must" requirements.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

sugarpuff
Posts: 110
Joined: Tue Oct 22, 2013 10:17 pm

Re: [NMDF] Namecoin API Server [0.5BTC]

Post by sugarpuff » Thu Mar 27, 2014 6:49 pm

phelix wrote:The DNSChain solution is so different than what I had asked for that I can not pay out any NMDF funds for it with good conscience at this point of time. I know nothing about the tools (coffee?) DNSChain is built upon.
Ah, so you're saying it must be built in python? Got it. I rather dislike python. :-\
Last edited by sugarpuff on Thu Mar 27, 2014 11:09 pm, edited 1 time in total.

indolering
Posts: 800
Joined: Sun Aug 18, 2013 8:26 pm
os: mac

Re: [NMDF] Namecoin API Server [0.5BTC] [frozen]

Post by indolering » Thu Mar 27, 2014 11:02 pm

I think the one thing Sugarpuff and I agree on is that the spec is ... misguided:

* Should use Nmcontrol (integrated or query) or maybe a custom Python script
* Server should run on nginx, tornado, supervisord

API (json):
* name_show (just like namecoind or nmcontrol)
* name_show at previous height, return failure if older than e.g. 100k blocks (nice to have)
Since we are just reading records from a database and not transforming the data or maintaining session state, NMControl, Tornado and supervisord have nothing to do with this conversation.

I'm not trying to lecture, I just think the problem is that you spec was too strict given your backround in building these types of solutions. If anything, you need to be less careful about the should/must wording and engage with people on how it should be done. I should have engaged more too, sadly I have classes to attend! : )

The simplest solution to this would be to throw the JSON-RPC interface behind NGINX, that's essentially what I did with my PHP script and what Sugarpuff is doing with Node.js. However, Namecoind becomes your database! This is totally inappropriate for a web API that needs to handle on-demand scaling, DDoS, Reddit, etc.

Furthermore, since we are replacing blockchain encryption with public-key encryption, every time a record comes off of the blockchain we need to securely sign it. In the above scenario, each Namecoind server would act as an independent signing server, providing a large attack surface. Signing things once and then replicating those signed copies is much more desirable.
DNS is much more than a key->value datastore.

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

Re: [NMDF] Namecoin API Server [0.5BTC] [frozen]

Post by phelix » Fri Mar 28, 2014 8:44 am

indolering wrote:I think the one thing Sugarpuff and I agree on is that the spec is ... misguided:

* Should use Nmcontrol (integrated or query) or maybe a custom Python script
* Server should run on nginx, tornado, supervisord

API (json):
* name_show (just like namecoind or nmcontrol)
* name_show at previous height, return failure if older than e.g. 100k blocks (nice to have)
Since we are just reading records from a database and not transforming the data or maintaining session state, NMControl, Tornado and supervisord have nothing to do with this conversation.
They sure do because: I asked for them.
I'm not trying to lecture, I just think the problem is that you spec was too strict given your backround in building these types of solutions. If anything, you need to be less careful about the should/must wording and engage with people on how it should be done. I should have engaged more too, sadly I have classes to attend! : )

The simplest solution to this would be to throw the JSON-RPC interface behind NGINX, that's essentially what I did with my PHP script and what Sugarpuff is doing with Node.js. However, Namecoind becomes your database! This is totally inappropriate for a web API that needs to handle on-demand scaling, DDoS, Reddit, etc.

Furthermore, since we are replacing blockchain encryption with public-key encryption, every time a record comes off of the blockchain we need to securely sign it. In the above scenario, each Namecoind server would act as an independent signing server, providing a large attack surface. Signing things once and then replicating those signed copies is much more desirable.
I am pretty sure the solution I asked for would work very well and would fit very well into our ecosystem. It is really only fitting together things we already have. With the NGINX rate limiting that was suggested somewhere upthread the only actual coding left to do would be to connect Tornado to the appropriate Nmcontrol function.

With the time we wasted on discussions in this thread it would probably have been possible to implement exactly what I wanted. Maybe I will find the time to give it a try myself.

The bounty is closed/frozen for now. There are two proposed solutions further up the thread. I will try to make the next bounties more clear with less "should" and more "must" requirements.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Locked