Search content
Sort by

Showing 6 of 6 results by lapidary
Post
Topic
Board Bitcoin Technical Support
Re: c-lightning on ubuntu
by
lapidary
on 06/11/2020, 21:54:50 UTC
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
Post
Topic
Board Bitcoin Technical Support
Re: c-lightning on ubuntu
by
lapidary
on 06/11/2020, 20:54:56 UTC
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?
Post
Topic
Board Bitcoin Technical Support
Merits 4 from 4 users
Topic OP
c-lightning on ubuntu
by
lapidary
on 06/11/2020, 13:40:06 UTC
⭐ Merited by DarkStar_ (1) ,ETFbitcoin (1) ,Heisenberg_Hunter (1) ,Husna QA (1)
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?
Post
Topic
Board Bitcoin Technical Support
Re: RPC getrawtransaction for all transactions in a block
by
lapidary
on 25/12/2019, 21:34:41 UTC
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.
Post
Topic
Board Bitcoin Discussion
Re: RPC getrawtransaction for all transactions in a block
by
lapidary
on 23/12/2019, 03:05:56 UTC
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.
Post
Topic
Board Bitcoin Discussion
Topic OP
RPC getrawtransaction for all transactions in a block
by
lapidary
on 22/12/2019, 12:53:09 UTC
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?