I am trying to read information created in a ceramic node A from different ceramic node B.
I am starting the connection of the second with --extra-ceramic-peer-address, connecting successfully from what I see in the logs, and I am able to get the events using getEventsFeed() from the node B, but not able to use getDocumentState(), as looks like not able to retrieve the stream information (returning undefined from node B but correct information from A). Why is retrieving events but not the document state?
Also, getting this warning in the logs in case it helps too.: WARN recon::libp2p: peer not found in peers map when started synchronizing?, peer_id: 12D3KooW...7hYm
I was able to connect to a node in different machine and I did not have these issues related to recon (previous errors I was running different ceramic nodes under same machine but with different port configuration).
I used --extra-ceramic-peer-address to connect the nodes, and I see stable “connection established” log, but when I try to use getDocumentState() from the node that did not create the stream then I am not able to retrieve the information, but being connected to the node that created the information it should speed up the process of finding the information, right? How long should it take?
Have you made sure to register the “interest” in your model on both nodes?
You shouldn’t need to connect them directly (though it doesn’t hurt if you do). Each C1 node automatically connects to our bootstrap nodes, and is able to discover other nodes interested in the same models.
I did that yes, and I realized that I can get the information using getEventsFeed() method to retrieve all the events related to the interest. But using getDocumentState() does not work even registering interest, I think it should work, but finally using getEventsFeed I am able to decode the information as explained in this post (with some doubts exposed there, but the code works and I am able to retrieve the events from different nodes by registering the events).
getDocumentState() not working is a bit concerning…
Please make sure you don’t update the same stream across multiple nodes. Currently, the protocol assumes that there is only a single author for a stream, writing to one node.
But it would be possible to update the same stream using the same single author but pointing to different ceramic nodes, right? For example updating a stream using C1 node A and then updating again using C1 node B, shouldn’t be a problem with that right?