-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConf.mining-pool.toml
More file actions
159 lines (145 loc) · 4.88 KB
/
Copy pathConf.mining-pool.toml
File metadata and controls
159 lines (145 loc) · 4.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Verus RPC Server Mining Pool Integration Configuration
# This configuration enables mining pool integration for enhanced PoW validation
#
# Available HTTP Endpoints:
# - POST / - JSON-RPC 2.0 endpoint
# - GET /health - Health check (JSON)
# - GET /metrics - Metrics (JSON)
# - GET /metrics/prometheus - Prometheus exposition format (text/plain)
# - POST /pool/share - Mining pool share validation (ENABLED)
# - GET /pool/metrics - Mining pool metrics (ENABLED)
# - POST /payments/request - Create a payment quote (z-address + amount)
# - POST /payments/submit - Submit signed raw tx for payment
# - GET /payments/status/{id}- Check payment status and retrieve JWT
[verus]
# The URL and port of your Verus daemon RPC endpoint
rpc_url = "http://127.0.0.1:27486"
# RPC username (from your verus.conf file)
rpc_user = "your_rpc_username"
# RPC password (from your verus.conf file)
rpc_password = "your_rpc_password"
# Connection timeout in seconds
timeout_seconds = 30
# Maximum retry attempts
max_retries = 3
# Circuit breaker configuration for daemon connectivity
[verus.circuit_breaker]
failure_threshold = 5
recovery_timeout_seconds = 60
half_open_max_requests = 3
[server]
# Server address to bind to
bind_address = "127.0.0.1"
# Server port
port = 8080
# Maximum request size in bytes
max_request_size = 1048576
# Worker threads (0 for auto-detect)
worker_threads = 0
[security]
# Allowed CORS origins (use "*" for development, specific domains for production)
cors_origins = ["*"]
# Allowed CORS methods
cors_methods = ["GET", "POST", "OPTIONS"]
# Allowed CORS headers
cors_headers = ["Content-Type", "Authorization"]
# Enable request logging
enable_request_logging = true
# Enable security headers
enable_security_headers = true
# Trusted proxy headers
trusted_proxy_headers = ["X-Forwarded-For", "X-Real-IP"]
# Enable custom security headers
enable_custom_headers = true
# Custom security header value
custom_security_header = "X-Verus-RPC-Server"
# Method-specific rate limits
[security.method_rate_limits]
getinfo = { requests_per_minute = 1000, burst_size = 100, enabled = true }
getblock = { requests_per_minute = 500, burst_size = 50, enabled = true }
getrawtransaction = { requests_per_minute = 300, burst_size = 30, enabled = true }
[security.jwt]
# JWT secret key (generate a secure random key for production)
secret_key = "your-super-secret-jwt-key-that-is-at-least-32-characters-long"
# JWT token expiration time in seconds
expiration_seconds = 3600
# JWT issuer
issuer = "verus-rpc-server"
# JWT audience
audience = "verus-clients"
# PoW Configuration (Proof of Work for token issuance)
[security.pow]
# Default difficulty for PoW challenges (hex string)
# Easy: "ffffffff" (for testing)
# Medium: "0000ffff" (default production)
# Hard: "000000ff" (premium access)
default_difficulty = "0000ffff"
# Challenge expiration time in minutes
challenge_expiration_minutes = 10
# Token duration for PoW-validated tokens (seconds)
token_duration_seconds = 14400 # 4 hours
# Rate limit multiplier for PoW-validated tokens
rate_limit_multiplier = 2.0
# Enable PoW challenges
enabled = true
# Mining Pool Configuration
[security.mining_pool]
# Pool server URL (replace with your actual pool URL)
pool_url = "https://pool.example.com"
# Pool API key for authentication (replace with your actual API key)
api_key = "your-pool-api-key"
# Pool public key for signature verification (32-byte hex string)
# This should be the Ed25519 public key of your mining pool
public_key = "0000000000000000000000000000000000000000000000000000000000000000"
# Connection timeout in seconds
timeout_seconds = 30
# Maximum retry attempts for failed requests
max_retries = 3
# Circuit breaker threshold (number of failures before opening)
circuit_breaker_threshold = 5
# Circuit breaker timeout in seconds (time to wait before retrying)
circuit_breaker_timeout = 60
# Rate limiting requests per minute per miner
requests_per_minute = 100
# Enable pool integration
enabled = true
# Development mode - allows local access without authentication
development_mode = false
[rate_limit]
# Requests per minute per IP
requests_per_minute = 1000
# Burst size
burst_size = 100
# Enable rate limiting
enabled = true
[logging]
# Log level (debug, info, warn, error)
level = "info"
# Log format (json, text)
format = "text"
# Enable structured logging
structured = false
[cache]
# Enable caching
enabled = true
# Redis connection URL
redis_url = "redis://127.0.0.1:6379"
# Default TTL in seconds
default_ttl = 300
# Maximum cache size in bytes
max_size = 104857600 # 100MB
# Payments configuration (optional)
[payments]
enabled = true
address_types = ["orchard", "sapling"]
default_address_type = "orchard"
min_confirmations = 1
session_ttl_minutes = 30
require_viewing_key = false
viewing_keys = []
viewing_key_rescan = "whenkeyisnew"
[[payments.tiers]]
id = "basic"
amount_vrsc = 1.0
description = "Basic access"
permissions = ["read"]