Skip to content

db-sync fails to restart with Error: Shelley.validateGenesisDistribution #877

@mkoura

Description

@mkoura

OS
Fedora 34

Versions
12.0.0-pre2 and current master: 15a434be9df084d04b8d2bf18df833470befecc8
PostgreSQL version: 11.11

Build/Install Method
The method you use to build or install cardano-db-sync: nix

Additional context
The cardano node is on latest master, Alonzo era, Protocol Version 6.

Problem Report
Db-sync is running without any issues until restarted. After restart it fails to start with
stdout:

[db-sync-node:Info:6] [2021-10-08 14:20:14.56 UTC] Schema migration files validated
[db-sync-node:Info:6] [2021-10-08 14:20:14.56 UTC] Running database migrations
[db-sync-node:Info:6] [2021-10-08 14:20:14.81 UTC] Using byron genesis file from: "./state-cluster0/byron/genesis.json"
[db-sync-node:Info:6] [2021-10-08 14:20:14.81 UTC] Using shelley genesis file from: "./state-cluster0/shelley/genesis.json"
[db-sync-node:Info:6] [2021-10-08 14:20:14.81 UTC] Using alonzo genesis file from: "./state-cluster0/shelley/genesis.alonzo.json"
[db-sync-node:Info:6] [2021-10-08 14:20:14.82 UTC] NetworkMagic: 42
[db-sync-node:Info:6] [2021-10-08 14:20:14.82 UTC] Initial genesis distribution present and correct
[db-sync-node:Info:6] [2021-10-08 14:20:14.82 UTC] Total genesis supply of Ada: 45000000000.000000
[db-sync-node:Info:6] [2021-10-08 14:20:14.82 UTC] Validating Genesis distribution

stderr:

Error: Shelley.validateGenesisDistribution: Expected initial block to have 1 but got 2

Might be related to #766 however my local network has

"TestShelleyHardForkAtEpoch": 1

(not "0").

It is a regression, with the same node and db-sync configuration it is possible to restart db-sync 11.0.4 with no issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions