-
Notifications
You must be signed in to change notification settings - Fork 13
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
Replace all string hash with []byte #1072
Conversation
This pull request has been mentioned on MESG Community. There might be relevant details there: |
Good idea to create a dedicated type 👍 |
@krhubert please next time you create a PR not finished, set the PR in WIP using this new GitHub feature ;) |
01d6ba5
to
a123411
Compare
@mesg-foundation/mesg-core-team Please review this PR (especially hash/hash.go implementation) and if everything is ok I will just replace:
What I don't like is the fact that hash.Hash is in our repository and in std golang package, but:
|
ae1a2f9
to
bc8dfbb
Compare
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 valid the implementation of hash that you did 👍
The API of the package is simple.
I like that there is 2 type: Digest to generate the hash (and it's only overriding Sum function of sha256) and Hash to convert []byte from and to string.
I don't mind having the same name as std Hash.Hash..
bc8dfbb
to
2884b89
Compare
818f52f
to
0100cb7
Compare
Good job with the hash. Also, there is a big breaking change here which is removing the support of the sid. Maybe a |
Done
Nope, I asked @NicolasMahe and said he talked to you about the sid removal and you have agreed on this. Also, you said that sid/hash resolution should be on the client side, not in the core. The one condition I started working on this was dropping support of sid in the api. If you want sid support it won't be done in this PR (I don't know if it will be done at all because it's pretty hard to introduce such support). |
I valid but we still need the support of SID and this doesn't need to be done at the database level but just at the api level. But let's merge this one, then do some cleanup on the API and reenable the sid support |
This pull request has been mentioned on MESG Community. There might be relevant details there: |
I created to forum post to continue this discussion: https://forum.mesg.com/t/new-grpc-nameservice-api/324 |
# Conflicts: # sdk/instance/instance.go # server/grpc/instance.go
TODO:
type Hash []byte
and implement New and String methods