Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
110 lines (96 loc) · 5.17 KB
/
Copy path.env.example
File metadata and controls
110 lines (96 loc) · 5.17 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
# Note: `docker compose up` on a fresh volume takes several extra
# minutes the first time, while the clamav service downloads its virus
# database (the clamav-data volume caches it for subsequent starts).
# The portal waits for clamd to report healthy before it starts, and
# every upload is scanned — if clamd is down, uploads fail closed with a
# 503 rather than being stored unscanned. ClamAV's stream and file size
# limits live in clamd.conf, sized to cover one scan window rather than
# the whole upload; see the README section "Upload size and ClamAV".
# gno.land RPC endpoint used to verify operator public keys (required, no default)
REMOTE=https://rpc.topaz.testnets.gno.land
# Comma-separated bech32 operator addresses allowed to authenticate
# against the admin API — /admin, /admin/submissions, /admin/exercise,
# /admin/summary, the per-submission score endpoint, and the delete
# endpoint. Admins sign in the same challenge-tx way validators do (see
# REMOTE above); an address not in this list gets a 403 even with a
# valid signature.
ADMIN_OPERATOR_ADDRESSES=g1...,g1...
# Optional: hex-encoded HMAC secret for session tokens. Leave unset to
# generate a random one per run (fine for local dev; sessions won't
# survive a restart).
#SESSION_SECRET=
# Optional: hex-encoded HMAC secret for admin session tokens, kept
# separate from SESSION_SECRET so restarting the portal doesn't also
# invalidate in-flight validator upload sessions (or vice versa). Leave
# unset to generate a random one per run.
#ADMIN_SESSION_SECRET=
# MinIO (local S3-compatible storage) admin credentials — also used as
# the portal's S3_ACCESS_KEY / S3_SECRET_KEY.
MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=minioadmin123
# Bucket name, created automatically on startup.
S3_BUCKET=submissions
# Host port the portal is published on.
PORTAL_PORT=8080
# --- Production only (docker-compose.prod.yml) -----------------------
# The variables below are ignored by docker-compose.yml.
# Tag of the portal image to run, from
# ghcr.io/samouraiworld/validator-diagnostics. Defaults to `latest`,
# which is republished on every merge to master. Its reason to exist is
# rollback: set it to the `sha-<7 chars>` tag of a known-good commit
# (visible on the repository's Packages page) and redeploy, without
# editing the compose file.
#PORTAL_IMAGE_TAG=latest
# Domain the portal is served on, used by the commented Traefik block in
# docker-compose.prod.yml. Hostname only — no scheme, no trailing slash.
# Its A record must point at the deployment host before the first
# certificate request.
#PORTAL_DOMAIN=firedrill.example.org
# Contact address Let's Encrypt uses for expiry warnings, also used by
# the commented Traefik block. Required by ACME; a real mailbox someone
# reads, not a role alias nobody has.
#ACME_EMAIL=ops@example.org
# Maximum accepted size of the whole upload, in bytes. The default, 4 GiB,
# is not a scan limit: clamd never sees the raw upload, only metadata.json
# and the decompressed log in 1 GiB windows, so this is a disk/S3/time
# question. Raising it costs disk in particular: uploads over 32 MiB spill
# from memory to a temp file, so free disk has to cover roughly one
# archive's worth of space per concurrent submission. The next limit to
# hit is storage.S3Store.Save's single PutObject, which S3 caps at 5 GiB.
# See the README section "Upload size and ClamAV".
#
# Source of truth: cmd/portal/main.go's defaultMaxUploadSize constant.
# This file can't import a Go constant, so keep the two numbers in step
# by hand.
MAX_UPLOAD_SIZE=4294967296
# Maximum accepted size of each compressed log entry inside the archive
# (validator.log.gz, sentry.log.gz), in bytes (default 4 GiB, matching
# MAX_UPLOAD_SIZE — a real submission's compressed log has been observed
# above the old 256 MiB default). Each entry is streamed, never buffered,
# so this costs decompression time rather than memory.
#
# Careful: this bounds the COMPRESSED entry. The DECOMPRESSED log is no
# longer capped by the antivirus — it is scanned in 1 GiB windows, so an
# entry this size decompresses fine either way. Two other bounds apply to
# the decompressed bytes instead, and neither rejects the submission:
# AV_SCAN_BUDGET below (coverage — how much of the log the antivirus
# examines) and scoring.maxLogWindowBytes, 1 GiB (partial credit — how
# much of the investigation window automatic scoring reads).
#
# Source of truth: cmd/portal/main.go's defaultMaxLogSize constant. This
# file can't import a Go constant, so keep the two numbers in step by
# hand.
MAX_LOG_SIZE=4294967296
# How many DECOMPRESSED bytes of log content the antivirus examines per
# submission, in bytes (default 32 GiB), shared across validator.log.gz
# and sentry.log.gz under one budget. Logs are scanned in 1 GiB windows,
# so this is not a memory cost — it is a time cost, about four minutes at
# the ~142 MB/s clamd manages here.
#
# Exceeding it does not reject the submission: the archive is stored and the
# admin dashboard shows a "scan partiel" badge saying how much was examined.
# Its real job is zip/tar bomb defence.
#
# Source of truth: clamav.DefaultScanBudget. This file can't import a Go
# constant, so keep the two numbers in step by hand.
AV_SCAN_BUDGET=34359738368