Harden dual-chain accounting, signed voting and deployment boundaries #53

Merged
PlasticDigits merged 19 commits from fix/voting-36-43 into main 2026-10-14 06:34:37 +00:00
Owner

Dual-chain snapshot voting could replay balances, freeze stale power, open unreviewed revisions, and expose unsafe browser/API boundaries. This change validates complete chain observations and coherent registration boundaries, makes accounting and signed actions transactional, certifies freeze readiness, supervises independent workers, and secures SQL, rendering, CORS and protocol contracts.

It adds forward migrations preserving frozen/history records, immutable independently verifiable v2 receipts, generated OpenAPI/TypeScript contracts, stored-weight UI controls, and explicit operational recovery. Existing hash-only receipts and uncertified legacy polls retain documented verification limits; legacy mutation signatures require v2 re-signing. Governance remains advisory and separate per address/chain; Legal and the existing wallet ports remain in place.

Validation on Rust1.88.0: 71 Rust unit/supervisor tests, 79 integration tests, 225 OpenAPI response validations, 146 frontend tests, production build, 11 Chromium regressions, real second-origin signed amend/retry, 4 optimized timestamp regressions, nginx smoke checks and Gitleaks passed. Followup application coverage passes8 tests, including configured threshold, forbidden headers, and16 genuine signed development-domain/version rejections. Verification uses dedicated marked disposable PostgreSQL with no production URL fallback.

Implementation, invariants, commands and evidence limits crosslinks the ops and third-party agent runbooks. Coolify/live verification follows merge; issues36–43 are not automatically closed. Final issue comments will identify completed criteria and remaining exhaustive fault-matrix checks.

Related: #36 #37 #38 #39 #40 #41 #42 #43.

Dual-chain snapshot voting could replay balances, freeze stale power, open unreviewed revisions, and expose unsafe browser/API boundaries. This change validates complete chain observations and coherent registration boundaries, makes accounting and signed actions transactional, certifies freeze readiness, supervises independent workers, and secures SQL, rendering, CORS and protocol contracts. It adds forward migrations preserving frozen/history records, immutable independently verifiable v2 receipts, generated OpenAPI/TypeScript contracts, stored-weight UI controls, and explicit operational recovery. Existing hash-only receipts and uncertified legacy polls retain documented verification limits; legacy mutation signatures require v2 re-signing. Governance remains advisory and separate per address/chain; Legal and the existing wallet ports remain in place. Validation on Rust1.88.0: 71 Rust unit/supervisor tests, 79 integration tests, 225 OpenAPI response validations, 146 frontend tests, production build, 11 Chromium regressions, real second-origin signed amend/retry, 4 optimized timestamp regressions, nginx smoke checks and Gitleaks passed. Followup application coverage passes8 tests, including configured threshold, forbidden headers, and16 genuine signed development-domain/version rejections. Verification uses dedicated marked disposable PostgreSQL with no production URL fallback. [Implementation, invariants, commands and evidence limits](docs/verification/2026-10-14-issues-36-43.md) crosslinks the ops and third-party agent runbooks. Coolify/live verification follows merge; issues36–43 are not automatically closed. Final issue comments will identify completed criteria and remaining exhaustive fault-matrix checks. Related: #36 #37 #38 #39 #40 #41 #42 #43.
Require versioned nonce actions, complete revision approval, atomic signature and state persistence, safe retries and race-safe quotas. Secure balance definers and explicit API grants, validate effective production privileges, and guard destructive test databases before migrations. Document receipt verification and legacy evidence limits.
Cover PUT with exact CORS, trusted proxy peers, bounded mutation quotas and safe correlated errors. Keep display sanitation separate from server canonical signing and bind frontend actions to v2 revisions. Generate typed API contracts and document protocol invariants for issues 41 and 43.

Verify middleware, shared vectors, browser amendment, production build boundaries and frontend workflows.
Enforce shared authenticated action quotas and final acceptance timestamps. Bind receipt sections, rendered content and identifiers to signed history. Audit effective column privileges and writer-owned registration metadata, expose finalized admission and stored poll weights, and exercise crash recovery through the production application stack.
Keep unauthenticated mutation limits scoped to peer IP and reserve wallet quotas for the authenticated database action service. Refuse forwarded identity without an actual peer and retain safe correlated 429 responses.

Expose typed future registration admission and immutable per-poll weight contracts. Explain confirmation and invalid snapshot states, block signing without positive stored power, refresh eligibility and discard stale account responses. Capture canonical metadata responses for schema validation.
Require a fresh successful intent pass before opening, reject role escape and definer ownership, and preserve complete proposal identity and opened content. Match client canonical field ordering, reject blank titles and foreign Terra prefixes, and verify duplicate ballot conflicts and restricted registration operations.
Add exact Terra and BSC register, amend and open JSON vectors with Unicode titles, revision ordering, EIP-191 digest and ADR-36 sign-document checks.

Load immutable recorded votes before signing and recover response loss through the same nonce and persisted state. Keep wallet and proposal contexts separate. Validate title UTF8 limits and allow valid Unicode summaries without a UTF16 textarea cap.
Validate physical Terra executions and coherent native balance observations before atomic source accounting. Preserve canonical continuity, registration boundaries and immutable frozen power across replay, concurrent writers and explicit recovery epochs.

Supervise independent chain workers and bounded fair intent processing with fresh readiness evidence. Add deterministic HTTP, Postgres, fork, concurrency, migration and process restart regressions, plus invariant and maintenance documentation.
ops: use deployed Coolify environment field names
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
c59c9fe188
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/voting!53
No description provided.