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

Fill command diagnostics #151

Merged
merged 26 commits into from
Jul 18, 2023
Merged

Conversation

emmanueldenloye
Copy link
Contributor

@emmanueldenloye emmanueldenloye commented Jun 7, 2023

We've observed that while attempting to fill gaps (missing rows in each table) in the database, that gaps would still remain.

We noticed upon further inspection that we were accessing the block header and payload endpoints incorrectly. Both can be accessed via chainweb-node's P2P API, however, it is only possible to get back at most 20 items and we had previously assumed we would always retrieve 360 items. We simply had to make sure to use chainweb-node's service API.

We also noticed another small error in the way gaps were being calculated. Even with a full db, chainweb-data would proclaim that it had gaps of size 0 at the genesis block of chain.

Copy link
Contributor

@enobayram enobayram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job diagnosing and fixing this bug, which has been a source of inconvenience for chainweb-data operators.

haskell-src/exec/Chainweb/Gaps.hs Outdated Show resolved Hide resolved
haskell-src/lib/ChainwebData/Env.hs Outdated Show resolved Hide resolved
haskell-src/lib/ChainwebData/Env.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Worker.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Server.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Gaps.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Gaps.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Worker.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Worker.hs Outdated Show resolved Hide resolved
Copy link
Contributor

@enobayram enobayram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work with the fixes!

haskell-src/exec/Chainweb/Server.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Worker.hs Outdated Show resolved Hide resolved
haskell-src/exec/Chainweb/Worker.hs Outdated Show resolved Hide resolved
emmanueldenloye and others added 3 commits July 18, 2023 13:26
Co-authored-by: Enis Bayramoğlu <enisbayramoglu@gmail.com>
Co-authored-by: Enis Bayramoğlu <enisbayramoglu@gmail.com>
Co-authored-by: Enis Bayramoğlu <enisbayramoglu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants