Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Build artifacts
target/
*.profraw
coverage/

# Git
.git/
.gitignore
.github/

# IDE and editor files
.vscode/
.idea/
*.swp
*.swo
*~

# Documentation
*.md
!README.md
spec/
docs/

# Test files
tests/
mock-relay/
mock-services/

# Environment and secrets (NEVER include in Docker image)
.env
.env.example
*.pem
*.key
test-keys.sh
test-keys.sh.example

# SQLx offline query cache (built during compile)
#.sqlx/

# Cargo Husky git hooks
.cargo-husky/

# CI/CD
.github/

# Claude AI
.claude/

# Docker files (no need to copy into image)
docker-compose.yml
Dockerfile
.dockerignore

# Task runner
Taskfile.yml

# Development scripts
scripts/

# Misc
*.log
*.bak
plan.md
74 changes: 59 additions & 15 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,27 +1,71 @@
# Environment variables for preconfirmation gateway
# Copy this file to .env and fill in your values
# ============================================================================
# Environment Variables for Preconfirmation Gateway
# ============================================================================
# This file is for LOCAL DEVELOPMENT (connecting to localhost services)
# For Docker deployment, use .env.docker instead
#
# SETUP INSTRUCTIONS:
# 1. Copy this file: cp .env.example .env
# 2. Fill in the REQUIRED variables marked below
# 3. The gateway will fail to start if required variables are missing
# ============================================================================

# Database connection
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/preconfirmation_gateway
TEST_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/preconfirmation_gateway_test
# ============================================================================
# REQUIRED VARIABLES - Gateway will NOT start without these
# ============================================================================

# Beacon API endpoint (REQUIRED)
# Example for Alchemy: https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY
# Example for Infura: https://mainnet.infura.io/eth/v1/YOUR_PROJECT_ID
# The gateway validates this on startup and will fail if not properly configured
# Examples:
# - Alchemy: https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY
# - Infura: https://mainnet.infura.io/eth/v1/YOUR_PROJECT_ID
# - Local: http://localhost:5052
BEACON_API_ENDPOINT=https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY

# ECDSA signing private key (hex string without 0x prefix, 64 hex characters)
# REQUIRED: The gateway will fail to start without this variable
# Generate with: cast wallet new (or use Hardhat account #0 for testing)
# ECDSA signing private key (REQUIRED)
# Format: 64 hex characters (32 bytes), without 0x prefix
# Used for commitment signing
# Generate with:
# - cast wallet new
# - Hardhat account #0 for testing: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# SECURITY WARNING: Never commit your real private key to git!
COMMITTER_PRIVATE_KEY=YOUR_ECDSA_PRIVATE_KEY_HERE

# BLS private key for constraint signing (hex string without 0x prefix, 64 hex chars)
# REQUIRED: The gateway will fail to start without this variable
# BLS private key (REQUIRED)
# Format: 64 hex characters (32 bytes), without 0x prefix
# Used for constraint signing
# Generate with: openssl rand -hex 32
# SECURITY WARNING: Never commit your real private key to git!
BLS_PRIVATE_KEY=YOUR_BLS_PRIVATE_KEY_HERE

# Logging level
# ============================================================================
# DATABASE CONFIGURATION - Local development uses localhost
# ============================================================================

# Database connection for local development
# For Docker: This is overridden in docker-compose.yml to use container network
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/preconfirmation_gateway

# Test database connection (used by test suite)
TEST_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/preconfirmation_gateway_test

# ============================================================================
# OPTIONAL VARIABLES
# ============================================================================

# Logging level (default: info)
# Options: trace, debug, info, warn, error
RUST_LOG=info

# Optional: Custom configuration file path
# CONFIG_FILE=config.toml
# Custom configuration file path (default: config.toml)
# CONFIG_FILE=config.toml

# ============================================================================
# ADDITIONAL ENDPOINTS (Optional - can be configured in config.toml)
# ============================================================================

# Reth node RPC endpoint (optional override)
# RETH_ENDPOINT=http://localhost:8545

# Constraints API relay endpoint (optional override)
# CONSTRAINTS_API_ENDPOINT=http://localhost:3501
Loading