Commit Graph
24 Commits
Author SHA1 Message Date
Raven Scott ea9124c429 BREAKING EXPERIMENTAL: Holepunch-native hard migration (RPC core, shared storage, SDK v2)
BREAKING: All nodes must upgrade together. Legacy p2ns.core-request string
messages are rejected; invite/consensus control plane uses protomux-rpc
(invite.request, invite.ack, invite.relay*, consensus.*). Shared Corestore
namespaces are the default for plugin DBs and drives; USE_SHARED_CORESTORE_NAMESPACES=false
is debug-only. Admin plugin actions with params are validated before run.

EXPERIMENTAL: End-to-end RPC invite path reuses existing handlers via adapters;
invite wire still ships on the invite channel. Multi-peer invite/relay
integration tests are not in CI yet (core-rpc-smoke only).

SDK & channels:
- channel-rpc.js, sdk.channels.rpc (register/request/event)
- core-rpc.js for p2ns.core; action-params + plugin route validation
- sdk.db.getCore/reopen, sdk.state.getPeerChannelSnapshot,
  sdk.metrics.getHolepunchStats (schema v1)

Runtime:
- p2ns.js: RPC-first core invite/consensus; Hyperswarm firewall/reconnect
- channel-manager: required protomux-rpc per peer
- db-shared-namespace-migration; drive-manager shared namespaces
- proxy-server: invite.request RPC for joiners

Plugins: file.drop, global.profile, peer.directory, domain.consensus,
peer.visualize, example.plugin (RPC demo); peer.directory UI polish

Also: CI/smoke scripts, diagnostics hardening, plugin config schema validation,
admin action param modal, docs/RFCS, package-lock + engines.node >= 18
2026-05-28 10:51:19 -04:00
Raven Scott 95559fc552 fixing boot 2026-05-28 01:46:38 -04:00
Raven Scott 64b9b6f9b8 Disable file.drop on master 2026-05-28 01:30:42 -04:00
Raven Scott 9057b9661d dnspass fixes 2026-05-28 01:20:52 -04:00
Raven Scott d95baaed1c Bump 2026-05-28 01:14:13 -04:00
Raven Scott 5559c9096d Skip migration if its completed 2026-05-28 00:26:32 -04:00
Raven Scott 8eb2bc5946 automatic db migrations on version bump 2026-05-28 00:19:43 -04:00
Raven Scott d57433d3e0 Modernize Holepunch stack for HyperDB 6 and current replication APIs
Align P2NS with current Autopass, Hypercore, Hyperdrive, and Protomux behavior:
add plugin DB recovery for incompatible persisted HyperDB data, stop
unconditional spec rebuilds via fingerprinting, update SDK replication paths,
and align proxy invite channels with p2ns.core-* protocols without replicating
Autopass over the p2ns topic.
2026-05-27 21:02:17 -04:00
Raven Scott 14a2373c4c Updates 2026-05-27 20:06:36 -04:00
Raven Scott 54cbee254d Updates 2026-05-27 19:47:06 -04:00
Raven Scott bfc51b8edb Upgrade Holepunch P2P stack and npm dependencies
Align p2ns with current Holepunch ecosystem versions: autopass 3,
hyperdb 6, hyperschema 1.21, hyperdrive 13, corestore 7.10, hyperswarm
4.17, protomux 3.11, and compact-encoding 3 (with npm overrides).
Also bump Tailwind/PostCSS, ws, node-forge, and related tooling; add
express and holesail-logger; remove unused install/npm packages.

Use cache/plugin-spec when plugin spec dirs are not writable, and
update docs and proxy install notes. Rebuild admin CSS for Tailwind 4.3.

