[ANN] libcoin rebase attempt

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

phelix wrote:sounds good :)
:D
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

domob wrote:
indolering wrote:Any updates on this? Domob's repo was updated ~3 weeks ago.

Are any of the the name_* commands implemented yet? Searching for "name" in the repo doesn't turn up anything.
I've been waiting on some answers from Michael, but now I have them and should hopefully finish off name_show soon. Note that the latest changes were mostly done in my Github fork of libcoin rather than the repository in the OP, since they need to modify libcoin internals. Thus you should look there for news. ;) (There also "name" should show up already, as name_show already works for retrieving name/value/expires_in/expired. txid/address will be implemented now, and then I'll do name_history.)
I need name_show and name_filter, should I be testing against /domob1812/libcoin or domob1812/nmc-libcoin or namecoin/libcoin ?
domob wrote:
indolering wrote:Is it possible to connect to the SQLite database directly? (I'm assuming it tracks names there?)

I'm going to guess that libcoin doesn't track names at the moment?
It does, and yes, they are stored in the database. This is basically what my name_show does / will do, together with parsing the tx out scripts to retrieve addresses and other such things.
Ahh, going back to my original question then, can I interact with the SQLite database programmatically? I would like to setup an additional index that tracks valid domains (age and valid name: /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]\.[a-z]{2,}$/)

You mentioned adding the ability to set an RPC call when new blocks are found/accepted. Is that in the mainline or only in Libcoin and is there any documentation on it?
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by domob »

indolering wrote:
domob wrote:
indolering wrote:Any updates on this? Domob's repo was updated ~3 weeks ago.

Are any of the the name_* commands implemented yet? Searching for "name" in the repo doesn't turn up anything.
I've been waiting on some answers from Michael, but now I have them and should hopefully finish off name_show soon. Note that the latest changes were mostly done in my Github fork of libcoin rather than the repository in the OP, since they need to modify libcoin internals. Thus you should look there for news. ;) (There also "name" should show up already, as name_show already works for retrieving name/value/expires_in/expired. txid/address will be implemented now, and then I'll do name_history.)
I need name_show and name_filter, should I be testing against /domob1812/libcoin or domob1812/nmc-libcoin or namecoin/libcoin ?
You should be using domob1812/nmc-libcoin as the actual binary, but it needs domob1812/libcoin as dependency installed. Most of the implementation is in domob1812/libcoin. You can test name_show already, it should be working except that it doesn't display a name's address. Other name_* "read-only" commands will come over time (first name_history and then name_filter / name_scan).
indolering wrote:
domob wrote:
indolering wrote:Is it possible to connect to the SQLite database directly? (I'm assuming it tracks names there?)

I'm going to guess that libcoin doesn't track names at the moment?
It does, and yes, they are stored in the database. This is basically what my name_show does / will do, together with parsing the tx out scripts to retrieve addresses and other such things.
Ahh, going back to my original question then, can I interact with the SQLite database programmatically? I would like to setup an additional index that tracks valid domains (age and valid name: /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]\.[a-z]{2,}$/)
The whole blockchain is in blockchain.sqlite3 in the corresponding data directory of libcoin. You can use SQLite to access it as you please.
indolering wrote:You mentioned adding the ability to set an RPC call when new blocks are found/accepted. Is that in the mainline or only in Libcoin and is there any documentation on it?
This is currently a pull request from domob1812/namecoin:async-rpc to mainline Namecoin. It is not related to libcoin, although I may discuss adding such a feature also to libcoin in the far future (or when it is needed by someone).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

domob wrote: You should be using domob1812/nmc-libcoin as the actual binary, but it needs domob1812/libcoin as dependency installed. Most of the implementation is in domob1812/libcoin. You can test name_show already, it should be working except that it doesn't display a name's address. Other name_* "read-only" commands will come over time (first name_history and then name_filter / name_scan).
Do you mean that the key (name) is not included in the returned value (record)?
domob wrote: This is currently a pull request from domob1812/namecoin:async-rpc to mainline Namecoin. It is not related to libcoin, although I may discuss adding such a feature also to libcoin in the far future (or when it is needed by someone).
Well, I kind of need it and I was planning on switching to Libcoin. Of course, this is very low priority for me, I would much rather see the port get done before this feature is implemented.

Does Libcoin have non-blocking RPC? I was trying to hack a "heartbeat" feature into mainline by requesting block-count once every second. Having blocking queries (name_filter can take a LONG time to respond) makes the heartbeat feature ... unpredictable at best.

You are the man domob!
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by domob »

indolering wrote:
domob wrote: You should be using domob1812/nmc-libcoin as the actual binary, but it needs domob1812/libcoin as dependency installed. Most of the implementation is in domob1812/libcoin. You can test name_show already, it should be working except that it doesn't display a name's address. Other name_* "read-only" commands will come over time (first name_history and then name_filter / name_scan).
Do you mean that the key (name) is not included in the returned value (record)?
No, the name is included. The "address" field is missing until I can discuss with Michael how to best implement stripping of name scripts.
indolering wrote:Does Libcoin have non-blocking RPC? I was trying to hack a "heartbeat" feature into mainline by requesting block-count once every second. Having blocking queries (name_filter can take a LONG time to respond) makes the heartbeat feature ... unpredictable at best.
I don't think so, but haven't checked in detail. I believe that it would be fairly straight-forward to make all RPC calls non-blocking with their own thread (as per my patch), though, and we could do that if necessary.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

midnightmagic
Posts: 18
Joined: Tue Sep 13, 2011 6:50 am

Re: [ANN] libcoin rebase attempt

Post by midnightmagic »

Hello!

This rebasing is a good project, and I'm glad someone is writing stuff re: namecoin. IMO, namecoin is a vital anti-censorship project.

Is the eventual aim to completely replace the base client?

If that is the case, are we making sure we're expecting a hardfork?

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

I've tried building Libcoin from the mainline, domob's fork, and Khal's fork and I got mainline and domob's to work but libcoind -namecoin is ends in a segfault.

Any tips?
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by phelix »

midnightmagic wrote:Hello!

This rebasing is a good project, and I'm glad someone is writing stuff re: namecoin. IMO, namecoin is a vital anti-censorship project.

Is the eventual aim to completely replace the base client?

If that is the case, are we making sure we're expecting a hardfork?
I agree, this might well cause a hardfork.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: [ANN] libcoin rebase attempt

Post by domob »

indolering wrote:I've tried building Libcoin from the mainline, domob's fork, and Khal's fork and I got mainline and domob's to work but libcoind -namecoin is ends in a segfault.

Any tips?
I use:

Code: Select all

nmc-libcoind --persistence FULL --namecoin --datadir ~/.libcoin/nmc
(See also "run.sh" in my Git repository.)

We will have to work on the options, though, for the future. (Especially forcing nmc-libcoind to use Namecoin by default / always.)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

jonasbits
Posts: 38
Joined: Tue Mar 04, 2014 4:47 pm
os: linux

Re: [ANN] libcoin rebase attempt

Post by jonasbits »

Thanks to the previous work of khal (https://github.com/khalahan/libcoin/tre ... ointestnet) I have now rebased those changes to the latest commit by gronager. I have with purpose done the changes on top of the namecoin mainnet code to make the difference more clear.

But there is a problem, at height 2506 it gets stuck. Orphan blocks is the reason what I can read from the debug and trace logs.

The code need more eyes on it, not sure where to look anymore.

https://github.com/jonasbits/libcoin/tree/nmc-test-3
My Namecoin address: NC3HGHk527xuWZBgMdGJ2GxjpRSw8D4oA6

Post Reply