You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is assumed that you have compiled the lotus. If you can't compile and install lotus, please check the previous content
The role Lotus Daemon play
For storage providers(SPs), the main role of Lotus is
lotus-miner needs to interact with the chain via lotus, initialize miners, precommit sectors. provecommit sectors, wdpost, winningpost, all need to send messages to the chain
transfer operations need to be performed via lotus
Accessing and store data on filecoin as a client
You should remember the role lotus play. The problems you are experiencing with other components may be caused by Lotus.
set the location of Lotus daemon
The default storage location for Lotus is ~/.lotus. Sometimes there are multiple hard disks on your system and you must distinguish your target hard disk and specify LOTUS_PATH to the directory where the target hard disk is mounted before running the program. You can of course leave the default storage location as it is if it meets your requirements
start Lotus Daemon
nohup lotus daemon >> daemon.log 2>&1&
Try to save the logs to a file for later troubleshooting. Lotus will sync the chain at the very beginning which will take a very long time and occupy so much disk space if you run Lotus Daemon from here. The full chain may need more than 7TB of disk space. typically we should sync the chain from the snapshot.
lotus sync status
lotus sync wait#this will wait for the chain sync. you can press CTRL+C to cancel
if you got done when you run lotus sync wait. you got everything right.
change configure and export api info
You should change your configure file of Lotus if you want use Lotus remotely.
edit this section of config.toml
[API]
# Binding address for the Lotus API## type: string#ListenAddress = "/ip4/127.0.0.1/tcp/1234/http"
Uncomment #ListenAddress = "/ip4/127.0.0.1/tcp/1234/http" and change ListenAddress to your address you want to listen on like ListenAddress = "/ip4/192.168.0.100/tcp/1234/http"
Then restart lotus daemon and run:
lotus auth api-info --perm admin
You will got something like this FULLNODE_API_INFO=eyJhbGcXXXX:/ip4/127.0.0.1/tcp/1234/http. export this value to your remote machine. it will work.
You can see logs like these when you export chain data
2021-09-15T14:51:52.558+0800 INFO chainstore store/snapshot.go:155 export started
....
2021-09-15T14:47:19.560+0800 INFO chainstore store/snapshot.go:166 export finished {"duration": 51.43478087}
Stop the Lotus daemon:
lotus daemon stop
Back up the chain data and create a directory for chain data:
Check sync status. check wallet before delete ~/.lotus/datastore/chain_backup
lotus sync status
lotus wallet list
typical questions
1: Can i run Lotus Daemon on HDD?
no
2: Why i sync chain slowly and never catch up?
the top reason why you sync slowly
Most of the time. you may store chain data on HDD which write/read speed is not enough for Lotus Daemon.
if you pretty sure you are store chain on SSD. check the disk space. SSD slows down when it runs out of space. you should prune the chain in this case.
network issue.
3: Should i run Lotus Daemon with Lotus Miner or separate
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
start lotus daemon
It is assumed that you have compiled the lotus. If you can't compile and install lotus, please check the previous content
The role Lotus Daemon play
For storage providers(SPs), the main role of Lotus is
lotus-miner needs to interact with the chain via lotus, initialize miners, precommit sectors. provecommit sectors, wdpost, winningpost, all need to send messages to the chain
transfer operations need to be performed via lotus
Accessing and store data on filecoin as a client
You should remember the role lotus play. The problems you are experiencing with other components may be caused by Lotus.
set the location of Lotus daemon
The default storage location for Lotus is
~/.lotus
. Sometimes there are multiple hard disks on your system and you must distinguish your target hard disk and specifyLOTUS_PATH
to the directory where the target hard disk is mounted before running the program. You can of course leave the default storage location as it is if it meets your requirementsstart Lotus Daemon
Try to save the logs to a file for later troubleshooting. Lotus will sync the chain at the very beginning which will take a very long time and occupy so much disk space if you run Lotus Daemon from here. The full chain may need more than 7TB of disk space. typically we should sync the chain from the snapshot.
sync from snapshot and check sync status
if you got
done
when you runlotus sync wait
. you got everything right.change configure and export api info
You should change your configure file of Lotus if you want use Lotus remotely.
edit this section of
config.toml
Uncomment
#ListenAddress = "/ip4/127.0.0.1/tcp/1234/http"
and change ListenAddress to your address you want to listen on likeListenAddress = "/ip4/192.168.0.100/tcp/1234/http"
Then restart lotus daemon and run:
You will got something like this FULLNODE_API_INFO=eyJhbGcXXXX:/ip4/127.0.0.1/tcp/1234/http. export this value to your remote machine. it will work.
prune the chain(optional)
Export the chain data:
lotus chain export --recent-stateroots=901 --skip-old-msgs my-snapshot.car
You can see logs like these when you export chain data
Stop the Lotus daemon:
Back up the chain data and create a directory for chain data:
Import the chain:
Start the daemon:
Check sync status. check wallet before delete
~/.lotus/datastore/chain_backup
typical questions
1: Can i run Lotus Daemon on HDD?
no
2: Why i sync chain slowly and never catch up?
the top reason why you sync slowly
Most of the time. you may store chain data on HDD which write/read speed is not enough for Lotus Daemon.
if you pretty sure you are store chain on SSD. check the disk space. SSD slows down when it runs out of space. you should prune the chain in this case.
network issue.
3: Should i run Lotus Daemon with Lotus Miner or separate
At present, running separately is a good choice
Beta Was this translation helpful? Give feedback.
All reactions