Skip to content
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

Push CID to DHT when publishing a name #7487

Open
RubenKelevra opened this issue Jun 17, 2020 · 4 comments
Open

Push CID to DHT when publishing a name #7487

RubenKelevra opened this issue Jun 17, 2020 · 4 comments
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@RubenKelevra
Copy link
Contributor

I investigated a bit a performance issue - where it takes quite a long time before data behind an IPNS record can be resolved via the DHT.

It seems that the newly added content is too large, so there's a large backlog of newly added pins and MFS data on the node, that it is able to push the CID for the name record in a reasonable amount of time.

A dedicated ipfs dht provide <CID> before running ipfs name publish --key=<keyID> <CID> solved this issue for me.

So there seems to be an improvement opportunity:

If the CID which should be published as a name record is still somewhere on the queue for sending it to the DHT as provider IPFS could give this CID priority, that it will be the next CID to be published. This way ipfs makes rue that the new name record will be resolvable via DHT.

@RubenKelevra RubenKelevra added the kind/enhancement A net-new feature or improvement to an existing feature label Jun 17, 2020
@Stebalien
Copy link
Member

This is a great idea.

@Stebalien Stebalien added exp/intermediate Prior experience is likely helpful effort/hours Estimated to take one or several hours help wanted Seeking public contribution on this issue P2 Medium: Good to have, but can wait until someone steps up labels Jun 17, 2020
@Stebalien
Copy link
Member

I'd modify the Publish function in core/coreapi/name.go to concurrently send a provider record to the DHT.

@RubenKelevra
Copy link
Contributor Author

I'd modify the Publish function in core/coreapi/name.go to concurrently send a provider record to the DHT.

Yeah, this probably works too, if the queue is not easily accessible from this context without having to lock it completely.

But this of course will lead to a double provide by the client. Depending on the amount of IPNS updates.

@Stebalien
Copy link
Member

We do put the root of objects into a queue to provide after we finish adding. However, I'm guessing this may be backed up.

Providing while publishing an IPNS record is a bit expensive, but publishing an IPNS record is expensive enough that it's not a huge issue.

@jacobheun jacobheun added the status/ready Ready to be worked label Jul 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/hours Estimated to take one or several hours exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

3 participants