Sign inSign up

simplecoin/channel-preload-service

By simplecoin

•Updated over 5 years ago

Image
1

1.6K

simplecoin/channel-preload-service repository overview

⁠Channel Preload Service

Service responsible for load BoltDB files from LND nodes with graph data and convert to LevelDB structures and upload to GCP Bucket to be read by SimpleCoin Wallet later.

⁠Routines

OrderIDNameDescription
1.startnodeStart NodeStarts the internal LND node and unlock it to update the graph data
2.synccheckerSync CheckerChecks if the internal LND node is sync to chain and graph data
3.stopnodeStop NodeStops the node which forces the node to write the graph data on disk
4.dirsDirsPrepare the directories to next routines
5.b2bB2BFetches the Bolt db only neededed buckets
6.b2lB2LTransforms the Bolt db into Level db data
7.zipperZipperCompacts the Level db data
8.uploaderUploaderUploads the zip file to GCP bucket
9.startnodeStart NodeStarts again the internal node for another cycle after the DELAY timeout

⁠Configuration

There are two ways to configure this project environment variables or config.yaml, the first way is the prefered one.

⁠Environment variables

VariableDescriptionDefault
DELAYDelay before run all routines again (seconds)3600 seconds
DATADIRThe .lnd/data directory/root/.lnd/data
BUCKET_NAMEName of the bucket on GCPgcs-eu-channel-preload-service
LND_NETWORKName of the BTC network to connectregtest
LND_PASSWORDPassword for the internal LND Walletpassword
LND_PEERPeer on another LND node to connect (required)
LND_PARAMSParams to pass to lnd binary on run
HEALTH_CHECK_PORTHealth check port for HTTP route /health3000
ROUTINESSelect the available routines to runstartnode,syncchecker,stopnode,dirs,b2b,b2l,zipper,uploader
RUN_FOREVERDefine if the routines will cycle or nottrue

⁠Important

The internal LND node on this image never holds any sats at all it is just a graph channel collector which passively reads the nearby nodes and builds graph channels database to be used later

Tag summary

Content type

Image

Digest

Size

25.6 MB

Last updated

over 5 years ago

docker pull simplecoin/channel-preload-service