Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

regenerated test vector to add a valid DID for to field in Message.metadata.from|to #247

Merged
merged 10 commits into from
Feb 26, 2024

Conversation

jiyoonie9
Copy link
Contributor

No description provided.

@@ -1,19 +1,19 @@
{
"description": "Close parses from string",
"input": "{\"metadata\":{\"from\":\"did:dht:abecscpi377h647nj5j8oz6yq544i8bzdze83mxsghskahq35ddy\",\"to\":\"did:ex:alice\",\"exchangeId\":\"abcd123\",\"kind\":\"close\",\"id\":\"close_01hpsc6aqten79yhw1gg25prmj\",\"createdAt\":\"2024-02-16T16:32:31.482Z\"},\"data\":{\"reason\":\"The reason for closing the exchange\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6YWJlY3NjcGkzNzdoNjQ3bmo1ajhvejZ5cTU0NGk4YnpkemU4M214c2doc2thaHEzNWRkeSMwIn0..LfYrchKuy0KtdRl-HRgLDSwRvzVAz6mApuQdJU5prOchLMRJkzcjROWxn5JbzkwVajH6VN4Xmhv6UcOfmZmoCA\"}",
"input": "{\"metadata\":{\"from\":\"did:dht:5feinba343k9fhy4zgdcp64bm6y7si39ru1pfjmrbxw9tkggbeuo\",\"to\":\"did:dht:t13oezyg87588ja11zoox6swtt7a8gq4zbmc6su5xbjy8xgdb46o\",\"exchangeId\":\"rfq_01hq9j1a70f3zrrh11n3q9x3jk\",\"kind\":\"close\",\"id\":\"close_01hq9j1a71fgh9qszsx06mefyn\",\"createdAt\":\"2024-02-22T23:22:29.473Z\"},\"data\":{\"reason\":\"The reason for closing the exchange\"},\"signature\":\"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpkaHQ6NWZlaW5iYTM0M2s5Zmh5NHpnZGNwNjRibTZ5N3NpMzlydTFwZmptcmJ4dzl0a2dnYmV1byMwIn0..Nnn8v5RZIgkA8rc9TC9WgKqdx1xe9F8197vhLqmlMQxv-U62jbORV5vNJXdzPlOo6PfgK84OdAAx1cuhsvcZCw\"}",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

all these were regenerated because Message.metadata.to field was did:ex:alice and that fails our schema validation - it must be a real DID

@KendallWeihe
Copy link
Contributor

Could you add more description as to what made the pre-existing DIDs invalid? (or maybe point to a ticket which describes the issue)

I'm cool with the CODEOWNERs change, though it's worthy of a discussion (changes here being so upstream of everything else makes changes here have leverage, resulting in large downstream implications; my point being, if there ever were a need to create a constitution of governance then it should be had here -- "we're not there yet" is a valid response such that we can iterate quicker right now). Which, there may have been a discussion for which I wasn't privy to, but if not, could we make the CODEOWNERs a dedicated PR and/or ticket on the backlog?

@jiyoonie9
Copy link
Contributor Author

jiyoonie9 commented Feb 23, 2024

Could you add more description as to what made the pre-existing DIDs invalid? (or maybe point to a ticket which describes the issue)

yes, can do! so i found this while getting my tbdex-js pr up to speed with main, and found that tbdex had some schema changes that enforced Message.metadata.from/to to be a real DID. the test vector was not updated with this change, and some of the test vectors had the value for those fields set to an invalid DID like did:ex:alice or did:ex:pfi. tests in tbdex-js and tbdex-kt that used the test vectors were failing because of this

I'm cool with the CODEOWNERs change, though it's worthy of a discussion (changes here being so upstream of everything else makes changes here have leverage, resulting in large downstream implications; my point being, if there ever were a need to create a constitution of governance then it should be had here -- "we're not there yet" is a valid response such that we can iterate quicker right now). Which, there may have been a discussion for which I wasn't privy to, but if not, could we make the CODEOWNERs a dedicated PR and/or ticket on the backlog?

happy to move the codeowners change out to a separate PR!
edit: pr here - #248

@jiyoonie9 jiyoonie9 changed the title regenerated test vector to add a valid DID for to field in parse-close regenerated test vector to add a valid DID for to field in Message.metadata.from|to Feb 23, 2024
@@ -11,7 +11,7 @@
"description": "The sender's DID"
},
"to": {
"$ref": "https://tbdex.dev/definitions.json#/definitions/did",
"$ref": "definitions.json#/definitions/did",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KendallWeihe
Copy link
Contributor

the test vectors had the value for those fields set to an invalid DID like did:ex:alice or did:ex:pfi

Got it, thanks! A good amount of these seem like did:dht-to-did:jwk changes. I would imagine we want did:dht in some of our test vectors, albeit maybe not currently? Or maybe it's beside the point and either or are fine and the changes here were just a byproduct of you generating new test vectors. Just raising awareness cc @phoebe-lew

@jiyoonie9
Copy link
Contributor Author

jiyoonie9 commented Feb 23, 2024

the test vectors had the value for those fields set to an invalid DID like did:ex:alice or did:ex:pfi

Got it, thanks! A good amount of these seem like did:dht-to-did:jwk changes. I would imagine we want did:dht in some of our test vectors, albeit maybe not currently? Or maybe it's beside the point and either or are fine and the changes here were just a byproduct of you generating new test vectors. Just raising awareness cc @phoebe-lew

yes, so i actually did initially opt to use did:dht, but found an issue while using did:dht:... for DIDs in test vectors and then ran tests that failed in tbdex-kt. decentralized-identity/web5-kt#252

i should probably write an issue to revert the DIDs back to did:dht once that issue is resolved. wrote issue here: #249

@mistermoe
Copy link
Contributor

mistermoe commented Feb 24, 2024

I thiiink we may want to keep the PFI DIDs as did:dht beeecause PFIs won't ever be able to use did:jwk beeecauuse they don't have support for service endpoints.

Thoughts?

@jiyoonie9
Copy link
Contributor Author

jiyoonie9 commented Feb 24, 2024 via email

@mistermoe
Copy link
Contributor

mistermoe commented Feb 25, 2024

@jiyoontbd just fixed the issue you found earlier!

Related issue: decentralized-identity/web5-kt#252
PR with fix: decentralized-identity/web5-kt#251
PR with updates to test vector generation: TBD54566975/tbdex-js#185

"output": {
"metadata": {
"from": "did:dht:abu39bcp7peyxkff8yz85kds4k4gpoizigkdcyqx3ozbyyiua6po",
"from": "did:dht:1uh6jhzqsreubaunfcrmaqux5nq66hxm3fmj9wpt4w1zmpn6mzuy",
Copy link

Choose a reason for hiding this comment

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

Since parse-offering.json was already using did:dht, will this make a difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, it would not, but all test vectors get re-generated with the generateXYZ() methods, so that's why these change even though they were did:dhts before

@jiyoonie9 jiyoonie9 merged commit 50cbc23 into main Feb 26, 2024
@jiyoonie9 jiyoonie9 deleted the test-vector-update branch February 26, 2024 19:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants