Compare commits

..

3 Commits

Author SHA1 Message Date
link2xt
37c771d342 temporarily replace logging with print 2024-05-25 05:52:07 +00:00
Septias
72df9504ad optimize logs 2024-05-25 05:52:07 +00:00
Sebastian Klähn
c68008aa04 feat(peer_channels): call update_endpoints 2024-05-25 05:52:07 +00:00
16 changed files with 67 additions and 76 deletions

View File

@@ -1,33 +1,5 @@
# Changelog
## [1.139.6] - 2024-05-25
### Build system
- Update `iroh` to the git version.
- nix: Add iroh-base output hash.
- Upgrade iroh to 0.17.0.
### Fixes
- @deltachat/stdio-rpc-server: Do not set RUST_LOG to "info" by default.
- Acquire write lock on iroh_channels before checking for subscribe_loop.
### Miscellaneous Tasks
- Fix python lint.
- cargo-deny: Remove unused entry from deny.toml.
### Refactor
- Log IMAP connection type on connection failure.
### Tests
- Viewtype::File attachments are sent unchanged and preserve extensions.
- deltachat-rpc-client: Add realtime channel tests.
- deltachat-rpc-client: Regression test for double gossip subscription.
## [1.139.5] - 2024-05-23
### API-Changes
@@ -4328,4 +4300,3 @@ https://github.com/deltachat/deltachat-core-rust/pulls?q=is%3Apr+is%3Aclosed
[1.139.3]: https://github.com/deltachat/deltachat-core-rust/compare/v1.139.2...v1.139.3
[1.139.4]: https://github.com/deltachat/deltachat-core-rust/compare/v1.139.3...v1.139.4
[1.139.5]: https://github.com/deltachat/deltachat-core-rust/compare/v1.139.4...v1.139.5
[1.139.6]: https://github.com/deltachat/deltachat-core-rust/compare/v1.139.5...v1.139.6

58
Cargo.lock generated
View File

@@ -1324,7 +1324,7 @@ dependencies = [
[[package]]
name = "deltachat"
version = "1.139.6"
version = "1.139.5"
dependencies = [
"ansi_term",
"anyhow",
@@ -1419,7 +1419,7 @@ dependencies = [
[[package]]
name = "deltachat-jsonrpc"
version = "1.139.6"
version = "1.139.5"
dependencies = [
"anyhow",
"async-channel 2.2.1",
@@ -1444,7 +1444,7 @@ dependencies = [
[[package]]
name = "deltachat-repl"
version = "1.139.6"
version = "1.139.5"
dependencies = [
"ansi_term",
"anyhow",
@@ -1459,7 +1459,7 @@ dependencies = [
[[package]]
name = "deltachat-rpc-server"
version = "1.139.6"
version = "1.139.5"
dependencies = [
"anyhow",
"deltachat",
@@ -1488,7 +1488,7 @@ dependencies = [
[[package]]
name = "deltachat_ffi"
version = "1.139.6"
version = "1.139.5"
dependencies = [
"anyhow",
"deltachat",
@@ -3237,9 +3237,8 @@ dependencies = [
[[package]]
name = "iroh-base"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1be0b442ed44d20905cf77c673169906c883e05c829e3fb303b131e925139fc"
version = "0.16.0"
source = "git+https://github.com/n0-computer/iroh?rev=c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e#c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e"
dependencies = [
"aead",
"anyhow",
@@ -3278,9 +3277,8 @@ dependencies = [
[[package]]
name = "iroh-gossip"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "857aa77a0b29283edf99224bd12cd739684c5873e639b85adb38b8d1d777162d"
version = "0.16.0"
source = "git+https://github.com/n0-computer/iroh?rev=c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e#c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e"
dependencies = [
"anyhow",
"bytes",
@@ -3304,9 +3302,8 @@ dependencies = [
[[package]]
name = "iroh-metrics"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd54b9cf342b2618efc8d3ff6cdcd083fa5a2cf6cc78bb473bd32e228eabb40e"
version = "0.16.0"
source = "git+https://github.com/n0-computer/iroh?rev=c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e#c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e"
dependencies = [
"anyhow",
"erased_set",
@@ -3325,9 +3322,8 @@ dependencies = [
[[package]]
name = "iroh-net"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4a744000e6c5704479eeb4751eb23b9b8e7e56a0fc484beb8831694fc93e378f"
version = "0.16.0"
source = "git+https://github.com/n0-computer/iroh?rev=c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e#c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e"
dependencies = [
"aead",
"anyhow",
@@ -3372,7 +3368,7 @@ dependencies = [
"postcard",
"rand 0.8.5",
"rand_core 0.6.4",
"rcgen 0.12.1",
"rcgen 0.11.3",
"reqwest 0.12.4",
"ring 0.17.8",
"rtnetlink",
@@ -3402,9 +3398,9 @@ dependencies = [
[[package]]
name = "iroh-quinn"
version = "0.10.5"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "906875956feb75d3d41d708ddaffeb11fdb10cd05f23efbcb17600037e411779"
checksum = "b934380145fd5d53a583d01ae9500f4807efe6b0f0fe115c7be4afa2b35db99f"
dependencies = [
"bytes",
"iroh-quinn-proto",
@@ -3419,13 +3415,13 @@ dependencies = [
[[package]]
name = "iroh-quinn-proto"
version = "0.10.8"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6bf92478805e67f2320459285496e1137edf5171411001a0d4d85f9bbafb792"
checksum = "16f2656b322c7f6cf3eb95e632d1c0f2fa546841915b0270da581f918c70c4be"
dependencies = [
"bytes",
"rand 0.8.5",
"ring 0.17.8",
"ring 0.16.20",
"rustc-hash",
"rustls 0.21.11",
"rustls-native-certs",
@@ -3437,9 +3433,9 @@ dependencies = [
[[package]]
name = "iroh-quinn-udp"
version = "0.4.2"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edc7915b3a31f08ee0bc02f73f4d61a5d5be146a1081ef7f70622a11627fd314"
checksum = "6679979a7271c24f9dae9622c0b4a543881508aa3a7396f55dfbaaa56f01c063"
dependencies = [
"bytes",
"libc",
@@ -5060,6 +5056,18 @@ dependencies = [
"yasna",
]
[[package]]
name = "rcgen"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "52c4f3084aa3bc7dfbba4eff4fab2a54db4324965d8872ab933565e6fbd83bc6"
dependencies = [
"pem 3.0.4",
"ring 0.16.20",
"time 0.3.34",
"yasna",
]
[[package]]
name = "rcgen"
version = "0.12.1"

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat"
version = "1.139.6"
version = "1.139.5"
edition = "2021"
license = "MPL-2.0"
rust-version = "1.77"
@@ -61,8 +61,8 @@ hickory-resolver = "0.24"
humansize = "2"
image = { version = "0.25.1", default-features=false, features = ["gif", "jpeg", "ico", "png", "pnm", "webp", "bmp"] }
iroh_old = { version = "0.4.2", default-features = false, package = "iroh"}
iroh-net = "0.17.0"
iroh-gossip = { version = "0.17.0", features = ["net"] }
iroh-net = { git = "https://github.com/n0-computer/iroh", rev="c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e" }
iroh-gossip = { git = "https://github.com/n0-computer/iroh", rev="c8690a2c6eb5753c4ec6b7e44db72abf09df3c6e", features = ["net"] }
quinn = "0.10.0"
kamadak-exif = "0.5.3"
lettre_email = { git = "https://github.com/deltachat/lettre", branch = "master" }
@@ -179,4 +179,4 @@ vendored = [
"async-native-tls/vendored",
"rusqlite/bundled-sqlcipher-vendored-openssl",
"reqwest/native-tls-vendored"
]
]

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat_ffi"
version = "1.139.6"
version = "1.139.5"
description = "Deltachat FFI"
edition = "2018"
readme = "README.md"

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-jsonrpc"
version = "1.139.6"
version = "1.139.5"
description = "DeltaChat JSON-RPC API"
edition = "2021"
default-run = "deltachat-jsonrpc-server"

View File

@@ -58,5 +58,5 @@
},
"type": "module",
"types": "dist/deltachat.d.ts",
"version": "1.139.6"
"version": "1.139.5"
}

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-repl"
version = "1.139.6"
version = "1.139.5"
license = "MPL-2.0"
edition = "2021"
repository = "https://github.com/deltachat/deltachat-core-rust"

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "deltachat-rpc-client"
version = "1.139.6"
version = "1.139.5"
description = "Python client for Delta Chat core JSON-RPC interface"
classifiers = [
"Development Status :: 5 - Production/Stable",

View File

@@ -177,7 +177,8 @@ class Rpc:
account_id = event["contextId"]
queue = self.get_queue(account_id)
event = event["event"]
logging.debug("account_id=%d got an event %s", account_id, event)
# logging.debug("account_id=%d got an event %s", account_id, event)
print("account_id=%d got an event %s" % (account_id, event))
queue.put(event)
except Exception:
# Log an exception if the event loop dies.

View File

@@ -1,6 +1,6 @@
[package]
name = "deltachat-rpc-server"
version = "1.139.6"
version = "1.139.5"
description = "DeltaChat JSON-RPC server"
edition = "2021"
readme = "README.md"

View File

@@ -15,5 +15,5 @@
},
"type": "module",
"types": "index.d.ts",
"version": "1.139.6"
"version": "1.139.5"
}

View File

@@ -139,4 +139,5 @@ license-files = [
github = [
"async-email",
"deltachat",
"n0-computer",
]

View File

@@ -55,5 +55,5 @@
"test:mocha": "mocha node/test/test.mjs --growl --reporter=spec --bail --exit"
},
"types": "node/dist/index.d.ts",
"version": "1.139.6"
"version": "1.139.5"
}

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "deltachat"
version = "1.139.6"
version = "1.139.5"
description = "Python bindings for the Delta Chat Core library using CFFI against the Rust-implemented libdeltachat"
readme = "README.rst"
requires-python = ">=3.7"

View File

@@ -1 +1 @@
2024-05-25
2024-05-23

View File

@@ -25,6 +25,7 @@
use anyhow::{anyhow, Context as _, Result};
use email::Header;
use futures_lite::StreamExt;
use iroh_gossip::net::{Gossip, JoinTopicFut, GOSSIP_ALPN};
use iroh_gossip::proto::{Event as IrohEvent, TopicId};
use iroh_net::relay::{RelayMap, RelayUrl};
@@ -157,10 +158,6 @@ impl Iroh {
self.gossip.broadcast(topic, data.into()).await?;
if env::var("REALTIME_DEBUG").is_ok() {
info!(ctx, "Sent realtime data");
}
Ok(())
}
@@ -246,6 +243,15 @@ impl Context {
// Shuts down on deltachat shutdown
tokio::spawn(endpoint_loop(context, endpoint.clone(), gossip.clone()));
let endp = endpoint.clone();
let gsp = gossip.clone();
tokio::spawn(async move {
let mut stream = endp.local_endpoints();
while let Some(endpoints) = stream.next().await {
gsp.update_endpoints(&endpoints)?;
}
anyhow::Ok(())
});
Ok(Iroh {
endpoint,
gossip,
@@ -347,7 +353,9 @@ pub async fn send_webxdc_realtime_advertisement(
msg.param.set_cmd(SystemMessage::IrohNodeAddr);
msg.in_reply_to = Some(webxdc.rfc724_mid.clone());
send_msg(ctx, webxdc.chat_id, &mut msg).await?;
info!(ctx, "IROH_REALTIME: Sent realtime advertisement");
if env::var("REALTIME_DEBUG").is_ok() {
info!(ctx, "IROH_REALTIME: Sent realtime advertisement");
}
Ok(conn)
}
@@ -363,6 +371,7 @@ pub async fn leave_webxdc_realtime(ctx: &Context, msg_id: MsgId) -> Result<()> {
let iroh = ctx.get_or_try_init_peer_channel().await?;
iroh.leave_realtime(get_iroh_topic_for_msg(ctx, msg_id).await?)
.await?;
info!(ctx, "IROH_REALTIME: Left gossip for message {msg_id}");
Ok(())
@@ -430,11 +439,12 @@ async fn subscribe_loop(
let event = stream.recv().await?;
match event {
IrohEvent::NeighborUp(node) => {
info!(context, "IROH_REALTIME: NeighborUp: {}", node.to_string());
iroh_add_peer_for_topic(context, msg_id, topic, node, None).await?;
}
IrohEvent::Received(event) => {
info!(context, "IROH_REALTIME: Received realtime data");
if env::var("REALTIME_DEBUG").is_ok() {
info!(context, "IROH_REALTIME: Received realtime data");
}
context.emit_event(EventType::WebxdcRealtimeData {
msg_id,
data: event