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

Automate "update IPNS process" for Castor #4

Closed
daviddias opened this issue Nov 20, 2015 · 4 comments
Closed

Automate "update IPNS process" for Castor #4

daviddias opened this issue Nov 20, 2015 · 4 comments
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@daviddias
Copy link
Member

castor id: QmdNc4B89DxVeiuDKRN5bWdKsAPCmekgmJMkRSdUNa7x9z
castor multiaddr: /ip4/37.59.33.238/tcp/4001/ipfs/QmdNc4B89DxVeiuDKRN5bWdKsAPCmekgmJMkRSdUNa7x9z

registry-mirror --ipfs --clone must auto update the IPNS name each time the mirror of the registry is updated. In ipfs CLI commands, this would be:

ipfs name publish /ipfs/`ipfs files stat /npm-registry | head -n1`
@daviddias daviddias added the kind/enhancement A net-new feature or improvement to an existing feature label Nov 20, 2015
@daviddias
Copy link
Member Author

For quick ref

var ipfsAPI = require('ipfs-api')('/ip4/127.0.0.1/tcp/5001')

ipfsAPI.files.stat('/npm-registry', function (err, res) {
  if (err) {
    return console.log(err)
  }
  ipfsAPI.name.publish('/ipfs/' + res.Hash, function (err, res) {
    if (err) {
      return console.log(err)
    }
  })
})

This was referenced Nov 23, 2015
@daviddias
Copy link
Member Author

@whyrusleeping when doing a ipfs name publish on a Node with ipfs swarm peers | wc -l === 0, IPFS throws an error, but when we are connected to at least one Node, it doesn't anymore. There is a point in that, but the thing is that we can publish when we have 1 node, disconnect, and then connect it after, and IPNS will know to continue to provide that IPNS record. Wouldn't it make sense to just let IPNS always "publish"?

@ghost
Copy link

ghost commented Nov 29, 2015

registry-mirror --ipfs --clone must auto update the IPNS name each time the mirror of the registry is updated

Does it already do that? It might make sense to update IPNS in batches.

Wouldn't it make sense to just let IPNS always "publish"?

Agreed

@daviddias
Copy link
Member Author

part I: #23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant