GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Phase 3: sync, blob gate, and relays by dezren39 · Pull Request #181 · developing-today/code

Phase 3: sync, blob gate, and relays #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
dezren39 merged 35 commits into main from phase-3
Oct 12, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

Phase 3: sync, blob gate, and relays #181

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cfb8002
docs(id): start phase 3, sync, blobs, and relays [phase 3 start]
dezren39 Oct 12, 2026
ed9fd4d
fix(rust): startup waits only for the home relay [P3.5]
dezren39 Oct 12, 2026
f828d2e
fix(rust): refuse a relay map whose QAD relays are past the probe lim…
dezren39 Oct 12, 2026
a0b3ce3
test(rust): relay kit stops on SIGINT and binds metrics to loopback […
dezren39 Oct 12, 2026
a4bc009
feat(rust): range sync on the redb store with local K and T [P3.1]
dezren39 Oct 12, 2026
ff5401b
fix(rust): a fork in a range batch is isolated [P3.1a]
dezren39 Oct 12, 2026
4509f3d
fix(rust): T=0 is refused at validation, not left to never end [P3.1b]
dezren39 Oct 12, 2026
f398ec9
test(rust): range answer shapes and a bootstrap above the frame limit…
dezren39 Oct 12, 2026
fedb164
feat(rust): vendor p2panda-sync with sqlx removed [P3.2]
dezren39 Oct 12, 2026
072f1c1
feat(rust): method selection for sync sessions [P3.3]
dezren39 Oct 12, 2026
f377b55
feat(rust): LogSync session over the redb traits [P3.2]
dezren39 Oct 12, 2026
1bbe09b
Merge branch 'p3-logsync' into phase-3
dezren39 Oct 12, 2026
942e4b6
Merge branch 'p3-range' into phase-3
dezren39 Oct 12, 2026
e8f01a8
feat(rust): blob requests are gated by the world's fetch rules [P3.4]
dezren39 Oct 12, 2026
19acd26
test(rust): blob gate end to end over loopback [P3.4]
dezren39 Oct 12, 2026
6e9f840
merge: origin/main into phase-3
dezren39 Oct 12, 2026
1bce215
fix(rust): adapt phase-3 sync to the body-aware ingest after merging …
dezren39 Oct 12, 2026
eb6c945
Merge branch 'p3-blobs' into p3-integ
dezren39 Oct 12, 2026
0dfa6de
feat(rust): WorldAccess over the folded worlds for the blob gate [P3.4]
dezren39 Oct 12, 2026
bac287b
test(rust): an event ahead of a voided or proof-header backlink is pa…
dezren39 Oct 12, 2026
937551e
fix(rust): an event ahead of a present backlink is parked, not waited…
dezren39 Oct 12, 2026
6bf0036
fix(rust): plain accepts skip the full refresh after merging main [P3]
dezren39 Oct 12, 2026
5723cc2
style(rust): make FoldedWorlds::new const after merging main [P3]
dezren39 Oct 12, 2026
0d03a3d
fix(rust): a session applies a page in one transaction and one resolu…
dezren39 Oct 12, 2026
ba45dea
fix(rust): LogSync stores arrivals in batches on a blocking worker [P…
dezren39 Oct 12, 2026
0957d9b
test(rust): the big bootstrap test is on demand, a small one always r…
dezren39 Oct 12, 2026
ce2042f
fix(rust): a merge of the restart fix with batch ingest [P1.11]
dezren39 Oct 12, 2026
2d6b33e
fix(rust): a lower fork does not supersede a proof header an event na…
dezren39 Oct 12, 2026
249cc06
docs(id): phase 3 record: steps, commits, open items
dezren39 Oct 12, 2026
581f96c
test(rust): a silent peer must end a range session at its deadline [P…
dezren39 Oct 12, 2026
7cfa83b
fix(rust): a range session ends at its deadline [P3-review]
dezren39 Oct 12, 2026
9cd9a0d
Merge branch 'review-phase-3' into phase-3
dezren39 Oct 12, 2026
46ec8cb
test(rust): an unbounded flight ends the range session at its budget …
dezren39 Oct 12, 2026
51e96d8
fix(rust): range flights are read under a per-session byte budget [P3…
dezren39 Oct 12, 2026
3a51589
Merge remote-tracking branch 'origin/main' into phase-3
dezren39 Oct 12, 2026
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
feat(rust): vendor p2panda-sync with sqlx removed [P3.2]
LogSync needs p2panda-sync, and its store dependency defaults to the
sqlite feature, which pulls in sqlx. The store is redb (explainers
section 14), so this vendors p2panda-sync 0.7.1 from p2panda rev
3e84cac under pkgs/id/vendor/p2panda-sync with that default turned off.
A fork was not used, so nothing is pushed or published.

The substantive change is one line in the vendored Cargo.toml:
p2panda-store default-features = false. The other manifest changes
resolve workspace inheritance, since the copy sits outside the p2panda
workspace; the examples (which construct SqliteStore) are removed. The
origin rev, the diff, and how to re-verify both are in
pkgs/id/vendor/README.md.

Cargo.lock gains the p2panda-sync package and a futures-util edge
(0.3, sink feature). No third-party crate is added to the lock.

The store_traits lock test now guards SQLite with LogSync wired in. It
fails if the lock names sqlx, sqlite, rusqlite or libsqlite3-sys, if
p2panda-sync is missing, or if the vendored p2panda-store loses
default-features = false. Checked red: with the default restored, the
lock gains seven sqlx entries and the test fails.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 committed Oct 12, 2026
commit fedb1644ece9cac32152b48ccf4958e777de8bcc

There are no files selected for viewing

18 changes: 18 additions & 0 deletions 18 pkgs/id/Cargo.lock
Show comments
View file
Open in desktop

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

3 changes: 3 additions & 0 deletions 3 pkgs/id/Cargo.toml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ libc = "0.2"
distributed-topic-tracker = "0.3"
ed25519-dalek = { version = "3", features = ["rand_core"] }
futures-lite = "2"
futures-util = { version = "0.3", features = ["sink"] }
iroh = "1"
iroh-mdns-address-lookup = "0.6"
iroh-base = "1"
Expand All @@ -54,6 +55,8 @@ iroh-gossip = { version = "0.101", features = ["net"] }
p2panda-core = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c" }
# Store traits only. The default features would pull in SQLite (explainers section 14).
p2panda-store = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c", default-features = false }
# LogSync. A vendored copy whose store dependency has no SQLite default (vendor/README.md).
p2panda-sync = { path = "vendor/p2panda-sync" }
postcard = { version = "1", features = ["alloc"] }
rand = "0.10"
redb = "=4.3.0"
Expand Down
46 changes: 28 additions & 18 deletions 46 pkgs/id/src/store_traits.rs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@
//! reason, rather than a guess. Auth state, fork proofs and waiting events are not part of these
//! traits, and stay in the event store's own tables.
//!
//! # Known limit: `LogSync` is not wired in
//! # `LogSync`
//!
//! p2panda-sync is not a dependency yet. Its p2panda-store dependency uses the default features,
//! and those include SQLite, so adding it would bring SQLite back into the build. Until P3.2
//! removes that default (a fork of the one dependency line, or a `LogSync` of our own), nothing
//! here runs `LogSync`. `test_logsync_is_not_wired_and_the_lock_has_no_sqlite` pins this: it fails
//! when the lock names SQLite or p2panda-sync, so that change is made on purpose.
//! `LogSync` runs over these traits in `log_sync`. It uses a vendored copy of p2panda-sync
//! (`vendor/`) whose store dependency has no SQLite default, so the build has no SQLite.
//! `test_the_lock_has_no_sqlite_with_logsync_wired` fails if SQLite returns.

use std::collections::{BTreeMap, BTreeSet, VecDeque};
use std::future::{Future, ready};
Expand Down Expand Up @@ -463,25 +461,37 @@ mod tests {
use crate::chain::{ChainExt, sign};
use crate::waiting::WaitingLimits;

/// The `LogSync` limit, pinned. The lock has no SQLite and no p2panda-sync, so `LogSync` is not
/// wired in. Adding p2panda-sync brings SQLite back through its store dependency, which is
/// the P3.2 item. This test fails on either, so the change is made on purpose.
/// The build has no SQLite, with `LogSync` wired in. p2panda-sync's store dependency defaults to
/// SQLite, so the vendored copy turns that default off (`vendor/README.md`). This fails if the
/// lock names SQLite or sqlx, if p2panda-sync is missing, or if the vendored line loses the change.
#[test]
fn test_logsync_is_not_wired_and_the_lock_has_no_sqlite() {
fn test_the_lock_has_no_sqlite_with_logsync_wired() {
let lock =
std::fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/Cargo.lock")).unwrap();
for name in [
"sqlx",
"sqlite",
"rusqlite",
"libsqlite3-sys",
"p2panda-sync",
] {
for name in ["sqlx", "sqlite", "rusqlite", "libsqlite3-sys"] {
assert!(
!lock.contains(&format!("name = \"{name}")),
"Cargo.lock names {name}: LogSync needs p2panda-sync without its SQLite default (P3.2)"
"Cargo.lock names {name}: SQLite is back in the build (see vendor/README.md)"
);
}
assert!(
lock.contains("name = \"p2panda-sync\""),
"Cargo.lock does not name p2panda-sync: LogSync is not wired in"
);

let manifest = std::fs::read_to_string(concat!(
env!("CARGO_MANIFEST_DIR"),
"/vendor/p2panda-sync/Cargo.toml"
))
.unwrap();
let store_line = manifest
.lines()
.find(|line| line.starts_with("p2panda-store = {"))
.unwrap();
assert!(
store_line.contains("default-features = false"),
"the vendored p2panda-store keeps its SQLite default: {store_line}"
);
}

fn key(n: u8) -> SigningKey {
Expand Down
35 changes: 35 additions & 0 deletions 35 pkgs/id/vendor/README.md
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Vendored crates

## p2panda-sync 0.7.1

**Origin.** `https://github.com/p2panda/p2panda`, rev `3e84cac48bba05c6857cce2ec433862b97f8d53c`, crate `p2panda-sync/`. The same rev as the other p2panda crates in `pkgs/id/Cargo.toml`. License `MIT OR Apache-2.0` (`p2panda-sync/LICENSES/`).

**Why.** p2panda-sync depends on p2panda-store with its default features, and the default includes `sqlite`, which pulls in `sqlx`. The store is redb (explainers section 14), so the copy removes that default. Vendoring was chosen over a fork, so nothing is pushed or published.

**The substantive change** (one line, in `p2panda-sync/Cargo.toml`):

```diff
-p2panda-store = { workspace = true, default-features = true }
+p2panda-store = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c", default-features = false }
```

**Mechanical changes**, needed because this copy is outside the p2panda workspace:

- Every `workspace = true` is replaced by the root's value (`[workspace.dependencies]`). `p2panda-core` and `p2panda-stream` become the same git source and rev.
- `[lints] workspace = true` is removed, so the copy takes no lints from this crate.
- `[dev-dependencies]` is removed. Its tests use the SQLite test helpers and are not built here.
- `examples/` is removed. The examples construct `SqliteStore`.
- `LICENSES/` is added.

**Verify.** The copy matches upstream except the files above:

```sh
SRC=$(ls -d ~/.cargo/git/checkouts/p2panda-*/3e84cac/p2panda-sync)
diff -rq "$SRC" pkgs/id/vendor/p2panda-sync # Cargo.toml differs; examples/ and LICENSES/ differ
diff -u "$SRC/Cargo.toml" pkgs/id/vendor/p2panda-sync/Cargo.toml
git -C "$SRC/.." rev-parse HEAD # 3e84cac48bba05c6857cce2ec433862b97f8d53c
```

`sqlx` is absent from the build. `cargo tree -i sqlx` reports no match, and `store_traits`'s `test_the_lock_has_no_sqlite_with_logsync_wired` fails if `Cargo.lock` names `sqlx`, `sqlite`, `rusqlite` or `libsqlite3-sys`, or if the `p2panda-store` line above loses `default-features = false`.

**To update.** Change the rev in the three places it appears (this file, the two git lines in `vendor/p2panda-sync/Cargo.toml`, and the git lines in `pkgs/id/Cargo.toml`). Then copy the crate again and reapply the changes above.
50 changes: 50 additions & 0 deletions 50 pkgs/id/vendor/p2panda-sync/Cargo.toml
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[package]
name = "p2panda-sync"
version = "0.7.1"
edition = "2024"
authors = [
"adz <[email protected]>",
"sandreae <[email protected]>",
"glyph <[email protected]>",
]
description = "Local-first sync for append-only logs and traits to build your own"
repository = "https://github.com/p2panda/p2panda"
license = "MIT OR Apache-2.0"
readme = "README.md"
keywords = ["p2p", "local-first", "sync", "replication"]
rust-version = "1.96"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = []
ingest = [
"dep:p2panda-stream",
]
test_utils = [
"dep:rand",
"dep:tracing-subscriber",
"p2panda-core/test_utils",
"p2panda-store/test_utils",
]

# Vendored from p2panda rev 3e84cac. See ../README.md for the changes.
# Every `workspace = true` below is resolved to the root's value, since this copy is outside that workspace.
[dependencies]
futures-channel = "0.3.32"
futures-util = { version = "0.3.32", default-features = true, features = ["sink"] }
p2panda-core = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c", default-features = true }
# Changed from the upstream line `p2panda-store = { workspace = true, default-features = true }`.
# The upstream default is `sqlite`, which pulls in sqlx. Our traits do not need it.
p2panda-store = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c", default-features = false }
p2panda-stream = { git = "https://github.com/p2panda/p2panda", rev = "3e84cac48bba05c6857cce2ec433862b97f8d53c", optional = true, default-features = false, features = ["ingest"] }
pin-project-lite = "0.2.16"
rand = { version = "0.10.1", optional = true }
serde = "1.0.228"
thiserror = "2.0.18"
tokio = { version = "1.52.3", default-features = true, features = ["macros", "sync"] }
tokio-stream = { version = "0.1.18", default-features = false, features = ["sync"] }
tracing = "0.1.44"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"], optional = true }
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.