Repository navigation
feat: reputation score query, multi-sig proposal expiry, and appeal/evidence deadlines - #1023
Merged
DevMuhdishaq merged 3 commits intoOct 18, 2026
Conversation
…dence deadlines reputation: add a maintained per-subject aggregate with get_score/get_aggregate so a client no longer recomputes reputation itself; document search::set_rating as a private ranking hint (Dfunder#974). reputation: bound the appeal window (set/get_appeal_window, get_appeal_deadline, ledgers_to_appeal) and the moderation queue (MAX_QUEUE_SIZE, MAX_REPORTS_PER_REVIEW) (Dfunder#976). multi_sig: add expire_proposal plus is_expired/ledgers_until_expiry so an elapsed proposal can be closed explicitly (Dfunder#975). dispute_arbiter: add an evidence deadline sourced from the new shared::dispute constants, submit_evidence/get_evidence, rename auto_resolve_ledger to deadline_ledger, and set_dispute_ttl_ledgers/get_dispute_ttl_ledgers (Dfunder#977). Bumps storage-schema 1->2 for reputation, multi_sig and dispute_arbiter; updates docs/STORAGE.md and CHANGELOG.md. Closes Dfunder#974 Closes Dfunder#975 Closes Dfunder#976 Closes Dfunder#977
|
@memplethee-lab 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! 🚀 |
7 tasks
Contributor
|
Merged after resolving one merge conflict against Conflict resolution (merge commit 49555d3):
Everything else in this PR (storage/dispute/reputation/multi-sig updates) applied cleanly. Thanks! |
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
Implements four contract-side gaps — a portable reputation score, explicit multi-sig proposal expiry, a bounded appeal window, and a single dispute evidence deadline shared with
escrow.Closes #974
Closes #975
Closes #976
Closes #977
Changes
#974 — Reputation score query
reputation::get_score(subject) -> ReputationScoreandget_aggregate(subject) -> ReviewAggregate.submit_review,moderate_review,file_appeal, andresolve_appeal, so a read is O(1) and never rescans the review set. Stored atDataKey::Aggregate(Address).reputation/src/score.rs(host-free, unit-tested):average_rating_x10andweighted_score_x10(neutral-prior blend so one review does not read as perfect). All components are exposed for audit.search::set_ratingis documented as a private ranking hint;reputationis the authoritative source. Unifying them would meansearchreading this contract — raised here as a maintainer decision rather than guessed at.review_idis caller-chosen and an index adds a second O(n) write path.#976 — Appeal window + moderation-queue bound
set_appeal_window/get_appeal_window(admin),get_appeal_deadline,ledgers_to_appeal.file_appealrejects withAppealWindowClosedonce the chain passes the deadline (the deadline ledger itself is still inside the window);AppealRecordrecordswindow_deadline_ledger.report_reviewnow rejects withQueueFullatMAX_QUEUE_SIZE(256) andReportLimitReachedatMAX_REPORTS_PER_REVIEW(16) before writing.#975 — Multi-sig proposal expiry
expire_proposal(proposal_id, executor)closes an elapsedPendingproposal asExpired:NotExpiredbefore the deadline,ProposalClosedonce closed. Approvals are retained for audit but can no longer finalise.is_expiredandledgers_until_expirysurface the expired state without waiting for afinalizefailure.#977 — Dispute evidence deadline
dispute_arbitergainssubmit_evidence/get_evidence/get_evidence_count,get_dispute_deadline,ledgers_until_deadline, andset_dispute_ttl_ledgers/get_dispute_ttl_ledgers.DisputeRecord.auto_resolve_ledgeris renameddeadline_ledgerand is now the single timer: evidence is refused after it andauto_resolvebecomes callable at it.escrowanddispute_arbitersource their default and ceiling from the newshared::disputeconstants, so the two contracts cannot disagree about a dispute's time bound. Tests in each crate assert they read the same shared source.Storage / compatibility
storage-schemabumped 1 -> 2 forreputation,multi_sig, anddispute_arbiter(new keys and a renamed field).reputation13-16,multi_sig15,dispute_arbiter11-13. Each is pinned by a test.docs/STORAGE.mdupdated for all three crates;CHANGELOG.mdupdated.Testing
Unit tests added for every behaviour above. Not executed here (per instructions); the maintainer runs
cargo test.