-
Notifications
You must be signed in to change notification settings - Fork 1.2k
IPNS name resolve fails the first time name.publish and name.resolve are called but works on next call #4198
Comments
This comment was marked as resolved.
This comment was marked as resolved.
2022-09-02 triage conversation: can you confirm if this happens with the default key type as well? |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
@BigLep it resolves when using the default key. I have pushed the runnable scenario to the repo - https://github.com/imthe-1/keychain-ipns-sample/tree/master. The console can be checked for the different steps. Please refer to keychain-ipns-sample/src/App.js for the issue specific code sample. |
@BigLep @lidel please let me know if you need any further info. Also, can you please reopen the issue? |
@BigLep in my setup i've used these flags: --enable-pubsub-experiment --enable-namesys-pubsub and have made the following changes in the ipfs config. sharing this so that there are no issues running the sample(you probably dont need that but sharing it anyways:slightly_smiling_face:). please let me know if any further info is required.
|
2022-10-07 triage conversation: @imthe-1: do you see these same IPNS issues when you use the default encryption in IPNS? We want to see how much of the issue here is related to your forking and using non-default keys. |
@BigLep we have not modified the default encryption and it is the same in our implementation as in the standard ipfs-core. Strangely, in our implementation when we repeat the execution of the deterministic IPNS keypair creation and linking(publishing) flow, the IPNS public key hash resolution works and returns the CID but it fails the first time. I hope i am able to answer your query, if not please let me know. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
I removed the stale label since the ball is in the maintainer court currently. |
@BigLep please let me know if any further information is required that might help with the troubleshooting and execution. |
hi @BigLep can you please share some updates on this? |
@imthe-1 it sounds we are discussing multiple issues here, makes it difficult to follow, but hopefully below is useful. lmk if below understanding is correct:
|
@lidel thanks a lot for looking into it!
we got to know that since the kubo node has not subscribed to the topic in the first resolve, it fails and then 2nd resolve call succeeds but we are still struggling a bit to get IPNS working. we plan to update the record on IPNS every few minutes in the start of our flow and then the updates happen based on events which is difficult to predict and could be between a gap of few seconds as well.
as asked by @achingbrain we went back and tested with the latest version of ipfs-core and could not resolve the IPNS name on ipfs.io gateway. we can skip this one since we eventually got it working.
we have not tried this @lidel.
the setup is same as ipns-browser-publish example and we tried resolving it using
one minute is good enough for us and we can implement work-arounds for this but even when i published after a few minutes the resolve call returned the older value only. I tried multiple times as well but it kept returning older values. it is critical for us to have the latest value.
|
@lidel we did try to resolve using our gateway that we setup on a remote instance(coz we really want to get this implemented into our system:slightly_smiling_face:). it resolves for a period of time and then stops resolving kinda intermittent. this is the IPNS name: 16Uiu2HAmEmQ5HoGsx5X7tqeWyow9fZ6LaUV9kvQGAEX6nfRQSaHd Also, the resolving to older values scenario is still there. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days. |
This issue was closed because it is missing author input. |
Reopening - we need to find a way to prevent these kind of items from getting closed. I'll put down in need of maintainer input. |
js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide. Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterward (see #4336). Assigning to @achingbrain to answer whether this issue is already resolved in Helia, or if this issue needs to be migrated to that repo! |
@helia/ipns supports using secp256k1 keys to publish IPNS records, and also publishing them to DHT peers so this should all work. @imthe-1 if you are still struggling with this issue can you please port your code to use Helia (see @SgtPooki's comment above for migration guide links) and if it still doesn't work, please open an issue on the |
ipfs-core: 0.12.2
libp2p: 0.33.0
libp2p-crypto: 0.19.7
macOS: 12.4
chrome browser: 104.0.5112.101
IPNS
Severity: High
Description:
we have forked the js-ipfs repo and have added the functionality to pass an optional secp256k1 private key for creating custom IPNS keypairs. This allows us to create IPNS keypairs that are created from a child derived from a seed phrase giving more control to the seed phrase. The repos modified are ipfs-core, libp2p, libp2p-crypto. We are using a downgraded version since we faced issues using the latest versions then. We have tried using current latest version as well but faced this issue(4148).
the setup has a browser running ipfs-core and is connected to a go-ipfs(kubo) node so that propagation of IPNS publishing works properly. The IPNS name.publish works properly and returns the public key hash but the name does not resolves when resolved via the go-ipfs node and strangely if the same process is repeated twice we are able to resolve the IPNS name. Due to the modifications we can pass the same private key again on the second name.publish call.
expected result: the IPNS name should resolve on the first call itself.
libp2p-crypto/src/keys/secp256k1-class.js(modified)
creating an IPNS keypair
IPNS publish using the keypair generated above
resolving via the go-ipfs node running on an instance
modified ipfs-core module w/ libp2p and libp2p-crypto changes: https://www.npmjs.com/package/@mdip/ipfs-core
The text was updated successfully, but these errors were encountered: