IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
this adds a BlockPut result in two places which is inferior to the more
complete bitswap refactoring. BlockPut will let the caller know if the
block was added or if it existed already. This is poorly implemented in
the fs blockstore.
Using prefixes for creating CIDs is tightly coupled to Bitswap. Hence moving
this functionality from rust-cid [1] directly into bitswap.
[1]: fcb8ea3f48/src/prefix.rs
* add: pubsub http api
* add: get shoveling and subscription complications going
currently the missing piece is seeing locally sent messages in the
subscribed streams, then maybe creating a more complicated API for
subscribing which will require a single task for shoveling into the
responses.
* chore: lower timeout to pass the tests
Should probably have another drop sender here.
* fix: close stream on first error
tokio::sync::broadcast will continue after telling how many items were
lost, which seems likely with the small buffer and quickly firing more
than the buffer elements.
* fix: raise the buffer size for subscribe responses
* feat: use custom rust-libp2p to pass tests
the v0.16.2-with-floodsub-opts includes "subscribers see locally
published messages" which is needed for the conformance tests to pass.
this has been PR'd as https://github.com/libp2p/rust-libp2p/pull/1520.
* fix: pubsub test after changing the floodsub impl
* add: simple pubsub api
the api is quite horrible with `ipfs::Ipfs::pubsub_*` methods but it
works. `ipfs::Ipfs` provides subscribing to a topic at most once, the
old subscription needs to be unsubscribed with `pubsub_unsubscribe`
before a new one can be started.
message publishing happens via the `Floodsub::publish_any` api which
allows publishing into not subscribed topics.
there are also apis for getting the known peers optionally per topic and
listing the active subscriptions.
subscriptions can be dropped by the user but the subscription will not
be cleaned up until a message comes in... this is perhaps something to
be looked at.
* add: simple pubsub tests
* fix: impl unsubscribing via drop
* doc: add missing public doc comment
* doc: add and adjust
* refactor: clippy warnings
* fix: dont unsub on drop after stream ended
this happens only once the sender has been dropped by unsubscribing (or
later via bounded channel becoming full).
* doc: update comments on pubsub
* fix: poll swarm fully
there was an issue where swarm wasn't being polled to the end for which
I hastly created https://github.com/libp2p/rust-libp2p/issues/1516. in
later investigation it turned out that the ipfs::p2p::pubsub was
returning `Poll::Pending` too soon. alternative to the loops would be to
wake the task up where previously `Poll::Pending` was returned.
the issue manifested because of the polling order and the changes made
to the swarm after polling it. the changes created new events which
needed to be dispatched which in turn means the swarm needs to be polled
again or a wakeup be scheduled. adding those wakeups would make the
tasks more co-operative with the same tasks running on the executor.
also reverts the changes made in
290fcfa3ad to ipfs::p2p::swarm where
std::task::Waker was recorded and notified on changes. adding the waker
helped in that particular case but not in general.
* fix: remove rare panic in valid situation
* refactor: remove extra logging