Phase 1 (0.6.0-beta): remove direct PostPush for encrypted posts

Encrypted posts now propagate only via the CDN (ManifestPush + neighbor
header updates), eliminating the sender→recipient traffic signal on the
wire. Encrypted DMs are indistinguishable from any other encrypted post.

- Remove push_post_to_recipients entirely from network.rs
- Remove call sites in create_post and re-encrypt-on-revoke
- PostPush handler now ignores non-public visibility (kept for public
  audience push path)

Known gap: non-follower DMs won't reach until Phase 3 (merged pull +
recipient-match). Followers receive via the existing CDN path — new
posts trigger neighbor-manifest updates, ManifestPush fans out to
downstream holders, recipients pull missing post IDs from followed
authors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Scott Reimers 2026-04-21 20:46:34 -04:00
parent 921a0ec40a
commit e6265b52b6
3 changed files with 31 additions and 68 deletions

View file

@ -836,13 +836,12 @@ impl Node {
}
}
// For encrypted posts, push directly to recipients
let pushed = self.network.push_post_to_recipients(&post_id, &post, &visibility).await;
// For public posts, push to audience members
// For public posts, push to audience members. Encrypted posts propagate
// via the CDN (ManifestPush + header-diff) to eliminate the sender→recipient
// traffic signal.
let audience_pushed = self.network.push_to_audience(&post_id, &post, &visibility).await;
info!(post_id = hex::encode(post_id), pushed, audience_pushed, "Created new post");
info!(post_id = hex::encode(post_id), audience_pushed, "Created new post");
Ok((post_id, post, visibility))
}
@ -2108,12 +2107,10 @@ impl Node {
storage.store_post_with_visibility(&new_post_id, &new_post, &new_vis)?;
}
// delete_post already pushes the DeleteRecord
// delete_post already pushes the DeleteRecord.
// Replacement post propagates via the CDN to remaining recipients.
self.delete_post(post_id).await?;
// Push replacement post directly to remaining recipients
self.network.push_post_to_recipients(&new_post_id, &new_post, &new_vis).await;
info!(
old_id = hex::encode(post_id),
new_id = hex::encode(new_post_id),