On 2/7/24 13:32, Big Boy wrote:
Good day! My apologies for writing again about the PEERSTORE service,
but I have some more questions. Firstly, the store operation will store
the keys-value pair in the client's device, while the iterate operation
will look for the record locally?
Yes.
Secondly, if I provide a peer id to
the store operation, will it act as signing a value i.e not letting a
different peer to add more values/replace the value?
Only the local peer can store data in the PEERSTORE, and other peers
cannot see values the local peer stored into its PEERSTORE. Signatures
are unnecessary.
Third question, is
there a way to generate a peer identity by providing a hash key pair?
I'm not sure what you mean by 'hash key pair', and there are different
answers to this; but right now, each peer generates its peer identity at
random, and there is no way to 'generate' it in any other way in the
current implementation.
> I
want my users to be able to connect from multiple devices with some
credentials and access stored data. Thank you in advance!
Then PEERSTORE is the wrong solution, you need the DHT or FS or
something else, but not PEERSTORE.
În joi, 1 feb. 2024 la 23:43, Christian Grothoff <groth...@gnunet.org
<mailto:groth...@gnunet.org>> a scris:
Hi BB,
Peerstore is just a local database for information a peer keeps about
other peers (by their PeerIds, and yes, that's what you get as the CORE
ID and via the connect callbacks), it is *not* a DHT. The DHT is a
separate subsystem.
As it is the local (trusted) code storing information locally, the
expiration time is whatever the local code wants it to be.
I *think* the current implementation _may_ have a value size limit
around 64k, but in principle that could be fixed if desired.
I hope this answers your questions!
Happy hacking!
Christian
On 2/1/24 21:29, Big Boy wrote:
> Good day, I looked at the current documentation of GNUnet and I have
> some questions regarding the PEERSTORE service:
> - how is the PEERSTORE supposed to work? Is it like a DHT, where
some
> info is kept on each peer? Is it a reference of the said information
> kept locally on each peer? I looked at the bibliography available
and I
> haven't yet seen a reference regarding how the peerstore service is
> supposed to work.
> - what is the maximum size of the stored data in a key? And is
there a
> TTL similar to DHT for stored data?
> - what PeerIdentity can I use in order to store data as signed? I
would
> imagine that the CORE identity that's created during the connects()
> method could work, but does it remain the same for each peer or
is it
> changing constantly?
>
> Thank you in advance!