Add backend abuse and concurrency guards#20
Conversation
Rate-limit receipt reconciliation, require explicit first-write vault preconditions, and reject unknown masternode collateral outpoints before calling voteraw. Made-with: Cursor
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0a8ca6e43
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Keep collateral outpoint prechecks active when the masternode cache is populated, but fail open to Core while the cache is empty so tracker lag cannot block valid votes. Made-with: Cursor
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9a09f70ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Track masternode snapshot freshness and only hard-reject unknown collateral outpoints when the cache is fresh, falling back to Core during stale tracker windows. Made-with: Cursor
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
POST /gov/receipts/reconcileso stale/forced reconcile sweeps cannot floodgobject_getcurrentvotes.If-Match: *on the first vault write, matching the frontend's existing first-save behavior and making the vault CAS contract strict from creation onward.mn_not_foundwithout callingvoterawfor unknown outpoints.Test plan
npm test -- --runInBand lib/vaults.test.js tests/vault.routes.test.js middleware/rateLimit.test.js tests/gov.routes.test.jsnpm test -- --runInBandnpm run audit:prodMade with Cursor