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.
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.
Add global activeClientKeys Set to track all active clients and prevent
race conditions between domain init and cache restore paths. Add EADDRINUSE
error handling in holesail.js, holesail_child.js
- Reorder shutdown sequence to close pairing operations before DNSPass
- Add proper tracking and cleanup of active Autopass.pair() operations
- Handle shared corestore conflicts between pairing ops and main DNSPass
- Ignore expected "store already closed" errors from pairing operations
- Consolidate all Autopass resource cleanup in PHASE 2.5
This fixes the "Corestore is closed" uncaught exceptions and corruption
that occurred when both pairing operations and DNSPass tried to close
the same shared corestore during shutdown.
- Reorder cleanup sequence to close HTTP/TLS/DNS servers BEFORE corestore operations
- Move dnsPass/main corestore closing after plugin cleanup to prevent race conditions
- Add explicit drive cleanup call to close all plugin drive stores
- Fix proxy-server cleanup to properly close state.store after dnsPass
- Add store.closed checks and improve error handling in cleanup functions
- Verify Autopass dnsPass.close() handles its internal corestore properly
- Remove duplicate DNS server closing code causing syntax errors
This resolves "Corestore is closed" errors during shutdown by ensuring no new
requests can access closed corestores, preventing corruption and ensuring clean
shutdown of all corestore instances (main, plugin databases, plugin drives, dnsPass).
- Prevent re-initialization when clicking domains button while already on domains tab
- Add navigateToTab helper function to intelligently handle tab navigation
- Redirect #domains hash to index (no hash) since domains is the default tab
- Update all navigation buttons to use navigateToTab helper
- Handle both initial load and hashchange events to remove #domains hash
This fixes the issue where navigating to or clicking the domains tab when
already viewing it would break the page by clearing and re-rendering content.
- Add refresh/shutdown button next to status indicator that gracefully
stops the process without cleaning my-storage
- Create /api/shutdown endpoint that triggers graceful shutdown via SIGTERM
- Update status indicator to show "Gracefully Cleaning...." when system
is shutting down (instead of "Searching for peers...")
- Include isShuttingDown flag in /api/status endpoint response
- Use built-in ConfirmationModal for shutdown confirmation with warning styling
The shutdown button appears in the top-right corner next to the status
indicator and uses the existing confirmation modal system for user
confirmation before initiating shutdown.
- Add three filter dropdowns to domains tab: Consensus Status, Hash Type, and Ownership
- Implement AND logic filtering with immediate table updates for live data
- Create persistent filter settings system saving to cache/filterSettings.json
- Add backend API endpoints: GET/POST /api/domain-filter-settings
- Set default filters to: All Consensus States, Holesail Hash, All Ownership
- Fix infinite scroll state management to handle filter changes properly
- Auto-save filter preferences on change and restore on page load
- Fix backend response handling (removed undefined sdk reference)
Changed number type settings parsing from parseInt to parseFloat to
properly handle decimal values. Added step="any" attribute to number
inputs in the frontend when the setting has decimal min/max/default
values.
This ensures that Consensus Quorum Threshold and other floating point
settings (like METRICS_SAMPLING_RATE) can accept and save decimal
values like 0.5, 0.67, etc. instead of being truncated to integers.
- Updated includes/admin/admin-backend/routes/settings.js
- Updated includes/admin/routes/settings.js
- Updated includes/admin/admin-frontend/ui/settings.js
Add WebSocket broadcasting of complete domains list from server to clients
Implement periodic domain list updates (10-second intervals)
Fix reconnection issues where domains list remained empty after p2ns restart
Add proper state management for WebSocket disconnect/reconnect scenarios
Enhance empty state messages to show "Disconnected" status during outages
Reset scroll/pagination state when receiving WebSocket domain updates
Add client-server request/response mechanism for immediate domain list refresh
Ensure domains list updates in real-time during consensus resolution
Remove conflicting HTTP fetches during reconnection to prevent race conditions
Fix critical bug where removing a conflicting domain would remove ALL claims
from the ledger instead of just the requesting peer's claims. When a peer
removed a domain they had a claim for but weren't the resolved claimant,
the removal request would cause all connected peers to remove all claims
and votes for that domain.
- Modify removal request handler in p2ns.js to process independently per peer
- Each peer checks if they have a claim before processing removal
- Resolved claimants: perform full cleanup (atomicDomainCleanup)
- Non-resolved claimants: remove only own claim and votes (removeOwnClaimAndVotes)
- Peers without claims: ignore removal requests entirely
- Preserve other peers' claims while maintaining proper cleanup functionality
Resolves data integrity issue where removal requests caused unintended
cross-peer claim deletion, ensuring each peer only removes their own entries.
Add comprehensive security checks to prevent unauthorized claim modifications
while preserving legitimate owner's ability to update their own claims.
- Add ownership verification before any pass.remove() operations
- Validate claimKey format: claim:domain:claimant
- Ensure claimant matches current user before allowing modifications
- Create safeRemoveClaim() helper with multi-layer validation
- Add security logging for audit trail
- Fail-safe error handling prevents unauthorized claim interference
Resolves critical data integrity issue where claims could be overwritten
by unauthorized peers, while maintaining proper claim management capabilities.
Fix critical bugs in domain claim management to ensure data integrity:
- Domain addition: Check for existing claims before adding to prevent duplicates
- Update user's own claim if it exists instead of creating duplicates
- Skip update if hash and SSL flag unchanged (idempotent)
- Never touch other users' claims when updating own claim
- Domain removal: Add strict validation to prevent removing other users' claims
- Only perform full cleanup (atomicDomainCleanup) when user is confirmed resolved claimant
- Require consensus status 'resolved' AND resolvedClaimant matches localWriter
- Improved logging to show which removal path is taken
- Enhanced removeOwnClaimAndVotes with explicit vote key parsing
- Hash preferences cleanup: Fix module path resolution error
- Correct require path from admin-backend/cache.js (../../core/core)
- Add lazy require pattern with error handling to prevent crashes
- Ensure cleanup runs after consensus updates and domain removals
Implement comprehensive P2P domain conflict resolution allowing users to choose between local claim hashes and consensus-resolved hashes for domains where they have local claims but another claimant won consensus.
Key features:
- P2P Domain Conflicts UI tab in Local DNS section
- Hash preference toggle (local vs resolved) with automatic client restart
- Extended selector_cache.json to store hashPreferences alongside versionPreferences
- DNS cache invalidation for immediate preference application
- REST API endpoints for conflict detection and preference management
- Automatic Holesail client restart when hash preferences change
- Complete documentation updates across README, API docs, and glossary
Resolves conflicts between local claims and consensus resolution by giving users control over which hash their domain resolves to, with seamless client management ensuring immediate effect.
- 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
- Modified getConsensusState() to track votes per voter and ensure each voter only counts once per domain
- Added logging to detect when voters have multiple votes for different claimants
- Prevents vote count inflation that could cause wrong claimants to win consensus
- Maintains most recent vote when duplicates are detected