-
Notifications
You must be signed in to change notification settings - Fork 18
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 Sell Data for Data Market Module #255
Conversation
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.
Thank you. I put a few comments
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.
Thanks @inchori for your works. I left a few comments more for this pr. If you have any question of thoughts, feel free to mention me!
@youngjoon-lee @hansol-medi Thanks for yours feedback! Could you review or approve #260 this branch first please? I will merge it to this branch and keep working! |
…line (#260) Co-authored-by: gyuguen <gyuguen.jang@medibloc.org>
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.
Great job. I think this PR can be merged as long as some comments above are resolved.
TODO
|
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.
Many reviews have been resolved.
I think you might miss few points and I commented.
x/market/client/cli/txDeal.go
Outdated
@@ -119,17 +120,32 @@ func NewSellDataMsg(clientCtx client.Context, txf tx.Factory, fs *flag.FlagSet) | |||
return txf, nil, fmt.Errorf("failed to parse data certificate file: %w", err) | |||
} | |||
|
|||
encryptedDataUrlBytes, err := base64.URLEncoding.DecodeString(sellData.Cert.UnsignedCert.EncryptedDataUrlBase64) |
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.
In data validator, base64.StdEncoding
is used for encoding encryptedDataUrl
.
It seems to use the same encoding method because they use different 2 characters
- StdEncoding : ABCD...0123456789+/
- UrlEncoding : ABCD...0123456789-_
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.
Oh, I missed this part in the previous PR.
I think base64.UrlEncoding
should be written in the URL or file name.
The field EncryptedDataUrlBase64
has a URL in its name, but it is actually encrypted String data, so it seems better to use base64.StdEncoding
, a standard Base64 encoding.
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.
I didn't know there have a difference between StdEncoding
and UrlEncoding
. 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.
Good!
app/config.go
Outdated
@@ -0,0 +1,61 @@ | |||
package app |
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.
I think it would be better to put this commit in the next pr.
This is because new features have already been approvaed by other reviewers before they are uploaded.
This reverts commit b133eaf.
What I done
tx.proto
file andmsg_server_deal.go
.SellOwnData
function inkeeper/deal.go
.SellOwnData
function.TODO
max_num_data
field andcur_num_data
field withpricePerData
.SellData
for Tx.This branch will be base branch for
SellData
feature.