filecoin-project / sentinel

Filecoin Network monitoring and analysis tools.
https://lilium.sh
Other
27 stars 14 forks source link

Add Sentinel module scaffolding to Lotus #179

Closed iand closed 2 years ago

iand commented 3 years ago

Create the scaffolding for a Sentinel module and API in Lotus. The scope of this issue is just enough to start Lotus in sentinel mode and start a watch that simply logs tipsets as they are received. This will provide a foundation to introduce data extraction and indexing in subsequent PRs.

Add a CLI flag to allow Lotus to be started as a daemon in "sentinel" mode:

lotus daemon --sentinel

Allow a watch to be started via CLI with a default confidence level:

lotus sentinel watch

Initial spike for reference: https://github.com/iand/lotus/blob/65a290b62edb8e26dc86d441b58e24f0d43b3637/node/impl/sentinel/sentinel.go

frrist commented 3 years ago

In draft here: https://github.com/filecoin-project/lotus/pull/5672

frrist commented 3 years ago

Message from Magik relating to this work:

I'd prefer this mode to be hidden behind build-time tag, or implemented as a plugin (we can give plugins hooks to fx/cli) - I really don't love the idea of adding flags to the daemon command, it gets messy over time (see go-ipfs)

I think a build flag will be the easiest solution here. A plugin implementation would require more work and could be explored at a later time or as a follow on.