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

Update the null deposit fields #1669

Open
kderme opened this issue Apr 4, 2024 · 0 comments
Open

Update the null deposit fields #1669

kderme opened this issue Apr 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kderme
Copy link
Contributor

kderme commented Apr 4, 2024

When https://github.com/orgs/IntersectMBO/projects/8/views/5?pane=issue&itemId=55734154 is done, there are 2 new field stake_registration.deposit and pool_update.deposit. When doing an upgrade from an already populated db-sync, these fields will remain NULL. We want to query, that updates all the NULL values.

There are 2 ways to do it:

  1. Querying the epoch_param
    A query will do a multi table join. In particulare, starting from a stake_registration (pool_update for pools) it will find its tx through stake_registration.tx_id. From the referenced tx it will find its block through tx.block_id. From the block it will find the epoch block.epoch_no. From this it will find the relevant params, epoch_param.epoch_no. From this the related key_deposit (pool_deposit for pools).

  2. Using the genesis, since this value could not change until Conway. This option is only viable if this is released before Conway HF.

@kderme kderme added the bug Something isn't working label Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant