Skip to content

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

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 11 commits into from
Apr 1, 2025

Conversation

Mr-Leshiy
Copy link
Contributor

Description

Based on #1986

  • Fixed cardano/assets endpoint

@Mr-Leshiy Mr-Leshiy changed the base branch from main to fix/cip36-assets-indexing March 27, 2025 18:28
@Mr-Leshiy Mr-Leshiy self-assigned this Mar 27, 2025
@Mr-Leshiy Mr-Leshiy added the review me PR is ready for review label Mar 27, 2025
@Mr-Leshiy Mr-Leshiy marked this pull request as draft March 27, 2025 18:29
@Mr-Leshiy Mr-Leshiy marked this pull request as ready for review March 27, 2025 18:29
Copy link
Contributor

github-actions bot commented Mar 27, 2025

Test Report | ${\color{lightgreen}Pass: 670/675}$ | ${\color{red}Fail: 0/675}$ |

Copy link
Collaborator

@stevenj stevenj left a comment

Choose a reason for hiding this comment

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

Remove the unnecessary type refactoring.
Don't call anything "Native Tokens" its not a valid reference to an onchain value. They are Assetts according to the spec, and we should align with its language to reduce confusion.
Don't serialize getting the TXI set, and updating the TXO data with the spent information as its bad from a performance perspective and un-required.from a correctness perspective.
Reading the TXI's and updaing TXO's is logically two distinct operations and should be coded as two distinct operations.

@github-project-automation github-project-automation bot moved this from New to 🔖 Ready in Catalyst Mar 31, 2025
@Mr-Leshiy Mr-Leshiy requested a review from stevenj April 1, 2025 05:52
Copy link
Collaborator

@stevenj stevenj left a comment

Choose a reason for hiding this comment

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

Looks good, changed requested aren't major

@Mr-Leshiy Mr-Leshiy requested a review from stevenj April 1, 2025 07:59
@Mr-Leshiy Mr-Leshiy merged commit fbf5f34 into fix/cip36-assets-indexing Apr 1, 2025
38 checks passed
@Mr-Leshiy Mr-Leshiy deleted the fix/assets branch April 1, 2025 08:42
@github-project-automation github-project-automation bot moved this from 🔖 Ready to ✅ Done in Catalyst Apr 1, 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
review me PR is ready for review
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants