fix(coalition): add quorum info to get_coalition_proposals (M5)#6305
Open
waefrebeorn wants to merge 35 commits into
Open
fix(coalition): add quorum info to get_coalition_proposals (M5)#6305waefrebeorn wants to merge 35 commits into
waefrebeorn wants to merge 35 commits into
Conversation
Adds max_length parameter to _clean_string_field and caps all user input fields in POST route handlers: - /lock: sender_wallet(128), target_wallet(128), tx_hash(128), receipt_signature(256) - /confirm: proof_ref(256), notes(1024) - /release: release_tx(128), notes(1024) Prevents storage of arbitrarily large strings in bridge_ledger DB.
…s + Row M error handling + Row T test gaps + Row E infrastructure
M4 - MED: propose() no fee validation - Added PROPOSAL_FEE_RTC = 10 constant - Before creating proposal, checks miner balance in balances table - Deducts 10 RTC from proposer on successful creation - Graceful fallback if balances table doesn't exist - Returns 402 Payment Required if insufficient balance Prevents governance spam by requiring a small stake.
M5 - MED: coalition.py: no quorum check on vote tally The get_coalition_proposals endpoint returned raw votes_for/votes_against values without computing quorum status. Users querying proposals had no way to know if a proposal had reached quorum. Now enriches active proposals with: - member_count: active members in the coalition - voter_count: distinct miners who voted - quorum_required: votes needed for quorum (50% of members) - quorum_met: boolean if quorum reached - total_votes: sum of for + against weight Pattern matches the cast_vote endpoint's inline quorum computation.
jaxint
approved these changes
May 25, 2026
Contributor
jaxint
left a comment
There was a problem hiding this comment.
LGTM! Great work on this PR. 🚀
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
M5 - MED: coalition.py: no quorum check on vote tally
Enriches active proposals in list endpoint with quorum fields: member_count, voter_count, quorum_required, quorum_met, total_votes.
Matches quorum computation pattern already in cast_vote.
RTC Wallet for bounty: `RTC17c0d21f04f6f65c1a85c0aeb5d4a305d57531096"