1

I start the docker as followed in the guide:

export NETWORK=mainnet &&\
docker pull inputoutput/cardano-graphql:6.2.0-${NETWORK} &&\
docker pull inputoutput/cardano-graphql-hasura:6.2.0 &&\
docker pull cardanosolutions/cardano-node-ogmios:v5.1.0-${NETWORK} &&\
RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/13/db-sync-snapshot-schema-13-block-7519843-x86_64.tgz \
docker-compose up -d &&\
docker-compose logs -f

However, db-sync didn't start from a point where I passed as a RESTORE_SNAPSHOT parameter instead started at 0 to sync from genesis which takes too much time to get sync. Any recommendations? If I keep waiting to make it sync via genesis probably will last 2-3 weeks.

7
  • Rolling back to genesis like this can be due to 3 reasons: the node is not synced, the node and db-sync are running on different networks or wrong/missing ledger state directory. Commented Jul 25, 2022 at 12:58
  • What you mean by node is not Ogmios right? I mean my node and db-sync are running on same computer in different screens and it's sync. However, I did not pass any parameter while starting db-sync about the ledger path.
    – korimusk
    Commented Jul 25, 2022 at 13:05
  • On the db-sync command line there is a --state-dir parameter. That specifies the directory where the ledger state is expected. Commented Jul 25, 2022 at 21:14
  • If the state directory is empty then it will roll back to genesis. Commented Jul 25, 2022 at 22:28
  • One common issue when using snapshots is that the ledger state part of the snapshot is restored to one place and db-sync expects it in another. Commented Jul 26, 2022 at 1:59

1 Answer 1

0

The snapshot will only be applied if cardano-node is synced past the snapshot point, since the benefit of using it would be eliminated given cardano-db-sync rolls back to genesis under these conditions. For best results, ensure the node is close to the network tip prior to upgrading.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.