[ANN] libcoin rebase attempt

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

Re: [ANN] libcoin rebase attempt

Post by domob »

Wow, great! Yes, presumably libcoin implements testnet difficulty calculation as per Bitcoin (but I've not checked it out). So maybe we should just start off with a fresh chain for the libcoin testnet? This would fix the too-high difficulty issue at the same time. Of course it would not allow us to test for 100% compatibility between both clients on the test net, but I think it would already be great to have something for testing out the basics without real coins.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

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

Re: [ANN] libcoin rebase attempt

Post by biolizard89 »

khal wrote:- find bitcoin features & patches that should not be used in namecoin
I assume we will re-add them in the future? Most of the new Bitcoin features/patches since 0.3.x would be useful in Namecoin.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

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

Re: [ANN] libcoin rebase attempt

Post by khal »

biolizard89 wrote:
khal wrote:- find bitcoin features & patches that should not be used in namecoin
I assume we will re-add them in the future? Most of the new Bitcoin features/patches since 0.3.x would be useful in Namecoin.
Yes. Some will be activated on the next fork.
domob wrote:Wow, great! Yes, presumably libcoin implements testnet difficulty calculation as per Bitcoin (but I've not checked it out). So maybe we should just start off with a fresh chain for the libcoin testnet? This would fix the too-high difficulty issue at the same time. Of course it would not allow us to test for 100% compatibility between both clients on the test net, but I think it would already be great to have something for testing out the basics without real coins.
Having support for existing testnet (to fix all what is not working yet) + a namecoin testnet2 would be the best I guess.

I've push a set of fixes to make testnet run after block 4032. My node has updated until block 22725.
Some new errors now :

Code: Select all

12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block ebdd671a8739da235db5
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED

12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block 60e0817bdd64323a7e93
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED

12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block 2733d90bdd0972ad3187
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid

12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED
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

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

Re: [ANN] libcoin rebase attempt

Post by domob »

I've not yet heard back from Michael, so I'll start implementing things in my own repo for now and use "stock" libcoin. It will be easy to move the files later if Michael is fine with having support for name_* and so on in libcoin itself.

@khal: Please let me know in case you already started with the name_* commands during your work so that it is not duplicate. If not, I'll start with them as soon as possible.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

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

Re: [ANN] libcoin rebase attempt

Post by khal »

domob wrote:I've not yet heard back from Michael, so I'll start implementing things in my own repo for now and use "stock" libcoin. It will be easy to move the files later if Michael is fine with having support for name_* and so on in libcoin itself.

@khal: Please let me know in case you already started with the name_* commands during your work so that it is not duplicate. If not, I'll start with them as soon as possible.
I moved my changes to the branch "namecointestnet".
As saif by PM, I'll don't plan to work on name_*, only on testnet things that'll help us to test libcoin.
Once namecoin testnet is fully supported, I'll add namecoin testnet2. We'll need to chose what feature will be supported (testnet difficulty reset at least, block upgrade with quorum/majority, etc).
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 »

khal wrote: Some new errors now :

Code: Select all

12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block ebdd671a8739da235db5
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED
12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block 60e0817bdd64323a7e93
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED
12:44:49 DEBUG(node) [BlockFilter.cpp:40 virtual bool BlockFilter::operator()(Peer*, Message&)] received block 2733d90bdd0972ad3187
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: Aux POW parent has our chain ID
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: CheckProofOfWork() : AUX POW is not valid
12:44:49 ERROR(node) [util.cpp:335 error] ERROR: ProcessBlock() : CheckProofOfWork FAILED
In file src/coin/AuxPow.cpp, line 27, this check must be disabled for testnet :

Code: Select all

    if (parentBlock.getVersion() / BLOCK_VERSION_CHAIN_START == nChainID)
        return error("Aux POW parent has our chain ID");
But I don't know how to get the chain name from there (something like "&_blockChain.chain() != &namecointest" like what is done in src/coinChain/NodeRPC.cpp for "getinfo").
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

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

Re: [ANN] libcoin rebase attempt

Post by phelix »

IMHO the GUI should be implemented in a higher level language (Python).
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 »

phelix wrote:IMHO the GUI should be implemented in a higher level language (Python).
Not sure about the further-away future, but for now I'll try to get libcoin working as a node and RPC daemon only anyway. I like the idea though to use loose coupling between the node and UI, possibly even with a separate process using just the RPC (or an extended RPC - I've just implemented a method in Huntercoin that can be used to wait for new blocks coming in in order to update front-ends in real-time; we could do something like this also for updating UIs).

Personally I would probably not use Python but instead either C++ with Qt (if we want to re-use parts of the existing UI) or Gtk+/Gtkmm for a rewrite, but that's just a matter of taste. You or others are more than welcome to implement a high-level UI in Python. I will add RPC routines as necessary. :)

BTW, I've pushed some initial code to my repository. It is just an autotools build system plus the libcoind.cpp main routine copied over, but now I can start adapting it to Namecoin from there on.
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: Not sure about the further-away future, but for now I'll try to get libcoin working as a node and RPC daemon only anyway. I like the idea though to use loose coupling between the node and UI, possibly even with a separate process using just the RPC
This is how it should have been done originally.
domob wrote: (or an extended RPC - I've just implemented a method in Huntercoin that can be used to wait for new blocks coming in in order to update front-ends in real-time; we could do something like this also for updating UIs).
Can I ask what you did and how? I would really like to have some sort of generic trigger system I can register with to receive updates. I know that PouchDB uses LevelDB for it's Node implementation.
domob wrote: Personally I would probably not use Python but instead either C++ with Qt (if we want to re-use parts of the existing UI) or Gtk+/Gtkmm for a rewrite, but that's just a matter of taste. You or others are more than welcome to implement a high-level UI in Python. I will add RPC routines as necessary. :)
Thank you! It would be nice if these sorts of extensions to the RPC library made their way back to Bitcoin so others could benefit.
domob wrote: BTW, I've pushed some initial code to my repository. It is just an autotools build system plus the libcoind.cpp main routine copied over, but now I can start adapting it to Namecoin from there on.
Great, keep us updated!
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: (or an extended RPC - I've just implemented a method in Huntercoin that can be used to wait for new blocks coming in in order to update front-ends in real-time; we could do something like this also for updating UIs).
Can I ask what you did and how? I would really like to have some sort of generic trigger system I can register with to receive updates. I know that PouchDB uses LevelDB for it's Node implementation.
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).

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.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

Post Reply