DSRCH Node Documentation

Complete technical reference for running, configuring, and operating a DSRCH decentralized search node.

v329.11.81 · Chain: dsrch-mainnet-1

Overview

DSRCH (Decentralized Search Ranking Consensus Hypernetwork) is a purpose-built Layer 1 blockchain for decentralized web search. Each node crawls the web, builds a local search index, serves queries, and earns DSRCH tokens through Proof-of-Index consensus.

Key Technologies
ComponentTechnology
LanguageGo 1.26+
BlockchainCosmos SDK
Networkinglibp2p (GossipSub, DHT, mDNS)
SearchBluge full-text engine
ConsensusProof-of-Index
ConfigYAML
DeploymentDocker

Architecture

HTTP
:8080
P2P
:9090
DSRCH Node
API Server
REST + WebSocket
Explorer / Dashboard
Web Interfaces
Crawler + AutoSeeder
56+ seed sources
Bluge Index
Full-text search engine
libp2p Network Layer
GossipSubDHTmDNSSync
Epoch Manager
Proof-of-Index consensus
DSRCH Blockchain App
srchtokennoderegistryrewardsslashinggovcrawlproofqueryproofindexregistry
PortProtocolDescription
8080HTTP/HTTPSAPI, Explorer, Dashboard, Search UI, Docs
9090TCP/UDPlibp2p P2P networking

Quick Start

Option 1: From Binary

# Build from source
cd dsrch && go build -o dsrchd ./cmd/dsrchd

# Initialize node
./dsrchd init --mode full --port 9090

# Start node
./dsrchd start --api-port 8080 --epoch-duration 30s

Option 2: Docker

# Build and run
docker build -t dsrch-node .
docker run -d --name dsrch \
  -p 8080:8080 -p 9090:9090 \
  -v dsrch-data:/home/dsrch/.dsrch \
  --restart unless-stopped \
  dsrch-node start --api-port 8080 --epoch-duration 30s

Option 3: Docker Compose (3-node testnet)

docker compose up -d

CLI Reference

dsrch init

Initialize a new DSRCH node. Generates Ed25519 keypair and default configuration.

FlagDefaultDescription
--modefullNode mode: light, full, validator
--port9090P2P listen port

Generated files:

~/.dsrch/
├── config.yaml    # Node configuration
└── node.key       # Ed25519 private key (keep secure!)

dsrch start

Start the full DSRCH node with all subsystems.

FlagDefaultDescription
--api-portfrom configHTTP API port
--epoch-duration1hEpoch duration (e.g. 30s for testnet)
--bootstrapbuilt-in seedsBootstrap peer multiaddrs
--crawl-seedSeed URLs to auto-crawl on startup
--no-seedsfalseDisable built-in seed nodes
--external-ipPublic IP for Docker/NAT
--tls-certTLS certificate path
--tls-keyTLS private key path

dsrch status

Display current node status and document count.

Configuration

Configuration is stored in ~/.dsrch/config.yaml:

node:
  mode: "full"           # light | full | validator
  dataDir: "/home/user/.dsrch"
  apiPort: 8080

p2p:
  listenPort: 9090
  bootstrapPeers: []
  enableMDNS: true
  enableDHT: true
  externalIP: ""         # Public IP for NAT/Docker

Node Modes

ModeCrawlsIndexesServes QueriesEarns Tokens
lightNoNoRelay onlyNo
fullYesYesYesYes
validatorYesYesYesYes (higher)

Data Directory

~/.dsrch/
├── config.yaml      # Configuration
├── node.key         # Ed25519 private key
├── index/           # Bluge full-text index
├── state.json       # Blockchain state
└── query.log        # Search query log

API Reference

Base URL: https://api.dsrch.net · Full interactive docs: api.dsrch.net

Search

GET /api/search

Search the decentralized index.

ParameterTypeDescription
qstringSearch query (required)
limitintMax results (default: 10, max: 100)
curl "https://api.dsrch.net/api/search?q=ukraine&limit=5"

Node Status

GET /api/status

Returns node ID, status, document count, version, and chain ID.

{
  "nodeId": "12D3KooW...",
  "status": "running",
  "documents": 2921,
  "version": "329.11.81",
  "chainId": "dsrch-mainnet-1"
}

Network

GET /api/peers

List connected P2P peers.

GET /api/network-stats

Aggregated network statistics across all peers.

POST /api/connect

Connect to a specific peer by multiaddr.

Epoch & Consensus

GET /api/epoch

Current epoch number, activity tracker, and work report data.

GET /api/rewards

Token reward history for this node.

Staking

POST /api/stake

Stake DSRCH tokens. Params: nodeId, amount

POST /api/unstake

Unstake tokens (subject to unbonding period). Params: nodeId, amount

Governance

GET /api/gov/proposals

List all governance proposals.

POST /api/gov/propose

Submit a proposal. Params: title, description, type, proposer

POST /api/gov/vote

Vote on a proposal. Params: proposalId, voter, vote (yes/no/abstain/veto)

Crawler

POST /api/crawl/add

Add URL to crawl queue. Params: url, depth, maxPages

curl -X POST "https://api.dsrch.net/api/crawl/add?url=https://example.com&depth=3&maxPages=200"
GET /api/crawl/status

Crawler queue status and auto-seeder statistics.

Webmaster Tools

POST /api/webmaster/submit · /verify · GET /stats · /domains

Submit URLs, verify domain ownership, view indexing statistics.

Other Endpoints

EndpointMethodDescription
/api/suggestGETAutocomplete suggestions
/api/analyticsGETSearch analytics
/api/faucetPOSTRequest 100 testnet DSRCH tokens
/api/shardsGETShard distribution
/api/keysGET/POSTAPI key management
/metricsGETPrometheus metrics
/openapi.jsonGETOpenAPI specification

P2P Networking

DSRCH uses libp2p for all peer-to-peer communication.

Protocols

ProtocolDescription
/dsrch/search/1.0.0Distributed search queries
/dsrch/crawl/1.0.0Crawl task delegation
/dsrch/sync/1.0.0Index replication
GossipSub dsrch/v1Work report broadcasting
GossipSub dsrch/crawl/v1Crawl announcements

Discovery

Crawler Engine

Components

ComponentDescription
CrawlerCore HTTP crawler with rate limiting
FrontierPriority queue for URL scheduling
ParserHTML parser (text, links, meta extraction)
DomainFilterAllow/blocklist for domains
RobotsCheckerrobots.txt compliance
SimHashNear-duplicate detection
SchedulerJob queue with auto-seeder integration
AutoSeederContinuous URL seed provider (56+ sources)
DomainAssignerConsistent hashing for domain distribution
CrawlCoordinatorDistributed crawl task routing

Auto-Seeder

Ensures continuous indexing by providing new seed URLs when the queue is empty:

Crawl Parameters

ParameterDefaultDescription
Max depth2Link following depth from seed
Max pages/job50Pages per crawl session
Delay300msPer-domain rate limit
Timeout/job5 minMax crawl duration
Max body5 MBPer-page size limit
Max redirects3Redirect chain limit
User-AgentDSRCHBot/1.0Crawler identification

Consensus: Proof-of-Index

DSRCH uses a custom Proof-of-Index consensus mechanism.

Epochs

Default duration: 1 hour (configurable, 30s for testnet). At epoch end, each node generates a Work Report:

{
  "nodeId": "12D3KooW...",
  "epoch": 42,
  "pageCount": 150,
  "queriesServed": 89,
  "avgLatency": "15ms",
  "shardsStored": 3,
  "crawlMerkle": "a1b2c3d4..."
}

Validation Flow

  1. Node crawls pages and serves queries throughout the epoch
  2. Activity tracked by ActivityTracker
  3. At epoch end, work report generated and broadcast via GossipSub
  4. DSRCHApp.ProcessEpochWithValidation validates all reports
  5. Valid nodes receive DSRCH token rewards
  6. State persisted to disk

Blockchain Modules

ModuleDescription
x/srchtokenNative DSRCH token — minting, transfers, supply
x/noderegistryNode registration, types, status tracking
x/rewardsEpoch reward calculation and distribution
x/slashingPenalty mechanisms for misbehaving nodes
x/govOn-chain governance — proposals, voting, tallying
x/indexregistryTracks what each node has indexed
x/crawlproofCryptographic proofs of crawl work
x/queryproofCryptographic proofs of query serving

Governance

DSRCH has on-chain governance for protocol upgrades and parameter changes.

Staking & Rewards

Rewards are distributed based on:

Testnet faucet: curl -X POST "https://api.dsrch.net/api/faucet?address=dsrch1..." — get 100 free DSRCH tokens.

Docker Deployment

# Single node
docker build -t dsrch-node .
docker run -d --name dsrch \
  -p 8080:8080 -p 9090:9090 \
  -v dsrch-data:/home/dsrch/.dsrch \
  --restart unless-stopped \
  dsrch-node start --api-port 8080 --external-ip YOUR_PUBLIC_IP

# 3-node testnet
docker compose up -d
Built-in health check pings /api/status every 30 seconds.

Production Setup

Recommended

Caddy Config

explorer.dsrch.net {
    reverse_proxy localhost:8080
}
api.dsrch.net {
    reverse_proxy localhost:8080
}
docs.dsrch.net {
    reverse_proxy localhost:8080
}

Monitoring

Security

Warning: Never expose node.key — it controls your node identity and staked tokens.

Troubleshooting

Node won't start

Run dsrch init first to generate config and keypair.

No peers connecting

Crawl queue empty

The auto-seeder provides URLs automatically. If still stopped, manually seed:

curl -X POST "https://api.dsrch.net/api/crawl/add?url=https://example.com"

Search returns no results

Check document count with curl https://api.dsrch.net/api/status. If 0, wait for crawler to index pages.

DSRCH — The internet's search engine, owned by everyone.