chromaway / ngcccbase

next-gen colored coin client base
MIT License
85 stars 46 forks source link

pycoin mismatch #161

Open israellevin opened 10 years ago

israellevin commented 10 years ago

After installing a new version with python setup.py develop (also happens with python setup.py install) and running ngccc-cli.py I get the following error:

Traceback (most recent call last):
  File "./ngccc-cli.py", line 16, in <module>
    from ngcccbase.wallet_controller import WalletController
  File "/root/iridis/color/ngcccbase/ngcccbase/wallet_controller.py", line 9, in <module>
    from coindb import CoinQuery
  File "/root/iridis/color/ngcccbase/ngcccbase/coindb.py", line 17, in <module>
    from txcons import RawTxSpec
  File "/root/iridis/color/ngcccbase/ngcccbase/txcons.py", line 13, in <module>
    import pycoin_txcons
  File "/root/iridis/color/ngcccbase/ngcccbase/pycoin_txcons.py", line 11, in <module>
    from pycoin.tx import SecretExponentSolver
ImportError: cannot import name SecretExponentSolver

It seems that pycoin.tx no longer has this SecretExponentSolver. Two possible workarounds are commenting out the import and the part that uses it, or downgrading to an older pycoin version, like so:

pip install https://pypi.python.org/packages/source/p/pycoin/pycoin-0.26.tar.gz
wozz commented 10 years ago

@israellevin can you test my fix? I'm not sure this should be merged though if the rest of the code is based off the older pycoin. I'm still working on getting everything running, so I don't have an env to test with yet.

wozz commented 10 years ago

nevermind... it's going to take quite a bit to update the whole code base to run with the new pycoin version. I'm not too familiar with either project though, so it may take me a while to get it running.

israellevin commented 10 years ago

Cool. I'll be happy to test when you have something stable.

wozz commented 10 years ago

you can look at my branch... I made some more updates. It runs now, but will need updating by someone that understands the code more to make it completely work.

I also noticed that it looks like running from a local bitcoind appears to be broken, unless there's a guide on how to configure that properly.

killerstorm commented 10 years ago

I've simply pinned pycoin version to 0.23 in setup.py. Following each release is fool's errand anyway, these libs change a bit too often.

killerstorm commented 10 years ago

running from a local bitcoind appears to be broken

It very well might be, for me the priority is to make the default configuration working.

But it's easy to run chromanode on your own machine so it will work with your local bitcoind. Then you can instruct it to use your chromanode instance:

,/ngccc-cli.py setval chromanode_url http://localhost:8080/

This is preferred for testing since this way you can test the whole stack (including SPV implementation).

wozz commented 10 years ago

Is there any documentation on how to run chromanode?

As for the libraries, it would be nice if they at least kept backwards compatibility while updating. I may continue trying to update it as a way to start understanding how the code works though.

killerstorm commented 10 years ago
./chromanode.py 8081 testnet

where 8081 is port, and testnet is needed if you want testnet mode. It then connects to local bitcoind and starts downloading block headers. It might take like 20 minutes, but it is kinda usable even if not fully sync'd.