kristapsk / bitcoin-scripts

Various shell scripts, mainly to be used together with Bitcoin Core (bitcoind or bitcoin-qt) wallet. Fake coinjoin, ricochet, poor man's cli block explorer.
82 stars 30 forks source link

syntax error #23

Closed CoreLine76 closed 2 years ago

CoreLine76 commented 2 years ago

I'm done so far. But now I am getting such error. Could you help. dostum@ubuntu:~/bitcoin-scripts$ ./ricochet-send.sh 0.999 bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 5 $(./estimatesmartfee.sh $(./timetoblocks.sh "24 hours")) (standard_in) 1: syntax error (standard_in) 1: syntax error ./inc.common.sh: line 189: ((: ,00000000 < ,00001000 : syntax error: operand expected (error token is ",00000000 < ,00001000 ") (standard_in) 1: syntax error Ricocheting 0.999 BTC to bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 via 5 hops using average fee per kvB Is this ok?

dostum@ubuntu:~/bitcoin-scripts$ ./fake-coinjoin.sh $(./randbtc.sh 0.001 0.002) bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 bc1qwfafhs3ztp5d78n3jwwvlel0m7g0njj949zdya (standard_in) 1: syntax error Usage: fake-coinjoin.sh [options] amount address1 address2... Where: amount - amount to send in BTC address... - destination addresses (2 or more) dostum@ubuntu:~/bitcoin-scripts$

kristapsk commented 2 years ago

Sounds like a locale related issue. Could you try $ bash -x ./ricochet-send.sh 0.999 bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 5, it will give more debug output?

CoreLine76 commented 2 years ago

Sounds like a locale related issue. Could you try $ bash -x ./ricochet-send.sh 0.999 bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 5, it will give more debug output?

dostum@ubuntu:~/bitcoin-scripts$ bash -x ./ricochet-send.sh 0.999 bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 5 ++ dirname ./ricochet-send.sh

kristapsk commented 2 years ago
  • error code: -28 error message: Verifying blocks…

That's different error than above. Here you ran the script before Bitcoin Core has finished loading.

CoreLine76 commented 2 years ago
  • hata kodu: -28 hata iletisi: Blokları doğrulama…

Bu yukarıdakinden farklı bir hata. Burada Bitcoin Core yüklenmeyi bitirmeden önce betiği çalıştırdınız.

dostum@ubuntu:~/bitcoin-scripts$ bash -x ./ricochet-send.sh 0.999 bc1qxhq2vpzy0ne9wwu76z9kljyesewq56ax3nvw83 5 ++ dirname ./ricochet-send.sh

kristapsk commented 2 years ago

What is your locale? Could you run echo $LANG and paste output here? If my theory is correct, that should allow me to reproduce your issue on my machine if I know your locale setting.

CoreLine76 commented 2 years ago

echo $LANG en_US.UTF-8

kristapsk commented 2 years ago

echo $LANG en_US.UTF-8

Then it's something else, en_US.UTF-8 definitely should be ok... :(

kristapsk commented 2 years ago
  • txfee=0,00000000

It looks problem is here, Bitcoin Core RPC on your machine returns values with comma not point as a decimal separator and later bc does no like that. Will look how to properly fix this.

kristapsk commented 2 years ago

Or, actually it's likely btc_amount_format function from inc.common.sh, which uses awk, that changes from point to comma.

kristapsk commented 2 years ago

@CoreLine76 Could you also run bash -x estimatesmartfee.sh 2 and also bitcoin-cli estimatesmartfee 2 manually and paste outputs here? That should give me enough information to know for sure where is the problem.

CoreLine76 commented 2 years ago

dostum@ubuntu:~/bitcoin-scripts$ bash -x estimatesmartfee.sh ++ dirname estimatesmartfee.sh

CoreLine76 commented 2 years ago

This problem is not related to your software. I think it is completely related to my local ubuntu software. Your codes are working fine on the remote machine.

It looks like it's shipping. Or it seems to me. but looking at the blockchain it seems that it was not sent.

Or am I doing something missing that I don't know about?

CoreLine76 commented 2 years ago

root@localhost:/home/bitcoin-scripts-master# ./fake-coinjoin.sh $(./randbtc.sh 0.900 0.999) bc1q7eqheemcu6xpgr42vl0ayel6wj087nxdfjfndf bc1qnjq9demnmud92gxh2mdefrzseatzflmewapnv5 Feerate 0.00000916 is below minimum mempool fee, raising to 0.00001000 Using fee 0.00001000 per KB Recipients: bc1q7eqheemcu6xpgr42vl0ayel6wj087nxdfjfndf bc1qnjq9demnmud92gxh2mdefrzseatzflmewapnv5 input_type: bech32 Selected maker inputs: Calculated maker outputs: Not enough good inputs, aborting. root@localhost:/home/bitcoin-scripts-master#

root@localhost:/home/bitcoin-scripts-master# ./ricochet-send.sh 0.999 bc1qnjq9demnmud92gxh2mdefrzseatzflmewapnv5 5 $(./estimatesmartfee.sh $(./timetoblocks.sh "24 hours")) Feerate 0.00000700 is below minimum mempool fee, raising minimum to 0.00001000 Ricocheting 0.999 BTC to bc1qnjq9demnmud92gxh2mdefrzseatzflmewapnv5 via 5 hops using average 0.00001150 fee per kvB Is this ok?

root@localhost:/home/bitcoin-scripts-master#

CoreLine76 commented 2 years ago

thanks. please ticket off

kristapsk commented 2 years ago

I'm still curious where was the problem. Did you managed to solve this also on your local Ubuntu machine?

CoreLine76 commented 2 years ago

The problem was not in your software. The problem was in the ubuntu library. I removed all components. I updated and upgraded from scratch. I added the ubuntu keys again. In short, I reinstalled everything and requirements. It worked. Now I'm installing it on the remote machine.

CoreLine76 commented 2 years ago

Thank you for your help. now the only problem is to be able to send fake btc. I'm sending, but when I query the wallet on the blockchain, it doesn't seem to have gone.

CoreLine76 commented 2 years ago

Dear @kristapsk you can close the ticket. I will create a new ticket. About sending fake btc. Thank you very much again.