Skip to content

fix: policy re-check, oracle key length, query cache, sequence serialization (#725-#728) - #769

Merged
nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
brightcli-stack:fix/issues-725-728-bugs
Oct 18, 2026
Merged

nonsobethel0-dev merged 2 commits into
Parashield-Protocol:mainfrom
brightcli-stack:fix/issues-725-728-bugs

Conversation

@brightcli-stack

Copy link
Copy Markdown
Contributor

Fixes #725
Fixes #726
Fixes #727
Fixes #728

What changed

How to test

  • npm test passes
  • Claim on cancelled policy rejected
  • Oversized oracle key rejected
  • Concurrent invokeContract serialized

…e, sequence serialization (Parashield-Protocol#725-Parashield-Protocol#728)

- Parashield-Protocol#725: Re-check policy status immediately before claim creation and
  contract invocation. Reject cancelled and expired policies at claim
  time, not just at request start.
- Parashield-Protocol#726: Add MAX_ORACLE_KEY_LENGTH (128 chars) to oracle key validation.
  Reject oversized keys before regex matching to prevent DB bloat and DoS.
- Parashield-Protocol#727: Add 30s TTL cache for getLatestReading() to avoid repeated
  identical queries. Prisma already uses prepared statements; the cache
  eliminates redundant round-trips for hot keys.
- Parashield-Protocol#728: Add per-account promise-chain mutex to serialize concurrent
  transaction submissions, preventing sequence number conflicts
  (TRANSACTION_BAD_SEQ). InvokeContract now acquires the lock before
  building and submitting transactions.
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@brightcli-stack 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

@nonsobethel0-dev
nonsobethel0-dev merged commit 40a8cdf into Parashield-Protocol:main Oct 18, 2026
0 of 3 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