Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refine the init script for adding new job for lily #1270

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment/docker-compose-lily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ services:
- ./snapshot:/var/lib/lily/snapshot
# lily config
- ./lily/config.toml:/var/lib/lily/config.toml
- ./lily/upsert_config.toml:/var/lib/lily/upsert_config.toml
- ./lily/docker_init.sh:/usr/bin/docker_init.sh
entrypoint: /usr/bin/docker_init.sh
restart: always
Expand Down
4 changes: 4 additions & 0 deletions deployment/lily/docker_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,9 @@ lily job run --tasks=${tasks} --storage="Database1" watch --confidence=5

lily job run --tasks="peeragents" --storage="Database1" survey --interval="24h"

lily job run --tasks="fevm_actor_dump,miner_actor_dump" --storage="Database1" watch --confidence=5 --interval=120

lily sync blocks --config=/var/lib/lily/upsert_config.toml --storage=Database1 &

# resume daemon stdout
lily job wait --id=1
62 changes: 62 additions & 0 deletions deployment/lily/upsert_config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[API]
ListenAddress = "/ip4/127.0.0.1/tcp/1234/http"
RemoteListenAddress = ""
Timeout = "30s"

[Backup]
DisableMetadataLog = false

[Logging]

[Libp2p]
ListenAddresses = ["/ip4/0.0.0.0/tcp/0", "/ip6/::/tcp/0"]
AnnounceAddresses = []
NoAnnounceAddresses = []
DisableNatPortMap = false
ConnMgrLow = 150
ConnMgrHigh = 180
ConnMgrGrace = "20s"

[Pubsub]
Bootstrapper = false
RemoteTracer = "/dns4/pubsub-tracer.filecoin.io/tcp/4001/p2p/QmTd6UvR47vUidRNZ1ZKXHrAFhqTJAD27rKL9XYghEKgKX"

[Client]
UseIpfs = false
IpfsOnlineMode = false
IpfsMAddr = ""
IpfsUseForRetrieval = false
SimultaneousTransfersForStorage = 20
SimultaneousTransfersForRetrieval = 20
OffChainRetrieval = false

[Chainstore]
EnableSplitstore = true
[Chainstore.Splitstore]
ColdStoreType = "discard"
HotStoreFullGCFrequency = 3
HotStoreMaxSpaceTarget = 650000000000
HotStoreMaxSpaceThreshold = 150000000000

[Fevm]
# EnableEthRPC enables eth_ rpc, and enables storing a mapping of eth transaction hashes to filecoin message Cids.
# This will also enable the RealTimeFilterAPI and HistoricFilterAPI by default, but they can be disabled by config options above.
#
# type: bool
# env var: LOTUS_FEVM_ENABLEETHRPC
EnableEthRPC = true

[Storage]
[Storage.File]
[Storage.File.CSV]
Format = "CSV"
Path = "/tmp"
OmitHeader = false
FilePattern = "{table}.csv"
[Storage.Postgresql]
[Storage.Postgresql.Database1]
URLEnv = "LILY_STORAGE_POSTGRESQL_DB_URL"
ApplicationName = "lily"
SchemaName = "visor"
PoolSize = 20
AllowUpsert = true