Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardanoDbMeta invalid during initial sync #248

Closed
rhyslbw opened this issue Jul 26, 2020 · 3 comments · Fixed by #407
Closed

cardanoDbMeta invalid during initial sync #248

rhyslbw opened this issue Jul 26, 2020 · 3 comments · Fixed by #407
Assignees

Comments

@rhyslbw
Copy link
Contributor

rhyslbw commented Jul 26, 2020

In the latest version of the dependencies I'm seeing inaccuracies when performing an initial sync of:

{
  cardanoDbMeta {
   initialized
    syncPercentage
  }
}
@rhyslbw rhyslbw added the BUG label Jul 26, 2020
@rhyslbw rhyslbw self-assigned this Jul 26, 2020
@rhyslbw rhyslbw removed the BUG label Jul 26, 2020
@rhyslbw
Copy link
Contributor Author

rhyslbw commented Jul 26, 2020

Not a bug, and actually is a helpful guard against following a stale chain. If a block is not produced within the past two minutes, this is expected based on the current logic

https://github.com/input-output-hk/cardano-graphql/blob/master/packages/api-cardano-db-hasura/src/Db.ts#L81

@rhyslbw rhyslbw closed this as completed Jul 26, 2020
@rhyslbw
Copy link
Contributor Author

rhyslbw commented Jul 29, 2020

Sync percentage is still off. Will investigate again, but initialized is returning the expected result and should be used to couple with application logic

@rhyslbw rhyslbw reopened this Jul 29, 2020
@rhyslbw
Copy link
Contributor Author

rhyslbw commented Dec 10, 2020

With the implementation of queries to the node via cardano-cli, the sync percentage can be calculated using the tip from both services.

rhyslbw added a commit that referenced this issue Jan 25, 2021
…tialisation state

Enabled by having direct access to `cardano-node` via `cardano-cli`

Fixes #248
rhyslbw added a commit that referenced this issue Jan 25, 2021
…tialisation state

Enabled by having direct access to cardano-node via cardano-cli,
the node tip is used as the base value to determine the sync progress
of cardano-db-sync. In addition, the initialisation state is now
determined by asserting the most recent epoch in the table matches
the tip's epochNo

Fixes #248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant