-
Notifications
You must be signed in to change notification settings - Fork 150
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
CAIP-19: Add block number tag in query #125
base: main
Are you sure you want to change the base?
Conversation
See discussions in ChainAgnostic#119
I don't think it's correct to mix an identifier with a querying language. CAIP-19 identifiers should be used to identify assets. Adding a query part to it can be quite confusing. I think it would make more sense to define a new CAIP which describes the querying language to use. Also because also a chain ID, or an account ID, might want to support this feature, to retrieve historical data. |
I agree that it looks confusing syntactically and I wish we had other options. Is there something we could make this less looking like an non-deterministic query @qizhou?
I think @qizhou and I agree with you. But our problem is that we believe CAIP-19 indeed doesn't identify assets at this point. It is a Universal Resource Location as the identity of the asset can change over time. Hence, to truly create an URI that is permanently accessible, we somehow need to add the block number. Now, I personally have little competence or understanding what should be the right symbol in the case and previously I had suggested the
We're not trying this define a query language. This is an extremely important distinction. |
Perhaps we could use other symbols other than |
Not to feather our own's nest, but we have opened an issue in this very same space to integrate CAIP-19 into a new DID method. What that would do, is that it would enhance CAIP-19 with DID features, including an already standardised query language. In this way, it would be trivial to define a |
block_number is not a query parameter, it's a fragment of an identifier. Anyone that is running CAIP-19 without a block_number is querying as there can be many results to one URL but only one result to an URI. |
@TimDaub what I am saying (and re-iterating) is that I do not think a block number should be part of the identifier itself. I think it should be some additional detail that might be required in some use cases. Different is the case where the verifier of an asset's credential might want to retrieve the status of the asset at some past block, and it would do that with a query parameter, which would be defined in the DID spec linked above and taken care of by the DID resolver. I think having the block number as part of the identifier would only introduce problems. |
@ntn-x2 I actually agree with you that adding the block number as part of the identifier makes things much more complicated and I also agree with your line of reasoning, which is that:
But here's the safety concern that supports adding a block number. Imagine an NFT with a cute kitty and the name "Cute kitty PFP," and then we have this new type of protocol that allows "liking" the NFT kitty using a Verifiable Credential where the issuer However, a few days later, now the operator of the NFT could come along and change various things:
And so therefore, it is fragile for us to identify an NFT asset without naming its block number if, in most cases, what is meant is the NFT in its current form. Now: The herein proposed change is technically backward compatible as it'd allow us to craft a CAIP-19 identifier that puts "block_number=latest", but we should avoid using that when truly wanting to identify a temporal manifestation of a specific asset. |
I am struggling with the backwards-compatibility part. Are queries beginning with ? inherently/syntactically optional? I guess my question is: Do today's "block-height-free" CAIP-19s default to "block_number=latest"? Is My one concern here is that If there are systems that, for whatever reason, strip the |
I'm not suggesting backward compatibility in the syntactical sense. CAIP-19 is in status: DRAFT, and so breaking assumptions should be allowed, right? What I mean is that the current implementation of CAIP-19 that doesn't include a block_number would then later be block_number=latest because that's what it is today (albeit implicitly).
Yes, this is my interpretation. Or let's say they're equivalent in where they're pointing towards.
Fair.
No, it's replaced by
I liked @qizhou's proposal of using e.g. "@". |
I think this should be a concern of the verifiable credential layer OR of a querying language on top of identifiers, for which historic state can be queried. For instance, either the VC could have a block number as a claim, or an issuance date from which a given block number can be retrieved. Different is if we want to assume that two CAIP-19 identifiers that only differ in block number are to be considered completely independent on each other: in that case adding a block number to the identifier would make sense. |
Discussed on today's call; will discuss further at inperson gathering in sept |
now also as a proposed agenda item: ChainAgnostic/Gatherings#7 |
See discussions in #119