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

Implement provenance in the index #2353

Merged
merged 6 commits into from
Sep 4, 2023
Merged

Implement provenance in the index #2353

merged 6 commits into from
Sep 4, 2023

Conversation

casey
Copy link
Collaborator

@casey casey commented Aug 22, 2023

This is an initial PR implementing draft spec for parent/child inscriptions. It only implements indexing parent inscriptions and displaying them on the front end and returning them from the JSON API.

Other features are not implemented and are deferred to a future PR:

  • Creating inscriptions with parents in the wallet
  • Displaying child inscriptions on the parent inscription page

@sondotpin
Copy link
Contributor

sondotpin commented Aug 25, 2023

What's about end point /parent to get metadata of parent inside child @casey

@casey
Copy link
Collaborator Author

casey commented Aug 25, 2023

What's about end point /parent to get metadata of parent inside child @casey

I'm not sure this is necessary. The parent is known to the inscriber at inscribe time, so they have and can use the parent's inscription ID and can use it in the child, no need to look it up from an API endpoint.

@casey casey marked this pull request as ready for review August 25, 2023 21:02
@casey casey changed the title Start working on children Index and display parent inscriptions Aug 25, 2023
@casey
Copy link
Collaborator Author

casey commented Aug 25, 2023

@cypherpork I just finished this initial implementation of provenance, in case you want to test/review.

@sondotpin
Copy link
Contributor

So as far as I understand, we can only solve the 1-dimensional problem at the moment. The child will point to the parent, but the parent won't know who their child is
@casey

@casey casey mentioned this pull request Aug 28, 2023
@cypherpork
Copy link

@cypherpork I just finished this initial implementation of provenance, in case you want to test/review.

@casey, thank you - I have spun it up and started testing/reviewing. I will come back with notes in a day or two.

@casey
Copy link
Collaborator Author

casey commented Aug 29, 2023

@cypherpork I just finished this initial implementation of provenance, in case you want to test/review.

@casey, thank you - I have spun it up and started testing/reviewing. I will come back with notes in a day or two.

And, note that there's a change to the implementation: #2278 (comment)

@casey casey changed the title Index and display parent inscriptions Index and display child inscriptions Aug 29, 2023
@casey casey changed the title Index and display child inscriptions Index and display parent inscriptions Aug 29, 2023
@casey
Copy link
Collaborator Author

casey commented Aug 29, 2023

Okay, changed the implementation back to use the variable length encoding for the index. It's not a big savings on its own, but if we have a few savings like these they add up.

@casey casey changed the title Index and display parent inscriptions Implement provenance in the index Aug 29, 2023
@sondotpin
Copy link
Contributor

@casey can we do multiple parents with one child?

OP_FALSE
OP_IF
  OP_PUSH "ord"
  OP_PUSH 1
  OP_PUSH "text/plain;charset=utf-8"
  OP_PUSH 3
  OP_PUSH parent1_insription_id
  OP_PUSH 3
  OP_PUSH parent2_insription_id
  OP_PUSH 0
  OP_PUSH "Hello, world!"
OP_ENDIF

@casey
Copy link
Collaborator Author

casey commented Aug 31, 2023

@casey can we do multiple parents with one child?

I'd like to enable this eventually, but it's not in the first version. What's the use case you're thinking of?

@sondotpin
Copy link
Contributor

  1. breeding nft
  2. whitelist voting, Dao, Group

Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

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

v exciting!

@casey casey merged commit 87a9ed7 into master Sep 4, 2023
6 checks passed
@casey casey deleted the children branch September 4, 2023 18:23
elocremarc added a commit to elocremarc/ord that referenced this pull request Sep 5, 2023
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