Bitcoin Forum
May 09, 2024, 02:37:34 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 [4] 5 6 7 8 9 10 »  All
  Print  
Author Topic: sx command line utilities - Empower The Sysadmin With Bitcoin Tools  (Read 240149 times)
flatfly
Legendary
*
Offline Offline

Activity: 1078
Merit: 1016

760930


View Profile
December 03, 2013, 06:22:42 PM
 #61

Any windows binaries available? Or simple build instructions?

Just check out page 3 of this thread. The short answer is, not at this time, unfortunately.
@genjix: Many thanks for your efforts.
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715265454
Hero Member
*
Offline Offline

Posts: 1715265454

View Profile Personal Message (Offline)

Ignore
1715265454
Reply with quote  #2

1715265454
Report to moderator
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 04, 2013, 02:19:42 AM
 #62

investigating the issue. will deploy a vps to test. if you want to skip that step for now, you can delete change DEPENDENCIES="" in the install script (it will skip the dependencies check).
jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
December 04, 2013, 04:03:14 AM
 #63

Thanks
I can maintain debian / buntu docker files for sx / oblisk etc once I understand the dependencies in more depth.

jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
December 04, 2013, 04:16:13 AM
 #64

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<boost::asio::io_service&, std::_Bind<std::_Mem_fn<void (libbitcoin::getx_responder::*)(const std::error_code&, const libbitcoin::transaction_type&, std::shared_ptr<libbitcoin::channel>)>(libbitcoin::getx_responder*, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptr<libbitcoin::channel>)> >)'
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<boost::asio::io_service&, std::_Bind<std::_Mem_fn<void (libbitcoin::getx_responder::*)(const std::error_code&, const libbitcoin::transaction_type&, std::shared_ptr<libbitcoin::channel>)>(libbitcoin::getx_responder*, std::_Placeholder<1>, std::_Placeholder<2>, std::shared_ptr<libbitcoin::channel>)> >' to 'int'
make[1]: *** [getx_responder.lo] Error 1
make[1]: Leaving directory `/usr/local/src/libbitcoin-git/src'
make: *** [all-recursive] Error 1


genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 05, 2013, 06:07:34 PM
Last edit: December 05, 2013, 07:21:37 PM by genjix
 #65

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.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 05, 2013, 07:23:07 PM
 #66

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://bitcointalk.org/index.php?topic=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.
gluk64
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
December 08, 2013, 09:54:57 PM
 #67

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.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 09, 2013, 07:46:41 AM
 #68

This looks like a problem with LevelDB. Is your platform packaging a recent version of LevelDB?
gluk64
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
December 09, 2013, 10:18:47 AM
 #69

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.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 14, 2013, 03:20:46 AM
 #70

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
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 14, 2013, 03:35:06 AM
 #71

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.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 14, 2013, 09:38:47 PM
 #72

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.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 16, 2013, 04:44:24 PM
 #73

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.
phillipsjk
Legendary
*
Offline Offline

Activity: 1008
Merit: 1001

Let the chips fall where they may.


View Profile WWW
December 16, 2013, 11:32:25 PM
 #74

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?

James' OpenPGP public key fingerprint: EB14 9E5B F80C 1F2D 3EBE  0A2F B3DE 81FF 7B9D 5160
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 17, 2013, 02:38:05 PM
 #75

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.
jbis1
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
December 18, 2013, 02:52:42 AM
 #76

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.
qrius1111
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
January 01, 2014, 12:04:57 PM
 #77

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 <algorithm> 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?
qrius1111
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
January 01, 2014, 12:32:08 PM
Last edit: January 01, 2014, 12:44:28 PM by qrius1111
 #78

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
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
January 01, 2014, 01:23:49 PM
 #79

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.
qrius1111
Newbie
*
Offline Offline

Activity: 30
Merit: 0


View Profile
January 01, 2014, 10:34:40 PM
 #80

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?
Pages: « 1 2 3 [4] 5 6 7 8 9 10 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!