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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
the assert while holding the guard poisons the mutex and that causes
drop to panic because of the poisoned mutex, by design; see last
commit. by shortening the scope of the mutex guard we should once again
see more clear build failures :)
Turns out #174 was wrong, as the alternative required sprinkling
block_on which made the whole thing worse. we shouldn't risk a deadlock
with the mutex as we are not (can not) holding it across awaits.
unwrap as we are not expecting subscriptions to panic and poison the
mutex.
280: Patch a Bitswap leak r=koivunej a=ljedrz
We currently don't properly clean up after a connection to a `Bitswap` peer is closed, which leads to leaking `Ledger`s; funnily enough, it seems that just uncommenting a pre-existing line solves the issue. In addition, add a relevant test.
Co-authored-by: ljedrz <ljedrz@gmail.com>
290: Some maintenance r=koivunej a=ljedrz
Some maintenance work so as not to conflict too much with the pending PRs:
- depend on cid instead of libipld where only Cid is used
- update the `domain` dep (big `Cargo.lock` wins)
cc #75
Co-authored-by: ljedrz <ljedrz@gmail.com>
earlier commit already included cleanup for the Ready and Cancelled
cases and this will do the same for Pending cases. the end result
doesn't change but as is apparent from the test changes: a single
Some(0) becomes None. however this does remove leaking and potential
bugs when a previously completed subscription would be reused.
* chore: upgrade the libp2p to 0.18.(0|1)
* refactor: fix most of the swarm with todos
mainly leaving the multiple connections case to panic.
* feat: add ability to configure listening addr
the original random listening address is still in place.
* add test case for the panic with two connections
* fix: allow multiple connections in p2p/swarm
* doc: Connection and the any connecting address
* chore: cleanup libp2p patching examples
* refactor: rename SwarmApi::stats
perhaps roundtrip_times is more readable.
* chore: upgrade to libp2p 0.19
* fix: awaiting for binding new listening addresses
the initial implementation didn't actually wait for anything other than
asking the swarm to start listening, but now the await will complete
only after a listening address has actually been bound. this required
some nasty matching on the multiaddr protocol parts which will hopefully
ever be used by test code but ... it works now, at least a bit better.
* fix test on macos, fix unspecified addr handling
* 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