Open DanielVF opened 5 years ago
I think OrbitDB depends on seeing a new IPFS peer address to start a head exchange. If the only OrbitDBs connected to a database are on the same IPFS peer, then OrbitDB doesn't see another IPFS peer connected to that database, doesn't start a head exchange, and both DB's stay unsynced until a write happens.
Moving this to the Field Manual repo so we can discuss in more depth
In the OrbitDB docs, I read: "In order to have the same data, ie. a query returns the same result for all peers, an OrbitDB database must be replicated between the peers. This happens automatically in OrbitDB in a way that a peer only needs to open an OrbitDB from an address and it'll start replicating the database."
However, the behavior I'm seeing while testing this locally is that when I merely open a DB, no syncing happens.
I have one IPFS server, one Orbit Database, two local instances of that database, each one with some heads that the other does not have has. I start up both instances, and no message are sent on IPFS PubSub, and both DB's remain unsynced.
If I do a write at the point that both are online, they both pickup that new head, and follow the next's back from that write. But merely opening a database connecting does not sync.
Is this intended behavior? Could this be due to my local DB's instances using the same user public key? And/or is this because I'm sharing a remote IPFS server?
Source below: