Skip to content

Feature/ops security docs improvements - #451

Merged
maugauwi-hash merged 4 commits into
ethos-protocol:mainfrom
dami-005:feature/ops-security-docs-improvements
Aug 31, 2026
Merged

Feature/ops security docs improvements#451
maugauwi-hash merged 4 commits into
ethos-protocol:mainfrom
dami-005:feature/ops-security-docs-improvements

Conversation

@dami-005

Copy link
Copy Markdown
Contributor

Closes #416
Closes #417
Closes #418
Closes #419

  1. Idempotent deploy scripts — deploy_utils.sh marker tracking, --dry-run, gated --force.
  2. Monitoring — Prometheus config, alert rules, two Grafana dashboards, new metrics, docs/monitoring-guide.md + docs/runbook-alerts.md.
  3. Upgrade safety — UpgradeManifest-based validate_upgrade_compatibility/upgrade_with_manifest in ttl_vault, tests, docs/upgrade-safety.md.
  4. use-cases.md drift fix — replaced the non-existent /api/webhooks example with the real notifications endpoint, added a CI-wired validation script.

Add deployed-state marker tracking (.deploy-state/<network>.state) to
scripts/deploy_utils.sh so deploy_mainnet.sh and deploy_testnet.sh can
be safely re-run after a partial failure: steps whose target state
already matches (contract deployed, admin initialized) are skipped
instead of re-executed. Adds a documented --dry-run mode that prints
every action without mutating environments.toml or calling the
stellar CLI, and a --force flag for intentional redeployment gated by
an explicit typed confirmation phrase rather than a generic yes/no.
Wire metrics.rs and custom_metrics.rs to Prometheus scrape config, two
Grafana dashboards (vault activity; credential lifecycle + error
trends), and alerting rules covering API downtime, high error rate,
high latency, contract pause state, and in-progress contract upgrades.
Adds ethos_protocol_contract_upgrade_events_total and
ethos_protocol_credential_lifecycle_errors_total counters so the new
alerts have real series to evaluate against. Adds
docs/monitoring-guide.md and docs/runbook-alerts.md documenting setup
and per-alert operator response.
upgrade(env, new_wasm_hash) previously only checked for a non-zero
hash before deploying arbitrary new WASM. Add an UpgradeManifest
(exported function count, error code count, storage schema hash)
recorded by the admin via set_upgrade_manifest, and
validate_upgrade_compatibility to reject upgrades that shrink the
interface, remove/renumber error codes, or change the storage schema.
upgrade_with_manifest wires validation + upgrade + baseline rollover
into one call. Adds upgrade_validation_tests.rs and
docs/upgrade-safety.md documenting the admin workflow and limitations.
docs/use-cases.md referenced a non-existent /api/webhooks endpoint;
docs/openapi.yaml has no such path. Replace it with the actual
notification registration flow (POST /api/notifications/register, PUT
/api/notifications/preferences) using field names taken directly from
the OpenAPI RegisterTokenRequest schema. Add
scripts/validate_use_case_examples.py, which extracts curl examples
from use-cases.md and checks their path/payload against
docs/openapi.yaml, wire it into .github/workflows/ci.yml, and document
the validation process in use-cases.md for future doc updates.
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@dami-005 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@maugauwi-hash
maugauwi-hash merged commit e90bca5 into ethos-protocol:main Aug 31, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants