diff --git a/Cargo.lock b/Cargo.lock index ae0a26792..f08347f82 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -456,9 +456,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d17bf219fcd37199b9a29e00ba65dfb8cd5b2688b7297ec14ff829c40ac50ca9" +checksum = "b1121e32687f7f90b905d4775273305baa4f32cd418923e9b0fa726533221857" dependencies = [ "atty", "bitflags", @@ -1015,7 +1015,7 @@ version = "0.1.17" dependencies = [ "anyhow", "bytes", - "clap 3.0.0", + "clap 3.0.1", "console", "dialoguer", "dirs-next", @@ -2657,9 +2657,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c9d06878b3a851e8026ef94bf7fef9ba93062cd412601da4d9cf369b1cc62d" +checksum = "8aa3d135650b150c29f0c3e385896f9d3ceb42d2d87b02f0d7a8cbd0fc7e19a6" dependencies = [ "num-traits", ] @@ -3438,9 +3438,9 @@ checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" [[package]] name = "serde" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008" +checksum = "97565067517b60e2d1ea8b268e59ce036de907ac523ad83a0475da04e818989a" dependencies = [ "serde_derive", ] @@ -3467,9 +3467,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc0db5cb2556c0e558887d9bbdcf6ac4471e83ff66cf696e5419024d1606276" +checksum = "ed201699328568d8d08208fdd080e3ff594e6c422e438b6705905da01005d537" dependencies = [ "proc-macro2", "quote", @@ -3478,9 +3478,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.73" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" +checksum = "ee2bb9cd061c5865d345bb02ca49fcef1391741b672b54a0bf7b679badec3142" dependencies = [ "itoa 1.0.1", "ryu", diff --git a/clients/web/ts/store.ts b/clients/web/ts/store.ts index dceca57af..982c9af18 100644 --- a/clients/web/ts/store.ts +++ b/clients/web/ts/store.ts @@ -84,6 +84,17 @@ export class MutationBuilder { return new MutationBuilder(entityId); } + static deleteEntity(entityId: string): exocore.store.MutationRequest { + return new exocore.store.MutationRequest({ + mutations: [ + new exocore.store.EntityMutation({ + entityId: entityId, + deleteEntity: new exocore.store.DeleteEntityMutation({ entityId: entityId }), + }), + ], + }); + } + andUpdateEntity(entityId: string): MutationBuilder { this.entityId = entityId; diff --git a/transport/src/p2p/transport.rs b/transport/src/p2p/transport.rs index 2f8aeb752..8f62ec0fe 100644 --- a/transport/src/p2p/transport.rs +++ b/transport/src/p2p/transport.rs @@ -1,4 +1,5 @@ use std::{ + num::NonZeroU8, sync::{Arc, RwLock}, task::{Context, Poll}, }; @@ -96,6 +97,8 @@ impl Libp2pTransport { ping: Ping::default(), }; + const DIAL_CONCURRENCY_FACTOR: u8 = 5; + #[cfg(all(feature = "p2p-web", target_arch = "wasm32"))] let mut swarm = { use libp2p::wasm_ext::{ffi::websocket_transport, ExtTransport}; @@ -118,7 +121,10 @@ impl Libp2pTransport { )) .map(|(peer, muxer), _| (peer, libp2p::core::muxing::StreamMuxerBox::new(muxer))) .boxed(); - Swarm::new(transport, behaviour, *self.local_node.peer_id()) + + libp2p::swarm::SwarmBuilder::new(transport, behaviour, *self.local_node.peer_id()) + .dial_concurrency_factor(NonZeroU8::new(DIAL_CONCURRENCY_FACTOR).unwrap()) + .build() }; #[cfg(feature = "p2p-full")] @@ -136,6 +142,7 @@ impl Libp2pTransport { } libp2p::swarm::SwarmBuilder::new(transport, behaviour, *self.local_node.peer_id()) + .dial_concurrency_factor(NonZeroU8::new(DIAL_CONCURRENCY_FACTOR).unwrap()) .executor(Box::new(CoreExecutor)) .build() };