Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
904 lines (654 loc) · 21.7 KB
/
Copy path.env.example
File metadata and controls
904 lines (654 loc) · 21.7 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
# Generated by npm run config:generate; do not edit by hand.
# Development defaults only. Uncomment and supply required settings for deployment.
# Empty assignments are rejected. Use exactly one name per alias group.
# non-empty string
# Aliases: npm_package_version (choose only one)
APP_VERSION=dev
# local | development | test | staging | production
NODE_ENV=development
# ==============================================
# Database Configuration (PostgreSQL)
# STAB-BE-006: Prisma/PostgreSQL is the single persistence authority.
# DATABASE_URL is the only production database URL. The DB_* keys below
# are legacy TypeORM settings retained only for local tooling compatibility
# and MUST NOT be used to construct a second runtime connection.
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_NAME=truthbounty
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/truthbounty
# Prisma settings (canonical migration authority)
DATABASE_LOGGING=false # Set to 'true' to enable Prisma SQL query logging
# Redis Configuration
# STAB-BE-006: Redis is a cache/queue only, never a persistence authority.
# No SQLite/LibSQL fallback is permitted in any environment.
#
# The application will start even if Redis is unavailable (with warnings)
REDIS_ENABLED=true
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
REDIS_TLS=false # Set to 'true' for production with TLS
CACHE_CLAIMS_TTL=300 # Claim cache TTL in seconds (reduced to 5 minutes for safety)
CACHE_VERSION=v1 # Cache version for versioned keys - increment when cache schema changes
# Blockchain Configuration
# Controls how many blocks, events, and reorg entries are kept in memory
BLOCKCHAIN_MAX_BLOCKS=10000 # Max block records in memory (default: 10000)
BLOCKCHAIN_MAX_EVENTS=50000 # Max pending/confirmed/orphaned events (default: 50000)
BLOCKCHAIN_MAX_REORG_HISTORY=1000 # Max reorg history entries (default: 1000)
# Rate limiting (requests per TTL in seconds)
RATE_LIMIT_CLAIMS_TTL=60
RATE_LIMIT_CLAIMS_LIMIT=5
RATE_LIMIT_VOTES_TTL=60
RATE_LIMIT_VOTES_LIMIT=20
RATE_LIMIT_DISPUTES_TTL=60
RATE_LIMIT_DISPUTES_LIMIT=3
RATE_LIMIT_AI_TTL=60
RATE_LIMIT_AI_LIMIT=10
RATE_LIMIT_AI_STREAM_TTL=60
RATE_LIMIT_AI_STREAM_LIMIT=3
OPTIMISM_RPC_URL=https://mainnet.optimism.io
CHAIN_ID=10
# Event Indexer Configuration
CONFIRMATIONS_REQUIRED=12
BLOCK_RANGE_PER_BATCH=5000
MAX_RETRY_ATTEMPTS=3
POLLING_INTERVAL_MS=12000
# V2-BE-125 — Adaptive Historical Backfill
# Minimum block-range floor used by the adaptive halving logic.
# When a provider rejects a getLogs range as too large, the service halves
# the range repeatedly until it succeeds or reaches this floor.
MIN_BATCH_SIZE_FLOOR=1
# Gap (in blocks) above which backfillFromBlock enters high-throughput
# adaptive mode (no polling-interval delay between batches).
# Set lower for staging environments with smaller chains.
ADAPTIVE_FILL_THRESHOLD_BLOCKS=10000
# Realtime Event Stream Configuration
# Projection-backed SSE stream (outbox publish-after-commit, resume cursor, heartbeat, backpressure)
# STAB-BE-006 / #398: projection cursor and event writes MUST be committed
# atomically in the canonical Prisma/PostgreSQL store (single transaction).
REALTIME_POLL_INTERVAL_MS=1000 # Outbox publisher poll interval (ms)
REALTIME_MAX_PUBLISH_BATCH=100 # Max outbox rows published per pass
REALTIME_HEARTBEAT_INTERVAL_MS=15000 # Heartbeat interval for idle streams (ms)
REALTIME_MAX_BACKLOG=1000 # Max queued envelopes per subscriber before disconnect
REALTIME_MAX_REPLAY_ROWS=5000 # Max historical rows replayed on resume cursor
# Sybil Resistance Configuration
# accuracy score contributes to their sybil resistance score.
SYBIL_MIN_CLAIMS_FOR_ACCURACY_SCORE=5
# Authentication Configuration (JWT)
JWT_SECRET=your-super-secret-jwt-key-change-in-production
# JWT token expiration time (e.g., '7d', '24h', '60m')
JWT_EXPIRATION=7d
# SIWE (Sign-In with Ethereum) — EIP-4361 (V2-BE-063)
# Expected SIWE message fields. These are validated fail-closed during login:
# a message that does not match the deployed trust context is rejected.
SIWE_DOMAIN=app.truthbounty.com
# Comma-separated origins that may present a SIWE signature.
SIWE_ALLOWED_ORIGINS=https://app.truthbounty.com
# Comma-separated domains allowed to issue the authorization message.
SIWE_ALLOWED_DOMAINS=app.truthbounty.com,truthbounty.com
# Comma-separated chain IDs accepted for the signing wallet (Optimism = 10).
SIWE_SUPPORTED_CHAIN_IDS=10
# Exact SIWE statement that must appear in the signed message.
SIWE_EXPECTED_STATEMENT=Sign in to TruthBounty V2 to verify wallet ownership.
# SIWE nonce lifetime in milliseconds before it is considered stale.
AUTH_NONCE_TTL_MS=300000
# Staging Deployment Smoke Tests (V2-BE-146)
# Base URL of the deployed instance to smoke-test; used by
# `npm run smoke:staging` and the workflow via the staging_base_url secret.
STAGING_BASE_URL=
# Per-probe timeout in milliseconds for the smoke test suite.
SMOKE_TIMEOUT_MS=10000
# Idempotency Configuration
IDEMPOTENCY_ENABLED=true
# Time-to-live for stored responses in seconds (default: 24 hours)
IDEMPOTENCY_TTL=86400
# Required length of idempotency keys in characters (default: 32)
IDEMPOTENCY_KEY_LENGTH=32
# Notification Service Configuration
# SMTP configuration for email delivery
SMTP_HOST=localhost
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
SMTP_FROM=noreply@truthbounty.com
# Notification queue configuration
NOTIFICATION_QUEUE_DELAY=0
NOTIFICATION_MAX_RETRIES=5
NOTIFICATION_RETRY_DELAY=2000
# Canonical Contract Release Manifest (STAB-BE-007)
# release package. The manifest is the single source of truth for chain ID,
# release ID, deployment block, contract addresses and ABI/event checksums.
# Hand-maintained addresses and INDEXED_CONTRACTS are no longer accepted.
CONTRACT_RELEASE_MANIFEST_PATH=./contracts/releases/latest.json
# Canonical RPC endpoint used by the indexer and API. Credentials are redacted in logs.
BLOCKCHAIN_RPC_URL=https://mainnet.optimism.io
# Expected release ID; startup fails if the manifest release ID does not match.
CONTRACT_RELEASE_ID=
# Expected chain ID; startup fails if the manifest chain ID does not match.
CONTRACT_RELEASE_CHAIN_ID=10
# Expected deployment block; startup fails if the manifest block does not match.
CONTRACT_RELEASE_DEPLOYMENT_BLOCK=
# Maximum age of the manifest in days before it is considered stale (default 90)
CONTRACT_RELEASE_MAX_AGE_DAYS=90
# Fail closed when release data is absent or inconsistent.
# MUST be true in staging/production. Only set false for explicit local mode.
CONTRACT_RELEASE_STRICT=true
# Local Development Mode (STAB-BE-007)
# Explicit opt-in for local development. When true, the app runs in a
# visibly non-production mode, allows empty indexer configuration, and
# relaxes release manifest requirements. MUST be false in staging/production.
# true or false
# Aliases: STAB_LOCAL_MODE (choose only one)
LOCAL_DEV_MODE=false
# comma-separated non-empty values
# SIWE_ALLOWED_ORIGINS=
# non-empty string; required explicitly in staging/production
# CAPABILITY_TOKEN_SIGNING_KEY=
# integer 1..3650
ADMIN_AUDIT_RETENTION_DAYS=365
# comma-separated non-empty values
# SIWE_ALLOWED_DOMAINS=
# non-empty string
# SIWE_EXPECTED_STATEMENT=
# comma-separated Optimism chain IDs
# SIWE_SUPPORTED_CHAIN_IDS=
# integer 1..9007199254740991
OPERATIONS_AUDIT_MAX=10000
# integer 0..9007199254740991
INDEXER_MAX_FINALIZED_LAG_BLOCKS=150
# integer 0..9007199254740991
INDEXER_MAX_HEAD_AGE_SECONDS=120
# non-empty string
# INDEXER_RELEASE_ID=
# non-negative safe integer
# INDEXER_DEPLOYMENT_BLOCK=
# 64-character lowercase SHA-256
# Aliases: ARTIFACT_CHECKSUM (choose only one)
# INDEXER_ARTIFACT_CHECKSUM=
# integer 1..9007199254740991
PUBLIC_STATUS_CACHE_TTL_SECONDS=15
# integer 1..9007199254740991
PUBLIC_STATUS_STALE_AFTER_SECONDS=120
# URL (https:, http:)
# PUBLIC_STATUS_WEB_HEALTH_URL=
# integer 1..9007199254740991
PUBLIC_STATUS_WEB_PROBE_TIMEOUT_MS=2000
# integer 1..9007199254740991
PUBLIC_STATUS_RATE_LIMIT=60
# integer 1..9007199254740991
PUBLIC_STATUS_RATE_WINDOW_SECONDS=60
# true or false
ABUSE_SIGNALS_ENABLED=true
# true or false
ABUSE_SIGNALS_ENFORCEMENT_ENABLED=false
# secret of at least 32 characters
# ABUSE_SIGNALS_SUBJECT_SALT=
# integer 1..9007199254740991
ABUSE_SIGNALS_WINDOW_SECONDS=300
# integer 1..9007199254740991
ABUSE_SIGNALS_MAX_ACTION_SECONDS=900
# integer 1..9007199254740991
ABUSE_SIGNALS_MAX_ACTIONS_PER_SUBJECT=3
# integer 0..9007199254740991
ABUSE_SIGNALS_TRUSTED_PROXY_HOPS=0
# integer 1..9007199254740991
ABUSE_SIGNALS_SCRAPE_MAX_READS=600
# integer 1..9007199254740991
ABUSE_SIGNALS_SCRAPE_MAX_ROUTES=40
# integer 1..9007199254740991
ABUSE_SIGNALS_STUFFING_MAX_FAILURES=20
# integer 1..9007199254740991
ABUSE_SIGNALS_STUFFING_MAX_DISTINCT_CREDENTIALS=5
# integer 1..9007199254740991
ABUSE_SIGNALS_STUFFING_MAX_DISTINCT_SUBJECTS=10
# integer 1..9007199254740991
ABUSE_SIGNALS_SPAM_MAX_WRITES=30
# integer 1..9007199254740991
ABUSE_SIGNALS_SPAM_MAX_DUPLICATE_PAYLOADS=10
# integer 1..9007199254740991
ABUSE_SIGNALS_WEBHOOK_MAX_ENDPOINT_WRITES=15
# integer 1..9007199254740991
ABUSE_SIGNALS_WEBHOOK_MAX_SECRET_ROTATIONS=5
# integer 1..9007199254740991
ABUSE_SIGNALS_WEBHOOK_MAX_DELIVERIES=200
# integer 1..9007199254740991
ABUSE_SIGNALS_STREAM_MAX_CONNECTIONS=25
# integer 1..9007199254740991
ABUSE_SIGNALS_STREAM_MAX_SUBSCRIBE_OPS=60
# integer 1..9007199254740991
ABUSE_SIGNALS_STREAM_MAX_MESSAGES=300
# integer 1..9007199254740991
ABUSE_SIGNALS_SUPPORT_MAX_REQUESTS=30
# integer 1..9007199254740991
ABUSE_SIGNALS_SUPPORT_MAX_DUPLICATE_REQUESTS=20
# integer 1..9007199254740991
ABUSE_SIGNALS_SUPPORT_MAX_DISTINCT_CONTACTS=25
# integer 1..65535
PORT=3000
# comma-separated non-empty values; required explicitly in staging/production
# ALLOWED_ORIGINS=
# comma-separated non-empty values
# TRUSTED_PROXIES=
# integer 0..16
MAX_PROXY_HOPS=1
# integer 1..9007199254740991
HSTS_MAX_AGE=31536000
# URL (postgres:, postgresql:); required explicitly in staging/production
# DATABASE_URL=
# hostname or IP address (without scheme, credentials or port)
# Aliases: DATABASE_HOST (choose only one)
DB_HOST=localhost
# integer 1..65535
# Aliases: DATABASE_PORT (choose only one)
DB_PORT=5432
# non-empty string
# Aliases: DATABASE_USER (choose only one)
DB_USERNAME=postgres
# non-empty string
# Aliases: DATABASE_PASSWORD (choose only one)
# DB_PASSWORD=
# non-empty string
# Aliases: DB_NAME, DATABASE_NAME (choose only one)
DB_DATABASE=truthbounty
# true or false
# Aliases: DATABASE_SSL (choose only one)
DB_SSL=false
# true or false
DATABASE_SSL_REJECT_UNAUTHORIZED=true
# true or false
DATABASE_SYNCHRONIZE=false
# true or false
DATABASE_LOGGING=false
# non-empty string
# Aliases: DATABASE_PATH (choose only one)
SQLITE_PATH=database.sqlite
# integer 1..100
DB_POOL_MAX=20
# integer 0..50
DB_POOL_MIN=2
# integer 1000..120000
# DB_POOL_IDLE_TIMEOUT=
# integer 1000..120000
DB_POOL_ACQUIRE_TIMEOUT=30000
# integer 1000..60000
DB_STATEMENT_TIMEOUT=15000
# integer 1000..60000
DB_IDLE_TRANSACTION_TIMEOUT=10000
# integer 1000..300000
DB_TRANSACTION_DEADLINE=30000
# integer 1..100
# DB_POOL_BUDGET_API=
# integer 1..100
# DB_POOL_BUDGET_JOBS=
# integer 1..100
# DB_POOL_BUDGET_ADMIN=
# integer 1..100
# DB_POOL_BUDGET_DEFAULT=
# integer 0..100
DB_POOL_RETRIES=3
# integer 1..9007199254740991
DB_POOL_RETRY_DELAY=1000
# true or false
REDIS_ENABLED=true
# hostname or IP address (without scheme, credentials or port); required explicitly in staging/production
REDIS_HOST=localhost
# integer 1..65535
REDIS_PORT=6379
# non-empty string; required explicitly in staging/production
# REDIS_PASSWORD=
# integer 0..15
REDIS_DB=0
# true or false
REDIS_TLS=false
# integer 1..9007199254740991; required explicitly in staging/production
# Aliases: BLOCKCHAIN_CHAIN_ID, CONTRACT_RELEASE_CHAIN_ID (choose only one)
CHAIN_ID=11155420
# URL (https:, http:, wss:, ws:); required explicitly in staging/production
# Aliases: BLOCKCHAIN_RPC_URL, OPTIMISM_RPC_URL (choose only one)
# RPC_URL=
# comma-separated non-empty values
# BLOCKCHAIN_FALLBACK_RPC_URLS=
# integer 1..9007199254740991
BLOCKCHAIN_RPC_TIMEOUT_MS=10000
# true or false
BLOCKCHAIN_STARTUP_VALIDATION=true
# true or false
BLOCKCHAIN_STARTUP_RPC_CHECK=true
# integer 0..9007199254740991
START_BLOCK=0
# integer 1..9007199254740991
# Aliases: CONFIRMATIONS_SAFE, BLOCKCHAIN_CONFIRMATION_DEPTH (choose only one)
FINALITY_SAFE_CONFIRMATIONS=6
# integer 1..9007199254740991
# Aliases: CONFIRMATIONS_FINALIZED, CONFIRMATIONS_REQUIRED, REQUIRED_CONFIRMATIONS (choose only one)
FINALITY_FINALIZED_CONFIRMATIONS=12
# integer 1..9007199254740991
CONFIRMATIONS_FULL=64
# comma-separated non-empty values
FINALITY_ALLOWED_CHAIN_IDS=10,11155420
# integer 1..9007199254740991
BLOCKCHAIN_MAX_BLOCKS=10000
# integer 1..9007199254740991
BLOCKCHAIN_MAX_EVENTS=50000
# integer 1..9007199254740991
BLOCKCHAIN_MAX_REORG_HISTORY=1000
# integer 1..9007199254740991
BLOCK_RANGE_PER_BATCH=5000
# integer 0..100
MAX_RETRY_ATTEMPTS=3
# integer 1..9007199254740991
POLLING_INTERVAL_MS=12000
# integer 1..9007199254740991
MIN_BATCH_SIZE_FLOOR=1
# integer 1..100000
FINALITY_MAX_REORG_DEPTH=64
# integer 1..100000
FINALITY_MAX_ANCESTOR_SEARCH=64
# integer 1..9007199254740991
ADAPTIVE_FILL_THRESHOLD_BLOCKS=10000
# non-empty string; required explicitly in staging/production
# CONTRACT_RELEASE_MANIFEST_PATH=
# non-empty string; required explicitly in staging/production
# Aliases: RELEASE_ID (choose only one)
# CONTRACT_RELEASE_ID=
# 64-character lowercase SHA-256; required explicitly in staging/production
# CONTRACT_RELEASE_SHA256=
# integer 0..9007199254740991; required explicitly in staging/production
# Aliases: DEPLOYMENT_BLOCK (choose only one)
CONTRACT_RELEASE_DEPLOYMENT_BLOCK=0
# integer 1..365
# Aliases: MANIFEST_MAX_AGE_DAYS (choose only one)
CONTRACT_RELEASE_MAX_AGE_DAYS=90
# true or false
CONTRACT_RELEASE_STRICT=true
# local | pinata | web3storage
IPFS_PROVIDER=local
# non-empty string
IPFS_LOCAL_STORAGE_PATH=data/ipfs
# URL (https:, http:); required explicitly in staging/production
# IPFS_GATEWAY_URL=
# URL (https:, http:); required explicitly in staging/production
# IPFS_API_URL=
# hostname or IP address (without scheme, credentials or port); required explicitly in staging/production
# SMTP_HOST=
# integer 1..65535
SMTP_PORT=587
# non-empty string; required explicitly in staging/production
# SMTP_USER=
# non-empty string; required explicitly in staging/production
# Aliases: SMTP_PASS (choose only one)
# SMTP_PASSWORD=
# non-empty string; required explicitly in staging/production
# Aliases: EMAIL_FROM, NOTIFICATION_EMAIL_FROM (choose only one)
# SMTP_FROM=
# integer 0..9007199254740991
NOTIFICATION_QUEUE_DELAY=0
# integer 0..100
NOTIFICATION_MAX_RETRIES=5
# integer 1..9007199254740991
NOTIFICATION_RETRY_DELAY=2000
# openai | mock
AI_PROVIDER=mock
# openai | anthropic
DEFAULT_LLM_PROVIDER=openai
# non-empty string
# OPENAI_API_KEY=
# non-empty string
# ANTHROPIC_API_KEY=
# URL (https:, http:)
OPENAI_BASE_URL=https://api.openai.com/v1
# non-empty string
OPENAI_MODEL=gpt-4o-mini
# integer 1..9007199254740991
AI_MAX_PROMPT_LENGTH=4000
# integer 1..9007199254740991
AI_MEMORY_WINDOW_MESSAGES=10
# integer 1..9007199254740991
AI_MEMORY_WINDOW_TOKEN_BUDGET=3000
# integer 1..9007199254740991
AI_CONTEXT_TOP_N=5
# integer 1..9007199254740991
AI_CONTEXT_CACHE_TTL=900
# integer 1..9007199254740991
AI_CONVO_WINDOW_CACHE_TTL=120
# integer 1..9007199254740991
AI_PROVIDER_AVAILABILITY_CACHE_TTL=30
# true or false
AI_REDACT_BEFORE_STORE=true
# trace | debug | info | warn | error | fatal | silent
LOG_LEVEL=info
# non-empty string; required explicitly in staging/production
# METRICS_TOKEN=
# true or false
METRICS_ENABLED=true
# integer 1..9007199254740991
PUBLIC_INCIDENTS_CACHE_TTL_SECONDS=15
# integer 1..9007199254740991
PUBLIC_INCIDENTS_STALE_AFTER_SECONDS=120
# integer 1..9007199254740991
PUBLIC_INCIDENTS_RATE_LIMIT=60
# integer 1..9007199254740991
PUBLIC_INCIDENTS_RATE_WINDOW_SECONDS=60
# non-empty string
# CURSOR_KEY_ID=
# non-empty string
# CURSOR_KEY_SECRET=
# non-empty string
# CURSOR_PREVIOUS_KEYS=
# integer 1..9007199254740991
CURSOR_TTL_SECONDS=3600
# true or false
LOG_REDACT_RPC_URLS=true
# non-empty string; required explicitly in staging/production
# JWT_SECRET=
# positive duration with s, m, h or d unit
JWT_EXPIRATION=15m
# positive duration with s, m, h or d unit
REFRESH_TOKEN_EXPIRATION=7d
# non-empty string; required explicitly in staging/production
# SIWE_DOMAIN=
# true or false
IDEMPOTENCY_ENABLED=true
# integer 1..9007199254740991
IDEMPOTENCY_TTL=86400
# integer 16..256
IDEMPOTENCY_KEY_LENGTH=32
# integer 1..9007199254740991
RATE_LIMIT_CLAIMS_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_CLAIMS_LIMIT=5
# integer 1..9007199254740991
RATE_LIMIT_VOTES_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_VOTES_LIMIT=20
# integer 1..9007199254740991
RATE_LIMIT_DISPUTES_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_DISPUTES_LIMIT=3
# integer 1..9007199254740991
RATE_LIMIT_AUTH_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_AUTH_LIMIT=5
# integer 1..9007199254740991
RATE_LIMIT_AI_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_AI_LIMIT=10
# integer 1..9007199254740991
RATE_LIMIT_AI_STREAM_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_AI_STREAM_LIMIT=3
# integer 1..9007199254740991
RATE_LIMIT_DEFAULT_TTL=60
# integer 1..9007199254740991
RATE_LIMIT_DEFAULT_LIMIT=10
# integer 1..9007199254740991
REALTIME_POLL_INTERVAL_MS=1000
# comma-separated non-empty values
# REALTIME_ORIGINS=
# comma-separated non-empty values
# REALTIME_TOPICS=
# comma-separated non-empty values
# REALTIME_SUPPORTED_RELEASES=
# integer 1..9007199254740991
# REALTIME_RETENTION_SECONDS=
# integer 1..9007199254740991
# REALTIME_HEARTBEAT_SECONDS=
# integer 1..9007199254740991
# REALTIME_MAX_PAYLOAD_BYTES=
# integer 60000..9007199254740991
WORLDCOIN_MAX_ROOT_AGE_MS=86400000
# integer 1..9007199254740991
SEARCH_TIMEOUT_MS=5000
# integer 1..9007199254740991
REALTIME_MAX_PUBLISH_BATCH=100
# integer 1..9007199254740991
REALTIME_HEARTBEAT_INTERVAL_MS=15000
# integer 1..9007199254740991
REALTIME_MAX_BACKLOG=1000
# integer 1..9007199254740991
REALTIME_MAX_REPLAY_ROWS=5000
# integer 1..9007199254740991
# RATE_LIMIT_CLAIMS_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_VOTES_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_DISPUTES_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_AUTH_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_AI_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_AI_STREAM_BLOCK_DURATION=
# integer 1..9007199254740991
# RATE_LIMIT_DEFAULT_BLOCK_DURATION=
# integer 1..9007199254740991
SYBIL_MIN_CLAIMS_FOR_ACCURACY_SCORE=5
# integer 1..9007199254740991
CACHE_CLAIMS_TTL=300
# integer 1..9007199254740991
CACHE_GOVERNANCE_TTL=3600
# integer 1..9007199254740991
CACHE_REPUTATION_TTL=3600
# non-empty string
CACHE_VERSION=v1
# integer 1..9007199254740991
AUTH_NONCE_TTL_MS=300000
# URL (https:, http:)
# SIWE_ORIGIN=
# non-empty string
# SERVICE_API_KEY=
# comma-separated non-empty values
# ADMIN_WALLETS=
# true or false
DATABASE_SEED=false
# true or false
FINALITY_POLICY_STARTUP_VALIDATION=true
# true or false
MANIFEST_VALIDATION=true
# non-empty string
# CONTRACT_ADDRESS_MANIFEST=
# non-zero 20-byte EVM address
# REWARD_CONTRACT_ADDRESS=
# non-zero 20-byte EVM address
# CONTRACT_ADDRESS=
# non-zero 20-byte EVM address
# TREASURY_ADDRESS=
# non-zero 20-byte EVM address
# VERIFIER_ADDRESS=
# non-zero 20-byte EVM address
# FEE_RECIPIENT=
# JSON array of indexer contracts
INDEXED_CONTRACTS=[]
# smtp | sendgrid | mailgun
NOTIFICATION_EMAIL_PROVIDER=smtp
# non-empty string
# SENDGRID_API_KEY=
# non-empty string
# MAILGUN_API_KEY=
# non-empty string
# MAILGUN_DOMAIN=
# non-empty string
# FCM_PROJECT_ID=
# non-empty string
# FCM_SERVER_KEY=
# true or false
WEBHOOK_REQUIRE_HTTPS=true
# integer 1..9007199254740991
WEBHOOK_TIMEOUT_MS=10000
# non-empty string; required explicitly in staging/production
# AUDIT_HASH_SECRET=
# non-empty string
AUDIT_ARCHIVAL_BUCKET=audit-archive
# true or false
AUDIT_ARCHIVAL_ENABLED=false
# true or false
AUDIT_ASYNC_WRITES_ENABLED=true
# integer 1..9007199254740991
AUDIT_BATCH_SIZE=50
# non-empty string
# AUDIT_LOG_RETENTION_CRON=
# integer 1..9007199254740991
AUDIT_LOG_RETENTION_DAYS=365
# integer 1..9007199254740991
AUDIT_PII_RETENTION_DAYS=30
# integer 1..3650
EVENT_QUARANTINE_RETENTION_DAYS=90
# integer 1..9007199254740991
AUDIT_MAX_BATCH_WAIT_MS=1000
# non-empty string
AUDIT_METRIC_PREFIX=audit
# integer 1..9007199254740991
AUDIT_MAX_API_CALLS=100
# integer 1..9007199254740991
AUDIT_MAX_FAILED_LOGINS=5
# integer 1..9007199254740991
AUDIT_MAX_PERMISSION_CHANGES=3
# integer 1..9007199254740991
AUDIT_SUSPICIOUS_WINDOW_MINUTES=15
# non-empty string
BACKUP_STORAGE_DIR=/var/backups/truthbounty-v2
# non-empty string
# REBUILD_SCHEMA=
# 24-hour HH:mm time
MAINTENANCE_WINDOW_START=02:00
# 24-hour HH:mm time
MAINTENANCE_WINDOW_END=04:00
# non-empty string
# WORLDCOIN_ACTION=
# non-empty string
# WORLDCOIN_APP_ID=
# URL (https:, http:)
# WORLDCOIN_VERIFY_BASE_URL=
# integer 1..9007199254740991
CB_FAILURE_THRESHOLD_DATABASE=5
# integer 1..9007199254740991
CB_FAILURE_THRESHOLD_REDIS=5
# integer 1..9007199254740991
CB_FAILURE_THRESHOLD_RPC=5
# integer 1..9007199254740991
CB_FAILURE_THRESHOLD_IPFS=5
# integer 1..9007199254740991
CB_FAILURE_THRESHOLD_QUEUE=5
# integer 1..9007199254740991
CB_RESET_MS_DATABASE=30000
# integer 1..9007199254740991
CB_RESET_MS_REDIS=30000
# integer 1..9007199254740991
CB_RESET_MS_RPC=30000
# integer 1..9007199254740991
CB_RESET_MS_IPFS=30000
# integer 1..9007199254740991
CB_RESET_MS_QUEUE=30000
# integer 0..9007199254740991
DEPENDENCY_TIMEOUT_DATABASE=5000
# integer 0..9007199254740991
DEPENDENCY_TIMEOUT_REDIS=2000
# integer 0..9007199254740991
DEPENDENCY_TIMEOUT_RPC=10000
# integer 0..9007199254740991
DEPENDENCY_TIMEOUT_IPFS=15000
# integer 0..9007199254740991
DEPENDENCY_TIMEOUT_QUEUE=5000