Implement Proposal Timelock: Queued State, Veto, and Execution Countdown (#586)#897
Merged
Merged
Conversation
…elete-proposal-endpoint
…ao-proposals-backend feat: wire DAO proposals pages to backend API
…oposal-endpoint
…uorum/approval - Add ProposalExecuted and ProposalCancelled events - Add executed/cancelled fields to Proposal struct - Add VotingClosed and VotingNotClosed errors - Add quorum_threshold and approval_bps storage with getters/setters - Implement execute_proposal with deadline and state checks - Implement cancel_proposal for admin before deadline - Update vote to reject cancelled/executed proposals - Update finalize_proposal to use configurable thresholds - Add internal disburse_internal used by execute_proposal - Add comprehensive tests for execute/cancel paths - Update existing tests for new initialize signature and errors Closes bakeronchain#416 bakeronchain#417 bakeronchain#420
- Add GOVMinted, GOVTransferred, GOVApproved contract events - Emit events in mint, transfer, transfer_from, approve - Fix approve moved-value bug by cloning owner/spender for storage key - Add derive traits to event structs for observability Closes bakeronchain#419
- milestone_escrow: mint enough tokens for fuzzed escrow amounts - scholarship_treasury: mint enough tokens for fuzzed deposits and constrain amount to avoid overflow Closes #0
…e-debug-507 fix: remove production debug statements (bakeronchain#507)
…urriculum-506 fix: replace placeholder lesson curriculum (bakeronchain#506)
…-cancel-quorum-events Feat/treasury execute cancel quorum events
…ctive components - Add skip-to-content link visible on focus for keyboard-only users - Add global focus-visible CSS for consistent visible focus rings - WalletInfoModal: Escape key closes modal, focus trapped inside, focus restored on close - NotificationBell: Escape key closes panel, focus trapped, focus returns to bell button - GlobalSearch: Escape closes dropdown, ArrowUp/ArrowDown navigates results, Enter selects, combobox ARIA roles - NavBar: Escape key closes mobile slide-out menu - ThreadList: convert non-semantic div[onClick] to accessible <button> elements
…visual progress bar - New useLessonProgress hook: persists read lessons to localStorage keyed by course slug, syncs best-effort to /api/me/lesson-progress, retries on window 'online' event for offline-first UX - LessonContent: IntersectionObserver sentinel at the bottom of content fires onScrolledToBottom once per lesson load; resets on lesson change - LessonView: two-layer progress bar at the top (soft cyan = locally read, emerald = server-confirmed); wires onScrolledToBottom to markLessonRead; passes readLessonIds down to both sidebar instances - LessonSidebar: accepts readLessonIds prop; renders outlined soft checkmark for locally-read-but-not-completed lessons (vs. filled checkmark for server-confirmed); two-layer progress bar matches LessonView styling
Feat/fix issue#610
feat: E2E test — comment system (post, edit, vote, delete
…-deploy-workflow chore: add staging deployment workflow triggered on main
…g-742 perf: implement React code splitting for all route-level components (bakeronchain#742)
…merge-conflict Feat/resolve merge conflict
…-review-system Feat/add peer review system
…d-navigation feat(bakeronchain#727): add keyboard navigation support to all interactive compon…
…progress-tracker feat(bakeronchain#657): add interactive lesson progress tracker with visual progr…
…int-service-details fix: expand health endpoint with db redis and horizon diagnostics
…rol-audit security: audit contract access control and add treasury admin auth negative tests (bakeronchain#724)
…or-rate-limiting-middleware feat: implement comprehensive rate limiting tests
…or-CORS-middleware test: implement CORS configuration tests and refactor config
…ile-API feat: implement rich user profiles API
feat: implement pagination for all list endpoints (bakeronchain#614)
…rformance-analytics fix: add validator performance analytics API and admin dashboard metrics
…shold-positive fix(scholarship_treasury): require positive quorum threshold to prevent low-participation execution
|
@DSOTec 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! 🚀 |
Contributor
|
hi @DSOTec please can you pull from upstream, I made alot of changes from the last wave because it was too heavy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a configurable timelock delay to the governance proposal lifecycle. After a proposal passes voting, it enters a
Queuedstate for a configurable period (default 48 hours) before it can be executed. It also introduces a veto mechanism and updates the frontend to display the queued status with a countdown timer.Type of Change
Solution Implemented
Contract (
scholarship_treasury):QueuedandExecutedvariants to ProposalStatusDEFAULT_TIMELOCK_LEDGERSconstant (48 hours)queued_at,executed, andveto_votesQueuedand records the timelockQueuedstate and timelock expiryBackend:
006_add_timelock.sqlwithqueued_atandexecution_ready_atcolumnsqueued→"queued",approved→"executed""queued"Frontend:
"Queued"and"Executed"toProposal.statusandVote.statususeProposalsto mapqueued→"In Timelock"and surfacequeuedAt/executionReadyAtQueuedfilter, status badge, and execution countdown timerqueuedstatus colors (warning/brand-amber)E2E:
"queued"to MockProposal status union in mock-dao-api.tsTesting
npx tsc --noEmitpasses cleanlynpx prettier --checkpasses on all modified filesvitest run src/hooks/useProposals.test.tsx src/hooks/useGovernance.test.tsxpassesPotential Conflicts / Edge Cases
status = 'approved'in the database will be surfaced as"executed"by deriveProposalState, preserving backwards compatibilityApprovedenum variant toQueuedorExecutedbased on theexecutedflagany-type lint errors in server/src/routes/governance.routes.ts are unrelated to this PR and existed before these changesRelated Issues