Existing P2P storage must be wiped (--clean) after upgrading.
2026-05-27 19:33:06 -04:00
Raven Scott 94c923cc6d feat: add HyperDB replication to file.drop plugin
- Add database watcher to monitor @filedrop/files collection changes
- Implement robust database initialization with retry logic (30 attempts)
- Add replication status checking and logging on startup
- Add peer connection handlers for active replication updates
- Enable real-time database synchronization across P2NS network
2025-12-26 20:21:15 -05:00
Raven Scott 9b68e728fd feat: Add separate message for conflict claim removalImplement removeConflictDomainClaim: message type to distinguish betweenfull domain cleanup and conflict claim removal, ensuring other peers'claims are preserved when removing conflicting claims.- Add sendConflictClaimRemoval() function for notification broadcasting- Add handler for removeConflictDomainClaim: messages that updates consensus but does NOT remove other peers' claims- Modify removal logic to conditionally broadcast based on claimant status: - Resolved claimants: broadcast remove_domain: (full cleanup) - Non-resolved claimants: broadcast removeConflictDomainClaim: (notification only)- Update admin routes and SDK to use conditional broadcastingPrevents cross-peer claim deletion when removing conflict claims whilemaintaining proper consensus updates and full cleanup functionality. 2025-12-26 17:28:37 -05:00
Raven Scott 480f99ae28 feat: allow partial domain removal and add conflict status
- Add partial domain removal functionality allowing users to remove their own claims and votes even when they're not the resolved claimant
- Add conflict status detection for domains where local peer has claim but another claimant won consensus
- Update UI to display conflict status with red badge
- Enhance API responses with detailed consensus information
- Update all documentation with new features

Changes:
- core/core.js: Add removeOwnClaimAndVotes() function for partial removal
- admin/routes/domains.js: Implement partial/full removal logic in /api/remove-domain
- admin/admin-backend/routes/domains.js: Same partial removal logic for backend routes
- plugins/sdk.js: Update removeDomain() to support partial removal
- admin/ui/config.js: Add conflict status badge and update postFetch
- admin/admin-frontend/ui/config.js: Add conflict status badge and fix status rendering
- admin/utils.js: Add conflict status to utility functions
- admin/admin-frontend/utils.js: Add conflict status to utility functions
- docs/CONSENSUS.md: Add conflict status to resolution states
- docs/README_LONGFORM.md: Add conflict status to consensus states
- docs/RESTAPI.md: Update /api/resolved-domains with new fields and examples
- docs/ARCHITECTURE.md: Document full vs partial removal modes
- docs/OPENAPI.yaml: Update Domain schema and add ConsensusState schema
2025-12-26 15:32:41 -05:00
Raven Scott 7ec24c8122 Added recreation check: Before creating a missing channel, the code now checks isRecreating(pluginDomain, protocol, peerId) to prevent duplicate creation attempts 2025-12-21 07:52:38 -05:00
Raven Scott 3deb968553 Attempt to stabilize channel reconnecting 2025-12-20 19:09:23 -05:00
Raven Scott 954b98d9ce test 2025-12-20 15:47:22 -05:00
Raven Scott 6128abe902 tests 2025-12-20 15:41:48 -05:00
Raven Scott 3275f937e8 do not init plugins that are disabled 2025-12-19 22:58:32 -05:00
Raven Scott a3ea306a76 update builder 2025-12-18 02:07:51 -05:00
Raven Scott 1966062a12 connection tracking 2025-12-17 22:54:46 -05:00
Raven Scott eb5675adb2 fixes 2025-12-17 22:32:07 -05:00
Raven Scott ad4784d05d feat: consolidate utility functions into P2NS Plugin SDK
- Centralized common formatting, DOM, and status utilities in `includes/plugins/sdk.js`
- Created `sdk.utils.format`, `sdk.utils.dom`, and `sdk.utils.status` namespaces
- Refactored `domain.consensus` and `peer.visualize` plugins to use the global SDK
- Updated `plugin-handler` to serve SDK utilities globally via `/sdk-utils.js`
- Enhanced SDK validation by delegating to the core validation infrastructure
- Fixed bugs in metric rendering and missing frontend utility functions
2025-12-17 22:21:58 -05:00
Raven Scott 742e27d3f7 reorg 2025-12-17 20:05:50 -05:00