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

feat!: add deleted height to unique_id index #3506

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Oct 28, 2021

Description

  • adds the spend/deleted height to the asset id index when a unique id
    UTXO is spent
  • head unique_id (ie. <asset_pk, unique_id> in current UTXO set) has
    "special" key in unique_id_index
  • handle reorg code to update unique_id_index
  • replace hex string keys with byte keys in kernel and input dbs
  • add test for fetch_utxo_by_unique_id with deleted height param

Motivation and Context

Allow fetch_utxo_by_unique_id to query the "head" UTXO that existed at any height

How Has This Been Tested?

Unit tests
Some tests are failing but I suspect this was already the case before this PR

- adds the spend/deleted height to the asset id index when a unique id
  UTXO is spent
- head unique_id (ie. <asset_pk, unique_id> in current UTXO set) has
  "special" key in unique_id_index
- handle reorg code to update unique_id_index
- replace hex string keys with byte keys in kernel and input dbs
- add test for fetch_utxo_by_unique_id with deleted height param
@sdbondi sdbondi force-pushed the core-unique-id-index-incl-parent-pk branch from d1ef6ee to cfd451e Compare October 28, 2021 07:04
@sdbondi sdbondi changed the title feat: add deleted height to unique_id index feat!: add deleted height to unique_id index Oct 28, 2021
@delta1
Copy link
Contributor

delta1 commented Oct 28, 2021

Looks great, yes some tests were failing before this. Just a lil clippy

@sdbondi
Copy link
Member Author

sdbondi commented Oct 28, 2021

👌 I'll give some 📎 ❤️

* validator-node:
  tests!: add unique_id block validator tests (tari-project#3510)
* validator-node:
  feat: add file uploading to ipfs for asset create (tari-project#3524)
  test!: add additional tests for unique asset id validation (tari-project#3517)
@stringhandler stringhandler merged commit 70df667 into tari-project:validator-node Nov 3, 2021
@sdbondi sdbondi deleted the core-unique-id-index-incl-parent-pk branch November 3, 2021 05:52
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.

3 participants