-
Notifications
You must be signed in to change notification settings - Fork 446
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
Preserve PeerInfos discovered #68
Comments
I would suggest using the |
Another feature to add is the ability to dump to disk the PeerBook, so that we can shutdown and boot the node and get back almost every connection |
yes, that should be easy to do now that we have the datastore |
we could actually move the peerbook to be a direct wrapper round reading and writing to the datastore instead of in memory that way we consume less memory and it's directly backed up |
@dignifiedquire that would be quite nice! As long as there is some queueing for the writes, so that we don't stress with a 'good to have but not strictly necessary' operation that does lot of IO |
I can easily write datastore wrapper that batches ops if many come in at once :) but those read and writes to leveldb/indexedb are pretty cheap as well. |
Though warning, it will make the whole peerbook api async |
@dignifiedquire we can keep it sync, with an interval that flushes it. |
that doesn't change reads |
@dignifiedquire on repo open, it should just load all the peerBook into memory. |
This has been done \o/ |
Make identify not freak out on missing pubkey, it is ok.. this enables webrtc-star discovery to work fine
Update project config to publish api docs
## [2.0.4](libp2p/js-libp2p-record@v2.0.3...v2.0.4) (2022-12-16) ### Documentation * publish api docs ([libp2p#68](libp2p/js-libp2p-record#68)) ([5a3dd41](libp2p/js-libp2p-record@5a3dd41))
Removes the dependency on uuid. Use a simpler random string generator instead.
## [1.0.1](libp2p/js-libp2p-webrtc@v1.0.0...v1.0.1) (2023-01-03) ### Bug Fixes * remove uuid dependency ([libp2p#68](libp2p/js-libp2p-webrtc#68)) ([fb14b88](libp2p/js-libp2p-webrtc@fb14b88))
Allows setting the same tag twice, last update wins. Otherwise trying to ensure atomic writes becomes very hard.
## [6.0.2](libp2p/js-libp2p-peer-store@v6.0.1...v6.0.2) (2023-03-02) ### Bug Fixes * allow overwriting tags ([libp2p#68](libp2p/js-libp2p-peer-store#68)) ([4182211](libp2p/js-libp2p-peer-store@4182211)) ### Trivial Changes * Update .github/workflows/semantic-pull-request.yml [skip ci] ([e1271cf](libp2p/js-libp2p-peer-store@e1271cf)) ### Dependencies * **dev:** bump protons from 6.1.3 to 7.0.2 ([libp2p#60](libp2p/js-libp2p-peer-store#60)) ([0b5e25f](libp2p/js-libp2p-peer-store@0b5e25f))
As brought up here: https://github.com/libp2p/js-libp2p/pull/64/files#r108192190
With the DHT, we will want to preserve PeerInfos discovered. This is also the start of having a way to add info about each Peer we know for statistics.
The text was updated successfully, but these errors were encountered: