Pages:
Author

Topic: libbitcoin - page 7. (Read 92487 times)

hero member
Activity: 483
Merit: 551
June 25, 2012, 05:12:40 PM
Ubuntu 12.10 is still 4 months away. Also, many people (like me) will stay on 12.04 because this is a release with long term support.
legendary
Activity: 1232
Merit: 1076
June 25, 2012, 03:48:37 PM
The problem is that all the Linux distributions are moving towards g++ 4.7 which implements the C++11 standard fully and were complaining about compilation problems.

It turns out that g++ 4.6 implements the C++11 incorrectly which causes an incompatibility for me (that I had to workaround using macros). I eventually said whatever and decided to fully transition to 4.7 as it will become the norm in the new Ubuntu which is being released in ~2 months time.

More info:
http://gcc.gnu.org/projects/cxx0x.html
http://stackoverflow.com/questions/7214623/rule-for-lambda-capture-variable
https://llvm.org/viewvc/llvm-project/libcxx/trunk/include/system_error?view=markup&pathrev=153194 (incorrect noexcept specifier in 4.6)

I plan to make Ubuntu builds again when the new version (Quantal) is released.
legendary
Activity: 1232
Merit: 1076
June 13, 2012, 09:00:36 AM
I'm putting a bounty down for the creation of a QT client based upon libbitcoin.  (must be judged to be 'beta' by me).

10btc.

Example quick text-interface client for anyone who wants to have a go at trying to make a Qt version: https://gitorious.org/libbitcoin/libbitcoin/blobs/master/tests/crap/main.cpp
legendary
Activity: 1222
Merit: 1016
Live and Let Live
June 10, 2012, 08:38:04 PM
I'm putting a bounty down for the creation of a QT client based upon libbitcoin.  (must be judged to be 'beta' by me).

10btc.
legendary
Activity: 1232
Merit: 1076
June 09, 2012, 09:31:06 PM
- serialisation has changed. more intuitive and uses native c++ features to support extendability for saving and loading of bitcoin messages.
- async_service now provides access to underlying io_service ptr which is now the requirement for services.
legendary
Activity: 1232
Merit: 1076
June 06, 2012, 11:39:31 AM
legendary
Activity: 1232
Merit: 1076
June 06, 2012, 09:14:53 AM
OK, seems like Ubuntu Quantal uses g++ 4.7 (release date is October) and many distributions are phasing in the new toolchain. I think it's because g++ 4.7 implements the vast majority of the new C++ standard so it's being fast tracked in.

I'm upgrading to a system with 4.7 so hopefully I should be get it working with the new compiler now.
hero member
Activity: 731
Merit: 503
Libertas a calumnia
June 04, 2012, 12:36:16 AM
Berkeley DB, as it's being used in the existing bitcoin client, is a perfect example of why not to use NoSQL.
Could you please elaborate...?
legendary
Activity: 1288
Merit: 1080
June 03, 2012, 07:26:17 AM
Berkeley DB, as it's being used in the existing bitcoin client, is a perfect example of why not to use NoSQL.

Has Satoshi ever explained his choice for BerkeleyDB instead of a SQL-based relationnal db?
legendary
Activity: 1232
Merit: 1076
April 30, 2012, 04:06:54 AM
same problem here with GCC4.7 Tongue

GCC 4.7 has a bug in it. http://stackoverflow.com/questions/4940259/c11-lambdas-require-capturing-this-to-call-static-member-function

I need to get around to installing that compiler and adding a workaround for that. GCC 4.6 is fine.

No idea why Linux distributions like Arch are including an unstable compiler!!
full member
Activity: 237
Merit: 102
1 Pedro 3:15-16 (DHH)
April 27, 2012, 07:00:34 PM
same problem here with GCC4.7 Tongue
legendary
Activity: 1232
Merit: 1076
March 17, 2012, 02:39:26 PM
client with a single private key, http://gitorious.org/libbitcoin/libbitcoin/blobs/master/tests/crap/main.cpp
(bad hackjob code for testing)
legendary
Activity: 1232
Merit: 1076
February 18, 2012, 03:56:03 AM
Yes, that's very weird. It should be fine connecting to localhost. Have you got an IP address I can connect to your bitcoind? It could be that you're running an old version of bitcoin (the version packet has changed since older versions). If that's the case then trying the latest should work.

I'm on Skype as zgenjix or Freenode IRC in #bitcoinconsultancy as genjix

Ring ring, live support. How can I help you sir?
hero member
Activity: 742
Merit: 500
February 17, 2012, 07:19:56 PM
are you using the latest repos from http://gitorious.org/libbitcoin/ ?

If so can you paste the error here (if different from above). It looks like you're using a libbitcoin from a few days ago but latest python bindings.

Updating to the newest git head for libbitcoin seems to have fixed the last error. I don't know how I ended up with versions that didn't match considering I literally installed the system fresh last night and checked out the projects one after the other, but w/e.

Weeee!

Code:
(env)[user@silo onion-coin]$ python -i
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bitcoin
>>> dir(bitcoin)
['_1', '_2', '_3', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '_bitcoin', 'acceptor', 'address', 'address_to_short_hash', 'bdb_blockchain', 'bind', 'block', 'block_info', 'block_locator', 'block_locator_indices', 'block_reward', 'block_status', 'block_value', 'block_work', 'blockchain', 'bytes_from_pretty', 'channel', 'coin_price', 'coinbase_maturity', 'coinbase_script', 'data_chunk', 'decode_base58', 'elliptic_curve_key', 'encode_base58', 'error', 'error_code', 'exporter', 'generate_merkle_root', 'generate_ripemd_hash', 'generate_sha256_checksum', 'generate_sha256_hash', 'genesis_block', 'get_address', 'get_blocks', 'get_data', 'handshake', 'hash_block_header', 'hash_digest', 'hash_digest_from_pretty', 'hash_transaction', 'header', 'indices_list', 'input_point', 'inventory', 'inventory_list', 'inventory_type', 'inventory_vector', 'is_coinbase', 'magic_value', 'max_bits', 'max_money', 'max_target', 'network', 'network_address', 'network_address_list', 'null_hash', 'null_short_hash', 'opcode', 'opcode_to_string', 'operation', 'operation_stack', 'output_point', 'output_point_list', 'parse_script', 'payment_type', 'ping', 'previous_output_is_null', 'public_key_to_address', 'readjustment_interval', 'reward_interval', 'satoshi_exporter', 'save_script', 'script', 'setup_bdb_blockchain', 'short_hash', 'short_hash_from_pretty', 'short_hash_wrapper', 'sighash', 'string_to_opcode', 'target_spacing', 'target_timespan', 'total_output_value', 'transaction', 'transaction_input', 'transaction_input_list', 'transaction_list', 'transaction_output', 'transaction_output_list', 'verack', 'version']

So I'm trying to use your tutorials, but they aren't working for me.  I'm not running bitcoind locally, so I think that might be why.

Both tutorial.py and first500.py give this:

Code:
$ python tutorial.py
s: version (112 bytes)
Bad header received.

For tutorial.py, I changed self.net.connect to my system running bitcoind and also I tried changing vers.address_you.ip.

For first500.py, I changed hs.connect to my system, but it also failed.


I am trying to build a lightweight tool for querying nodes to get their version.  Right now, one of my systems has all of the tor hidden services added as nodes, but many of those services are offline and it takes forever trying to connect to all of them.  I was hoping to use PyTorCtl and libbitcoin to map all of the addresses and then return versions for all of the nodes that are up.  I could then drop this list of nodes that I know to be online and running current versions into my bitcoin.conf.  From there it wouldn't be too much work to make it into a bot that updates the wiki page.

It seems to connect, but the handshake is failing.
legendary
Activity: 1232
Merit: 1076
February 17, 2012, 05:39:51 PM
are you using the latest repos from http://gitorious.org/libbitcoin/ ?

If so can you paste the error here (if different from above). It looks like you're using a libbitcoin from a few days ago but latest python bindings.
hero member
Activity: 742
Merit: 500
February 17, 2012, 05:20:09 PM
I would stay away from the packages for the time being. Once I make a 1.0 release this month then I will update them.

If anyone manages to get it to build, then build instructions would be much appreciated. I wrote these:
https://bitcoinconsultancy.com/wiki/Build_libbitcoin
I installed from the package first, and when that didn't work I used the guide at bitcoinconsultancy.  While that works, I still can't get the python bindings built. I'm flying blind though since you don't have any docs for the python module.
legendary
Activity: 1232
Merit: 1076
February 17, 2012, 04:28:23 PM
[libbitcoin] First 500 blocks
libbitcoin is a toolkit based library and can be leveraged with different design patterns depending on the task or application. Previously we examined using libbitcoin using an active object pattern. In this example we will use an imperative style program to connect to a bitcoin node and download the first 500 blocks.
legendary
Activity: 1232
Merit: 1076
February 17, 2012, 04:28:00 PM
hero member
Activity: 742
Merit: 500
February 17, 2012, 02:01:20 PM
Add these 2 lines to the end of your /etc/apt/sources.list
Code:
deb http://ppa.launchpad.net/zgenjix/libbitcoin/ubuntu oneiric main
deb-src http://ppa.launchpad.net/zgenjix/libbitcoin/ubuntu oneiric main

I think this should be "http://ppa.launchpad.net/genjix" without a "z"

I also added it to "/etc/apt/sources.list.d/libbitcoin.list" instead of "/etc/apt/sources.list"

Now lets see if I can get the python bindings built Smiley



Sad

Code:
[user@silo python-bitcoin]$ make
mkdir -p bitcoin
g++ -fPIC -Wall -ansi `pkg-config --cflags libbitcoin` -I/usr/include/python2.7  -c main.cpp -o main.o
In file included from /home/user/usr/include/bitcoin/exporter.hpp:7:0,
                 from /home/user/usr/include/bitcoin/network/channel.hpp:17,
                 from /home/user/usr/include/bitcoin/bitcoin.hpp:8,
                 from main.cpp:4:
/home/user/usr/include/bitcoin/constants.hpp:37:75: warning: missing braces around initializer for ‘std::array::value_type [32] {aka unsigned char [32]}’ [-Wmissing-braces]
/home/user/usr/include/bitcoin/constants.hpp:39:62: warning: missing braces around initializer for ‘std::array::value_type [20] {aka unsigned char [20]}’ [-Wmissing-braces]
main.cpp: In member function ‘void handshake_wrapper::start(boost::python::api::object)’:
main.cpp:288:61: error: no matching function for call to ‘libbitcoin::handshake::start(pyfunction)’
main.cpp:288:61: note: candidate is:
/home/user/usr/include/bitcoin/network/handshake.hpp:31:10: note: void libbitcoin::handshake::start(libbitcoin::channel_ptr, libbitcoin::handshake::handshake_handler)
/home/user/usr/include/bitcoin/network/handshake.hpp:31:10: note:   candidate expects 2 arguments, 1 provided
main.cpp: In member function ‘void handshake_wrapper::ready(channel_wrapper, boost::python::api::object)’:
main.cpp:299:14: error: ‘class libbitcoin::handshake’ has no member named ‘ready’
/home/user/usr/include/boost/system/error_code.hpp: At global scope:
/home/user/usr/include/boost/system/error_code.hpp:214:35: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/system/error_code.hpp:215:35: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/system/error_code.hpp:216:35: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/asio/error.hpp:244:45: warning: ‘boost::asio::error::system_category’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/asio/error.hpp:246:45: warning: ‘boost::asio::error::netdb_category’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/asio/error.hpp:248:45: warning: ‘boost::asio::error::addrinfo_category’ defined but not used [-Wunused-variable]
/home/user/usr/include/boost/asio/error.hpp:250:45: warning: ‘boost::asio::error::misc_category’ defined but not used [-Wunused-variable]
make: *** [default] Error 1
hero member
Activity: 742
Merit: 500
February 17, 2012, 02:36:51 AM
So I'm running debian 6.0.4 (squeeze) and trying to get this installed for a small project.

I'm just going to install it on an ubuntu system instead, but figured I would post my error log anyway.

http://pastie.org/private/3jnuenhclxaf4f90wpbyfw


https://bitcoinconsultancy.com/wiki/Build_libbitcoin

Your g++ is outdated.
Yeah I noticed your requirements have higher requirements for libboost and g++.  I needed to upgrade my ubuntu server anyways, so I'm building it on there now. Installing boost is sure taking a while.
Pages:
Jump to: