Skip to content

feat: safe batch node import and verified voting context - #38

Merged
sidhujag merged 1 commit into
mainfrom
codex/sentry-batch-import-preserve
Oct 17, 2026
Merged

sidhujag merged 1 commit into
mainfrom
codex/sentry-batch-import-preserve

Conversation

@sidhujag

Copy link
Copy Markdown
Member

Summary

  • Add opt-in preserveExisting: true to public-node watch imports. SQLite retains an existing label atomically for the same user/network/ProTx identity, including concurrent imports; ordinary label updates retain their current behavior.
  • Add a bounded, read-only /api/sentry/v1/voting-context for Pali governance approvals. The service checks its independently pinned chain, reads the actual proposal from Core, and returns only verified proposal metadata and registered collateral/voting identities.
  • Preserve the existing browser-vault voting and /gov/vote relay. No secrets, arbitrary RPC methods, signing or broadcasting are accepted by the new read endpoint. Active PQ voting is explicitly gated.

Boundaries

  • Maximum 20 unique nonzero node hashes, 4 concurrent node reads, 10-second total deadline, 64-KiB upstream response limit.
  • Separate 12-request/minute IP quota, shared by both supported proxy prefixes and using the existing trusted-proxy/IP handling.
  • Before/after chain-head checks; exact proposal hash, Core validity flags and payload bounds; invalid or unconfirmed node identities reject the request.
  • Proposal names come from the on-chain payload. Optional non-web or credentialed URLs are omitted, without rejecting an otherwise valid proposal.
  • Every import still independently checks on-chain registration and retains existing session, exact-Origin and CSRF requirements.

Validation

  • Full Jest suite: 55 suites, 1,112 tests passed.
  • Sentry codec integration: 8 tests passed.
  • Actual disconnected Core regtest: the new context resolved a real submitted proposal and registered voting identity; the SDK-signed compressed and uncompressed funding votes were accepted by voteraw, while a changed outcome was rejected.
  • Tests include concurrent duplicate imports, user/network isolation, default label updates, malformed/oversized/zero identities, wrong genesis/PQ era, hostile or unknown proposals, node substitution, unconfirmed registration, changed chain head, bounded concurrency/deadline, and shared-prefix quotas/authentication.
  • git diff --check passed. No dependency, migration or deployment configuration changes.

The frontend batch/Pali-voting changes require this additive API to be deployed first. Public-network funded lifecycle testing is separate from these read/import checks.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T19:27:00.719692Z a727ba8 Manual request
🔒 Security Review ⚠️ Failed 2026-10-17T19:23:51.293063Z a727ba8 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: a727ba8dd4

ℹ️ 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".

@sidhujag
sidhujag merged commit 0693fc4 into main Oct 17, 2026
6 of 8 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

Development

Successfully merging this pull request may close these issues.

1 participant