2

After the import of the snapshot finishs it rolls back to genisis and starts over

cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | ALTER TABLE
cardano-db-sync2_1  | All good!
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:57.73 UTC] Schema migration files validated
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:57.73 UTC] Running database migrations
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.13 UTC] Using byron genesis file from: "/nix/store/iwq90igv72ihdr9z9nl3m0dsiv0bfh7y-byron-genesis.json"
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.13 UTC] Using shelley genesis file from: "/nix/store/sr1r1fsqij2bcr3jc1xz7hdgih2w6gp7-shelley-genesis.json"
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.13 UTC] Using alonzo genesis file from: "/nix/store/5qpskcxlvakm8d0qf4gg0mhs3ckr264l-alonzo-genesis.json"
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.43 UTC] NetworkMagic: 764824073
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.70 UTC] Initial genesis distribution present and correct
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.70 UTC] Total genesis supply of Ada: 31112484745.000000
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.71 UTC] Inserting Shelley Genesis distribution
cardano-db-sync2_1  | [db-sync-node:Info:6] [2021-09-02 19:36:58.71 UTC] localInitiatorNetworkApplication: connecting to node via "/node-ipc/node.socket"
cardano-db-sync2_1  | [db-sync-node.Subscription:Notice:65] [2021-09-02 19:36:58.71 UTC] Identity Starting Subscription Worker, valency 1
cardano-db-sync2_1  | [db-sync-node.Subscription:Notice:66] [2021-09-02 19:36:58.71 UTC] Identity Connection Attempt Start, destination LocalAddress "/node-ipc/node.socket"
cardano-db-sync2_1  | [db-sync-node.Subscription:Notice:66] [2021-09-02 19:36:58.71 UTC] Identity Connection Attempt End, destination LocalAddress "/node-ipc/node.socket" outcome: ConnectSuccessLast
cardano-db-sync2_1  | [db-sync-node.Handshake:Info:66] [2021-09-02 19:36:58.71 UTC] WithMuxBearer (ConnectionId {localAddress = LocalAddress "", remoteAddress = LocalAddress "/ipc/node.socket"}) Send (ClientAgency TokPropose,MsgProposeVersions (fromList [(NodeToClientV_1,TInt 764824073),(NodeToClientV_2,TInt 764824073),(NodeToClientV_3,TInt 764824073),(NodeToClientV_4,TInt 764824073),(NodeToClientV_5,TInt 764824073),(NodeToClientV_6,TInt 764824073),(NodeToClientV_7,TInt 764824073),(NodeToClientV_8,TInt 764824073),(NodeToClientV_9,TInt 764824073)]))
cardano-db-sync2_1  | [db-sync-node.Handshake:Info:66] [2021-09-02 19:36:58.71 UTC] WithMuxBearer (ConnectionId {localAddress = LocalAddress "", remoteAddress = LocalAddress "/ipc/node.socket"}) Recv (ServerAgency TokConfirm,MsgAcceptVersion NodeToClientV_9 (TInt 764824073))
cardano-db-sync2_1  | [db-sync-node.Mux:Info:66] [2021-09-02 19:36:58.71 UTC] Bearer on ConnectionId {localAddress = LocalAddress "", remoteAddress = LocalAddress "/ipc/node.socket"} event: Handshake Client end, duration 0.000429297s
cardano-db-sync2_1  | [db-sync-node.Mux:Info:67] [2021-09-02 19:36:58.71 UTC] Bearer on ConnectionId {localAddress = LocalAddress "", remoteAddress = LocalAddress "/ipc/node.socket"} event: State: Mature
cardano-db-sync2_1  | [db-sync-node:Info:70] [2021-09-02 19:36:58.71 UTC] Starting chainSyncClient
cardano-db-sync2_1  | [db-sync-node:Info:70] [2021-09-02 19:36:58.71 UTC] Cardano.Db tip is at slot 38188791, block 6151159
cardano-db-sync2_1  | [db-sync-node:Info:75] [2021-09-02 19:36:58.71 UTC] Running DB thread
cardano-db-sync2_1  | [db-sync-node:Info:75] [2021-09-02 19:36:58.72 UTC] Rolling back to genesis
cardano-db-sync2_1  | [db-sync-node.Subscription:Notice:65] [2021-09-02 19:36:58.73 UTC] Identity Required subscriptions started
cardano-db-sync2_1  | [db-sync-node:Info:75] [2021-09-02 19:37:11.35 UTC] Deleting 6151159 blocks up to slot 38188791

My config:

  cardano-db-sync:
    image: inputoutput/cardano-db-sync:11.0.0
    environment:
      - NETWORK=${NETWORK:-mainnet}
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/11/db-sync-snapshot-schema-11-block-6151159-x86_64.tgz
      - RESTORE_RECREATE_DB=N
    depends_on:
      - postgres
    secrets:
      - postgres_password
      - postgres_user
      - postgres_db
    volumes:
      - db-sync-data:/var/lib/cdbsync
      - /relay1-ipc:/node-ipc
      - ./tmp:/tmp
    restart: on-failure
    logging:
      driver: "json-file"
      options:
        max-size: "200k"
        max-file: "10"

Any ideas what i'm doing wrong?

2
  • 1
    I believe this is resolved in latest db-sync. I know we had some bugs about a month ago that have recently been cleaned up. Oct 4, 2021 at 16:38
  • Yes it is fixed in the newerst version
    – wutzebaer
    Oct 4, 2021 at 19:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.