-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change creator and collection verification to use upserts to support …
…out of order (#87) * Fix docker preparation script to build SPL * Update owner and delegate in asset table when collection or creator verification occurs * Modify program transformers to upsert in asset table * This allows out-of-order Bubblegum transactions to create and update the asset table. * Upsert leaf schema, owner, delegate, and seq separately since those are updated by all instructions and gated by sequence number to ensure freshest value. * Mint, burn, and decompress happen without regard to sequence number because they operate on unique fields. * Mint and burn have been updated but Decompress still needs to be fixed to handle out of order transactions. * Also remove unused 'filling' variable. * Update mint and decompress to be able to upsert asset info out of order * Add second sequence number for compression status fields * Reduce logging in docker * Comment out compressed_seq before regenerating Sea ORM objects * Add migration for asset specification * Update README * Rename PNFT and regenerate Sea ORM types * Apply usage of compressed_seq after regenerating Sea ORM types * Add owner delegate sequence number for owner and delegate fields. Also remove not null constraints for asset fields without defaults. * Regenerating database types * Update handling for non null constrained asset table * Update tests to use new Sea ORM types * Use owner_and_delegate_seq to separate upserts Also update redeem and decompress to not use leaf schema events. * Adding was_decompressed flag to replace compressed_seq compressed_seq won't work because decompression doesn't create a cl_event. * Regenerating Sea ORM types * Update code to use was_decompressed flag * Fix new boolean SQL conditions * Update comment * Remove column updates in asset table during mint for items not in model * Clippy fixes in ingester main * Cleanup debug comment * Allow for sequence number to be NULL (needed after decompress now) * Add leaf specific sequence number to protect that field in asset table * Revert "Allow for sequence number to be NULL (needed after decompress now)" This reverts commit 2713a18. * Update nft_ingester/src/program_transformers/bubblegum/redeem.rs Co-authored-by: Nicolas Pennie <[email protected]> * Change creator verification to use upserts to support out of order * Remove null constraints on asset_creators table * Add null clause to upsert during mint * Rename creator vecs and add comments * Removing comment * Fix typo in migration down function * Fix collection verification and change to use upserts to support out of order processing (#90) * Adding verified flag to asset_grouping table * Regenerate Sea ORM types * Remove null constraints on asset_grouping table * Regenerate Sea ORM types * Update digital asset types and ingester based on new Sea ORM objects * Setting new verified flag in asset_grouping table to be non null with default Also regenerating Sea ORM types * Separate out collection insert in mintV1 into separate upserts * Fix error message * Separate update collection base info from collection verified * Add group info seq to asset_grouping table * Regenerate Sea ORM types * Add group_info_seq checks to collection base info upsert * Add check for verified = true in grouping for Read API * Fix conditions for asset grouping updates * Require grouping to verified to be returned from API in all cases --------- Co-authored-by: Nicolas Pennie <[email protected]>
- Loading branch information
1 parent
8f82f42
commit 3ca1303
Showing
21 changed files
with
484 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.