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

pool_updates: fields related to retirement aren't snapshots from the update but show current status #241

Closed
robinboening opened this issue Oct 9, 2023 · 1 comment

Comments

@robinboening
Copy link

robinboening commented Oct 9, 2023

Describe the bug
Requesting pool updates returns a a list of snapshots of the values when the updates were issued. Though, this is only true for most columns. If you request updates for a retired pool you'll notice retiring_epoch is set in every single update item, even for the initial registration of the pool, the same applies to pool_status which is filled with retired in every item.

You could argue this is intended, but I'd say it is not only very confusing as all the other columns are snapshots while these two always represent current state. It also prohibits me to detect what update is responsible for a deregistration. And, if I want to see the current status of a pool I'd request the pool_info endpoint.

To Reproduce
Steps to reproduce the behavior:

  1. request pool_updates with pool1y2gynck9pd4en5rzm0rueqd2qm7sw89aqmkcntd899vv237qj38
  2. See the retiring_epoch and pool_status fields filled in all items.

Expected behavior

I expect the response to

  • include all updates (including deregistrations, see Add data-test.sh #26)
  • only fill retiring_epoch in update items with transactions carrying a deregistration certificate
  • set pool_status to retired only in update items AFTER the retiring_epoch is reached AND the update doesn't reregister
  • set pool_status to retiring only in update items AFTER a deregistration had been issued and BEFORE the retiring_epoch is reached

Screenshots
response for the retired pool mentioned above. It is missing 2 deregistration updates (#26) and it shows values for pool_status/retiring_epoch aren't snapshots of when the update was issued but current state.
Screenshot 2023-10-09 at 11 41 25

@rdlrt
Copy link
Contributor

rdlrt commented Oct 9, 2023

Thanks for raising - Same cause as #240, will be fixed together (pool_status in cache is updated based on current state, ending in messing up logic for filtering), will be tracked via #240

@rdlrt rdlrt closed this as completed Oct 9, 2023
@rdlrt rdlrt mentioned this issue Oct 12, 2023
59 tasks
rdlrt added a commit that referenced this issue Oct 13, 2023
## Description
<!--- Describe your changes -->
[Re-created from #227 post renaming base-branch]

- [x] pool_list: Return all fields from pool_info_cache (latest pool entry)
- [x] Remove filter for returning only 'registered' pools from pool_list, pool_relays and pool_metadata endpoints
- [x] Few more linting polishing (remove trailing spaces, move single column/table references onto same line)
- [x] Update pool_info to return same metadata as pool_list and pool_metadata (latest w/o fallback)
- [x] Update all tx_in joins to use the new tx_out.consumed_by_tx_in_id
- [x] Dont include epoch_params in epoch_info_cache, update references accordingly
- [x] Update `*_txs` as per #186 (point 4)
- [x] Update `*_utxos` as per #186 (point 3)
  - [x] credential_utxos
  - [x] address_utxos
  - [x] account_utxos
  - [x] utxo_info
  - [x] asset_utxos
  - [x] script_utxos
- [x] Add script_info and align all endpoints for scripts
- [x] Add temporary cron for fixing epoch count mismatch
- [x] Add pool_registrations/pool_deregistrations endpoint
- [x] Add retired txs to `pool_updates` (other fields for such transactions will return `null`)
- [x] Add reward_withdrawals/treasury_withdrawals endpoint
- [x] Simplify address_assets and account_assets heirarchy to return flat table (helps do horizontal filtering as desired)
- [x] API Spec updates:
  - [x] Add section for Authentication
  - [x] Bump Koios version
  - [x] pool_list
  - [x] pool_metadata
  - [x] pool_relay
  - [x] `*_txs`
  - [x] `*_utxos`
  - [x] `address_assets`
  - [x] `account_assets`
  - [x] `epoch_params`
  - [x] `pool_registrations`/`pool_deregistrations`
  - [x] `reward_withdrawals`/`treasury_withdrawals`
  - [x] All script-related endpoints
  - [x] Update examples
  - [x] Check re-usability
  - [x] Check schemathesis
    - [x] guild
    - [x] preview
    - [x] preprod
    - [x] mainnet
- [x] Add v0 vs v1 to monitoring
  - [x] guild
  - [ ] preview (post merge)
  - [ ] preprod (post merge)
  - [ ] mainnet (post 1.1.0 - instead of 1.1.0rc) release

- [x] Ogmios
  - [x] Add integration for tx Evaluation and submission using ogmios path
  - [x] Add health check based on /health (`version` and `networkSynchronization`)
- [x] Update CHANGELOG
- [x] Bump final specs version number to v1 

## Which issue it fixes?
<!--- Link to issue: Closes #issue-number -->
- [x] Closes #208
- [x] Closes #218
- [x] Closes #186 
- [x] Closes #221
- [x] Closes #224
- [x] Closes #191
- [x] Closes #232
- [x] Closes #240 #241

---------

Co-authored-by: KoT_B_KocMoce <[email protected]>
Co-authored-by: Ola [AHLNET] <[email protected]>
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

No branches or pull requests

2 participants