lightning-power-users / node-launcher

Easiest Bitcoin Lightning desktop app, for Windows, macOS, and Linux
MIT License
359 stars 68 forks source link

Node does not seem to run in prune mode? #264

Open nimatabatabai opened 5 years ago

nimatabatabai commented 5 years ago
PierreRochard commented 5 years ago

Try setting prune=6000 and txindex=0 in the bitcoin.conf file

nimatabatabai commented 5 years ago

Thanks, made the change. Will update here whether it continues to run out of memory or not!

PierreRochard commented 5 years ago

Closing for now, let me know if anything else comes up or you have feature requests!

Cheers

PierreRochard commented 5 years ago

I do want to eventually add prune and txindex to the GUI so that you don't have to go into the config file to manually change them

manbyt commented 5 years ago

I just updated my node to prune=5000 and txindex=0. The Bitcoind Output was rolling forward for a while, but I notice that I still am storing about 246GB of blocks. I've tried in the console:

bitcoin-cli pruneblockchain 5000

error code: -1 error message: Cannot prune blocks because node is not in prune mode.

Do I need to manually delete the old blocks? or is there a cleaner way?

Also noticing when I check the .conf file it seems to keep changing to prune=0

PierreRochard commented 5 years ago

@manbyt what is your hard drive situation? What operating system?

manbyt commented 5 years ago

I'm on macOS 10.14.4, I have 500gb ssd, since i use this machine for images half the disk space was eating up too much so i tried to prune to 5gb. Which i've since done by installing bitcoin-qt. It pruned the chain state on startup.
Just starting up node launcher now, i kind of figured it might break something.
Bitcoind is running fine but LND is broken, keeps restarting. I was reading somewhere that lnd does't play well with pruned nodes. I'm getting this from the LND output: 2019-04-30 20:44:50.088 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta, build=production, logging=default 2019-04-30 20:44:50.089 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-04-30 20:44:50.093 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8 2019-04-30 20:44:50.103 [INF] RPCS: password RPC server listening on [::]:10009 2019-04-30 20:44:50.103 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2019-04-30 20:44:50.103 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2019-04-30 20:44:51.313 [INF] LNWL: Opened wallet 2019-04-30 20:44:51.401 [INF] LTND: Primary chain is set to: bitcoin unable to create chain control: unable to connect to bitcoind: -28: Loading block index... 2019-04-30 20:44:51.417 [INF] LTND: Shutdown complete unable to connect to bitcoind: -28: Loading block index... 2019-04-30 20:44:55.083 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta, build=production, logging=default 2019-04-30 20:44:55.083 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-04-30 20:44:55.084 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8 2019-04-30 20:44:55.095 [INF] RPCS: password RPC server listening on [::]:10009 2019-04-30 20:44:55.095 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2019-04-30 20:44:55.095 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2019-04-30 20:44:56.105 [INF] LNWL: Opened wallet 2019-04-30 20:44:56.207 [INF] LTND: Primary chain is set to: bitcoin unable to create chain control: unable to connect to bitcoind: -28: Verifying blocks... 2019-04-30 20:44:56.225 [INF] LTND: Shutdown complete unable to connect to bitcoind: -28: Verifying blocks... 2019-04-30 20:44:59.183 [INF] LTND: Version: 0.6.0-beta commit=v0.6-beta, build=production, logging=default 2019-04-30 20:44:59.183 [INF] LTND: Active chain: Bitcoin (network=mainnet) 2019-04-30 20:44:59.184 [INF] CHDB: Checking for schema update: latest_version=8, db_version=8 2019-04-30 20:44:59.193 [INF] RPCS: password RPC server listening on [::]:10009 2019-04-30 20:44:59.193 [INF] RPCS: password gRPC proxy started at 127.0.0.1:8080 2019-04-30 20:44:59.193 [INF] LTND: Waiting for wallet encryption password. Use lncli create to create a wallet, lncli unlock to unlock an existing wallet, or lncli changepassword to change the password of an existing wallet and unlock it. 2019-04-30 20:45:00.324 [INF] LNWL: Opened wallet 2019-04-30 20:45:00.409 [INF] LTND: Primary chain is set to: bitcoin 2019-04-30 20:45:00.426 [INF] LTND: Initializing bitcoind backed fee estimator 2019-04-30 20:45:00.426 [INF] LNWL: Started listening for bitcoind block notifications via ZMQ on tcp://127.0.0.1:18500 2019-04-30 20:45:00.426 [INF] LNWL: Started listening for bitcoind transaction notifications via ZMQ on tcp://127.0.0.1:18501 2019-04-30 20:45:01.221 [INF] LNWL: The wallet has been unlocked without a time limit 2019-04-30 20:45:01.227 [INF] LTND: LightningWallet opened 2019-04-30 20:45:01.293 [INF] HSWC: Restoring in-memory circuit state from disk 2019-04-30 20:45:01.302 [INF] LNWL: Started rescan from block 00000000000000000001d3e11a301213c20da7b590208aaa04e328005084b48c (height 573962) for 53 addresses 2019-04-30 20:45:01.302 [INF] LNWL: Starting rescan from block 00000000000000000001d3e11a301213c20da7b590208aaa04e328005084b48c 2019-04-30 20:45:01.303 [INF] HSWC: Payment circuits loaded: num_pending=0, num_open=0 2019-04-30 20:45:01.312 [INF] LNWL: Rescan finished at 573962 (00000000000000000001d3e11a301213c20da7b590208aaa04e328005084b48c) 2019-04-30 20:45:01.312 [INF] LNWL: Catching up block hashes to height 573962, this might take a while 2019-04-30 20:45:01.325 [INF] LNWL: Done catching up block hashes 2019-04-30 20:45:01.325 [INF] LNWL: Finished rescan for 53 addresses (synced to block 00000000000000000001d3e11a301213c20da7b590208aaa04e328005084b48c, height 573962) 2019-04-30 20:45:01.350 [INF] LTND: Channel backup proxy channel notifier starting 2019-04-30 20:45:01.350 [INF] ATPL: Instantiating autopilot with cfg: (*main.autoPilotConfig)(0xc00030c4c0)({ Active: (bool) false, Heuristic: (map[string]float64) (len=1) { (string) (len=12) "preferential": (float64) 1 }, MaxChannels: (int) 5, Allocation: (float64) 0.6, MinChannelSize: (int64) 20000, MaxChannelSize: (int64) 16777215, Private: (bool) false, MinConfs: (int32) 0 })

2019-04-30 20:45:01.351 [INF] RPCS: RPC server listening on [::]:10009 2019-04-30 20:45:01.351 [INF] RPCS: gRPC proxy started at 127.0.0.1:8080 2019-04-30 20:45:01.352 [INF] LTND: Waiting for chain backend to finish sync, start_height=573962 2019-04-30 20:45:01.355 [INF] LTND: Chain backend is fully synced (end_height=573962)! 2019-04-30 20:45:01.367 [INF] HSWC: Starting HTLC Switch 2019-04-30 20:45:01.367 [INF] NTFN: New block epoch subscription 2019-04-30 20:45:01.368 [INF] NTFN: New block epoch subscription 2019-04-30 20:45:01.371 [INF] NTFN: New block epoch subscription 2019-04-30 20:45:01.375 [INF] NTFN: New block epoch subscription 2019-04-30 20:45:01.378 [INF] DISC: Authenticated Gossiper is starting 2019-04-30 20:45:01.378 [INF] BRAR: Starting contract observer, watching for breaches. 2019-04-30 20:45:01.378 [INF] NTFN: New block epoch subscription 2019-04-30 20:45:01.382 [INF] CRTR: FilteredChainView starting 2019-04-30 20:45:01.488 [INF] CRTR: Filtering chain using 14860 channels active 2019-04-30 20:45:01.491 [INF] CRTR: Prune tip for Channel Graph: height=567281, hash=00000000000000000017a439772336d76a92fd22005251818d3ec4748a052281 2019-04-30 20:45:01.493 [INF] CRTR: Syncing channel graph from height=567281 (hash=00000000000000000017a439772336d76a92fd22005251818d3ec4748a052281) to height=573962 (hash=00000000000000000001d3e11a301213c20da7b590208aaa04e328005084b48c) 2019-04-30 20:45:01.495 [ERR] SRVR: unable to start server: -1: Block not available (pruned data)

2019-04-30 20:45:01.495 [INF] RPCS: Stopping RPC Server 2019-04-30 20:45:01.499 [INF] RPCS: Stopping InvoicesRPC Sub-RPC Server 2019-04-30 20:45:01.499 [INF] RPCS: Stopping WalletKitRPC Sub-RPC Server 2019-04-30 20:45:01.499 [INF] RPCS: Stopping SignRPC Sub-RPC Server 2019-04-30 20:45:01.499 [INF] RPCS: Stopping ChainRPC Sub-RPC Server 2019-04-30 20:45:01.500 [INF] LTND: Shutdown complete -1: Block not available (pruned data)

PierreRochard commented 5 years ago

2019-04-30 20:45:01.495 [ERR] SRVR: unable to start server: -1: Block not available (pruned data)

This is odd, a prune of 5 GB would be ~ 5,000 blocks, which is more than a month of blocks. Was LND off for > 1 month?

manbyt commented 5 years ago

I started lnd up before trying to prune and it seemed to be running fine once bitcoind synced, however it had been more than a month.

PierreRochard commented 5 years ago

@manbyt hmm unfortunately I think you'll have to do a full sync again, this is a risk of pruning :(

manbyt commented 5 years ago

Thats what I figured when I started messing around with it. Is there a tutorial or is it as easy as uninstalling node launcher and re-installing?

Some how I think that its necessary to delete all of the dependencies(?), lnd and bitcoind and start over. Should I delete them from .library>application support>node launcher, then startover?

Then before i begin ibd set the prune=5000

Thanks for what you are doing for Bitcoin!

PierreRochard commented 5 years ago

I'd recommend only deleting the ~/Library/Application Support/Bitcoin directory (assuming you don't have any coins in the Bitcoin Core wallet!) and then restarting the Node Launcher. I would also recommend making more room on your hard drive so you can set prune=10000 or higher!