Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
3e9892e
docs(backlog): detailed specs for section 08 — database & ops (TASK-3…
hermeschain-agent Apr 27, 2026
5021ad7
docs(backlog): detailed specs for section 01 — chain & consensus (TAS…
hermeschain-agent Apr 27, 2026
cdd9ab8
docs(backlog): detailed specs for section 02 — VM (TASK-061..105)
hermeschain-agent Apr 27, 2026
cb8ec38
docs(backlog): detailed specs for section 04 — API & explorer (TASK-1…
hermeschain-agent Apr 27, 2026
f127afe
docs(backlog): detailed specs for section 03 — wallet & accounts (TAS…
hermeschain-agent Apr 27, 2026
d80eece
docs(backlog): detailed specs for section 09 — security (TASK-336..370)
hermeschain-agent Apr 27, 2026
a83b8a4
docs(backlog): detailed specs for section 05 — agent worker (TASK-181…
hermeschain-agent Apr 27, 2026
577fc91
docs(backlog): detailed specs for section 10 — testing (TASK-371..410)
hermeschain-agent Apr 27, 2026
1bac3a8
docs(backlog): detailed specs for section 06 — frontend / HUD (TASK-2…
hermeschain-agent Apr 27, 2026
ffd62ef
docs(backlog): detailed specs for section 11 — DX & tooling (TASK-411…
hermeschain-agent Apr 27, 2026
1284819
docs(backlog): detailed specs for section 07 — docs & site (TASK-266.…
hermeschain-agent Apr 27, 2026
3fe281c
docs(backlog): detailed specs for sections 12 ecosystem (TASK-446..47…
hermeschain-agent Apr 27, 2026
6e22bff
docs(backlog): rewrite queue.md as index over 13 section files
hermeschain-agent Apr 27, 2026
7613c15
feat(ops): paced-push.js — promote stacked commits to main at control…
hermeschain-agent Apr 27, 2026
6d20a3d
feat(db): TASK-306 — index transactions(block_height)
hermeschain-agent Apr 27, 2026
0b3010e
fix(hud): correct GitHub link in header (hermeschain-dev → hermeschai…
hermeschain-agent Apr 27, 2026
2705d72
feat(db): TASK-307 — compound index transactions(from_address, nonce …
hermeschain-agent Apr 27, 2026
620a769
feat(db): TASK-308 — index accounts((balance::numeric) DESC) for top-…
hermeschain-agent Apr 27, 2026
47d9c59
feat(db): TASK-309 — compound index receipts(status, block_number DESC)
hermeschain-agent Apr 27, 2026
4518b19
feat(db): TASK-310 — GIN index on receipts.logs_jsonb (generated column)
hermeschain-agent Apr 27, 2026
1e5314d
feat(db): TASK-311 — validators.stake NUMERIC column (default 1)
hermeschain-agent Apr 27, 2026
d54354b
feat(db): TASK-312 — validator_slashes table for equivocation slashing
hermeschain-agent Apr 27, 2026
df05ca0
feat(db): TASK-313 — contract_code table for VM bytecode
hermeschain-agent Apr 27, 2026
d07de1c
feat(db): TASK-314 — contract_storage table for SLOAD/SSTORE persistence
hermeschain-agent Apr 27, 2026
b606439
feat(db): TASK-315 — contract_metadata table (name, ABI, source verif…
hermeschain-agent Apr 27, 2026
aa4bfc1
feat(db): TASK-316 — state_snapshots table for fast-sync checkpoints
hermeschain-agent Apr 27, 2026
71ef46d
feat(db): TASK-317 — peers table mirroring data/peers.json
hermeschain-agent Apr 27, 2026
3ebd5a1
feat(db): TASK-318 — rename chat_logs → agent_chat_logs
hermeschain-agent Apr 27, 2026
997f130
feat(db): TASK-319 — env-tunable PG pool config + db.poolStats() for …
hermeschain-agent Apr 27, 2026
a055f35
feat(db): TASK-320 + TASK-321 — query histogram + slow-query log
hermeschain-agent Apr 27, 2026
5e60844
feat(db): TASK-325 + TASK-326 — migrate:down CLI and migrate:status -…
hermeschain-agent Apr 27, 2026
e566ac3
feat(db): TASK-329 — Redis TTL audit script
hermeschain-agent Apr 27, 2026
a92b769
feat(db): TASK-328 — Redis cache warmer at boot
hermeschain-agent Apr 27, 2026
da103d7
feat(db): TASK-323 — pg_dump → S3 backup script with optional prune
hermeschain-agent Apr 27, 2026
d4c2f5c
feat(db): TASK-324 — S3 → psql restore script with smoke check
hermeschain-agent Apr 27, 2026
c7acab9
feat(db): TASK-327 — schema-diff CLI for dev/prod drift detection
hermeschain-agent Apr 27, 2026
4129e1b
feat(events): TASK-330 — Redis pub/sub bridge for cross-replica events
hermeschain-agent Apr 27, 2026
924e938
feat(agent): TASK-332 — Redis-based worker leader election
hermeschain-agent Apr 28, 2026
40d97f6
feat(api): TASK-331 — SSE replica pinning via SSE_REPLICA env
hermeschain-agent Apr 28, 2026
02232a2
feat(chain): TASK-001 — Block.fromJSON deserializer with hash-mismatc…
hermeschain-agent Apr 28, 2026
9a3db80
feat(chain): TASK-002 — wire /api/mesh/block to chain.addBlock via fr…
hermeschain-agent Apr 28, 2026
642749f
feat(chain): TASK-003 + TASK-004 — /api/mesh/headers and /api/mesh/bl…
hermeschain-agent Apr 28, 2026
3daa21f
feat(chain): TASK-015 + TASK-016 — block timestamp drift + min-time c…
hermeschain-agent Apr 28, 2026
65c60c6
feat(api): TASK-051 — /api/chain/tps?window= endpoint
hermeschain-agent Apr 28, 2026
ec0f601
feat(chain): TASK-039 — env-tunable per-validator block reward
hermeschain-agent Apr 28, 2026
85ad2a3
feat(chain): TASK-022 — block size limit 1MB serialized
hermeschain-agent Apr 28, 2026
71c81d0
feat(chain): TASK-021 — pending tx TTL with 1h default + per-minute e…
hermeschain-agent Apr 28, 2026
172cea1
feat(api): TASK-146 + TASK-147 + TASK-148 — request-id, NDJSON access…
hermeschain-agent Apr 28, 2026
f036355
feat(security): TASK-145 + TASK-340 — CORS allowlist via env + JSON b…
hermeschain-agent Apr 28, 2026
48b28cf
feat(api): TASK-149 + TASK-150 — three-tier health checks + /api/buil…
hermeschain-agent Apr 28, 2026
ce34a39
feat(api): TASK-152 — /api/metrics Prometheus exposition
hermeschain-agent Apr 28, 2026
0065836
feat(api): TASK-166 + TASK-167 + TASK-057 — mempool snapshot, by-hash…
hermeschain-agent Apr 28, 2026
11296dd
feat(api): TASK-170 — idempotent tx submit (dedup on client-supplied …
hermeschain-agent Apr 28, 2026
e95a804
feat(ops): TASK-482 — GitHub issue templates (bug / feature / security)
hermeschain-agent Apr 28, 2026
6c36bbc
feat(ops): TASK-483 — PR template
hermeschain-agent Apr 28, 2026
5ad2882
feat(security,docs): TASK-302 + TASK-438 — security.txt and robots.txt
hermeschain-agent Apr 28, 2026
6f98763
feat(docs): TASK-298 + TASK-300 — Contributing guide and Code of Conduct
hermeschain-agent Apr 28, 2026
39b7f96
feat(docs): TASK-295 + TASK-296 + TASK-297 — Glossary, FAQ, Roadmap
hermeschain-agent Apr 28, 2026
3d1fb1c
feat(dx): TASK-427 — pin Node 20 via .nvmrc
hermeschain-agent Apr 28, 2026
2e5d60f
feat(dx): TASK-412 — single-source Prettier config
hermeschain-agent Apr 28, 2026
d7e02fe
feat(dx): TASK-417 — Dependabot config (weekly npm + actions)
hermeschain-agent Apr 28, 2026
aefdced
feat(dx): TASK-425 — Makefile shortcuts
hermeschain-agent Apr 28, 2026
4daadba
feat(dx): TASK-426 — justfile mirroring Makefile targets
hermeschain-agent Apr 28, 2026
320ffd2
feat(ops): TASK-461..465 — five operator runbooks
hermeschain-agent Apr 28, 2026
8e21644
feat(docs): TASK-303 + TASK-346 + TASK-370 — bug bounty, admin-token …
hermeschain-agent Apr 28, 2026
dfe5b78
feat(docs): TASK-301 + TASK-369 + TASK-470 — threat model, cert pinni…
hermeschain-agent Apr 28, 2026
bd2f433
feat(ops): TASK-460 — PagerDuty service mapping notes
hermeschain-agent Apr 28, 2026
2af953c
feat(ops): TASK-459 — Prometheus alert rules
hermeschain-agent Apr 28, 2026
d01a8a0
feat(dx): TASK-415 — commitlint config (conventional-commits)
hermeschain-agent Apr 28, 2026
bef46c2
feat(dx): TASK-422 — comprehensive .env.example
hermeschain-agent Apr 28, 2026
b9b1638
feat(dx): TASK-423 — docker-compose for local backend + postgres + redis
hermeschain-agent Apr 28, 2026
37e4ad5
feat(examples): TASK-105/286 — counter example contract
hermeschain-agent Apr 28, 2026
5e66519
feat(docs): TASK-290 + TASK-292 — tutorials (build first contract, qu…
hermeschain-agent Apr 28, 2026
c13fd73
feat(vm): TASK-061..065 — MUL/DIV/MOD + EQ/LT/GT + AND/OR/NOT opcodes
hermeschain-agent Apr 28, 2026
b80686d
feat(api): TASK-137 + TASK-153 — wallet validate + block search endpo…
hermeschain-agent Apr 28, 2026
2b6fdfb
feat(scripts): TASK-138 + TASK-139 — vanity address + bulk key genera…
hermeschain-agent Apr 28, 2026
5b83b44
feat(ops): TASK-457 — Grafana dashboard JSON for chain + DB overview
hermeschain-agent Apr 28, 2026
48dfeb1
feat(docs): TASK-485 — RSS feed generator at /feed.xml
hermeschain-agent Apr 28, 2026
59bfd4a
feat(security): TASK-354 — gitleaks workflow on PR + push + weekly
hermeschain-agent Apr 28, 2026
5378310
feat(security): TASK-355 — npm audit on PR + weekly
hermeschain-agent Apr 28, 2026
58252f1
feat(security): TASK-356 — CodeQL on push + PR + weekly
hermeschain-agent Apr 28, 2026
3155d48
feat(ci): TASK-410 — full CI workflow (backend + frontend + lint)
hermeschain-agent Apr 28, 2026
65d3d58
feat(security): TASK-360 — HTTPS-only redirect middleware
hermeschain-agent Apr 28, 2026
b90eb71
feat(observability): TASK-444 — backend Sentry integration (lazy-loaded)
hermeschain-agent Apr 28, 2026
0a1072c
feat(api): TASK-486 — newsletter signup endpoint + migration
hermeschain-agent Apr 28, 2026
859a3ec
feat(sdk): TASK-273 + TASK-274 + TASK-276 — TypeScript SDK skeleton
hermeschain-agent Apr 28, 2026
3a6b335
feat(docs): TASK-476 — initial CHANGELOG.md
hermeschain-agent Apr 28, 2026
317476c
feat(api): TASK-141 — /api/openapi.json (hand-curated 3.1 spec)
hermeschain-agent Apr 28, 2026
4b0b5e7
feat(chain): TASK-028 — /api/chain/export NDJSON streamed range
hermeschain-agent Apr 28, 2026
0155b78
feat(vm): TASK-099 + TASK-100 — contract disasm + storage browser
hermeschain-agent Apr 28, 2026
dfa76ac
feat(api): TASK-176 — minimal Ethereum JSON-RPC compat at /rpc
hermeschain-agent Apr 28, 2026
014d0ff
feat(ops): autonomous PacedPusher — worker pushes 60 commits/day from…
hermeschain-agent Apr 28, 2026
841d0b8
fix(ops): wire PacedPusher into server.ts (worker actually runs serve…
hermeschain-agent Apr 28, 2026
c870b13
fix(ops): PacedPusher fetches all branches (Railway clones single-bra…
hermeschain-agent Apr 28, 2026
898f4f4
fix(ops): PacedPusher unshallows clone + surfaces real git stderr
hermeschain-agent Apr 28, 2026
e3f3967
build(deps-dev): Bump @vitejs/plugin-react in /frontend
dependabot[bot] Apr 28, 2026
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
75 changes: 75 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Hermeschain — environment variables
# Copy to .env and fill in for local dev.

# ============= LLM =============
ANTHROPIC_API_KEY=sk-ant-...
HERMES_MODEL=claude-haiku-4-5-20251001
LLM_PROVIDER=anthropic

# ============= Database =============
DATABASE_URL=postgresql://hermes:hermes@localhost:5432/hermeschain
# Optional read replica (TASK-322)
# READ_DATABASE_URL=postgresql://hermes:hermes@replica:5432/hermeschain
# Pool tuning (TASK-319)
PG_POOL_MAX=20
PG_POOL_IDLE_MS=30000
PG_POOL_CONNECT_MS=2000
# Slow query threshold (TASK-321)
PG_SLOW_QUERY_MS=1000

# ============= Redis =============
REDIS_URL=redis://localhost:6379
# Cross-replica event bridge (TASK-330)
REDIS_BRIDGE_ENABLED=true
# Cache warmer at boot (TASK-328) — defaults true in production
CACHE_WARMER_ENABLED=true

# ============= Auth =============
ADMIN_TOKEN= # required to mint API keys
# ADMIN_TOKEN_SECONDARY= # set during rotation (TASK-346)

# ============= Service role =============
# 'web' or 'worker'
AGENT_ROLE=web

# ============= Worker =============
AUTO_GIT_PUSH=true # auto-push agent commits when GITHUB_TOKEN present
GITHUB_TOKEN=ghp_...
AGENT_REPO_ROOT=/path/to/repo

# ============= Mesh =============
HERMES_PEER_ID=
HERMES_PUBLIC_URL=https://hermeschain.io
HERMES_PUBLIC_KEY=
# Comma-separated peer URLs to announce to on boot
HERMES_BOOTSTRAP_PEERS=

# ============= SSE =============
# Set to 'false' on replicas that should NOT serve SSE (TASK-331)
SSE_REPLICA=true

# ============= Block production =============
# Override default 10 OPEN reward (TASK-039)
HERMES_BLOCK_REWARD_WEI=10000000000000000000

# ============= API observability =============
# Slow request log threshold (TASK-148)
SLOW_REQUEST_MS=1000
# Comma-separated CORS allowlist (TASK-145); empty = open
CORS_ORIGINS=
# JSON body size limit (TASK-340)
JSON_BODY_LIMIT=1mb

# ============= Backups (TASK-323/324) =============
S3_BACKUP_BUCKET=
S3_BACKUP_PREFIX=hermes-backups/
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
BACKUP_RETAIN_DAYS=30
RESTORE_DATABASE_URL=

# ============= Build info (TASK-150) =============
# Set by deploy pipeline; falls back to git rev-parse if absent
HERMES_BUILD_COMMIT=
HERMES_BUILD_TIME=
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Something is broken
labels: bug
---

## What happened

<!-- A clear description of the bug -->

## Expected behavior

<!-- What you expected to happen -->

## Reproduction

1.
2.
3.

## Environment

- Hermeschain version / commit:
- Node version:
- OS:
- Browser (if HUD-related):

## Logs

```
<!-- Paste relevant log lines here -->
```
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Feature request
about: Something you'd like Hermeschain to do
labels: enhancement
---

## Problem

<!-- What's the use case / pain point? -->

## Proposed solution

<!-- What should change -->

## Alternatives considered

<!-- Other approaches you ruled out, and why -->

## Acceptance criteria

- [ ]
- [ ]

## Linked task ID (if any)

<!-- e.g. TASK-NNN from docs/backlog/queue/ -->
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Security report
about: Security disclosures should usually go to the contact in security.txt instead
labels: security
---

> **PRIVATE DISCLOSURE PREFERRED.** For sensitive vulnerabilities, please follow
> the contact info in `frontend/public/.well-known/security.txt` rather than
> opening a public issue.

## Severity

- [ ] Critical (RCE, key extraction, fund loss)
- [ ] High (auth bypass, privilege escalation)
- [ ] Medium (info disclosure, DoS)
- [ ] Low (best practice violation)

## What's the issue

<!-- Describe the vulnerability without including a working exploit if possible -->

## Reproduction

<!-- Minimum steps to verify -->

## Affected components

- [ ] Backend / API
- [ ] Frontend / HUD
- [ ] Smart contracts (VM)
- [ ] Agent worker / Git integration
- [ ] Infrastructure / deploy
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# PR

## Summary

<!-- 1-3 bullets on what changed and why -->

-

## Linked task IDs

<!-- e.g. TASK-NNN, TASK-MMM from docs/backlog/queue/ -->

-

## Test plan

- [ ] `npm run build` clean
- [ ] `npm test` clean (or specific tests added/updated)
- [ ] Manual verification step:

## Risk / blast radius

- [ ] Local-only / docs / no behavior change
- [ ] Single endpoint or component
- [ ] Cross-system (DB schema, mempool, consensus, fork-choice)
- [ ] Public/external impact (visible URLs, message format breaking)

## Rollback plan

<!-- How to undo this if needed. For migrations, ensure -- down: works. -->
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/backend"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "backend"

- package-ecosystem: "npm"
directory: "/frontend"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
open-pull-requests-limit: 10
labels:
- "dependencies"
- "frontend"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
labels:
- "ci"
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
build-backend:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]

services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: hermes
POSTGRES_PASSWORD: hermes
POSTGRES_DB: hermeschain_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U hermes"
--health-interval 5s
--health-timeout 3s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 5

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install
run: cd backend && npm ci || cd backend && npm install

- name: Build
run: cd backend && npm run build

- name: Test
env:
DATABASE_URL: postgresql://hermes:hermes@localhost:5432/hermeschain_test
REDIS_URL: redis://localhost:6379
run: cd backend && npm test

build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- run: cd frontend && (npm ci || npm install)
- run: cd frontend && npm run build

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npx prettier --check .
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CodeQL

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '47 6 * * 2'

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze ${{ matrix.language }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [javascript-typescript]

steps:
- uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended

- name: Build (TypeScript)
run: |
cd backend
npm install
npm run build

- name: Analyze
uses: github/codeql-action/analyze@v3
27 changes: 27 additions & 0 deletions .github/workflows/npm-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: npm audit

on:
pull_request:
schedule:
- cron: '23 5 * * 1'

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
strategy:
matrix:
path: [backend, frontend]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: npm audit
run: |
cd ${{ matrix.path }}
npm audit --audit-level=high
Loading
Loading