Bitcoin Forum
May 09, 2024, 03:58:21 AM *
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)
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
November 19, 2013, 12:26:53 AM
 #41

Hi! The instructions are here:

http://libbitcoin.dyne.org/obelisk-setup.html

But you can also use a public Obelisk server as listed here:

http://libbitcoin.dyne.org/servers.html

(some might be down but after the crowd funding we are going to setup some nice stable servers for people)

The config file for sx is in PREFIX/share/sx/sx.cfg. Copy this to ~/.sx.cfg (PREFIX is usually /usr/local/share/)

You can install sx, obelisk and everything using:

wget http://sx.dyne.org/install-sx.sh
sudo bash install-sx.sh

Wolf0, not sure why you get that?

jago, everything works now?
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
1715227101
Hero Member
*
Offline Offline

Posts: 1715227101

View Profile Personal Message (Offline)

Ignore
1715227101
Reply with quote  #2

1715227101
Report to moderator
oys
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
November 19, 2013, 06:03:17 AM
Last edit: November 19, 2013, 06:13:32 AM by oys
 #42

This is absolutely awesome. There are so many usecases for this. The one I am currently trying to solve is how to quickly fetch the history associated with an address.

I am running my own obelisk server which looks to be working, but the history command does not return anything even after letting it run for several minutes.

bci-history works great, but relies on trusting blockchain.info from what I understand.

Is my understanding correct that sx history should return a value within a couple of seconds at most, or does it parse the entire blockchain?

-----

Edit: to answer my own question, it looks like I was trying to query a public obelisk server since that's the default. Reading the documentation and adding service = "tcp://localhost:9091" to ~/.sx.cfg fixed things.
rbdrbd
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250



View Profile
November 24, 2013, 02:38:02 PM
 #43

Just got sx built under Ubuntu, thanks! Just wondering how portable 'sx' is to windows? Do I need cygwin, or is it possible to compile with VC++? Any build instructions anywhere (or pre-built binaries)?
jago25_98
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 24, 2013, 03:38:31 PM
 #44

Could really do with an RPM...

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
November 24, 2013, 04:55:28 PM
 #45

Just got sx built under Ubuntu, thanks! Just wondering how portable 'sx' is to windows? Do I need cygwin, or is it possible to compile with VC++? Any build instructions anywhere (or pre-built binaries)?

never done it, but when our infrastructure is more setup (after crowd funding) we will be deploying/testing/making builds.
rbdrbd
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250



View Profile
November 24, 2013, 08:33:23 PM
 #46

Just got sx built under Ubuntu, thanks! Just wondering how portable 'sx' is to windows? Do I need cygwin, or is it possible to compile with VC++? Any build instructions anywhere (or pre-built binaries)?

never done it, but when our infrastructure is more setup (after crowd funding) we will be deploying/testing/making builds.

The big challenge for me was to figure out how to use sx in the first place (I would just run it and it would hang)...so then I figured out obworker/obbalancer.

Since my goal was an automated setup for a Mastercoin-related project (mastercoind) that depends on 'sx', I made a script to allow for this (thats why some of the paths may reference mastercoind). You're welcome to use any of this code, if you find it helpful....it sure allows for more of an "out of the box" setup of everything:

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

Activity: 1232
Merit: 1076


View Profile
November 24, 2013, 09:54:12 PM
 #47

oh this is wicked! this is exactly what I wanted! can I include them in the project?
rbdrbd
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250



View Profile
November 24, 2013, 10:35:01 PM
 #48

oh this is wicked! this is exactly what I wanted! can I include them in the project?

Yes, absolutely (that was my goal). Modify as needed and go for it! Then I can pull them out of mastercoind. Smiley

I really need to get sx working on windows as well... let me spend a bit of time and look into it.
jago25_98
Hero Member
*****
Offline Offline

Activity: 900
Merit: 1000


Crypto Geek


View Profile WWW
November 25, 2013, 12:00:12 AM
 #49

Couldn't get it to build on fedora.... could do with a rpm...

Just got sx built under Ubuntu, thanks! Just wondering how portable 'sx' is to windows? Do I need cygwin, or is it possible to compile with VC++? Any build instructions anywhere (or pre-built binaries)?

never done it, but when our infrastructure is more setup (after crowd funding) we will be deploying/testing/making builds.

Bitcoiner since the early days. Crypto YouTube Channel: Trading Nomads | Analyst | News Reporter | Bitcoin Hodler | Support Freedom of Speech!
rbdrbd
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250



View Profile
November 25, 2013, 02:29:06 AM
 #50

and building on windows looks like it will be a LOT of work. cygwin may be a good first step, as it has g++ 4.7 I believe...but from what I understand of it, there's still a bunch of work that has to happen to the Makefiles, etc. A native windows port (using vc++) would be even more work.
mikeg
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
November 30, 2013, 11:56:39 AM
 #51

Is there a way to generate a new seed/12-word mnemonic with dice rolls?
Hawkix
Hero Member
*****
Offline Offline

Activity: 531
Merit: 505



View Profile WWW
November 30, 2013, 01:18:24 PM
 #52

You can always roll enough times to generate at least 256-bit entropy, form it as e.g. string (1536123 ... ) and hash it.

Donations: 1Hawkix7GHym6SM98ii5vSHHShA3FUgpV6
http://btcportal.net/ - All about Bitcoin - coming soon!
davout
Legendary
*
Offline Offline

Activity: 1372
Merit: 1007


1davout


View Profile WWW
November 30, 2013, 01:26:40 PM
 #53

Is there a way to generate a new seed/12-word mnemonic with dice rolls?

http://world.std.com/~reinhold/diceware.html

mikeg
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
November 30, 2013, 03:11:53 PM
 #54

Is there a way to generate a new seed/12-word mnemonic with dice rolls?

http://world.std.com/~reinhold/diceware.html

I'm not looking to generate a private key. I'm trying to create a libbitcoin seed and the associated deterministic wallet from the dice rolls. The sx code that generates random seeds is in https://github.com/spesmilo/libbitcoin/blob/master/src/deterministic_wallet.cpp

Code:
void deterministic_wallet::new_seed()
{
    constexpr size_t bits_needed = 8 * seed_size / 2;
    ssl_bignum rand_value;
    BN_rand(rand_value, bits_needed, 0, 0);
    bool set_success = set_seed(bignum_hex(rand_value));
    BITCOIN_ASSERT(set_success);
}

Best case would be something like...
Code:
>echo "6132235463233123456522124112542554365223124562346652123111266" | sx newseed | sx mnemonic
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 02, 2013, 04:24:33 AM
 #55

Use this Python code:

$ python
>>> "%x" % int("".join([str(int(c) - 1) for c in "6132235463233123456522124112542554365223124562346652123111266"]), 6)

Replace the string "613...." with whatever you want. I'm assuming that each digit represents a dice roll from 1 to 6.
mikeg
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 02, 2013, 04:24:01 PM
Last edit: December 02, 2013, 04:45:58 PM by mikeg
 #56

Use this Python code:

$ python
>>> "%x" % int("".join([str(int(c) - 1) for c in "6132235463233123456522124112542554365223124562346652123111266"]), 6)

Replace the string "613...." with whatever you want. I'm assuming that each digit represents a dice roll from 1 to 6.

Thanks - that worked.

I was playing around with libbitcoin/sx using a bash script wrapper to generate offline, electrum compatible wallets.
https://github.com/gehlm/paper-btc
jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
December 03, 2013, 04:35:48 AM
 #57

Amir
Sx is not installing via the bash script on fresh Ubuntu 12.04 64 bit installs

As posted on the sx.dyne page comments this is the result of running the script:

Code:
Error: libconfig++-dev is not installed!

Run the following command:

  $ sudo apt-get install git build-essential autoconf libtool libboost-all-dev pkg-config libcurl4-openssl-dev libleveldb-dev libzmq-dev libconfig++-dev libncurses5-dev


However all these libs are installed and the further attempts to install from the bash script just result in this message again.


What is the fix; I saw it methioned in this thread but the "algo in code" fix was ambigous at best.

Also how can we point sx at alt chains?
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1076


View Profile
December 03, 2013, 03:24:11 PM
 #58

What is the output of:

$ dpkg -s libconfig++-dev

?

thanks
RoxxR
Full Member
***
Offline Offline

Activity: 208
Merit: 148


View Profile
December 03, 2013, 04:33:03 PM
 #59

Any windows binaries available? Or simple build instructions?
jcrubino
Member
**
Offline Offline

Activity: 83
Merit: 10


View Profile
December 03, 2013, 05:03:21 PM
 #60

What is the output of:

$ dpkg -s libconfig++-dev

?

thanks


Code:
main@computer:~$ dpkg -s libconfig++-dev
Package `libconfig++-dev' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
main@computer:~$ sudo apt-get install libconfig++-dev
[sudo] password for main:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libconfig++8-dev' instead of 'libconfig++-dev'
libconfig++8-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
main@computer:~$

Thank you Amir.
You contributions to the bitcoin community are always among the best.
I am looking forward to using the darkwallet stack in production for not so dark things.... that said it would be nice if DarkWallet had a less ominous moniker.

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!