Skip to content

Release Candidate 3: PubSub Reliability, Dual-CID StoreFile, and File Notifications

Pre-release
Pre-release

Choose a tag to compare

@zot zot released this 21 Nov 21:18
· 19 commits to main since this release

Breaking Changes

  • storeFile API: Now returns {fileCid: string, rootCid: string} instead of just a string
    • TypeScript: async storeFile(path, content): Promise<StoreFileResponse>
    • Go: StoreFile(filepath string, content []byte, directory bool) (string, string, error)
    • Allows clients to persist the peer's root directory CID for session restoration

New Features

PubSub Reliability Improvements

  • Mesh Formation Wait: Subscribe() now waits up to 2 seconds for GossipSub mesh to form
    • Ensures peers can communicate immediately after subscribe returns
    • Prevents message loss from publishing before mesh is ready
  • Direct Peers: Automatically configure existing peers as direct peers
    • Guarantees mesh connectivity between all peers in the same process
  • Exponential Backoff Retry: Manual peer connections retry with exponential backoff
    • Up to 15 seconds with backoff: 100ms, 200ms, 400ms, 800ms...
    • Improves connection reliability on slow networks
  • Optimized GossipSub Parameters: Tuned for small/local networks
    • Heartbeat: 50ms initial delay, 500ms interval
    • Degree parameters: D=2, Dlo=1

File Availability Notifications

  • Enhanced logging for file update notifications
  • Lock-free notification publishing to prevent deadlocks
  • Demo UI auto-refreshes file browser when files change
  • Configurable via fileUpdateNotifyTopic setting

Improvements

  • Demo UI improvements: Auto-refresh file lists on notifications
  • Better error messages and verbose logging throughout
  • Documentation updates: README, specs, design files, developer guide

Installation

Download the appropriate binary for your platform:

  • Linux: p2p-webapp-linux-amd64
  • Windows: p2p-webapp-windows-amd64.exe
  • macOS Intel: p2p-webapp-darwin-amd64
  • macOS Apple Silicon: p2p-webapp-darwin-arm64

Make the binary executable (Linux/macOS):
```bash
chmod +x p2p-webapp-*
```

Run the demo:
```bash
./p2p-webapp demo
```