Pages:
Author

Topic: sx command line utilities - Empower The Sysadmin With Bitcoin Tools - page 7. (Read 240135 times)

newbie
Activity: 50
Merit: 0
I changed the first line of Makefile.am.

Old:
Code:
AM_CPPFLAGS = ${libbitcoin_CFLAGS} ${libwallet_CFLAGS}

New:
Code:
AM_CPPFLAGS = ${libbitcoin_CFLAGS} ${libwallet_CFLAGS} -DENABLE_TESTNET

Then compile as normal (./configure; make; sudo make install). Now mktx doesn't complain when I create a transaction with an address that begins with m. I have not tested beyond that.
newbie
Activity: 37
Merit: 0
i changed install-sx.sh to compile for testnet, but it seems not to work.

Code:
./configure  --enable-testnet --enable-leveldb --prefix $INSTALL_PREFIX

at github there is a reference to -DENABLE_TESTNET for CFLAGS
https://github.com/spesmilo/sx/issues/9

I dont know C, could you explain what I need to do to have sx enabled for testnet?
newbie
Activity: 30
Merit: 0
yeah i did use install-sx.sh but it had a lot of problems for me. firstly with zeromq then with obelisk. i got it working by downloading these from git then installing manually before running the sx installer again. anyway its working now Smiley

is there a way to check the progress when running the history command?
legendary
Activity: 1232
Merit: 1076
qrius1111 did you use the install-sx.sh script? http://sx.dyne.org/install-sx.sh

I recommend all to use git until next release which is coming soon.
newbie
Activity: 30
Merit: 0
hmm well i got obelisk to install after all, like so:

Code:
$ cd obelisk-master
$ libtoolize --force
$ aclocal
$ autoheader
$ autoreconf -vif
$ ./configure
$ make
$ sudo make install

and now sx has installed too Smiley
newbie
Activity: 30
Merit: 0
i'm trying to install sx. i get close i think but it dies as there is a missing file in obelisk:

Code:
...
checking for libzmq... yes
checking for libconfigxx... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/obelisk/Makefile
config.status: creating src/Makefile
config.status: creating libobelisk.pc
config.status: executing depfiles commands
config.status: executing libtool commands
Making all in include/obelisk
make[1]: Entering directory `/usr/local/src/obelisk-git/include/obelisk'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/src/obelisk-git/include/obelisk'
Making all in src
make[1]: Entering directory `/usr/local/src/obelisk-git/src'
  CXX    message.lo
In file included from message.cpp:1:0:
./../include/obelisk/message.hpp:4:19: fatal error: zmq.hpp: No such file or directory
compilation terminated.
make[1]: *** [message.lo] Error 1
make[1]: Leaving directory `/usr/local/src/obelisk-git/src'
make: *** [all-recursive] Error 1

i'm on debian wheezy. grebit you may have had a similar error?


Also I was unable to build obelisk without making modifications, I get
Quote
In file included from worker/publisher.hpp:4:0,
                 from worker/publisher.cpp:1:
/usr/include/zmq.hpp: In member function ‘zmq::context_t& zmq::context_t::operator=(zmq::context_t&&)’:
/usr/include/zmq.hpp:207:13: error: ‘swap’ is not a member of ‘std’
             std::swap(ptr, rhs.ptr);

Which I fixed by making sure to include in various places in the code.

Now it seems to be all nicely installed so I will have a play Smiley

can you explain what modifications you made to get it working?
newbie
Activity: 50
Merit: 0
I'm getting the following issue when trying to install sx using the install-sx.sh file. I left out earlier output.

Code:
obelisk now installed.
Updating sx...
Current branch master is up to date.
Beginning build process now...
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/bin/bash: /root/missing: No such file or directory
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=c++11... yes
checking whether make supports nested variables... (cached) yes
checking for NcursesW wide-character library... no
checking for Ncurses library... yes
checking for working ncurses/curses.h... no
checking for working ncurses.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libbitcoin... yes
checking for libwallet... no
configure: error: Package requirements (libwallet) were not met:

No package 'libwallet' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libwallet_CFLAGS
and libwallet_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
legendary
Activity: 1232
Merit: 1076
Okay, who added "--enable-testnet" to the libbitcoin-leveldb-git PKGBUILD?  Roll Eyes

Does this imply that there is no way to switch to testnet at run-time?

Sometimes you don't want to risk "real" coins.

Is there a sane way to have both versions installed?

I'm going to add runtime support of testnet in the future.
legendary
Activity: 1008
Merit: 1001
Let the chips fall where they may.
Okay, who added "--enable-testnet" to the libbitcoin-leveldb-git PKGBUILD?  Roll Eyes

Does this imply that there is no way to switch to testnet at run-time?

Sometimes you don't want to risk "real" coins.

Is there a sane way to have both versions installed?
legendary
Activity: 1232
Merit: 1076
sx now auto creates a config for your user if one doesn't exist.

https://github.com/spesmilo/sx/commit/71eebef3d702507643058863206a79a047623c7a

next goal is support for BIP32 deterministic wallets.
legendary
Activity: 1232
Merit: 1076
Thanks to rbdrbd, in Obelisk there are now init.d scripts, setup script and logrotation:

https://github.com/spesmilo/obelisk/tree/master/scripts

Going to be testing these. Would appreciate any feedback to improve them.
legendary
Activity: 1232
Merit: 1076
setup script for actually configuring obworker and obbalancer (as their own user, etc): http://pastebin.com/MWJsaXKY
obbalancer init.d file: http://pastebin.com/43ivabs5
obworker init.d file: http://pastebin.com/MiFfgA3s
obworker log rotation: http://pastebin.com/udJypGSa

There's a setup script, obbalancer init.d script, obworker init.d script and obworker log rotation script.

Questions to everyone:

1. Where should the scripts normally reside on your system? Would the setup script be installed with the package?

2. What's the standard GNU way of distributing them? scripts/? How would I name them?

Thanks.
legendary
Activity: 1232
Merit: 1076
Thanks
I can maintain debian / buntu docker files for sx / oblisk etc once I understand the dependencies in more depth.

just been reading about this. I'm not an admin guy but docker sounds really cool. update any progress you make on this.

we have a wiki: https://wiki.unsystem.net/
let me know your user if you make an account
newbie
Activity: 24
Merit: 0
Thank you, updating leveldb to 1.14.0 and recompiling it worked.

git clone https://code.google.com/p/leveldb/ points to 1.12, that was the problem.
legendary
Activity: 1232
Merit: 1076
This looks like a problem with LevelDB. Is your platform packaging a recent version of LevelDB?
newbie
Activity: 24
Merit: 0
now obelisk doesn't link:
Code:
Making all in include/obelisk
make[1]: Entering directory `/usr/local/src/obelisk-git/include/obelisk'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/src/obelisk-git/include/obelisk'
Making all in src
make[1]: Entering directory `/usr/local/src/obelisk-git/src'
/bin/bash ../libtool --tag=CXX   --mode=link g++  -g -O2 -std=c++11   -o obbalancer balancer/balancer.o balancer/config.o -lobelisk -L/usr/local/lib -lbitcoin -lboost_thread -lboost_system -lboost_regex -lboost_filesystem -lpthread -lleveldb -lcurl   -L/usr/local/lib -lzmq   -lconfig++   
libtool: link: g++ -g -O2 -std=c++11 -o .libs/obbalancer balancer/balancer.o balancer/config.o  /usr/local/src/obelisk-git/src/.libs/libobelisk.so -L/usr/local/lib /usr/local/lib/libbitcoin.so -lboost_thread -lboost_system -lboost_regex -lboost_filesystem -lpthread -lleveldb /usr/lib/i386-linux-gnu/libcurl.so /usr/local/lib/libzmq.so -lconfig++
/usr/local/lib/libbitcoin.so: undefined reference to `snappy::RawCompress(char const*, unsigned int, char*, unsigned int*)'
/usr/local/lib/libbitcoin.so: undefined reference to `snappy::RawUncompress(char const*, unsigned int, char*)'
/usr/local/lib/libbitcoin.so: undefined reference to `snappy::GetUncompressedLength(char const*, unsigned int, unsigned int*)'
/usr/local/lib/libbitcoin.so: undefined reference to `snappy::MaxCompressedLength(unsigned int)'
collect2: error: ld returned 1 exit status
make[1]: *** [obbalancer] Error 1
make[1]: Leaving directory `/usr/local/src/obelisk-git/src'
make: *** [all-recursive] Error 1

snappy is installed.
legendary
Activity: 1232
Merit: 1076
New library for interfacing with Obelisk servers and doing Bitcoin functionality.

Pure Python so library is easily portable to platforms that can run a Python interpreter.

https://bitcointalksearch.org/topic/python-obelisk-pure-python-obelisk-bitcoin-client-side-library-354607

https://github.com/darkwallet/python-obelisk/

See examples/ directory.

This is a collaboration between Pablo Martin's ZMQ/Obelisk implementation, Robert Williamson's blockalchemy library and code from ThomasV's Electrum.

Obelisk is a scalable blockchain query infrastructure. See the setup guide. There is a public server available at 37.139.11.99:9091 but I wouldn't use it for anything production (besides testing).

A pure Python library is great because it can be deployed easily without requiring dependencies. This allows code to be ported across many platforms such as the mobile phone with Kivy, desktops or any platform running Python.

Features:

* Blockchain queries and navigation through Obelisk servers.
* Construct & sign transactions.
* BIP32 hierarchical wallet.
* Traverse the blockchain using a syntax similar to Django ORM / SQL alchemy.

Use cases:

* Website payment backend (store and manage the keys yourself).
* Wallet software.
legendary
Activity: 1232
Merit: 1076
redownload your install-sx.sh script and continue. i've patched it now to work.

you need g++ 4.7 or higher.

http://askubuntu.com/questions/76885/where-can-i-find-a-g-4-7-package

you need to install a newer leveldb also.
member
Activity: 83
Merit: 10
you can delete change DEPENDENCIES="" in the install script (it will skip the dependencies check).

Got further but ended with this:
Code:
make[1]: Entering directory `/usr/local/src/libbitcoin-git/src'
  CXX    getx_responder.lo
In file included from ./../include/bitcoin/network/channel.hpp:22:0,
                 from getx_responder.cpp:3:
./../include/bitcoin/utility/subscriber.hpp:64:1: error: expected unqualified-id before 'using'
In file included from ./../include/bitcoin/transaction_pool.hpp:10:0,
                 from getx_responder.cpp:4:
./../include/bitcoin/blockchain/blockchain.hpp:28:5: error: expected unqualified-id before 'using'
./../include/bitcoin/blockchain/blockchain.hpp:31:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:33:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:36:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:38:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:40:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:43:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:49:13: error: 'fetch_handler' does not name a type
./../include/bitcoin/blockchain/blockchain.hpp:118:9: error: 'fetch_handler_block_header' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:133:9: error: 'fetch_handler_block_header' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:148:9: error: 'fetch_handler_block_transaction_hashes' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:163:9: error: 'fetch_handler_block_transaction_hashes' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:178:9: error: 'fetch_handler_block_height' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:191:36: error: 'fetch_handler_last_height' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:206:9: error: 'fetch_handler_transaction' has not been declared
./../include/bitcoin/blockchain/blockchain.hpp:244:9: error: 'fetch_handler_spend' has not been declared
getx_responder.cpp: In member function 'void libbitcoin::getx_responder::pool_tx(const std::error_code&, const libbitcoin::transaction_type&, const hash_digest&, libbitcoin::channel_ptr)':
getx_responder.cpp:73:41: error: no matching function for call to 'libbitcoin::blockchain::fetch_transaction(const hash_digest&, boost::asio::detail::wrapped_handler)>(libbitcoin::getx_responder*, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptr)> >)'
getx_responder.cpp:73:41: note: candidate is:
./../include/bitcoin/blockchain/blockchain.hpp:205:18: note: virtual void libbitcoin::blockchain::fetch_transaction(const hash_digest&, int)
./../include/bitcoin/blockchain/blockchain.hpp:205:18: note:   no known conversion for argument 2 from 'boost::asio::detail::wrapped_handler)>(libbitcoin::getx_responder*, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptr)> >' to 'int'
make[1]: *** [getx_responder.lo] Error 1
make[1]: Leaving directory `/usr/local/src/libbitcoin-git/src'
make: *** [all-recursive] Error 1


member
Activity: 83
Merit: 10
Thanks
I can maintain debian / buntu docker files for sx / oblisk etc once I understand the dependencies in more depth.

Pages:
Jump to: