input-output-hk / smash

Stakepool Metadata Aggregation Server
36 stars 7 forks source link

SMASH starts syncing from Byron genesis #172

Open erikd opened 3 years ago

erikd commented 3 years ago

I left it (commit 4b71cf933d70c4b2dcbeb7f79f314f6abe99e6ee) running over night and woke up to find that it was syncing Byron era blocks but already was fetching offline pool metadata.

I then found this:

[2021-07-02 01:27:53.86 UTC] runDBThread: AsyncCancelled
[2021-07-02 01:27:53.86 UTC] ChainSyncWithBlocksPtcl: AsyncCancelled
[2021-07-02 01:27:53.86 UTC] Identity Application Exception: LocalAddress "../cardano-node/state-node-mainnet/node.socket" MuxError MuxSDUWriteTimeout "Mux SDU Time
out"

after which it started a block 0 of the Byron era again.

Therefore it seems that network errors can cause SMASH to resync from genesis (without rolling back the database).

erikd commented 3 years ago

Have tried @kderme 's kderme/alonzo branch and it suffers the same problem.

erikd commented 3 years ago

This is such a pain in the neck. Network error messages keep causing my SMASH instance to re-start syncing from block 0.

This makes it incredibly difficult to compare the SMASH that is integrated into db-sync with the standalone version.

erikd commented 3 years ago

The module Cardano.SMASH.DBSyncRun has a bunch of code to set up a SyncDataLayer but none ot that code seems to be ever run.

Building the 1.4.0 release tag using cabal also runs into a bunch of problems with dependencies. Spent a bunch of time trying to find a solution but there does not seem to be any suitable solution.