Skip to content

fix(cat-gateway): Use persistent state in volatile asset calculation #2160

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

Merged
merged 5 commits into from
Apr 7, 2025

Conversation

saibatizoku
Copy link
Contributor

@saibatizoku saibatizoku commented Apr 4, 2025

Description

Extends the persistent state with volatile data for staked asset calculation.

Related Issue(s)

Closes #2111

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream module

@saibatizoku saibatizoku added the bug Something isn't working label Apr 4, 2025
@saibatizoku saibatizoku added this to the Fund14 Technical Readiness milestone Apr 4, 2025
@saibatizoku saibatizoku self-assigned this Apr 4, 2025
@Mr-Leshiy Mr-Leshiy changed the base branch from main to fix/cip36-assets-indexing April 7, 2025 05:32
@Mr-Leshiy Mr-Leshiy added the review me PR is ready for review label Apr 7, 2025
Copy link
Contributor

@Mr-Leshiy Mr-Leshiy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

github-actions bot commented Apr 7, 2025

Test Report | ${\color{lightgreen}Pass: 683/688}$ | ${\color{red}Fail: 0/688}$ |

@Mr-Leshiy Mr-Leshiy merged commit dbad580 into fix/cip36-assets-indexing Apr 7, 2025
44 checks passed
@Mr-Leshiy Mr-Leshiy deleted the fix/volatile-asset-calculation branch April 7, 2025 09:22
@github-project-automation github-project-automation bot moved this from New to ✅ Done in Catalyst Apr 7, 2025
Mr-Leshiy added a commit that referenced this pull request Apr 17, 2025
* fix(cat-gateway): Fixing indexing issues and chain follower synchronisation (#2100)

* update cardano sync code

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* fix fmt

* change schema version

* wip

* wip

* wip

* wip

* fix(cat-gateway): Fix `cardano/assets` endpoint. (#2109)

* fix assets endpoint

* wip

* wip

* wip

* wip

* wip

* fix spelling

* Update catalyst-gateway/bin/src/service/common/objects/cardano/stake_info.rs

Co-authored-by: Steven Johnson <[email protected]>

* wip

---------

Co-authored-by: Steven Johnson <[email protected]>

* fix(cat-gateway): Use persistent state in volatile asset calculation (#2160)

* fix(cat-gateway): separate futures

* fix(cat-gateway): calculate volatile assets

* wip

* remove unused code

---------

Co-authored-by: Mr-Leshiy <[email protected]>

* fix(cat-gateway): Correct Service Health logic (#1974)

* wip(rust/signed_doc): add atomic variables for live check, update endpoint and middleware

* wip(rust/signed_doc): reset live counter

* fix(cat-gateway): typo

* fix(cat-gateway): use timestamp for LIVE_COUNTER, update logic

* fix(cat-gateway): refactor code into health utilities

* fix(cat-gateway): fix panic catcher to disable live service flag

* fix(cat-gateway): remove unused atomic-counter crate

* fix(cat-gateway): refactor health::live utilities into proper module

* fix(cat-gateway): restore live counter logic, set env var for threshold

* fix(cat-gateway): code format

* fix(cat-gateway): return service unavailable with proper error

* fix(cat-gateway): refactor health::start utilities into proper module

* feat(cat-gateway): add service::utilities::health::ready module

* wip(rust/signed_doc): add atomic variables for live check, update endpoint and middleware

* wip(rust/signed_doc): reset live counter

* fix(cat-gateway): typo

* fix(cat-gateway): use timestamp for LIVE_COUNTER, update logic

* fix(cat-gateway): refactor code into health utilities

* fix(cat-gateway): fix panic catcher to disable live service flag

* fix(cat-gateway): remove unused atomic-counter crate

* fix(cat-gateway): refactor health::live utilities into proper module

* fix(cat-gateway): restore live counter logic, set env var for threshold

* fix(cat-gateway): code format

* fix(cat-gateway): return service unavailable with proper error

* fix(cat-gateway): add atomic vars to health::started to keep track and set state

* fix(cat-gateway): add atomic var to health::started to keep track of chain follower

* fix(cat-gateway): implement logic for health::started flags

* fix(cat-gateway): add middleware to check DB connections

* fix(cat-gateway): attempt DB reconnect if health/ready check fails

* fix(cat-gateway): implement logic for health::ready endpoint

* fix(cat-gateway): handle DB errors at endpoints

* chore(cat-gateway): fix doc comments

* fix(cat-gateway): add suggested fixes

* fix(cat-gateway): simplify boolean logic, correctly set flag when follower first syncs

* fix(cat-gateway): add suggested fix

* chore(docs): fix doc comment

* fix(cat-gateway): update doc comments for health endpoints

* fix(cat-gateway): add suggested fix to doc comments

* wip

* fix(cat-gateway): set index db liveness after waiting for it to be ready

---------

Co-authored-by: Alex Pozhylenkov <[email protected]>
Co-authored-by: Steven Johnson <[email protected]>

* feat(cat-gateway): `cardano/assets` integration test (#2139)

* add assets test

* wip

* fix

* wip

* wip

* fix(cat-gateway): Fix test_assets.py (#2300)

* fix assets test

* wip

* fix

* try

* wip

* wip

* wip

* fix

* wip

* increase timeout for `schemathesis`

---------

Co-authored-by: Steven Johnson <[email protected]>
Co-authored-by: Joaquín Rosales <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working review me PR is ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cardano assets endpoint fix volatile data collection
2 participants