Bitcoin Forum
May 05, 2024, 08:52:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: c-lightning on ubuntu on: November 06, 2020, 09:54:50 PM
ah, thanks!

nothing as good as proper documentation.  --bitcoin-cli --bitcoin-rpcuser and --bitcoin-rpcpassword; now it's happy!!  So much more to learn; but at least it's running
2  Bitcoin / Bitcoin Technical Support / Re: c-lightning on ubuntu on: November 06, 2020, 08:54:56 PM
I'm getting closer; making a link is good; but my node rpc listens on my local IPv4 address and not on localhost.  so I think that is why it still is complaining about not finding bitcoin-cli.  Does c-lighting have a config setting for host user and password?
3  Bitcoin / Bitcoin Technical Support / c-lightning on ubuntu on: November 06, 2020, 01:40:06 PM
Hello all,

I have Ubuntu 20, I did snap install bitcoin-core, now I want c-lightning, but can't see to make it work.  I can add the PPA for lightning network, install it; but it can't find bitcoin. 
Quote
bitcoin-cli not found.
  Do I need to reinstall bitcoin in a different way than snap? I would like to preserve my blockchain and bitcoin.conf (yes I have a backup of that)

Does anyone have a tutorial I can follow?
4  Bitcoin / Bitcoin Technical Support / Re: RPC getrawtransaction for all transactions in a block on: December 25, 2019, 09:34:41 PM
OMG; that is what I needed,
thanks a million!!! This goes many times faster now.

Still odd that it takes longer when I give the hash.
5  Bitcoin / Bitcoin Technical Support / Re: RPC getrawtransaction for all transactions in a block on: December 23, 2019, 03:05:56 AM
I wrote a little page to do a speed test on a large block,
I only ran it three times, but it is consistent,
Code:
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import time
rpc_user = "NotMyRealUsername"
rpc_password = "NotMyRealPassword"
rpc_connection = AuthServiceProxy("http://%s:%s@192.168.000.000:8332"%(rpc_user, rpc_password))
h = "000000000000000000036f0cfb2dadd069060c8ba36d63f2e11cb02e85ef7ed2"

alldata = rpc_connection.getblock(h)
start = time.time()
for txid in alldata['tx']:
    rawtx = rpc_connection.getrawtransaction(txid,1)
stop = time.time()
print(stop-start)
start = time.time()
for txid in alldata['tx']:
    rawtx = rpc_connection.getrawtransaction(txid,1,h)
stop = time.time()
print(stop-start)
first without hash is 9 seconds, with hash is 149 seconds
My bitcoin node is live, but only has 20 peers, and little traffic.  It is version 0.17 (newest I can install on pfSense), the database is on a dedicated SSD, core 2 quad,
Memory: 221M Active, 290M Free  4G real memory.  bitcoind is the only thing that uses any real CPU.

to test my code, open your bitcoin config file to set rpcuser, rpcpassword, rpcallowip, and set txindex=1 (this will require re-indexing... sit back for a week on HDD with my CPU!!!) 
If you have an indexed full node, and python, pip install python-bitcoinrpc, and set the proper user/password/ip in the above code.
6  Bitcoin / Bitcoin Technical Support / RPC getrawtransaction for all transactions in a block on: December 22, 2019, 12:53:09 PM
I have an indexed full node on my home router, and I run a python script on my desktop to grab all the transactions for a full block.  I did run it two ways:
Code:
rpc_connection.getrawtransaction(transactionID,1)
and
rpc_connection.getrawtransaction(transactionID,1,hash)
I also tried batch, but that would time out if I had a big block I wanted to look at.
first way thrashes the HD, second way hardly uses the HD at all, about 70% of one core, and runs slower than the first way.  can someone verify getrawtransaction takes longer to execute if you tell it which hash it's in?
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!