Skip to content

Instantly share code, notes, and snippets.

@anomit
Last active January 31, 2026 08:08
Show Gist options
  • Select an option

  • Save anomit/422a857709c14bfa7b1e6872cc4eabfa to your computer and use it in GitHub Desktop.

Select an option

Save anomit/422a857709c14bfa7b1e6872cc4eabfa to your computer and use it in GitHub Desktop.

DSV Operator Mainnet Alpha Setup

Overview

This is a guide for operators to set up their DSV nodes on the Mainnet Alpha network.

Pre-requisites

Pull the latest develop branch of snapshot-sequencer-validator repository.

git clone https://github.com/powerloom/snapshot-sequencer-validator.git
cd snapshot-sequencer-validator
git checkout develop
git pull

Run instructions

What has changed

🏗️ Pass the --rebuild flag to the dsv.sh start command to rebuild the docker images when you pull the latest changes.

./dsv.sh start --with-vpa --with-ipfs --rebuild

Key configurations to be changed

Contract addresses

# Protocol State Contract (REQUIRED for event monitoring and VPA)
PROTOCOL_STATE_CONTRACT=0xa1100CB00Acd3cA83a7C8F4DAA42701D1Eaf4A6c

# Data Market Addresses (JSON array or comma-separated)
# These are the markets this sequencer will monitor
DATA_MARKET_ADDRESSES=0x4198Bf81B55EE4Af6f9Ddc176F8021960813f641

RPC URLs

# RPC Configuration (Required for event monitoring and contract interactions)
# All RPC interactions in this component are with the Powerloom protocol chain
POWERLOOM_RPC_NODES=<Powerloom Mainnet RPC URL>
# Optional archive nodes for historical queries
POWERLOOM_ARCHIVE_RPC_NODES=[]

# Source Chain RPC Configuration (JSON array)
# where data is sourced from (e.g., Ethereum, Polygon)
SOURCE_RPC_NODES=<Ethereum Mainnet RPC URL>
# Source Archive nodes (optional, JSON array)
SOURCE_ARCHIVE_RPC_NODES=[]

Mesh configurations

RENDEZVOUS_POINT=powerloom-dsv-mainnet-alpha
# ============================================
# GOSSIPSUB TOPIC CONFIGURATION
# ============================================
# Configure gossipsub topic names for P2P networking
# These allow customization of topic names for different deployment scenarios
# Snapshot submission topics (discovery and main submissions)
# Format: {prefix}/0 (discovery), {prefix}/all (submissions)
GOSSIPSUB_SNAPSHOT_SUBMISSION_PREFIX=/powerloom/dsv-mainnet-alpha/snapshot-submissions

# Finalized batch topics (discovery and batch exchange)
# Format: {prefix}/0 (discovery), {prefix}/all (batches)
GOSSIPSUB_FINALIZED_BATCH_PREFIX=/powerloom/dsv-mainnet-alpha/finalized-batches

# Validator consensus topics
# Presence topic for validator heartbeat and discovery
GOSSIPSUB_VALIDATOR_PRESENCE_TOPIC=/powerloom/dsv-mainnet-alpha/validator/presence

# Consensus voting and proposal topics
# Used for validator consensus and batch aggregation coordination
GOSSIPSUB_CONSENSUS_VOTES_TOPIC=/powerloom/dsv-mainnet-alpha/consensus/votes
GOSSIPSUB_CONSENSUS_PROPOSALS_TOPIC=/powerloom/dsv-mainnet-alpha/consensus/proposals

Level 2 Aggregation Configuration

# Level 2 Aggregation Window (Network-wide batch collection)
# Time to wait for validator finalizations before aggregating network consensus
# First remote batch arrival starts timer, additional batches collected during window
# Window expiration triggers final Level 2 aggregation combining all validator views
# IMPORTANT: This should be coordinated with contract submission window timing
# If contract has preSubmissionWindow=0, this gives validators time to aggregate votes
# before submissions can start (since submissions can start immediately after epoch release)
AGGREGATION_WINDOW_SECONDS=7

Protocol State Cacher Configuration

# ============================================
# PROTOCOL STATE CACHER CONFIGURATION
# ============================================
# Protocol State Cacher caches SnapshotterState contract data to Redis
# This component is REQUIRED when ENABLE_SLOT_VALIDATION=true
# It performs event-driven caching of slot information and periodic cold sync

