Idea: primary and secondary packages

I wanted to discuss the following idea:

Currently I see a pattern of my dappnode usage -> stopping packages when my geth-mainnet falls behind and starting packages once it catched up again.

I think it would be great if this could be automated.

  • Would it be useful also to others?
  • Do you see other solutions to the problem?

What exactly is the problem? Are the secondary packages not stable enough to handle a lagging mainnet?

Agree with @pindakaaz that sync issues should be handled at each package level. Do you know why your Geth package is falling out of sync so frequently?

How should it be handled at “each package level?”
I am not sure why it falls behind regularly - but I noticed when I stop services that have high usage as seen in DMS grafana - then it catches up again. E.g. now I stopped kovan which is a “nice to have” but not mission critical like the mainnet node.

At each package level means for example that:
a dapp dappnode package that uses Kovan should check that Kovan is synced. Otherwise, internally stop its tasks or show some alert until it goes back in sync.

Yea - but this would not solve my problem. There is no package that consumes kovan actually. It is just maybe used from other devices. But kovan (or any other package actually) should stop when main-net is not synced.

Why should Kovan stop when Mainnet is not synced? While both following a similar Ethereum protocol, they are completely independent blockchains

Yea - but both consume power of the same machine. And one is optional for me (kovan) and one is mandatory (main-net). So I would like kovan to stop consuming power when main-net is not synced

Maybe not a primary / secondary package level to introduce, but instead maybe a global DAppNodePackageCoreWatchdog with the following features that could be used :

  • configure a list of other DappNodePackage to watch.
  • For each packages logs watched, configure a keywords regexp that will trigger an automatic restart of the package ( peers = 0 or specific error message etc …)
  • other potential features in this “Watchdog package”: be able to configure (like in crontab) restart every hours, days etc other listed packages.
1 Like

@fbranciard that also sounds like a great thing to have - but I do not see how this would solve my problem

if you can detect in logs ( regexp) when geth-mainnet falls and when it catch up again, you can decide the watchdog action, stop or start, for the other package that needs this synch ?

Another perspective, we have also a chain status to verify to operate properly another service in one of our package https://github.com/luguslabs/archipel/blob/master/orchestrator/src/app.js#L150: But for now we integrate all the orchestration logic inside one DappNode package ( with sub docker containers launched) not between DAppNode packages.

1 Like

ok yea - this can work. If it can control other packages. This just irritated me:

For each packages logs watched, configure a keywords regexp that will trigger an automatic restart of the package ( peers = 0 or specific error message etc …)

as I thought it is just about restarting the watched packages itself