A research-oriented peer-to-peer distributed event protocol written in Go using libp2p and GossipSub.
This project explores:
- decentralized event replication
- cryptographically signed events
- peer-to-peer synchronization
- append-only event systems
- metadata-resistant communication concepts
- distributed trust and identity systems
The current implementation is intentionally minimal and focused on protocol primitives rather than application features.
The long-term goal is to build a modular distributed protocol layer that can support:
- decentralized communication
- encrypted asynchronous messaging
- replicated event feeds
- distributed forums
- marketplace-like systems
- pseudonymous identities
- store-and-forward messaging
- metadata minimization research
This repository is currently focused only on the foundational distributed systems layer.
Uses libp2p peer identities:
- Ed25519 keypairs
- Peer IDs derived from public keys
- Cryptographic signing support
Each node acts as a cryptographic identity.
Events are:
- deterministic
- content-addressed
- cryptographically signed
- verifiable
Each event contains:
- author
- timestamp
- type
- payload
- signature
- deterministic hash ID
Nodes use GossipSub pubsub topics for:
- event propagation
- decentralized replication
- peer synchronization
All peers subscribed to the topic receive propagated events.
Current storage implementation:
- filesystem-based
- one JSON file per event
Advantages:
- easy debugging
- inspectable state
- portable storage
- simple recovery
Incoming events are:
- deserialized
- signature verified
- hash verified
- deduplicated
- stored locally
Current tests include:
- deterministic serialization
- deterministic hashing
- event signing
- signature verification
- tamper detection
- filesystem storage
- loading/saving events
- deduplication checks
stdin
->
create unsigned event
->
sign event
->
store locally
->
publish via GossipSub
->
peer receives event
->
verify event
->
deduplicate
->
store locally
cmd/node/
main.go
internal/
event/
network/
store/
Contains:
- event models
- serialization
- hashing
- signing
- verification
This package is intended to remain deterministic and highly testable.
Contains:
- GossipSub integration
- topic subscriptions
- event publishing
- event receiving loops
This package should remain transport-focused only.
Contains:
- event storage abstraction
- filesystem storage implementation
Future backends may include:
- BadgerDB
- Pebble
- SQLite
This project is still in a very early prototype stage.
Implemented:
- peer nodes
- GossipSub propagation
- signed events
- filesystem persistence
- verification pipeline
- tests
Not implemented yet:
- persistent identities
- encrypted direct messages
- peer discovery
- synchronization replay
- historical event sync
- encrypted payloads
- access control
- capability tokens
- private topics
- anonymous routing
- metadata minimization
- DHT integration
- store-and-forward mailboxes
- relay infrastructure
- reputation systems
- forums
- marketplace logic
- moderation systems
This repository is experimental research software.
The focus is currently:
distributed cryptographically verifiable event replication
NOT:
- production anonymity
- operational security
- censorship resistance
- financial systems
- marketplace deployment
The current implementation does NOT provide:
- anonymity guarantees
- metadata protection
- traffic analysis resistance
- secure operational deployment
Persist node identities locally:
data/identity.key
instead of generating new identities each startup.
Nodes currently only receive live events.
Future work:
- synchronize historical events
- peer catch-up
- append-only replication
Planned architecture:
encrypted payload
->
signed event
->
gossip propagation
->
recipient decrypts
Potential future migration to:
- BadgerDB
- Pebble
for scalable local persistence.
Current deduplication is filesystem-based.
Future improvements:
- in-memory indexes
- bloom filters
- efficient content indexing
Potential future protocol areas:
- CRDT replication
- append-only feeds
- store-and-forward mailboxes
- relay nodes
- metadata-resistant messaging
- asynchronous communication
- distributed trust systems
- reputation graphs
- decentralized moderation
- capability-based access control
Run node:
go run ./cmd/nodeRun tests:
go test ./...The protocol currently follows several core principles:
Everything is represented as immutable signed events.
Event IDs are derived from event content hashes.
The protocol layer should remain independent from the underlying transport.
Events are intended to become append-only replicated state.
Trust is derived from cryptographic signatures rather than network location.
This project is experimental research software intended for distributed systems and protocol experimentation.
It should not be considered production-ready, secure, anonymous, or safe for sensitive real-world usage.