namecoin / ncbtcjson

Companion package to Conformal's btcjson, which adds Namecoin-specific RPC methods
https://www.namecoin.org/
ISC License
0 stars 4 forks source link

ncdns v0.0.10 - failed to query namecoin #4

Closed redblade7 closed 4 years ago

redblade7 commented 4 years ago

With the latest version of ncdns (v0.0.10) attempting to look up a .bit domain gives a SERVFAIL. ncdns, when not forked, shows this message:

[ERROR] ncdns.backend: failed to query namecoin: -1: name_show "name"

(the help entry for name_show follows)

No problems with ncdns v0.0.9.

JeremyRand commented 4 years ago

With the latest version of ncdns (v0.0.10) attempting to look up a .bit domain gives a SERVFAIL. ncdns, when not forked, shows this message:

[ERROR] ncdns.backend: failed to query namecoin: -1: name_show "name" (the help entry for name_show follows)

No problems with ncdns v0.0.9.

@redblade7 Thanks for the bug report. Is this with Namecoin Core 0.13.99-name-tab-beta1 by any chance? If so, does it work with a current Namecoin Core (0.18.0 or higher) or Electrum-NMC (3.3.8 or higher) release? (If you try a newer Namecoin Core, backup your profile folder first in case you want to revert to the older Namecoin Core.)

redblade7 commented 4 years ago

On the computer with my wallet, I had to recently downgrade to the binary version of v0.13.99-name-tab-beta1 because of changes to Gentoo packages which require a newer version of boost to compile. This version of boost won't work with v0.15.99-name-tab-beta1 or any Bitcoin Core version from that time.

I have a laptop with the latest version of Namecoin Core (v0.19.0.1) with wallet disabled and ncdns v0.0.10 works there.

Are there any future name tab releases planned or are you recommending people with wallets switch to Electrum-NMC?

JeremyRand commented 4 years ago

I have a laptop with the latest version of Namecoin Core (v0.19.0.1) with wallet disabled and ncdns v0.0.10 works there.

@redblade7 Okay, thanks for confirming that.

So, the issue you're seeing is because between v0.0.9 and v0.0.10, ncdns switched to the ncrpcclient package to talk to Namecoin Core. This was necessary in order to properly handle stream isolation, which was a hard requirement for Tor Browser integration (see my 36C3 talk). Old versions of Namecoin Core (specifically, versions that don't support the optional stream isolation argument to name_show) return an error when ncrpcclient tries to pass the stream isolation argument.

I can probably patch ncrpcclient to detect this error and fall back to the old name_show format that doesn't include the stream isolation argument. This will still not work if you're actually using stream isolation (which is the default in Tor Browser), but if you're just using ncdns with Unbound or something similar, it will probably work okay (at least, if you're okay with a bit of additional latency since it will end up calling name_show twice per lookup).

Are there any future name tab releases planned or are you recommending people with wallets switch to Electrum-NMC?

Merging the name tab GUI to Namecoin Core master branch will probably be a priority in our next funding proposal, which is currently projected to be submitted on 2020 Feb 1. Until that funding arrives, it is not likely that we'll see any work in this area.

JeremyRand commented 4 years ago

I might have a trivially easy fix, actually. Stand by.