[ANN] libcoin rebase attempt

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

domob wrote: I added a hook that gets called whenever the best chain's head changes, and using boost::condition_variable's waiting threads can get notified about this to process the change. I also implemented "asynchronous" RPC routines that spawn a new thread for their processing, so that they can block until the hook triggers and don't halt the whole RPC server (other RPC calls are possible in the mean time and also an arbitrary number of such waiting calls can co-exist).
I was planning on creating SQLite triggers, that sounded easier. However, this is much better, I <3 REST. I'm guessing you just pass a URI as part of the original call?
See my pull request at https://github.com/chronokings/huntercoin/pull/11. I also believe this could be a useful addition for Namecoin and Bitcoin in general, particularly for things like your CouchDB application or front-ends in general.
Seriously: scraping is a shitty hack that breaks easily and takes forever to get just right, esp. with JS. Bitcoin internally might not need more than very basic key->value store, but all of the applications have a need for it.

I poked around in the code and I saw references to LevelDB, is it using both SQLite and LevelDB? The reason I mentioned Pouch was because they maintain indexes on top of LevelDB and the PouchDB people thought it would be a fairly straight-forward port if I wanted to use it as LevelDB abstraction layer. However, there seems to be plenty of generic abstractions being created for LevelDB....
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by domob »

indolering wrote:
domob wrote: I added a hook that gets called whenever the best chain's head changes, and using boost::condition_variable's waiting threads can get notified about this to process the change. I also implemented "asynchronous" RPC routines that spawn a new thread for their processing, so that they can block until the hook triggers and don't halt the whole RPC server (other RPC calls are possible in the mean time and also an arbitrary number of such waiting calls can co-exist).
I was planning on creating SQLite triggers, that sounded easier. However, this is much better, I <3 REST. I'm guessing you just pass a URI as part of the original call?
Not sure what you mean here. You perform a JSON-RPC method call to the server, and the call blocks until the game state changes and only then returns a result (the new game state). I've never played around with REST.
indolering wrote:
domob wrote: See my pull request at https://github.com/chronokings/huntercoin/pull/11. I also believe this could be a useful addition for Namecoin and Bitcoin in general, particularly for things like your CouchDB application or front-ends in general.
Seriously: scraping is a shitty hack that breaks easily and takes forever to get just right, esp. with JS. Bitcoin internally might not need more than very basic key->value store, but all of the applications have a need for it.

I poked around in the code and I saw references to LevelDB, is it using both SQLite and LevelDB? The reason I mentioned Pouch was because they maintain indexes on top of LevelDB and the PouchDB people thought it would be a fairly straight-forward port if I wanted to use it as LevelDB abstraction layer. However, there seems to be plenty of generic abstractions being created for LevelDB....
I'm not sure here. I definitely know that libcoin uses SQLite3 for its blockchain and also the name database, and I believe it uses Berkeley DB for the wallet (as does Bitcoin), although it seems to be planned to implement a new wallet based also on SQLite3. LevelDB is used in the "newer" Bitcoin code, but I'm not sure if libcoin also uses it (since it has its own blockchain storage, AFAIK).

With respect to Huntercoin/Namecoin, it only uses Berkeley DB as old Bitcoin versions did (at least I think so).
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Re: [ANN] libcoin rebase attempt

Post by virtual_master »

I appreciate very much your work on the rebase.
Unfortunately I cannot say very much helpful about this but I will test it when it is so far. :)
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] libcoin rebase attempt

Post by khal »

Fix testnet POW ChainID check :
https://github.com/khalahan/libcoin/com ... ointestnet

Blocks after 22726 are now accepted.
I'm still download the remaining blockchain (on block 27500 for now).
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: [ANN] libcoin rebase attempt

Post by khal »

Full blocks (34714) are now downloaded ! :)

Next steps are to test all this, mining included, which requires adding the testnet difficulty adjustment (I didn't see it in the bitcoin testnet code, strange).

Edit: code is there : https://github.com/khalahan/libcoin/com ... ointestnet
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

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

Re: [ANN] libcoin rebase attempt

Post by biolizard89 »

khal wrote:Full blocks (34714) are now downloaded ! :)

Next steps are to test all this, mining included, which requires adding the testnet difficulty adjustment (I didn't see it in the bitcoin testnet code, strange).
Nice work, this is good progress.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

tosh0
Posts: 43
Joined: Sat Mar 22, 2014 6:48 pm

Re: [ANN] libcoin rebase attempt

Post by tosh0 »

is multisig implemented or up to what btc version is this updated?
NMC: more stable than BTC!

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

Re: [ANN] libcoin rebase attempt

Post by indolering »

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.

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?
DNS is much more than a key->value datastore.

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

Re: [ANN] libcoin rebase attempt

Post by domob »

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.)
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.
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: [ANN] libcoin rebase attempt

Post by phelix »

sounds good :)
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply