Bitcoin Forum
May 04, 2024, 12:42:05 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 240148 times)
gwlloyd
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 22, 2014, 01:12:30 PM
 #161

sorry, I am trying to be helpful, I didnt actually run it with --help I just looked at the install script which clearly shows that it would display info that would help you see that you need to add --testnet .. but seemingly that's not what you're seeing when you actually execute it.


Code:
usage() {
    echo " [+] Install script usage:"
    echo
    echo " [sudo] bash install-sx.sh [<--argument> <value> [...]]"
    echo
    echo " If no arguments are provided, defaults will be used, and sudo is mandatory."
    echo
    echo " Default path for installation is $INSTALL_PREFIX"
    echo " Default path for the conf files is $CONF_DIR"
    echo " Stable versions of toolchain packages (from git $TOOLCHAIN_BRANCH branches) will be installed for libbitcoin, libwallet, obelisk and sx tools."
    echo
    echo " Optional arguments:"
    echo " --prefix <path>  Path prefix to install to, e.g. /home/user/usr"
    echo " --branch <name>  libbitcoin toolchain branch to use, e.g. develop"
    echo " --branch-keep    Don't check out from git for libbitcoin toolchain or dependencies, takes no value"
    echo " --testnet        Build for testnet, takes no value"
}
1714826525
Hero Member
*
Offline Offline

Posts: 1714826525

View Profile Personal Message (Offline)

Ignore
1714826525
Reply with quote  #2

1714826525
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714826525
Hero Member
*
Offline Offline

Posts: 1714826525

View Profile Personal Message (Offline)

Ignore
1714826525
Reply with quote  #2

1714826525
Report to moderator
jbis1
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
May 22, 2014, 01:16:00 PM
 #162

sorry, I am trying to be helpful, I didnt actually run it with --help I just looked at the install script which clearly shows that it would display info that would help you see that you need to add --testnet .. but seemingly that's not what you're seeing when you actually execute it.


Sorry, I guess there was a misunderstanding. The latest version of the installation script does not have a testnet option.
jbis1
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
May 22, 2014, 02:00:24 PM
 #163

Hm, adding --enable-testnet to ./configure doesn't seem to be working. I did it for libbitcoin, obelisk, and sx. It is still giving me the following, which is the hash of mainnet genesis block. Yes I am sure I am using the correct sx binary.

Code:
~/sx/worker$ ../bin/sx initchain blockchain/
INFO: Imported genesis block 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
May 22, 2014, 02:17:59 PM
 #164

Hm, adding --enable-testnet to ./configure doesn't seem to be working. I did it for libbitcoin, obelisk, and sx. It is still giving me the following, which is the hash of mainnet genesis block. Yes I am sure I am using the correct sx binary.

Code:
~/sx/worker$ ../bin/sx initchain blockchain/
INFO: Imported genesis block 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

try:

$ make clean
$ make
...

it probably didn't rebuild the modules
jbis1
Newbie
*
Offline Offline

Activity: 50
Merit: 0



View Profile
May 22, 2014, 02:52:15 PM
 #165

Hm, adding --enable-testnet to ./configure doesn't seem to be working. I did it for libbitcoin, obelisk, and sx. It is still giving me the following, which is the hash of mainnet genesis block. Yes I am sure I am using the correct sx binary.

Code:
~/sx/worker$ ../bin/sx initchain blockchain/
INFO: Imported genesis block 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

try:

$ make clean
$ make
...

it probably didn't rebuild the modules

Nope, I deleted the entire ~/sx directory and reran the installer with the --enable-test on libbitcoin, obelisk, and sx. I saw it rebuild everything. I still get the same genesis block hash.
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
May 23, 2014, 12:24:32 PM
 #166

libbitcoin has to be rebuilt with testnet support, so you need to make clean libbitcoin, and ./configure needs the argument --enable-testnet

I just looked, and the latest install script (with --testnet) wasn't uploaded. OK now I've re-uploaded it.

So redownload http://sx.dyne.org/install-sx.sh and see the help text.
Summer,69
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 26, 2014, 08:35:50 AM
 #167

how many special terms are here! I don't understand a word!
genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
June 01, 2014, 10:24:46 PM
 #168

We have a forum for collaboration and discussion of all related projects (darkwallet, libbitcoin, sx .etc):

Forum: https://forum.unsystem.net/
Altoidnerd
Sr. Member
****
Offline Offline

Activity: 406
Merit: 251


http://altoidnerd.com


View Profile WWW
June 22, 2014, 09:46:38 AM
 #169

This is the greatest thing of all time.  Thanks.

Do you even mine?
http://altoidnerd.com 
12gKRdrz7yy7erg5apUvSRGemypTUvBRuJ
Altoidnerd
Sr. Member
****
Offline Offline

Activity: 406
Merit: 251


http://altoidnerd.com


View Profile WWW
June 25, 2014, 11:16:56 AM
 #170

I like using bitcoind together with sx

Code:
altoidnerd@LEPTON:~$ bitcoind getnewaddress > a.txt; a=$(cat a.txt);bitcoind dumpprivkey $a | sx addr 
1AhAcnWk92uce89jq5jTQNjHt9T4DuAKAZ
altoidnerd@LEPTON:~$ cat a.txt
1AhAcnWk92uce89jq5jTQNjHt9T4DuAKAZ

It works!  But in the other direction, I can't get it quite right;

Code:
altoidnerd@LEPTON:~$ priv=$(sx newkey); echo $priv | sx addr > a.txt; a=$(cat a.txt); echo $a
1H441WDHRuXPTDosqjUKN54C44yuHY3upM

I want to do something like

Code:
altoidnerd@LEPTON:~$ bitcoind importprivkey $priv

or

Code:
altoidnerd@LEPTON:~$ echo $priv | bitcoind importprivkey

both of which seem to freeze bitcoind or return an error. I guess because bitcoind importprivkey doesn't like stdin?

Do you even mine?
http://altoidnerd.com 
12gKRdrz7yy7erg5apUvSRGemypTUvBRuJ
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4616



View Profile
June 25, 2014, 01:11:30 PM
 #171

Code:
altoidnerd@LEPTON:~$ bitcoind importprivkey $priv

or

Code:
altoidnerd@LEPTON:~$ echo $priv | bitcoind importprivkey

both of which seem to freeze bitcoind or return an error. I guess because bitcoind importprivkey doesn't like stdin?

Is your wallet encrypted?

If so, you'll probably need to unlock the wallet with walletpassphrase before you try to import a private key.
Altoidnerd
Sr. Member
****
Offline Offline

Activity: 406
Merit: 251


http://altoidnerd.com


View Profile WWW
June 25, 2014, 05:11:52 PM
 #172

No actually, this is a toy build I'm using to play. In fact the source is not that of an actual release... It's a post 0.9.2 clone and carries a warning.

I thought I might be making an obvious bash mistake. I should note that if I were to do

Code:
echo $priv

literally copy the resulting string and verbosely do

Code:
bitcoind importprivkey "<key>"

At least there isn't an error message. But I'm not home now and can't recall if that totally worked or not.

Do you even mine?
http://altoidnerd.com 
12gKRdrz7yy7erg5apUvSRGemypTUvBRuJ
phillipsjk
Legendary
*
Offline Offline

Activity: 1008
Merit: 1001

Let the chips fall where they may.


View Profile WWW
June 28, 2014, 08:46:45 PM
Last edit: June 28, 2014, 10:12:25 PM by phillipsjk
 #173

I ran into a similar problem trying to follow the tutorial here for offline transactions:
Code:
james@torchlight:~/coinjoin$ sx mktx jun272014pool.tx --input 43f1c3e735560f7b1e4c396a55a2e62d2e83b7c4ed1efc5a7d29358c84ca7807:1 --output 1Ft1DZ4EcpH1jFttDoPwsFbe11a6diyZ1H:25000000
Added input 43f1c3e735560f7b1e4c396a55a2e62d2e83b7c4ed1efc5a7d29358c84ca7807:1
Added output sending 25000000 Satoshis to 1Ft1DZ4EcpH1jFttDoPwsFbe11a6diyZ1H.
james@torchlight:~/coinjoin$ DECODED_ADDR=$(cat 1ExAmpLEf.key | sx addr | sx decode-addr)
james@torchlight:~/coinjoin$ PREVOUT_SCRIPT=$(sx rawscript dup hash160 [ $DECODED_ADDR ] equalverify checksig)
james@torchlight:~/coinjoin$ SIGNATURE=$(cat 1ExAmpLEf.key | sx sign-input jun272014pool.tx 0 $PREVOUT_SCRIPT)
james@torchlight:~/coinjoin$ sx rawscript [ $SIGNATURE ] [ $(cat 1ExAmpLEf.key | sx pubkey) ] | sx set-input jun272014pool.tx 0 > signed.tx
Usage: set-input FILENAME N SIGNATURE_AND_PUBKEY_SCRIPT

After some trial and error, I find this works:

Code:
james@torchlight:~/coinjoin$ sx set-input jun272014pool.tx 0 $(sx rawscript [ $SIGNATURE ] [ $(cat 1ExAmpLEf.key | sx pubkey) ]) > signed.tx
james@torchlight:~/coinjoin$ sx validtx signed.tx
Status: Success

I also found that Bitcoind 0.9.2 seems to ignore transactions sent with sendtx-node. This appears to be a regression, since I believe I had it work at least once in the past. I since updated and rebuilt sx tools. I may have upgraded the bitcoind node to 0.9.2  (from 0.8.x) as well.

I really need to keep better maintenance logs Tongue

PS: I briefly considered posting on the unsystem forum, but I see no categories. I have always thought web-forums are a poor imitation of USENET, but doing away with categories altogether (because people don't use them?) is worse IMO.

James' OpenPGP public key fingerprint: EB14 9E5B F80C 1F2D 3EBE  0A2F B3DE 81FF 7B9D 5160
Mashuri
Full Member
***
Offline Offline

Activity: 135
Merit: 107


View Profile
September 24, 2014, 05:11:28 PM
 #174

I'm now on my fifth attempt using 2 different servers (one a pretty much clean Debian VM and one an established server).. every time I get nearly to the end of the blockchain sync it just seems to sit around not receiving new blocks and spewing reams of errors such as below. I'm assuming blockchain database corruption but it always seems to be somewhere in the 27#### block range (I've just noticed this). Is this normal? Is there maybe something about this range of blocks, was that when someone was spamming the blockchain? Getting a bit frustrated here sapping so much time and bandwidth and still haven't got a sync'd copy to play with. I don't want to download a torrent copy.


WARNING: Error storing memory pool transaction c0c958698d61b260a885115a7e2ccec1a25c8a121c0da9ec6165f0ce11920c9b: Spent input not found


I am having this exact same issue on Ubuntu 64 (latest version) running in VirtualBox on my MacBook Pro Retina.  I have 70GB of SSD and 6GB RAM allocated to the VM.  The block chain has simply stopped updating at right around 300,000 block height.  What solved this problem for you?

genjix (OP)
Legendary
*
expert
Offline Offline

Activity: 1232
Merit: 1072


View Profile
September 26, 2014, 03:27:09 PM
 #175

big changes coming to libbitcoin, obelisk and sx. stay tuned...
inBitweTrust
Hero Member
*****
Offline Offline

Activity: 658
Merit: 501



View Profile
September 27, 2014, 09:05:03 PM
 #176

big changes coming to libbitcoin, obelisk and sx. stay tuned...

Wow , exciting and I thought this video was concerning a new version of the Liberator:

https://www.youtube.com/watch?v=fO30z2o6-t0

An update on libbitcoin is more important, but I would be happy with either.

Thanks for your hard work.


gwlloyd
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
October 17, 2014, 12:06:39 AM
 #177

I'm now on my fifth attempt using 2 different servers (one a pretty much clean Debian VM and one an established server).. every time I get nearly to the end of the blockchain sync it just seems to sit around not receiving new blocks and spewing reams of errors such as below. I'm assuming blockchain database corruption but it always seems to be somewhere in the 27#### block range (I've just noticed this). Is this normal? Is there maybe something about this range of blocks, was that when someone was spamming the blockchain? Getting a bit frustrated here sapping so much time and bandwidth and still haven't got a sync'd copy to play with. I don't want to download a torrent copy.


WARNING: Error storing memory pool transaction c0c958698d61b260a885115a7e2ccec1a25c8a121c0da9ec6165f0ce11920c9b: Spent input not found


I am having this exact same issue on Ubuntu 64 (latest version) running in VirtualBox on my MacBook Pro Retina.  I have 70GB of SSD and 6GB RAM allocated to the VM.  The block chain has simply stopped updating at right around 300,000 block height.  What solved this problem for you?

I'm afraid nothing solved the problem for me, I gave it a good go but submitted defeat assuming that the h/ware I was using was too slow. I'll try again though one day when I have spare hardware in the hope that whatever caused it is solved.
micax1
Hero Member
*****
Offline Offline

Activity: 708
Merit: 502


View Profile
October 22, 2014, 02:44:03 PM
 #178

do I need to run obelisk to get response from "sx balance addreess" command
also it seems that i cant install obelisk -
 ERROR: --> You need to have installed libbitcoin, sx and obelisk before run this script.
 Read the header of this script:


after i install-sx.sh

Please advise. Thank you.
gwlloyd
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
October 22, 2014, 03:07:44 PM
 #179

do I need to run obelisk to get response from "sx balance addreess" command
also it seems that i cant install obelisk -
 ERROR: --> You need to have installed libbitcoin, sx and obelisk before run this script.
 Read the header of this script:


after i install-sx.sh

Please advise. Thank you.

yes, though you can point it at public servers rather than a local one if you dont want to / cant run it.

http://sx.dyne.org/introduction.html#installation  (note running the install script as root)
micax1
Hero Member
*****
Offline Offline

Activity: 708
Merit: 502


View Profile
October 22, 2014, 04:26:04 PM
 #180

do I need to run obelisk to get response from "sx balance addreess" command
also it seems that i cant install obelisk -
 ERROR: --> You need to have installed libbitcoin, sx and obelisk before run this script.
 Read the header of this script:


after i install-sx.sh

Please advise. Thank you.

yes, though you can point it at public servers rather than a local one if you dont want to / cant run it.

http://sx.dyne.org/introduction.html#installation  (note running the install script as root)

i ran it as root.



/usr/local/src/sx-git# sx balance 1Lmc3kNttoyiU2ivPLizEBhE9UvQj6rquD
^CTraceback (most recent call last):
  File "/usr/local/bin/sx", line 1163, in <module>
    sys.exit(main(sys.argv))
  File "/usr/local/bin/sx", line 1157, in main
    return subprocess.call([binary] + args)
  File "/usr/lib/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 1301, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 478, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt


sx.cfg:

# ~/.sx.cfg Sample file.
service = "tcp://obelisk.unsystem.net:8081"
# Use CZMQ program 'makecert' to generate these values.
#client-certificate = "/home/genjix/.sx.cert"
#server-public-key = "W=GRFxHUuUN#En3MI]f{}X:KWnV=pRZ$((byg=:h"


it seems like it is public server by default - but query dose not return anything, until i ctrl+c

please advise.
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!