# Enable protocol state cacher component
# When enabled, caches slot information from SnapshotterState contract to Redis
# Required for slot validation (ENABLE_SLOT_VALIDATION)
# true/false (default: false)
ENABLE_PROTOCOL_STATE_CACHER=true        

# Cold sync interval in seconds
# How often to perform periodic fallback cold sync of all slots
# Event-driven updates happen in real-time, this is a safety net
# seconds (default: 3600 = 1 hour)
SLOT_SYNC_INTERVAL_SECONDS=3600          

# Batch size for slot synchronization
# Number of slots to fetch in parallel during cold sync
# slots per batch (default: 20)
SLOT_SYNC_BATCH_SIZE=100                  

# EIP-712 Signature Validation and Slot Authorization
# Enable validation of snapshotter addresses against protocol state cache
# When enabled, dequeuer performs the following checks:
# 1. Verify EIP-712 signature cryptographically
# 2. Ensure signature matches registered snapshotter EVM address
# 3. Validate that signer is authorized for the given slot
#
# Requirements:
# - protocol-state-cacher must be running (ENABLE_PROTOCOL_STATE_CACHER=true)
# - Redis populated with SlotInfo.{slotID} keys
# - Submissions must include valid EIP-712 signature
#
# Security modes:
# - false (default): Only cryptographic signature validation
# - true: Full address and slot authorization check
#
# In production: ALWAYS set to true for maximum security
# true/false (default: false)
ENABLE_SLOT_VALIDATION=true              

DDoS and Spam Protection Configuration

# ============================================
# SPAM PROTECTION CONFIGURATION
# ============================================

# Master switch for spam protection
ENABLE_SPAM_PROTECTION=true

# Enable validator coordination (spam report broadcasting)
ENABLE_SPAM_REPORT_BROADCAST=true

# Spam report topic (validator-only)
# If empty, auto-constructs from GOSSIPSUB_VALIDATOR_PRESENCE_TOPIC prefix + "/spam-reports"
# Example: If GOSSIPSUB_VALIDATOR_PRESENCE_TOPIC=/powerloom/dsv-devnet-alpha/validator/presence,
#          then spam report topic will be /powerloom/dsv-devnet-alpha/validator/spam-reports
# To override, set explicit topic: SPAM_REPORT_TOPIC=/custom/path/spam-reports
SPAM_REPORT_TOPIC=

# Spam Report Consensus Delay: Additional delay after sending local reports to wait for other validators' reports before checking consensus
# Default: 10 seconds
# Only applies at window boundaries (epochID % 10 == 0)
SPAM_REPORT_CONSENSUS_DELAY_SECONDS=10

# Cache TTL for flagged state (hours)
SPAM_CACHE_TTL_HOURS=1

P2P Gateway Configuration

# ============================================
# P2P GATEWAY CONFIGURATION
# ============================================

# Number of worker goroutines for async submission message processing
# Prevents "subscriber too slow" errors by processing messages asynchronously
# Default: 10 workers
P2P_GATEWAY_SUBMISSION_WORKERS=10

# Buffer size for submission message channel
# Messages are queued here before being processed by workers
# If channel fills up, messages are dropped with a warning (prevents blocking)
# Default: 1000 messages (~5MB max memory)
P2P_GATEWAY_SUBMISSION_CHAN_SIZE=10000

Optional configurations

These are optiona configurations that can come in handy when different roles and peers are involved.

Identity and Verification

# Full node addresses (JSON array or comma-separated)
# These addresses bypass certain verification checks by the dequeuer
# JSON array or comma-separated list of EVM addresses
FULL_NODE_ADDRESSES=0x6301AF5a4C7231282B9b31a1B3bF8587eec1c675

Peer ID Whitelisting

# Full node Peer IDs - these bypass rate limiting but NOT validation checks
# comma separated list of libp2p peer IDs
FULL_NODE_PEER_IDS=12D3KooWMEHyhNVvbcctphjbZ8hFSwhJJ23ndzq6AmZ2dv4Kg9zn

Bulk service Peer IDs

# Bulk service Peer IDs - these bypass rate limiting (used by delegators submitting on behalf of others)
# comma separated list of libp2p peer IDs
BULK_SERVICE_PEER_IDS=12D3KooWNLMj571TrCNNPqw38AAKn9VEFRH8uuxuiVC9SPX4chUS

Relayer port

# Port relayer-py HTTP server listens on (health + API). Default 8080.
RELAYER_PORT=8081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment