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

(Partial updates) Asset creator hash fix #87

Closed
wants to merge 1 commit into from

Conversation

linuskendall
Copy link

A fix for asset creator hashes.

A fix for asset creator hashes.
linuskendall pushed a commit that referenced this pull request Jul 26, 2023
linuskendall pushed a commit that referenced this pull request Jul 26, 2023
linuskendall pushed a commit that referenced this pull request Jul 26, 2023
linuskendall pushed a commit that referenced this pull request Jul 27, 2023
…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]>
@linuskendall linuskendall changed the title Asset creator hash fix (Partial updates) Asset creator hash fix Jul 27, 2023
@linuskendall linuskendall marked this pull request as draft July 27, 2023 16:24
@kespinola kespinola closed this Mar 19, 2024
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.

2 participants