tangle


git clone https://radroots.dev/git/tangle.git
Log | Files | Refs | README | LICENSE

commit 93cd88dc6f6daa63e70705ea9da890996aea7b62
parent a000036f46a091270b6c7598f36a3995350143d5
Author: triesap <tyson@radroots.org>
Date:   Sat, 13 Jun 2026 16:18:28 -0700

build: pin pocket dependency boundary

- pin Pocket dependencies to the Chorus latest manifest revision
- expose the tangle_store_pocket dependency boundary types
- record Chorus, Pocket, and Zooid source pins without local paths
- cover the pinned Pocket boundary with targeted tests

Diffstat:
MCargo.lock | 199++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mcrates/tangle_store_pocket/Cargo.toml | 2++
Mcrates/tangle_store_pocket/src/lib.rs | 55++++++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 254 insertions(+), 2 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -332,6 +332,15 @@ dependencies = [ [[package]] name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bincode" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36eaf5d7b090263e8150820482d5d93cd964a81e4019913c972f4edcc6edb740" @@ -369,10 +378,29 @@ dependencies = [ ] [[package]] +name = "bitcoin-io" +version = "0.1.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11301df0b06f22dea7bb1916403fdd88a371031e495c49b8f96931b28189e175" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c9901a56e133a1fc86eeb1113e2591f45f4682451ca893bff494d2f88918e3f" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + +[[package]] name = "bitflags" version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +dependencies = [ + "serde_core", +] [[package]] name = "bitvec" @@ -672,6 +700,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" [[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -864,6 +898,19 @@ dependencies = [ ] [[package]] +name = "derive_more" +version = "0.99.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.117", +] + +[[package]] name = "deunicode" version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -961,6 +1008,15 @@ dependencies = [ ] [[package]] +name = "doxygen-rs" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9" +dependencies = [ + "phf 0.11.3", +] + +[[package]] name = "dtoa" version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1627,6 +1683,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] +name = "heed" +version = "0.20.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb" +dependencies = [ + "bitflags", + "byteorder", + "heed-traits", + "heed-types", + "libc", + "lmdb-master-sys", + "once_cell", + "page_size", + "serde", + "synchronoise", + "url", +] + +[[package]] +name = "heed-traits" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3130048d404c57ce5a1ac61a903696e8fcde7e8c2991e9fcfc1f27c3ef74ff" + +[[package]] +name = "heed-types" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d3f528b053a6d700b2734eabcd0fd49cb8230647aa72958467527b0b7917114" +dependencies = [ + "bincode 1.3.3", + "byteorder", + "heed-traits", + "serde", + "serde_json", +] + +[[package]] name = "hermit-abi" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1639,6 +1733,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] +name = "hex-conservative" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda06d18ac606267c40c04e41b9947729bf8b9efe74bd4e82b61a5f26a510b9f" +dependencies = [ + "arrayvec", +] + +[[package]] name = "hkdf" version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2143,6 +2246,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] +name = "lmdb-master-sys" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaeb9bd22e73bd1babffff614994b341e9b2008de7bb73bf1f7e9154f1978f8b" +dependencies = [ + "cc", + "doxygen-rs", + "libc", +] + +[[package]] name = "lock_api" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2252,6 +2366,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" [[package]] +name = "memmap2" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3" +dependencies = [ + "libc", +] + +[[package]] name = "mime" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2285,6 +2408,16 @@ dependencies = [ ] [[package]] +name = "mmap-append" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2ef74bd4eba425972bd31da530dbe0c0e62d15f7c06e1c6ebcc3b6d5446237" +dependencies = [ + "libc", + "memmap2", +] + +[[package]] name = "ndarray" version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2523,6 +2656,16 @@ dependencies = [ ] [[package]] +name = "page_size" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da" +dependencies = [ + "libc", + "winapi", +] + +[[package]] name = "papaya" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2778,6 +2921,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] +name = "pocket-db" +version = "0.1.0" +source = "git+https://github.com/mikedilger/pocket?rev=329334f20948c796c6016b673b92551ac4855ad7#329334f20948c796c6016b673b92551ac4855ad7" +dependencies = [ + "heed", + "libc", + "mmap-append", + "pocket-types", +] + +[[package]] +name = "pocket-types" +version = "0.1.0" +source = "git+https://github.com/mikedilger/pocket?rev=329334f20948c796c6016b673b92551ac4855ad7#329334f20948c796c6016b673b92551ac4855ad7" +dependencies = [ + "derive_more", + "rand 0.9.4", + "secp256k1", +] + +[[package]] name = "portable-atomic" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3481,6 +3645,26 @@ dependencies = [ ] [[package]] +name = "secp256k1" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3c81b43dc2d8877c216a3fccf76677ee1ebccd429566d3e67447290d0c42b2" +dependencies = [ + "bitcoin_hashes", + "rand 0.9.4", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcb913707158fadaf0d8702c2db0e857de66eb003ccfdda5924b5f5ac98efb38" +dependencies = [ + "cc", +] + +[[package]] name = "seize" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4035,7 +4219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8a87f050a4860832ccf4a53e43ea264e98d27618983602b5c575e6df296054" dependencies = [ "arc-swap", - "bincode", + "bincode 2.0.1", "bytes", "crossbeam-deque", "crossbeam-queue", @@ -4082,6 +4266,15 @@ dependencies = [ ] [[package]] +name = "synchronoise" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dbc01390fc626ce8d1cffe3376ded2b72a11bb70e1c75f404a210e4daa4def2" +dependencies = [ + "crossbeam-queue", +] + +[[package]] name = "synstructure" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4217,6 +4410,10 @@ dependencies = [ [[package]] name = "tangle_store_pocket" version = "0.1.0" +dependencies = [ + "pocket-db", + "pocket-types", +] [[package]] name = "tangle_store_surreal" diff --git a/crates/tangle_store_pocket/Cargo.toml b/crates/tangle_store_pocket/Cargo.toml @@ -8,6 +8,8 @@ license.workspace = true description = "Pocket storage boundary for tangle" [dependencies] +pocket-db = { git = "https://github.com/mikedilger/pocket", rev = "329334f20948c796c6016b673b92551ac4855ad7" } +pocket-types = { git = "https://github.com/mikedilger/pocket", rev = "329334f20948c796c6016b673b92551ac4855ad7" } [lints] workspace = true diff --git a/crates/tangle_store_pocket/src/lib.rs b/crates/tangle_store_pocket/src/lib.rs @@ -1,8 +1,42 @@ #![forbid(unsafe_code)] use core::fmt; +use pocket_db::Store; +use pocket_types::{Event, Filter, Id, Pubkey}; use std::path::{Path, PathBuf}; +pub const POCKET_SOURCE_REPOSITORY: &str = "https://github.com/mikedilger/pocket"; +pub const POCKET_SOURCE_REVISION: &str = "329334f20948c796c6016b673b92551ac4855ad7"; + +pub type PocketEvent = Event; +pub type PocketEventId = Id; +pub type PocketFilter = Filter; +pub type PocketPubkey = Pubkey; +pub type PocketStore = Store; + +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct PocketDependencyBoundary { + source_repository: &'static str, + source_revision: &'static str, +} + +impl PocketDependencyBoundary { + pub fn current() -> Self { + Self { + source_repository: POCKET_SOURCE_REPOSITORY, + source_revision: POCKET_SOURCE_REVISION, + } + } + + pub fn source_repository(&self) -> &'static str { + self.source_repository + } + + pub fn source_revision(&self) -> &'static str { + self.source_revision + } +} + #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum PocketSyncPolicy { FlushOnWrite, @@ -97,7 +131,26 @@ impl std::error::Error for PocketConfigError {} #[cfg(test)] mod tests { - use super::{PocketStoreConfig, PocketSyncPolicy}; + use super::{ + POCKET_SOURCE_REPOSITORY, POCKET_SOURCE_REVISION, PocketDependencyBoundary, + PocketStoreConfig, PocketSyncPolicy, + }; + + #[test] + fn pocket_dependency_boundary_pins_chorus_latest_manifest_revision() { + let boundary = PocketDependencyBoundary::current(); + + assert_eq!( + boundary.source_repository(), + "https://github.com/mikedilger/pocket" + ); + assert_eq!(boundary.source_repository(), POCKET_SOURCE_REPOSITORY); + assert_eq!( + boundary.source_revision(), + "329334f20948c796c6016b673b92551ac4855ad7" + ); + assert_eq!(boundary.source_revision(), POCKET_SOURCE_REVISION); + } #[test] fn pocket_store_config_preserves_explicit_storage_boundary() {