-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
basic keystore implementation #3472
Conversation
fee2b7f
to
805b504
Compare
License: MIT Signed-off-by: Jeromy <[email protected]>
Oooh! Excellent stuff! Big fan of your work J :) Thank you @kyledrake for prompting @whyrusleeping to just write this already. |
kp := filepath.Join(ks.dir, name) | ||
|
||
_, err = os.Stat(kp) | ||
if err == nil { |
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.
To be safe I would use os.IsExist
and change it to ErrKeyExists
then, else passthrough the error.
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.
How would you use os.IsExist
here?
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.
sorry, IsNotExist
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.
ah! okay, i see what you want
} | ||
defer fi.Close() | ||
|
||
_, err = fi.Write(b) |
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 thought you wanted to use multicodec so we can migrate much easier?
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.
Nah, it won't make migrating easier at all. (it will make them hard since i'll have to decode multicodecs in the migrations code :P )
Also there are absolutely no tests for it. |
Yeah yeah, i'm getting there. |
License: MIT Signed-off-by: Jeromy <[email protected]>
License: MIT Signed-off-by: Jeromy <[email protected]>
@whyrusleeping I love the new feature, thanks for implementing it. What is missing is the renewal of the IPNS records every 4 hours. The namesys/republisher uses a so-called keybook in the peerstore that only contains the As I currently understand, the republisher/reprovider is the only part of the network that fixes data loss caused by peers going online/offline. If there is no automatic recovery from the shifting responsibilities in the DHT layer, in the current state of the code, the |
Yeah, that's the next part that needs to be done. Can you open a new issue
for discussing how we should go about doing that? Configuration UX will be
important
…On Fri, Dec 23, 2016, 22:12 wigy ***@***.***> wrote:
@whyrusleeping <https://github.com/whyrusleeping> I love the new feature,
thanks for implementing it.
What is missing is the renewal of the IPNS records every 4 hours. The
namesys/republisher uses a so-called keybook in the peerstore that only
contains the self key. Probably the republisher needs to use the
keystore, too, to enumerate all IPNS records that need a renewal.
As I currently understand, the republisher/reprovider is the only part of
the network that fixes data loss caused by peers going offline or leaving
the network. If there is no automatic recovery from it in the DHT layer, in
the current state of the code, the ipns name publish --key notself
/ipfs/QmBlah needs to be executed regularly as a workaround to make sure
the name can be resolved.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3472 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABL4HCJqZGu5KvLsfqEO6xZ3C9Fp6ibXks5rLDkugaJpZM4LFGJk>
.
|
I have opened it already: #3537 |
Thank you to @kyledrake for prompting me to just write this already
License: MIT
Signed-off-by: Jeromy [email protected]