Discussion for https://github.com/Orbitdb/orbit-db. Community docs and CoC at https://github.com/Orbitdb/welcome. FAQ: https://github.com/orbitdb/orbit-db/blob/master/FAQ.md
Hi team! I'm implementing a Node app that is backed by an orbitDB keyvalue store. My config looks like this:
const ipfs = await IpfsHttpClient.create({
host: 'ipfs',
port: '5001',
protocol: 'http'
}); // We have an IPFS node running in the same docker
const orbitDB = await OrbitDB.createInstance(ipfs);
const options = {};
const metricsDB = await orbitDB.keyvalue('kvDb', options)
await metricsDB.load()
<do db stuff>
After this I can set and get data but we can't seem to find the data on IPFS (it seems to me that the data is only coming from orbitdb local storage on node). Maybe there is something missing in the config? :pray: Thank you for your time in advance!
I can set and get data but we can't seem to find the data on IPFS
can you elaborate @zestified
metricsDB.set(key, value)
and metricsDB.get(key)
and that will return the data. However, im not sure whether these key value pair data is persisted on my ipfs node or just in /orbitdb
folder (which is created by default whenever i run the app). So how do i find these data on my ipfs?
Hello, unfortunately I (still) have the replication problem after upgrading orbit-db to 0.28.0. I have a simple test that reproduces it (one node adding entries to the log db, other node connecting and waiting for replication). I can see that they are indeed connecting (orbitdb logs and libp2p events show that), I can also see that heads have been exchanged, however the second db does not receive any replication events, the db is empty.
2021-11-22T21:53:58.577Z [DEBUG] orbit-db: New peer 'QmUZCtB3p9RPjLfk9LdCYc7bdAmVtzg5Tw9YeiNYYqM4VB' connected to '/orbitdb/zdpuB3VCfydEyPvH8ftmokhK19HW1LHmxAPLM8dAje2caFGMB/092183012'
2021-11-22T21:53:58.578Z [DEBUG] exchange-heads: Create a channel to QmUZCtB3p9RPjLfk9LdCYc7bdAmVtzg5Tw9YeiNYYqM4VB
2021-11-22T21:53:58.579Z [DEBUG] exchange-heads: Channel created to QmUZCtB3p9RPjLfk9LdCYc7bdAmVtzg5Tw9YeiNYYqM4VB
2021-11-22T21:53:58.587Z [DEBUG] pubsub: Peer joined /orbitdb/zdpuAvDtJxmX2PxFFvmGAZTj1QoDvThQgZ64LfSGtWox1qW2J/3479623913-test:
Usually I would assume that the problem is on our side but we have been running this test for a while now and it has been passing.
My changes are here: ZbayApp/waggle#152, the test can be run locallyDEBUG='libp2p:websockets:listener:waggle*,waggle:*' ts-node src/nodeTest/testReplicate.ts --nodesCount 1 --timeThreshold 200 --entriesCount 20 --useTor
Maybe I am missing something obvious, If you had time to look at this I would really appreciate. We can also DM to not spam here.