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

How does OrbitDB update the heads (tails?) (oplog?) on immutable IPFS #124

Open
filoozom opened this issue Feb 10, 2021 · 3 comments
Open

Comments

@filoozom
Copy link

Hi,

I've tried looking a bit at the code and in this repo, but I'm struggling to find out how OrbitDB is able to keep a constant address on IPFS, which should be immutable.

How can you append to /orbitdb/cid/db? I didn't find any reference to IPNS, but I'm assuming there has to be something like that somewhere?

Thanks!

@filoozom filoozom changed the title How does OrbitDB update the heads (tails?) on immutable IPFS How does OrbitDB update the heads (tails?) (oplog?) on immutable IPFS Feb 10, 2021
@CSDUMMI
Copy link
Contributor

CSDUMMI commented Sep 15, 2021

OrbitDB uses PubSub channels to communicate the CIDs of tail objects.
These objects then reference those objects before them.

The name of the PubSub channel is stored or derived from the manifest.

An example manifest looks like this:

{
  value: {
    name: 'abc',
    type: 'eventlog',
    accessController: '/ipfs/zdpuAyXXyGF4wDnpoV1hnQAT3HrBdnNh27aW9tYzJk1w1pL9B'
  },
  remainderPath: ''
}

And the AC Object then looks like this:

{
  value: {
    type: 'ipfs',
    params: { address: 'zdpuAsngiZH1NMErdZKjrC5DGEb78yvHvGwxe76YiUXTbNE96' }
  },
  remainderPath: ''
}

@CSDUMMI
Copy link
Contributor

CSDUMMI commented Sep 16, 2021

Actually the stringified address of the database is used as the PubSub Channel name.

@astudnev
Copy link

astudnev commented Jun 8, 2022

This explains the topic, but does not tell how we can rely on this PubSub mechanics on real production system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants