Skip to content

feat: NMv3: submission of stress testing result into nym-api#6709

Merged
jstuczyn merged 12 commits intofeat/mix-stress-testingfrom
feat/nmv3-nym-api-submission
Apr 27, 2026
Merged

feat: NMv3: submission of stress testing result into nym-api#6709
jstuczyn merged 12 commits intofeat/mix-stress-testingfrom
feat/nmv3-nym-api-submission

Conversation

@jstuczyn
Copy link
Copy Markdown
Contributor

@jstuczyn jstuczyn commented Apr 24, 2026

NYM-749

Summary

Allow the network monitor orchestrator to submit stress-testing results to the nym-api over a signed, authenticated channel.

  • Contract: orchestrators can now announce an ed25519 identity key on-chain; shape-only validation (base58 + 32 bytes), no curve-point check by design.
  • Orchestrator startup: verifies on-chain authorisation (with retry/backoff), reconciles its announced identity key against the local one, and self-checks that the nym-api recognises it before
    spawning background tasks.
  • Result submission: new ResultSubmitter task periodically drains freshly-completed testrun rows, wraps them in a signed StressTestBatchSubmission, and POSTs them to nym-api. Watermark is
    advanced only on POST success (at-least-once delivery — losing measurements is worse than occasional duplicates).
  • nym-api:
    • POST /v3/nym-nodes/stress-testing/batch-submit — staleness check, authorised-set membership, monotonic-timestamp replay protection, signature verify, then per-entry insert.
    • GET /v3/nym-nodes/stress-testing/known-monitors/{identity_key} — lets orchestrators self-check authorisation after announcing their key.
    • Authorised set is TTL-cached with single-flight refresh to avoid thundering the chain.
  • Dedup: each result carries its orchestrator-local testrun_id, stored alongside the submitter's pubkey as a composite primary key. Retried submissions drop duplicates via INSERT OR IGNORE.

Results are persisted but not yet consumed — downstream usage lands in a follow-up PR.


This change is Reviewable

@jstuczyn jstuczyn marked this pull request as draft April 24, 2026 09:35
@jstuczyn jstuczyn force-pushed the feat/nmv3-nym-api-submission branch from 1d4db7d to f99fc63 Compare April 24, 2026 09:38
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nym-explorer-v2 Ready Ready Preview, Comment Apr 27, 2026 9:27am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs-nextra Ignored Ignored Preview Apr 27, 2026 9:27am
nym-node-status Ignored Ignored Preview Apr 27, 2026 9:27am

Request Review

@jstuczyn jstuczyn requested a review from simonwicky April 24, 2026 09:58
Base automatically changed from feat/nmv3-orchestrator-prometheus to feat/mix-stress-testing April 24, 2026 10:00
Comment thread nym-api/migrations/20260424120000_stress_testing.sql
Comment thread nym-network-monitor-v3/nym-network-monitor-orchestrator/src/orchestrator/mod.rs Outdated
Comment thread nym-network-monitor-v3/nym-network-monitor-orchestrator/src/storage/models.rs Outdated
@jstuczyn jstuczyn merged commit 0e09d74 into feat/mix-stress-testing Apr 27, 2026
13 of 16 checks passed
@jstuczyn jstuczyn deleted the feat/nmv3-nym-api-submission branch April 27, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants