-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: change return type from certificate to consent #67
Conversation
payload := datadealtypes.Consent{ | ||
Certificate: certificate, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @youngjoon-lee said in offline channel, oracle will just return the certificate, and provider will make consent to provide the data with this certificate.
So, let's just return the certificate itself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, when I tested this code and seller request validating a data, this API returns like this:
{
"certificate": {
"unsigned_certificate": {
"cid": "...",
"unique_id": "...",
"oracle_address": "...",
"deal_id": 1,
"provider_address": "...",
"data_hash": "..."
},
"signature": "..."
}
}
Because consent includes a certificate, so would I need to change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it includes certificate. I just wanna say that returning consent and returning certificate are distinctly different.
For example, in the future, let's assume that we add a expiration for the consent (how long the provider provide the data).
Then, the provider will get a certificate from oracle, and make consent message to provide data with expiration he/she want. Making the consent is the provider's job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we discussed in offline, I rollbacked and renamed variables. I understand the @H4NLee's comment. And I think that it was right. So I changed it in d3e313e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. I agree.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅣㅎ스
Closes #64