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

[mtg-836] Separate fungible token accounts from non-fungible ones #305

Merged
merged 34 commits into from
Nov 26, 2024

Conversation

kstepanovdev
Copy link
Contributor

No description provided.

@kstepanovdev kstepanovdev changed the title Write a fungible token-related events into a dedicated RocksDb column Separate fungible token accounts from non-fungible ones Nov 5, 2024
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from 079a666 to 0cf3ab9 Compare November 11, 2024 16:20
@kstepanovdev kstepanovdev changed the title Separate fungible token accounts from non-fungible ones [mtg-836] Separate fungible token accounts from non-fungible ones Nov 12, 2024
@kstepanovdev kstepanovdev marked this pull request as ready for review November 12, 2024 17:26
@kstepanovdev kstepanovdev requested a review from StanChe November 14, 2024 18:25
@kstepanovdev kstepanovdev self-assigned this Nov 14, 2024
Copy link
Contributor

@StanChe StanChe left a comment

Choose a reason for hiding this comment

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

Let's catch up and sync on those 2 synchronizers running. The approach looks good, the separation should be thought through. I'd really love to merge this change asap

migrations/9_insert_fungible_idx.sql Show resolved Hide resolved
rocks-db/src/batch_client.rs Outdated Show resolved Hide resolved
rocks-db/src/batch_client.rs Show resolved Hide resolved
rocks-db/src/asset.rs Show resolved Hide resolved
postgre-client/src/asset_index_client.rs Outdated Show resolved Hide resolved
postgre-client/src/asset_index_client.rs Show resolved Hide resolved
postgre-client/src/temp_index_client.rs Show resolved Hide resolved
nft_ingester/src/index_syncronizer.rs Outdated Show resolved Hide resolved
nft_ingester/src/index_syncronizer.rs Outdated Show resolved Hide resolved
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from a8ccae6 to 0622c99 Compare November 15, 2024 16:16
Copy link
Contributor

@StanChe StanChe left a comment

Choose a reason for hiding this comment

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

As an idea (not a suggestion to implement right now) - wdyt of running 2 separate binaries - synchronizer_fungible, synchronizer_nft. Maybe it'll make separation easier. Or it could be a single binary with run mode - fungible/non-fungible

rocks-db/src/batch_client.rs Show resolved Hide resolved
postgre-client/src/asset_index_client.rs Show resolved Hide resolved
postgre-client/src/asset_index_client.rs Show resolved Hide resolved
postgre-client/src/temp_index_client.rs Show resolved Hide resolved
rocks-db/src/batch_client.rs Show resolved Hide resolved
rocks-db/src/batch_client.rs Outdated Show resolved Hide resolved
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from dcf47db to 555d596 Compare November 19, 2024 19:13
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from 9f903ad to 0746bc1 Compare November 20, 2024 08:54
Copy link
Contributor

@StanChe StanChe left a comment

Choose a reason for hiding this comment

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

I still need to go over the synchronizer

nft_ingester/src/api/backfilling_state_consistency.rs Outdated Show resolved Hide resolved
nft_ingester/src/bin/synchronizer/main.rs Show resolved Hide resolved
nft_ingester/src/bin/synchronizer/main.rs Outdated Show resolved Hide resolved
postgre-client/src/load_client.rs Show resolved Hide resolved
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from 18d6a4a to f97a3e8 Compare November 22, 2024 12:42
@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from f97a3e8 to 08f705a Compare November 22, 2024 12:43
@kstepanovdev kstepanovdev requested a review from StanChe November 22, 2024 17:10
};

self.copy_fungibles(fungible_tokens_path, &mut transaction)
.await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

The explicit rollback will not be called here, if the copy_fungible errors, so we'll still rely on rust to rollback the tx

Copy link
Contributor

@StanChe StanChe 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, thank you! Those transaction rollbacks should be called explicitely on any errors though

@kstepanovdev kstepanovdev force-pushed the separate-fungible-tokens-updates branch from d5f3d6d to 4a9b34f Compare November 26, 2024 02:29
@kstepanovdev kstepanovdev merged commit 74cd2ee into main Nov 26, 2024
2 checks passed
@kstepanovdev kstepanovdev deleted the separate-fungible-tokens-updates branch November 26, 2024 09:27
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.

4 participants